From 910541b2b933f4a437ea83ec3ec19242a41a3630 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Sun, 9 Jun 2019 23:11:58 +0200 Subject: Supporting commits for the switch to pipewire MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We move all components around meta-audio-soundmanager-framework to that layer (still kept on request). We deprecate the meta-audio-4a-framework layer for Happy Halibut. Bug-AGL: SPEC-2473 Change-Id: I2a7c9d815801a3f8ea80943165ea6fd1422533ea Signed-off-by: Jan-Simon Möller --- ATTIC/agl-audio-4a-framework/50_bblayers.conf.inc | 5 + ATTIC/agl-audio-4a-framework/50_local.conf.inc | 2 + ATTIC/meta-audio-4a-framework/README.md | 3 + .../classes/afb-system-cmake.bbclass | 6 + .../classes/afb-system.bbclass | 1 + .../conf/include/agl-audio-4a-framework.inc | 24 + ATTIC/meta-audio-4a-framework/conf/layer.conf | 23 + .../recipes-multimedia/4a-mixer/4a-mixer_git.bb | 27 + ...0001-build-and-link-with-a-shared-library.patch | 853 +++++++++++++++++++++ .../0002-log-add-calling-function-name.patch | 26 + .../0003-dbus-request-a-name-on-startup.patch | 153 ++++ ...sa-pcm-bump-the-trigger-after-pcm-prepare.patch | 35 + .../bluez-alsa/bluez-alsa_git.bbappend | 19 + .../packagegroups/packagegroup-agl-audio.bb | 24 + .../0001-snd-avirt-backport-kernel-4.12-api.patch | 40 + .../0002-snd-avirt-backport-kernel-4.9-api.patch | 63 ++ .../recipes-kernel/snd-avirt/snd-avirt.bb | 14 + .../recipes-kernel/snd-avirt/snd-avirt.bbappend | 22 + .../4a-alsa-core/4a-alsa-core_git.bb | 25 + .../4a-hal-config/4a-hal-config.bb | 24 + .../4a-hal-config/files/asound.conf.template | 3 + .../4a-hal-device-config-alternatives.README | 3 + .../4a-hal-device-config-alternatives.bbexample | 57 ++ .../4a-hal-device-config.README | 4 + .../4a-hal-device-config/4a-hal-device-config.bb | 58 ++ .../4a-hal-vendor-config.README | 3 + .../4a-hal-vendor-config.bbexample | 46 ++ .../4a-hal-device-config/files/deploy-hal-udev.sh | 4 + .../files/udev-sample-rule.rules | 1 + .../4a-hal-generic/4a-hal-generic_git.bb | 30 + .../4a-hal-unicens/4a-hal-unicens_git.bb | 32 + .../4a-softmixer/4a-softmixer_git.bb | 25 + .../recipes-multimedia/4a-tools/4a-tools_git.bb | 22 + .../agl-service-audio-4a_git.bb | 58 ++ .../agl-service-audio-4a/files/4a_wait_bt.sh | 83 ++ .../alsa/alsa-plugins_%.bbappend | 7 + .../recipes-multimedia/libavirt/libavirt_git.bb | 19 + .../pulseaudio/files/default.pa.4a | 77 ++ .../pulseaudio/pulseaudio-module-4a-client_git.bb | 20 + .../pulseaudio/pulseaudio_%.bbappend | 7 + meta-audio-4a-framework/README.md | 3 - .../classes/afb-system-cmake.bbclass | 6 - meta-audio-4a-framework/classes/afb-system.bbclass | 1 - .../conf/include/agl-audio-4a-framework.inc | 24 - meta-audio-4a-framework/conf/layer.conf | 23 - .../recipes-multimedia/4a-mixer/4a-mixer_git.bb | 27 - ...0001-build-and-link-with-a-shared-library.patch | 853 --------------------- .../0002-log-add-calling-function-name.patch | 26 - .../0003-dbus-request-a-name-on-startup.patch | 153 ---- ...sa-pcm-bump-the-trigger-after-pcm-prepare.patch | 35 - .../bluez-alsa/bluez-alsa_git.bbappend | 19 - .../packagegroups/packagegroup-agl-audio.bb | 24 - .../0001-snd-avirt-backport-kernel-4.12-api.patch | 40 - .../0002-snd-avirt-backport-kernel-4.9-api.patch | 63 -- .../recipes-kernel/snd-avirt/snd-avirt.bb | 14 - .../recipes-kernel/snd-avirt/snd-avirt.bbappend | 22 - .../4a-alsa-core/4a-alsa-core_git.bb | 25 - .../4a-hal-config/4a-hal-config.bb | 24 - .../4a-hal-config/files/asound.conf.template | 3 - .../4a-hal-device-config-alternatives.README | 3 - .../4a-hal-device-config-alternatives.bbexample | 57 -- .../4a-hal-device-config.README | 4 - .../4a-hal-device-config/4a-hal-device-config.bb | 58 -- .../4a-hal-vendor-config.README | 3 - .../4a-hal-vendor-config.bbexample | 46 -- .../4a-hal-device-config/files/deploy-hal-udev.sh | 4 - .../files/udev-sample-rule.rules | 1 - .../4a-hal-generic/4a-hal-generic_git.bb | 30 - .../4a-hal-unicens/4a-hal-unicens_git.bb | 32 - .../4a-softmixer/4a-softmixer_git.bb | 25 - .../recipes-multimedia/4a-tools/4a-tools_git.bb | 22 - .../agl-service-audio-4a_git.bb | 58 -- .../agl-service-audio-4a/files/4a_wait_bt.sh | 83 -- .../alsa/alsa-plugins_%.bbappend | 7 - .../recipes-multimedia/libavirt/libavirt_git.bb | 19 - .../pulseaudio/files/default.pa.4a | 77 -- .../pulseaudio/pulseaudio-module-4a-client_git.bb | 20 - .../pulseaudio/pulseaudio_%.bbappend | 7 - .../0001-Fix-build-with-systemd-209.patch | 30 + ...on-t-execute-processes-as-a-specific-user.patch | 81 ++ ...t-type-should-be-in-lowercase-so-use-Type.patch | 98 +++ .../0004-Modify-systemd-config-directory.patch | 24 + .../dlt-daemon/dlt-daemon_2.11.1.bb | 54 ++ .../dlt-daemon/dlt-daemon_2.15.0.bb | 52 ++ .../audiomanager-plugins-config/amcp_dbus.conf | 20 + .../audiomanager-plugins-config/amrp_dbus.conf | 21 + .../audiomanager-plugins-config/configuration.xml | 522 +++++++++++++ .../audiomanager-plugins-config/customtypes.xsd | 63 ++ ...org.genivi.audiomanager.routing.pulseaudio.conf | 35 + .../audiomanager-plugins-config_7.4.bb | 40 + .../audiomanager-plugins_git.bb | 60 ++ .../0001-Fix-duplicated-command-line-arg-t.patch | 25 + .../audiomanager/audiomanager/audiomanager.service | 17 + .../audiomanager/audiomanager_7.4.bb | 56 ++ .../module-router/module-router_git.bb | 31 + .../files/20-module-router.pa | 3 + .../pulseaudio-config-module-router_1.0.bb | 13 + .../packagegroups/packagegroup-agl-demo.bbappend | 4 + .../agl-audio-4a-framework/50_bblayers.conf.inc | 5 - .../agl-audio-4a-framework/50_local.conf.inc | 2 - .../50_local.conf.inc | 2 + 101 files changed, 3199 insertions(+), 1948 deletions(-) create mode 100644 ATTIC/agl-audio-4a-framework/50_bblayers.conf.inc create mode 100644 ATTIC/agl-audio-4a-framework/50_local.conf.inc create mode 100644 ATTIC/meta-audio-4a-framework/README.md create mode 100644 ATTIC/meta-audio-4a-framework/classes/afb-system-cmake.bbclass create mode 100644 ATTIC/meta-audio-4a-framework/classes/afb-system.bbclass create mode 100644 ATTIC/meta-audio-4a-framework/conf/include/agl-audio-4a-framework.inc create mode 100644 ATTIC/meta-audio-4a-framework/conf/layer.conf create mode 100644 ATTIC/meta-audio-4a-framework/meta-agl-demo/recipes-multimedia/4a-mixer/4a-mixer_git.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0001-build-and-link-with-a-shared-library.patch create mode 100644 ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0002-log-add-calling-function-name.patch create mode 100644 ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0003-dbus-request-a-name-on-startup.patch create mode 100644 ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch create mode 100644 ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend create mode 100644 ATTIC/meta-audio-4a-framework/recipes-core/packagegroups/packagegroup-agl-audio.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0001-snd-avirt-backport-kernel-4.12-api.patch create mode 100644 ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0002-snd-avirt-backport-kernel-4.9-api.patch create mode 100644 ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-alsa-core/4a-alsa-core_git.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.README create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.README create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.README create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.bbexample create mode 100755 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/deploy-hal-udev.sh create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/udev-sample-rule.rules create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-unicens/4a-hal-unicens_git.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-softmixer/4a-softmixer_git.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-tools/4a-tools_git.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb create mode 100755 ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/alsa/alsa-plugins_%.bbappend create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/libavirt/libavirt_git.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/files/default.pa.4a create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio-module-4a-client_git.bb create mode 100644 ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend delete mode 100644 meta-audio-4a-framework/README.md delete mode 100644 meta-audio-4a-framework/classes/afb-system-cmake.bbclass delete mode 100644 meta-audio-4a-framework/classes/afb-system.bbclass delete mode 100644 meta-audio-4a-framework/conf/include/agl-audio-4a-framework.inc delete mode 100644 meta-audio-4a-framework/conf/layer.conf delete mode 100644 meta-audio-4a-framework/meta-agl-demo/recipes-multimedia/4a-mixer/4a-mixer_git.bb delete mode 100644 meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0001-build-and-link-with-a-shared-library.patch delete mode 100644 meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0002-log-add-calling-function-name.patch delete mode 100644 meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0003-dbus-request-a-name-on-startup.patch delete mode 100644 meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch delete mode 100644 meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend delete mode 100644 meta-audio-4a-framework/recipes-core/packagegroups/packagegroup-agl-audio.bb delete mode 100644 meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0001-snd-avirt-backport-kernel-4.12-api.patch delete mode 100644 meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0002-snd-avirt-backport-kernel-4.9-api.patch delete mode 100644 meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bb delete mode 100644 meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-alsa-core/4a-alsa-core_git.bb delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.README delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.README delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.bb delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.README delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.bbexample delete mode 100755 meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/deploy-hal-udev.sh delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/udev-sample-rule.rules delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-hal-unicens/4a-hal-unicens_git.bb delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-softmixer/4a-softmixer_git.bb delete mode 100644 meta-audio-4a-framework/recipes-multimedia/4a-tools/4a-tools_git.bb delete mode 100644 meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb delete mode 100755 meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh delete mode 100644 meta-audio-4a-framework/recipes-multimedia/alsa/alsa-plugins_%.bbappend delete mode 100644 meta-audio-4a-framework/recipes-multimedia/libavirt/libavirt_git.bb delete mode 100644 meta-audio-4a-framework/recipes-multimedia/pulseaudio/files/default.pa.4a delete mode 100644 meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio-module-4a-client_git.bb delete mode 100644 meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend create mode 100644 meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0001-Fix-build-with-systemd-209.patch create mode 100644 meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch create mode 100644 meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0003-systemd-unit-type-should-be-in-lowercase-so-use-Type.patch create mode 100644 meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch create mode 100644 meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb create mode 100644 meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon_2.15.0.bb create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/amcp_dbus.conf create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/amrp_dbus.conf create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/configuration.xml create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/customtypes.xsd create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/org.genivi.audiomanager.routing.pulseaudio.conf create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config_7.4.bb create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins/audiomanager-plugins_git.bb create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager/0001-Fix-duplicated-command-line-arg-t.patch create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager/audiomanager.service create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager_7.4.bb create mode 100755 meta-audio-soundmanager-framework/recipes-multimedia/module-router/module-router_git.bb create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/pulseaudio-config-module-router/files/20-module-router.pa create mode 100644 meta-audio-soundmanager-framework/recipes-multimedia/pulseaudio-config-module-router/pulseaudio-config-module-router_1.0.bb create mode 100644 meta-audio-soundmanager-framework/recipes-platform/packagegroups/packagegroup-agl-demo.bbappend delete mode 100644 templates/feature/agl-audio-4a-framework/50_bblayers.conf.inc delete mode 100644 templates/feature/agl-audio-4a-framework/50_local.conf.inc diff --git a/ATTIC/agl-audio-4a-framework/50_bblayers.conf.inc b/ATTIC/agl-audio-4a-framework/50_bblayers.conf.inc new file mode 100644 index 00000000..a4889083 --- /dev/null +++ b/ATTIC/agl-audio-4a-framework/50_bblayers.conf.inc @@ -0,0 +1,5 @@ + +BBLAYERS =+ " \ + ${METADIR}/meta-agl-devel/meta-audio-4a-framework \ + " + diff --git a/ATTIC/agl-audio-4a-framework/50_local.conf.inc b/ATTIC/agl-audio-4a-framework/50_local.conf.inc new file mode 100644 index 00000000..91d4c863 --- /dev/null +++ b/ATTIC/agl-audio-4a-framework/50_local.conf.inc @@ -0,0 +1,2 @@ +#see meta-agl-devel/meta-audio-4a-framework/conf/include/agl-audio-4a-framework.inc +require conf/include/agl-audio-4a-framework.inc diff --git a/ATTIC/meta-audio-4a-framework/README.md b/ATTIC/meta-audio-4a-framework/README.md new file mode 100644 index 00000000..37dd360a --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/README.md @@ -0,0 +1,3 @@ +Collection of recipes for first integration of 4A (Advanced AGL Audio Architecture). + +This layer should disappear and recipes merged into meta-agl. diff --git a/ATTIC/meta-audio-4a-framework/classes/afb-system-cmake.bbclass b/ATTIC/meta-audio-4a-framework/classes/afb-system-cmake.bbclass new file mode 100644 index 00000000..67ad7260 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/classes/afb-system-cmake.bbclass @@ -0,0 +1,6 @@ +inherit afb-system + +DEPENDS += "alsa-lib json-c systemd af-binder cmake-apps-module-native" +inherit cmake pkgconfig + +EXTRA_OECMAKE_append = " -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}" diff --git a/ATTIC/meta-audio-4a-framework/classes/afb-system.bbclass b/ATTIC/meta-audio-4a-framework/classes/afb-system.bbclass new file mode 100644 index 00000000..b553d621 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/classes/afb-system.bbclass @@ -0,0 +1 @@ +INSTALL_PREFIX = "${libexecdir}/agl" diff --git a/ATTIC/meta-audio-4a-framework/conf/include/agl-audio-4a-framework.inc b/ATTIC/meta-audio-4a-framework/conf/include/agl-audio-4a-framework.inc new file mode 100644 index 00000000..12711f66 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/conf/include/agl-audio-4a-framework.inc @@ -0,0 +1,24 @@ +# In order to enable the audio-4a-framework features , +# enables the following line: +# +DISTRO_FEATURES_append = " agl-audio-4a-framework " + +# asound.conf is provided by the 4a-hal-config (and not by asound.state) +#VIRTUAL-RUNTIME_alsa-state = "4a-hal-config" +VIRTUAL_RUNTIME_alsa-state = "" +# additionally there is a bug in alsa-utils-alsactl where it pulls in alsa-state directly +RRECOMMENDS_pn-alsa-utils-alsactl = "VIRTUAL-RUNTIME_alsa-state" + +# why should a config package have -dev ... I'll leave that answer to you. +PACKAGES_pn-alsa-state_remove = "alsa-state-dev" +PACKAGES_pn-alsa-state_remove = "alsa-states-dev" +PACKAGES_pn-alsa-state = "alsa-state alsa-states" + +PREFERRED_PROVIDER_virtual/mixer ?= "4a-mixer" +PREFERRED_RPROVIDER_virtual/mixer ?= "4a-mixer" + +PREFERRED_VERSION_alsa-lib = "1.1.6" +PREFERRED_VERSION_alsa-plugins = "1.1.6" +PREFERRED_VERSION_alsa-tools = "1.1.6" +PREFERRED_VERSION_alsa-utils = "1.1.6" +PREFERRED_VERSION_alsa-utils-scripts = "1.1.6" diff --git a/ATTIC/meta-audio-4a-framework/conf/layer.conf b/ATTIC/meta-audio-4a-framework/conf/layer.conf new file mode 100644 index 00000000..dc190b66 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/conf/layer.conf @@ -0,0 +1,23 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# Fix for SPEC-1588 +# Let us add layer-specific bbappends which are only applied when that +# layer is included in our configuration - +# e.g. only add layers if a bsp is present. +# This is based on the BBFILE_COLLECTIONS name of the layer. +BBFILES += "${@' '.join('${LAYERDIR}/meta-%s/recipes*/*/*.bbappend' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" +BBFILES += "${@' '.join('${LAYERDIR}/meta-%s/recipes*/*/*.bb' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" + + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "4a-framework" +BBFILE_PATTERN_4a-framework = "^${LAYERDIR}/" +BBFILE_PRIORITY_4a-framework = "8" + +LAYERSERIES_COMPAT_4a-framework = "thud" diff --git a/ATTIC/meta-audio-4a-framework/meta-agl-demo/recipes-multimedia/4a-mixer/4a-mixer_git.bb b/ATTIC/meta-audio-4a-framework/meta-agl-demo/recipes-multimedia/4a-mixer/4a-mixer_git.bb new file mode 100644 index 00000000..f87d4d20 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/meta-agl-demo/recipes-multimedia/4a-mixer/4a-mixer_git.bb @@ -0,0 +1,27 @@ +SUMMARY = "Mixer for CES2017 AGL Demonstration" +DESCRIPTION = "AGL HMI application for control of PulseAudio mixer elements" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/mixer" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/mixer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +# build-time dependencies +DEPENDS += "qtquickcontrols2 \ + qtwebsockets \ + qtaglextras \ + libafb-helpers-qt \ +" + +PROVIDES += "virtual/mixer" +RPROVIDES_${PN} += "virtual/mixer" + +inherit cmake_qt5 aglwgt + +OECMAKE_CXX_FLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '' , '-DQT_NO_DEBUG_OUTPUT', d)}" diff --git a/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0001-build-and-link-with-a-shared-library.patch b/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0001-build-and-link-with-a-shared-library.patch new file mode 100644 index 00000000..53ee3ad0 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0001-build-and-link-with-a-shared-library.patch @@ -0,0 +1,853 @@ +From 7625b67a687b7a365d9d758a86ed05e84b2b3a61 Mon Sep 17 00:00:00 2001 +From: Thierry Bultel +Date: Mon, 3 Dec 2018 14:29:07 +0100 +Subject: [PATCH 1/3] build and link with a shared library + +Signed-off-by: Thierry Bultel +--- + configure.ac | 4 +- + includes/bluealsa/bluealsa.h | 21 ++++++ + {src/shared => includes/bluealsa}/ctl-client.h | 2 +- + {src/shared => includes/bluealsa}/ctl-proto.h | 0 + {src/shared => includes/bluealsa}/defs.h | 0 + {src/shared => includes/bluealsa}/ffb.h | 0 + {src/shared => includes/bluealsa}/log.h | 0 + {src/shared => includes/bluealsa}/rt.h | 0 + src/Makefile.am | 11 ++- + src/asound/Makefile.am | 15 ++-- + src/asound/bluealsa-ctl.c | 6 +- + src/asound/bluealsa-pcm.c | 10 +-- + src/at.c | 4 +- + src/bluealsa.h | 2 +- + src/bluealsalib/Makefile.am | 50 ++++++++++++++ + src/bluealsalib/bluealsa.pc.in | 12 ++++ + src/bluez-a2dp.c | 2 +- + src/bluez.c | 2 +- + src/ctl.c | 4 +- + src/ctl.h | 2 +- + src/io.c | 8 +-- + src/main.c | 4 +- + src/ofono.c | 2 +- + src/rfcomm.c | 4 +- + src/shared/ctl-client.c | 4 +- + src/shared/ffb.c | 2 +- + src/shared/log.c | 4 +- + src/shared/rt.c | 2 +- + src/transport.c | 2 +- + src/utils.c | 2 +- + test/Makefile.am | 10 ++- + test/server-mock.c | 3 - + test/test-at.c | 1 - + test/test-bluealsalib.c | 96 ++++++++++++++++++++++++++ + test/test-io.c | 3 - + test/test-utils.c | 8 +-- + utils/Makefile.am | 11 ++- + utils/aplay.c | 8 +-- + utils/rfcomm.c | 4 +- + 39 files changed, 252 insertions(+), 73 deletions(-) + create mode 100644 includes/bluealsa/bluealsa.h + rename {src/shared => includes/bluealsa}/ctl-client.h (98%) + rename {src/shared => includes/bluealsa}/ctl-proto.h (100%) + rename {src/shared => includes/bluealsa}/defs.h (100%) + rename {src/shared => includes/bluealsa}/ffb.h (100%) + rename {src/shared => includes/bluealsa}/log.h (100%) + rename {src/shared => includes/bluealsa}/rt.h (100%) + create mode 100644 src/bluealsalib/Makefile.am + create mode 100644 src/bluealsalib/bluealsa.pc.in + create mode 100644 test/test-bluealsalib.c + +diff --git a/configure.ac b/configure.ac +index 0bb9452..6323d60 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -152,8 +152,10 @@ AC_CONFIG_FILES([ + Makefile + src/Makefile + src/asound/Makefile ++ src/bluealsalib/Makefile + utils/Makefile +- test/Makefile]) ++ test/Makefile ++ src/bluealsalib/bluealsa.pc]) + AC_OUTPUT + + # warn user that alsa-lib thread-safety makes troubles +diff --git a/includes/bluealsa/bluealsa.h b/includes/bluealsa/bluealsa.h +new file mode 100644 +index 0000000..062856a +--- /dev/null ++++ b/includes/bluealsa/bluealsa.h +@@ -0,0 +1,21 @@ ++/* ++ * BlueALSA - bluealsa.h ++ * Copyright (c) 2018 Thierry Bultel ++ * ++ * This file is a part of bluez-alsa. ++ * ++ * This project is licensed under the terms of the MIT license. ++ * ++ */ ++ ++#ifndef BLUEALSA_H ++#define BLUEALSA_H ++ ++#include ++#include ++ ++typedef int (*transport_update_cb) (struct ba_msg_transport *transports); ++ ++extern int bluelsa_register_transport_update_cb(const char * interfance, transport_update_cb cb); ++ ++#endif +diff --git a/src/shared/ctl-client.h b/includes/bluealsa/ctl-client.h +similarity index 98% +rename from src/shared/ctl-client.h +rename to includes/bluealsa/ctl-client.h +index 3dc93a6..b8af154 100644 +--- a/src/shared/ctl-client.h ++++ b/includes/bluealsa/ctl-client.h +@@ -12,7 +12,7 @@ + #define BLUEALSA_SHARED_CTLCLIENT_H_ + + #include +-#include "shared/ctl-proto.h" ++#include + + int bluealsa_open(const char *interface); + +diff --git a/src/shared/ctl-proto.h b/includes/bluealsa/ctl-proto.h +similarity index 100% +rename from src/shared/ctl-proto.h +rename to includes/bluealsa/ctl-proto.h +diff --git a/src/shared/defs.h b/includes/bluealsa/defs.h +similarity index 100% +rename from src/shared/defs.h +rename to includes/bluealsa/defs.h +diff --git a/src/shared/ffb.h b/includes/bluealsa/ffb.h +similarity index 100% +rename from src/shared/ffb.h +rename to includes/bluealsa/ffb.h +diff --git a/src/shared/log.h b/includes/bluealsa/log.h +similarity index 100% +rename from src/shared/log.h +rename to includes/bluealsa/log.h +diff --git a/src/shared/rt.h b/includes/bluealsa/rt.h +similarity index 100% +rename from src/shared/rt.h +rename to includes/bluealsa/rt.h +diff --git a/src/Makefile.am b/src/Makefile.am +index fb1241d..5626ae5 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -2,12 +2,9 @@ + # Copyright (c) 2016-2018 Arkadiusz Bokowy + + bin_PROGRAMS = bluealsa +-SUBDIRS = asound ++SUBDIRS = bluealsalib asound + + bluealsa_SOURCES = \ +- shared/ffb.c \ +- shared/log.c \ +- shared/rt.c \ + at.c \ + bluealsa.c \ + bluez.c \ +@@ -34,7 +31,8 @@ AM_CFLAGS = \ + @APTX_CFLAGS@ \ + @LDAC_CFLAGS@ \ + @LDAC_ABR_CFLAGS@ \ +- @SBC_CFLAGS@ ++ @SBC_CFLAGS@ \ ++ -I$(top_srcdir)/includes + + LDADD = \ + @BLUEZ_LIBS@ \ +@@ -44,4 +42,5 @@ LDADD = \ + @APTX_LIBS@ \ + @LDAC_LIBS@ \ + @LDAC_ABR_LIBS@ \ +- @SBC_LIBS@ ++ @SBC_LIBS@ \ ++ bluealsalib/libbluealsa.la +diff --git a/src/asound/Makefile.am b/src/asound/Makefile.am +index 923d884..24618f1 100644 +--- a/src/asound/Makefile.am ++++ b/src/asound/Makefile.am +@@ -5,32 +5,35 @@ EXTRA_DIST = 20-bluealsa.conf + + asound_module_ctl_LTLIBRARIES = libasound_module_ctl_bluealsa.la + asound_module_pcm_LTLIBRARIES = libasound_module_pcm_bluealsa.la ++ + asound_module_conf_DATA = 20-bluealsa.conf + + libasound_module_ctl_bluealsa_la_SOURCES = \ +- ../shared/ctl-client.c \ +- ../shared/log.c \ + bluealsa-ctl.c ++ + libasound_module_pcm_bluealsa_la_SOURCES = \ +- ../shared/ctl-client.c \ +- ../shared/log.c \ +- ../shared/rt.c \ + bluealsa-pcm.c + + asound_module_ctldir = @ALSA_PLUGIN_DIR@ + asound_module_pcmdir = @ALSA_PLUGIN_DIR@ ++ + asound_module_confdir = @ALSA_CONF_DIR@ + + AM_CFLAGS = \ + -I$(top_srcdir)/src \ ++ -I$(top_srcdir)/includes \ + @ALSA_CFLAGS@ \ + @BLUEZ_CFLAGS@ \ + @GLIB2_CFLAGS@ + +-AM_LDFLAGS = -module -avoid-version ++AM_LDFLAGS = \ ++ -module \ ++ -avoid-version \ ++ ../bluealsalib/libbluealsa.la + + libasound_module_ctl_bluealsa_la_LIBADD = \ + @ALSA_LIBS@ ++ + libasound_module_pcm_bluealsa_la_LIBADD = \ + @ALSA_LIBS@ \ + @BLUEZ_LIBS@ +diff --git a/src/asound/bluealsa-ctl.c b/src/asound/bluealsa-ctl.c +index f4a0181..1b9d124 100644 +--- a/src/asound/bluealsa-ctl.c ++++ b/src/asound/bluealsa-ctl.c +@@ -19,9 +19,9 @@ + #include + #include + +-#include "shared/ctl-client.h" +-#include "shared/ctl-proto.h" +-#include "shared/log.h" ++#include ++#include ++#include + + + enum ctl_elem_type { +diff --git a/src/asound/bluealsa-pcm.c b/src/asound/bluealsa-pcm.c +index 258aebd..42cb61d 100644 +--- a/src/asound/bluealsa-pcm.c ++++ b/src/asound/bluealsa-pcm.c +@@ -23,11 +23,11 @@ + #include + #include + +-#include "shared/ctl-client.h" +-#include "shared/ctl-proto.h" +-#include "shared/defs.h" +-#include "shared/log.h" +-#include "shared/rt.h" ++#include ++#include ++#include ++#include ++#include + + + struct bluealsa_pcm { +diff --git a/src/at.c b/src/at.c +index e3d1703..bda2255 100644 +--- a/src/at.c ++++ b/src/at.c +@@ -16,8 +16,8 @@ + #include + #include + +-#include "shared/defs.h" +-#include "shared/log.h" ++#include ++#include + + + /** +diff --git a/src/bluealsa.h b/src/bluealsa.h +index 7968ba9..7eee34f 100644 +--- a/src/bluealsa.h ++++ b/src/bluealsa.h +@@ -27,7 +27,7 @@ + #include "bluez.h" + #include "bluez-a2dp.h" + #include "transport.h" +-#include "shared/ctl-proto.h" ++#include + + struct ba_config { + +diff --git a/src/bluealsalib/Makefile.am b/src/bluealsalib/Makefile.am +new file mode 100644 +index 0000000..11d9e00 +--- /dev/null ++++ b/src/bluealsalib/Makefile.am +@@ -0,0 +1,50 @@ ++# BlueALSA - Makefile.am ++# Copyright (c) 2018 Thiery Bultel (thierry.bultel@iot.bzh) ++ ++bluealsalib_LTLIBRARIES = libbluealsa.la ++ ++libbluealsa_la_SOURCES = \ ++ ../shared/ctl-client.c \ ++ ../shared/ffb.c \ ++ ../shared/log.c \ ++ ../shared/rt.c ++ ++EXTRA_DIST=bluealsa.pc.in ++ ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = bluealsa.pc ++ ++AM_CFLAGS = \ ++ -I$(top_srcdir)/src \ ++ -I$(top_srcdir)/includes \ ++ @ALSA_CFLAGS@ \ ++ @BLUEZ_CFLAGS@ \ ++ @GLIB2_CFLAGS@ ++ ++libbluealsa_la_LIBADD = \ ++ @ALSA_LIBS@ \ ++ @BLUEZ_LIBS@ ++ ++libbluealsa_la_LDFLAGS = \ ++ $(AM_LDFLAGS) \ ++ -version-info 1:0:0 ++ ++bluealsalibdir = $(libdir) ++ ++# install path for published headers ++bluealsalibincludedir=$(includedir)/bluealsa ++ ++bluealsalib_headers_dir=../../includes/bluealsa ++ ++bluealsalib_headers = \ ++ $(bluealsalib_headers_dir)/bluealsa.h \ ++ $(bluealsalib_headers_dir)/ctl-client.h \ ++ $(bluealsalib_headers_dir)/ctl-proto.h \ ++ $(bluealsalib_headers_dir)/defs.h \ ++ $(bluealsalib_headers_dir)/ffb.h \ ++ $(bluealsalib_headers_dir)/log.h \ ++ $(bluealsalib_headers_dir)/rt.h ++ ++libbluealsa_la_SOURCES += $(bluealsalib_headers) ++ ++bluealsalibinclude_HEADERS = $(bluealsalib_headers) +diff --git a/src/bluealsalib/bluealsa.pc.in b/src/bluealsalib/bluealsa.pc.in +new file mode 100644 +index 0000000..93c3c4a +--- /dev/null ++++ b/src/bluealsalib/bluealsa.pc.in +@@ -0,0 +1,12 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: alsa ++Description: Bluez-Alsa - Library ++Version: @VERSION@ ++Requires: ++Libs: -L${libdir} -lbluealsa ++#Libs.private: @ALSA_DEPLIBS@ ++Cflags: -I${includedir}/bluealsa +diff --git a/src/bluez-a2dp.c b/src/bluez-a2dp.c +index 5f81e6e..4c7b07b 100644 +--- a/src/bluez-a2dp.c ++++ b/src/bluez-a2dp.c +@@ -13,7 +13,7 @@ + #endif + + #include "bluez-a2dp.h" +-#include "shared/defs.h" ++#include + + static const a2dp_sbc_t a2dp_sbc = { + .frequency = +diff --git a/src/bluez.c b/src/bluez.c +index 537f0fe..591fdce 100644 +--- a/src/bluez.c ++++ b/src/bluez.c +@@ -24,7 +24,7 @@ + #include "ctl.h" + #include "transport.h" + #include "utils.h" +-#include "shared/log.h" ++#include + + + /** +diff --git a/src/ctl.c b/src/ctl.c +index ae2b812..dd3ab45 100644 +--- a/src/ctl.c ++++ b/src/ctl.c +@@ -32,8 +32,8 @@ + #include "hfp.h" + #include "transport.h" + #include "utils.h" +-#include "shared/defs.h" +-#include "shared/log.h" ++#include ++#include + + /* Special PCM type for internal usage only. */ + #define BA_PCM_TYPE_RFCOMM 0x1F +diff --git a/src/ctl.h b/src/ctl.h +index 0e3c46b..593a9fd 100644 +--- a/src/ctl.h ++++ b/src/ctl.h +@@ -11,7 +11,7 @@ + #ifndef BLUEALSA_CTL_H_ + #define BLUEALSA_CTL_H_ + +-#include "shared/ctl-proto.h" ++#include + + /* Indexes of special file descriptors in the poll array. */ + #define CTL_IDX_SRV 0 +diff --git a/src/io.c b/src/io.c +index b3d7ac9..f81eeb0 100644 +--- a/src/io.c ++++ b/src/io.c +@@ -44,10 +44,10 @@ + #include "bluealsa.h" + #include "transport.h" + #include "utils.h" +-#include "shared/defs.h" +-#include "shared/ffb.h" +-#include "shared/log.h" +-#include "shared/rt.h" ++#include ++#include ++#include ++#include + + + /** +diff --git a/src/main.c b/src/main.c +index 35e6702..9cef402 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -37,8 +37,8 @@ + #endif + #include "transport.h" + #include "utils.h" +-#include "shared/defs.h" +-#include "shared/log.h" ++#include ++#include + + + static char *get_a2dp_codecs( +diff --git a/src/ofono.c b/src/ofono.c +index 902d099..bfd4e39 100644 +--- a/src/ofono.c ++++ b/src/ofono.c +@@ -27,7 +27,7 @@ + #include "ctl.h" + #include "ofono-iface.h" + #include "transport.h" +-#include "shared/log.h" ++#include + + #define OFONO_FAKE_DEV_ID 0xffff + +diff --git a/src/rfcomm.c b/src/rfcomm.c +index a86ae61..2d76725 100644 +--- a/src/rfcomm.c ++++ b/src/rfcomm.c +@@ -17,11 +17,11 @@ + #include + #include + ++#include + #include "bluealsa.h" + #include "ctl.h" + #include "utils.h" +-#include "shared/defs.h" +-#include "shared/log.h" ++#include + + + /** +diff --git a/src/shared/ctl-client.c b/src/shared/ctl-client.c +index 6cf9402..2da9a54 100644 +--- a/src/shared/ctl-client.c ++++ b/src/shared/ctl-client.c +@@ -8,7 +8,7 @@ + * + */ + +-#include "shared/ctl-client.h" ++#include + + #include + #include +@@ -19,7 +19,7 @@ + #include + #include + +-#include "shared/log.h" ++#include + + + /** +diff --git a/src/shared/ffb.c b/src/shared/ffb.c +index b31d7d1..ab50f4a 100644 +--- a/src/shared/ffb.c ++++ b/src/shared/ffb.c +@@ -8,7 +8,7 @@ + * + */ + +-#include "shared/ffb.h" ++#include "../../includes/bluealsa/ffb.h" + + + /** +diff --git a/src/shared/log.c b/src/shared/log.c +index 65f0fea..884540c 100644 +--- a/src/shared/log.c ++++ b/src/shared/log.c +@@ -8,7 +8,7 @@ + * + */ + +-#include "shared/log.h" ++#include + + #include + #include +@@ -17,7 +17,7 @@ + #include + #include + +-#include "shared/rt.h" ++#include + + + /* internal logging identifier */ +diff --git a/src/shared/rt.c b/src/shared/rt.c +index edcbebc..40bd721 100644 +--- a/src/shared/rt.c ++++ b/src/shared/rt.c +@@ -8,7 +8,7 @@ + * + */ + +-#include "shared/rt.h" ++#include + + #include + +diff --git a/src/transport.c b/src/transport.c +index 7253925..1617dd1 100644 +--- a/src/transport.c ++++ b/src/transport.c +@@ -34,7 +34,7 @@ + #include "io.h" + #include "rfcomm.h" + #include "utils.h" +-#include "shared/log.h" ++#include + + + static const char *transport_type_to_string(enum ba_transport_type type) { +diff --git a/src/utils.c b/src/utils.c +index 70d069e..27459d2 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -24,7 +24,7 @@ + + #include "a2dp-codecs.h" + #include "bluez.h" +-#include "shared/log.h" ++#include + + + /** +diff --git a/test/Makefile.am b/test/Makefile.am +index 104dc63..8f7b2eb 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -6,7 +6,8 @@ TESTS = \ + test-ctl \ + test-io \ + test-pcm \ +- test-utils ++ test-utils \ ++ test-bluealsalib + + check_PROGRAMS = \ + server-mock \ +@@ -14,7 +15,8 @@ check_PROGRAMS = \ + test-ctl \ + test-io \ + test-pcm \ +- test-utils ++ test-utils \ ++ test-bluealsalib + + check_LTLIBRARIES = \ + aloader.la +@@ -25,6 +27,7 @@ aloader_la_LDFLAGS = \ + + AM_CFLAGS = \ + -I$(top_srcdir)/src \ ++ -I$(top_srcdir)/includes \ + @AAC_CFLAGS@ \ + @ALSA_CFLAGS@ \ + @APTX_CFLAGS@ \ +@@ -46,4 +49,5 @@ LDADD = \ + @GLIB2_LIBS@ \ + @LDAC_ABR_LIBS@ \ + @LDAC_LIBS@ \ +- @SBC_LIBS@ ++ @SBC_LIBS@ \ ++ ../src/bluealsalib/libbluealsa.la +diff --git a/test/server-mock.c b/test/server-mock.c +index 8c3a90e..c88fa35 100644 +--- a/test/server-mock.c ++++ b/test/server-mock.c +@@ -31,9 +31,6 @@ + #include "../src/rfcomm.c" + #include "../src/transport.c" + #include "../src/utils.c" +-#include "../src/shared/ffb.c" +-#include "../src/shared/log.c" +-#include "../src/shared/rt.c" + + static const a2dp_sbc_t cconfig = { + .frequency = SBC_SAMPLING_FREQ_44100, +diff --git a/test/test-at.c b/test/test-at.c +index 8cff264..a847c22 100644 +--- a/test/test-at.c ++++ b/test/test-at.c +@@ -11,7 +11,6 @@ + #include + + #include "../src/at.c" +-#include "../src/shared/log.c" + + START_TEST(test_at_build) { + +diff --git a/test/test-bluealsalib.c b/test/test-bluealsalib.c +new file mode 100644 +index 0000000..d5fa3ff +--- /dev/null ++++ b/test/test-bluealsalib.c +@@ -0,0 +1,96 @@ ++/* ++ * test-bluealsalib.c ++ * Copyright (c) 2018 Thierry Bultel ++ * ++ * This file is a part of bluez-alsa. ++ * ++ * This project is licensed under the terms of the MIT license. ++ * ++ */ ++ ++// TODO monitor all available interfaces ++const char * ba_interface = "hci0"; ++ ++#include ++#include ++#include ++#include ++#include ++ ++ ++static void * monitor_thread_entry(void* arg) { ++ debug("..."); ++ ++ int ba_fd, ba_event_fd; ++ enum ba_event transport_mask = BA_EVENT_TRANSPORT_ADDED | BA_EVENT_TRANSPORT_CHANGED|BA_EVENT_TRANSPORT_REMOVED; ++ ++ if ((ba_fd = bluealsa_open(ba_interface)) == -1) { ++ error("BlueALSA connection failed: %s", strerror(errno)); ++ goto fail; ++ } ++ ++ if ((ba_event_fd = bluealsa_open(ba_interface)) == -1) { ++ error("BlueALSA connection failed: %s", strerror(errno)); ++ goto fail; ++ } ++ ++ if (bluealsa_subscribe(ba_event_fd, transport_mask) == -1) { ++ error("BlueALSA subscription failed: %s", strerror(errno)); ++ goto fail; ++ } ++ ++goto init; ++ ++ while (true) { ++ ++ struct ba_msg_event event; ++ struct ba_msg_transport *transports; ++ ssize_t ret; ++ size_t i; ++ ++ struct pollfd pfds[] = {{ ba_event_fd, POLLIN, 0 }}; ++ if (poll(pfds, ARRAYSIZE(pfds), -1) == -1 && errno == EINTR) ++ continue; ++ ++ while ((ret = recv(ba_event_fd, &event, sizeof(event), MSG_DONTWAIT)) == -1 && errno == EINTR) ++ continue; ++ if (ret != sizeof(event)) { ++ error("Couldn't read event: %s", strerror(ret == -1 ? errno : EBADMSG)); ++ goto fail; ++ } ++ ++init: ++ debug("Fetching available transports"); ++ if ((ret = bluealsa_get_transports(ba_fd, &transports)) == -1) { ++ error("Couldn't get transports: %s", strerror(errno)); ++ goto fail; ++ } ++ ++ debug("Got %d transports", ret); ++ ++ for (int ix=0; ixaddr, addr); ++ info("Transport %d: type %d, dev %s", ix, transport->type, addr); ++ } ++ ++ } ++ ++fail: ++ info("exit"); ++ return NULL; ++} ++ ++int main(int argc, char * argv[]) { ++ printf("%s... !\n", argv[0]); ++ ++ pthread_t monitor; ++ if (pthread_create(&monitor, NULL, monitor_thread_entry, NULL) == -1) { ++ debug("failed to create the monitor thread"); ++ goto fail; ++ } ++ pthread_join(monitor, NULL); ++fail: ++ return 0; ++} +diff --git a/test/test-io.c b/test/test-io.c +index d913d2f..8ebb1d8 100644 +--- a/test/test-io.c ++++ b/test/test-io.c +@@ -21,9 +21,6 @@ + #include "../src/rfcomm.c" + #include "../src/transport.c" + #include "../src/utils.c" +-#include "../src/shared/ffb.c" +-#include "../src/shared/log.c" +-#include "../src/shared/rt.c" + + static const a2dp_sbc_t config_sbc_44100_stereo = { + .frequency = SBC_SAMPLING_FREQ_44100, +diff --git a/test/test-utils.c b/test/test-utils.c +index b704b42..46475f1 100644 +--- a/test/test-utils.c ++++ b/test/test-utils.c +@@ -10,11 +10,11 @@ + + #include + ++#include ++#include ++#include ++ + #include "../src/utils.c" +-#include "../src/shared/defs.h" +-#include "../src/shared/ffb.c" +-#include "../src/shared/log.c" +-#include "../src/shared/rt.c" + + START_TEST(test_dbus_profile_object_path) { + +diff --git a/utils/Makefile.am b/utils/Makefile.am +index 256689a..a6d132c 100644 +--- a/utils/Makefile.am ++++ b/utils/Makefile.am +@@ -6,32 +6,31 @@ bin_PROGRAMS = + if ENABLE_APLAY + bin_PROGRAMS += bluealsa-aplay + bluealsa_aplay_SOURCES = \ +- ../src/shared/ctl-client.c \ +- ../src/shared/ffb.c \ +- ../src/shared/log.c \ + aplay.c + bluealsa_aplay_CFLAGS = \ + -I$(top_srcdir)/src \ ++ -I$(top_srcdir)/includes \ + @ALSA_CFLAGS@ \ + @BLUEZ_CFLAGS@ \ + @GIO2_CFLAGS@ + bluealsa_aplay_LDADD = \ + @ALSA_LIBS@ \ + @BLUEZ_LIBS@ \ +- @GIO2_LIBS@ ++ @GIO2_LIBS@ \ ++ ../src/bluealsalib/libbluealsa.la + endif + + if ENABLE_RFCOMM + bin_PROGRAMS += bluealsa-rfcomm + bluealsa_rfcomm_SOURCES = \ +- ../src/shared/ctl-client.c \ +- ../src/shared/log.c \ + rfcomm.c + bluealsa_rfcomm_CFLAGS = \ + -I$(top_srcdir)/src \ ++ -I$(top_srcdir)/includes \ + @BLUEZ_CFLAGS@ + bluealsa_rfcomm_LDADD = \ + @BLUEZ_LIBS@ \ ++ ../src/bluealsalib/libbluealsa.la \ + -lreadline + endif + +diff --git a/utils/aplay.c b/utils/aplay.c +index f792ce6..4b1372e 100644 +--- a/utils/aplay.c ++++ b/utils/aplay.c +@@ -25,10 +25,10 @@ + #include + #include + +-#include "shared/ctl-client.h" +-#include "shared/defs.h" +-#include "shared/ffb.h" +-#include "shared/log.h" ++#include ++#include ++#include ++#include + + struct pcm_worker { + struct ba_msg_transport transport; +diff --git a/utils/rfcomm.c b/utils/rfcomm.c +index cc31f46..38e3b30 100644 +--- a/utils/rfcomm.c ++++ b/utils/rfcomm.c +@@ -24,8 +24,8 @@ + #include + #include + +-#include "shared/ctl-client.h" +-#include "shared/log.h" ++#include ++#include + + static char *strtrim(char *str) { + while (isspace(*str)) +-- +2.16.4 + diff --git a/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0002-log-add-calling-function-name.patch b/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0002-log-add-calling-function-name.patch new file mode 100644 index 00000000..8ed7e0b6 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0002-log-add-calling-function-name.patch @@ -0,0 +1,26 @@ +From 3a7400da79678e749381306e33163ca2c005cb3b Mon Sep 17 00:00:00 2001 +From: Thierry Bultel +Date: Mon, 3 Dec 2018 14:31:31 +0100 +Subject: [PATCH 2/3] log: add calling function name + +Signed-off-by: Thierry Bultel +--- + includes/bluealsa/log.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/includes/bluealsa/log.h b/includes/bluealsa/log.h +index 39663fb..6d4cec3 100644 +--- a/includes/bluealsa/log.h ++++ b/includes/bluealsa/log.h +@@ -31,7 +31,7 @@ void info(const char *format, ...) __attribute__ ((format(printf, 1, 2))); + + #if DEBUG + void _debug(const char *format, ...) __attribute__ ((format(printf, 1, 2))); +-# define debug(M, ARGS ...) _debug("%s:%d: " M, __FILE__, __LINE__, ## ARGS) ++# define debug(M, ARGS ...) _debug("%s:%d:%s: " M, __FILE__, __LINE__,__func__, ## ARGS) + #else + # define debug(M, ARGS ...) do {} while (0) + #endif +-- +2.16.4 + diff --git a/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0003-dbus-request-a-name-on-startup.patch b/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0003-dbus-request-a-name-on-startup.patch new file mode 100644 index 00000000..1ef59296 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0003-dbus-request-a-name-on-startup.patch @@ -0,0 +1,153 @@ +From 4c14fffbd20a6dd9e6ceca1eb1726ceaafab7410 Mon Sep 17 00:00:00 2001 +From: Thierry Bultel +Date: Fri, 18 Jan 2019 11:45:29 +0100 +Subject: [PATCH 3/3] dbus: request a name on startup + +When the service thread is ready, ask a name to dbus +The advantage of doing that is that client applications +can check dbus for bluez-alsa presence, without having +to implement any kinf of polling logic. Also, this +way, they can be notified on the service exit, to +perform any needed cleanup. +Since there must be an instance of bluealsa daemon +per hci device, the dbus name will be +'org.bluez-alsa.hci0', 'org.bluez-alsa.hci1' ... +and so on. + +Signed-off-by: Thierry Bultel +--- + configure.ac | 10 ++++++++++ + src/Makefile.am | 3 +++ + src/bluez-alsa.conf | 14 ++++++++++++++ + src/main.c | 32 ++++++++++++++++++++++++++++++++ + 4 files changed, 59 insertions(+) + create mode 100644 src/bluez-alsa.conf + +diff --git a/configure.ac b/configure.ac +index 6323d60..d4ec7d4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -130,6 +130,16 @@ AC_ARG_WITH([alsaconfdir], + [alsaconfdir="$sysconfdir/alsa/conf.d"], + [alsaconfdir="$datadir/alsa/alsa.conf.d"])]) + ++AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH], ++ [path to D-Bus config directory]), [path_dbusconf=${withval}], ++ [path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`"]) ++if (test -z "${path_dbusconf}"); then ++ DBUS_CONFDIR="${sysconfdir}/dbus-1/system.d" ++else ++ DBUS_CONFDIR="${path_dbusconf}/dbus-1/system.d" ++fi ++AC_SUBST(DBUS_CONFDIR) ++ + test "x$prefix" = xNONE && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix=$prefix + +diff --git a/src/Makefile.am b/src/Makefile.am +index 5626ae5..c501f2e 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -23,6 +23,9 @@ bluealsa_SOURCES += \ + ofono-iface.c + endif + ++dbusconfdir = @DBUS_CONFDIR@ ++dist_dbusconf_DATA = bluez-alsa.conf ++ + AM_CFLAGS = \ + @BLUEZ_CFLAGS@ \ + @GLIB2_CFLAGS@ \ +diff --git a/src/bluez-alsa.conf b/src/bluez-alsa.conf +new file mode 100644 +index 0000000..6b999d6 +--- /dev/null ++++ b/src/bluez-alsa.conf +@@ -0,0 +1,14 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/src/main.c b/src/main.c +index 9cef402..9183978 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -12,6 +12,7 @@ + # include "config.h" + #endif + ++#define _GNU_SOURCE + #include + #include + #include +@@ -58,6 +59,20 @@ static char *get_a2dp_codecs( + return g_strjoinv(", ", (char **)tmp); + } + ++static void name_acquired_handler( ++ GDBusConnection *connection, ++ const gchar *name, ++ gpointer user_data) { ++ debug("Acquired name: %s", name); ++} ++ ++static void name_lost_handler( ++ GDBusConnection *connection, ++ const gchar *name, ++ gpointer user_data) { ++ debug("Lost name: %s", name); ++} ++ + static GMainLoop *loop = NULL; + static void main_loop_stop(int sig) { + /* Call to this handler restores the default action, so on the +@@ -318,6 +333,7 @@ int main(int argc, char **argv) { + GError *err; + + err = NULL; ++ + address = g_dbus_address_get_for_bus_sync(G_BUS_TYPE_SYSTEM, NULL, NULL); + if ((config.dbus = g_dbus_connection_new_for_address_sync(address, + G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | +@@ -336,6 +352,19 @@ int main(int argc, char **argv) { + ofono_register(); + #endif + ++ char * name_on_bus = NULL; ++ asprintf(&name_on_bus, "org.bluez-alsa.%s", config.hci_dev.name); ++ ++ guint g_dbusid; ++ g_dbusid = g_bus_own_name_on_connection(config.dbus, ++ name_on_bus, ++ G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT | ++ G_BUS_NAME_OWNER_FLAGS_REPLACE, ++ name_acquired_handler, ++ name_lost_handler, ++ NULL, ++ NULL); ++ + /* In order to receive EPIPE while writing to the pipe whose reading end + * is closed, the SIGPIPE signal has to be handled. For more information + * see the io_thread_write_pcm() function. */ +@@ -359,5 +388,8 @@ int main(int argc, char **argv) { + bluealsa_ctl_free(); + bluealsa_config_free(); + ++ g_bus_unown_name (g_dbusid); ++ free(name_on_bus); ++ + return EXIT_SUCCESS; + } +-- +2.16.4 + diff --git a/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch b/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch new file mode 100644 index 00000000..7befe733 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch @@ -0,0 +1,35 @@ +From ba292e82928a6a0ea663039ba2d5c030c4cfa80d Mon Sep 17 00:00:00 2001 +From: Thierry Bultel +Date: Fri, 8 Feb 2019 10:21:55 +0100 +Subject: [PATCH] bluealsa-pcm: bump the trigger after pcm prepare + +When a sound application recovers from a EPIPE by calling +snd_pcm_prepare, and goes immediately after to a call to poll, +it would be stuck forever unless the internal event trigger +is bumped. + +Signed-off-by: Thierry Bultel +--- + src/asound/bluealsa-pcm.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/asound/bluealsa-pcm.c b/src/asound/bluealsa-pcm.c +index 42cb61d..4ccbf0d 100644 +--- a/src/asound/bluealsa-pcm.c ++++ b/src/asound/bluealsa-pcm.c +@@ -351,6 +351,12 @@ static int bluealsa_prepare(snd_pcm_ioplug_t *io) { + pcm->io_ptr = 0; + + debug("Prepared: %d", pcm->fd); ++ ++ /* When the sound application calls poll just after snd_pcm_prepare, ++ * it would block forever unless the internal trigger is bumped ++ * */ ++ eventfd_write(pcm->event_fd, 1); ++ + return 0; + } + +-- +2.16.4 + diff --git a/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend b/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend new file mode 100644 index 00000000..ece43824 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend @@ -0,0 +1,19 @@ +# This brings some mandatory patches for the softmixer and hal-manager. +# +# - patch 1 makes a communication library for hal-manager to get +# the list of audio transports from bluez-alsa +# - patch 2 makes the "debug" macro always display the caller name +# - patch 3 asks dbus for a name like 'org.bluez-alsa.hciX' where hciX +# - patch 4 is a bug fix +# name of the HCI interface that the bluealsa daemon instance is handling +# +# Notice that patch 2 will very likely be replaced by a full dbus interface +# in the future. +# + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-build-and-link-with-a-shared-library.patch" +SRC_URI += "file://0002-log-add-calling-function-name.patch" +SRC_URI += "file://0003-dbus-request-a-name-on-startup.patch" +SRC_URI += "file://0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch" diff --git a/ATTIC/meta-audio-4a-framework/recipes-core/packagegroups/packagegroup-agl-audio.bb b/ATTIC/meta-audio-4a-framework/recipes-core/packagegroups/packagegroup-agl-audio.bb new file mode 100644 index 00000000..bc236ff6 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-core/packagegroups/packagegroup-agl-audio.bb @@ -0,0 +1,24 @@ +SUMMARY = "AGL Audio packages" +DESCRIPTION = "The set of packages required by the AGL Audio" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-audio \ + " + +RDEPENDS_${PN} += "\ + 4a-alsa-core \ + agl-service-audio-4a \ + VIRTUAL-RUNTIME_alsa-state \ + agl-service-unicens \ + bluez-alsa \ + 4a-softmixer \ + 4a-hal-generic \ + 4a-hal-unicens \ + snd-avirt \ + ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '4a-tools', '' , d)} \ +" +# FIXME: Disable for now due to compilation issues against PulseAudio 12.x +# ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-module-4a-client', '' , d)} diff --git a/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0001-snd-avirt-backport-kernel-4.12-api.patch b/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0001-snd-avirt-backport-kernel-4.12-api.patch new file mode 100644 index 00000000..fa737cb4 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0001-snd-avirt-backport-kernel-4.12-api.patch @@ -0,0 +1,40 @@ +From 2fc07fedd17650f64f9bfcdb8682b55dad75cccd Mon Sep 17 00:00:00 2001 +From: Mark Farrugia +Date: Mon, 8 Apr 2019 16:38:13 +1000 +Subject: [PATCH] 0001-snd-avirt-backport-kernel-4.12-api + +--- + core.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/core.c b/core.c +index c2e32c5..2bb6616 100644 +--- a/core.c ++++ b/core.c +@@ -219,9 +219,8 @@ int snd_avirt_stream_try_complete(struct snd_avirt_stream *stream) + /* Set PCM ops for the Audio Path*/ + PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, pointer); + PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, get_time_info); +- PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, fill_silence); +- PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, copy_user); +- PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, copy_kernel); ++ PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, silence); ++ PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, copy); + PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, mmap); + PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, ack); + +@@ -331,9 +330,9 @@ snd_avirt_route_endpoint_copy(struct snd_pcm_substream *substream, + + switch (endpoint) { + case SND_AVIRT_ROUTE_SOURCE: +- return endpoint_ap->pcm_capture_ops->copy_kernel; ++ return endpoint_ap->pcm_capture_ops->copy; + case SND_AVIRT_ROUTE_SINK: +- return endpoint_ap->pcm_playback_ops->copy_kernel; ++ return endpoint_ap->pcm_playback_ops->copy; + } + + return NULL; +-- +2.17.1 + diff --git a/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0002-snd-avirt-backport-kernel-4.9-api.patch b/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0002-snd-avirt-backport-kernel-4.9-api.patch new file mode 100644 index 00000000..fa944da0 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0002-snd-avirt-backport-kernel-4.9-api.patch @@ -0,0 +1,63 @@ +From fe7fc04e4f685c72b4f971ca0e23b10d683cffe0 Mon Sep 17 00:00:00 2001 +From: Mark Farrugia +Date: Fri, 16 Nov 2018 16:10:12 +1100 +Subject: [PATCH] snd-avirt-backport-kernel-4.9-api + +--- + dummy/dummy.c | 6 +++--- + loopback/loopback.c | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/dummy/dummy.c b/dummy/dummy.c +index f683b92..c37be09 100644 +--- a/dummy/dummy.c ++++ b/dummy/dummy.c +@@ -125,9 +125,9 @@ static int dummy_systimer_prepare(struct snd_pcm_substream *substream) + return 0; + } + +-static void dummy_systimer_callback(struct timer_list *t) ++static void dummy_systimer_callback(unsigned long data) + { +- struct dummy_systimer_pcm *dpcm = from_timer(dpcm, t, timer); ++ struct dummy_systimer_pcm *dpcm = (struct dummy_systimer_pcm *)data; + unsigned long flags; + int elapsed = 0; + +@@ -162,7 +162,7 @@ static int dummy_systimer_create(struct snd_pcm_substream *substream) + if (!dpcm) + return -ENOMEM; + substream->runtime->private_data = dpcm; +- timer_setup(&dpcm->timer, dummy_systimer_callback, 0); ++ setup_timer(&dpcm->timer, dummy_systimer_callback, (unsigned long)dpcm); + spin_lock_init(&dpcm->lock); + dpcm->substream = substream; + return 0; +diff --git a/loopback/loopback.c b/loopback/loopback.c +index 4181392..6667a69 100644 +--- a/loopback/loopback.c ++++ b/loopback/loopback.c +@@ -498,9 +498,9 @@ unlock: + return running; + } + +-static void loopback_timer_function(struct timer_list *t) ++static void loopback_timer_function(unsigned long data) + { +- struct loopback_pcm *dpcm = from_timer(dpcm, t, timer); ++ struct loopback_pcm *dpcm = (struct loopback_pcm *)data; + unsigned long flags; + + spin_lock_irqsave(&dpcm->cable->lock, flags); +@@ -652,7 +652,7 @@ static int loopback_open(struct snd_pcm_substream *substream) + } + dpcm->loopback = loopback; + dpcm->substream = substream; +- timer_setup(&dpcm->timer, loopback_timer_function, 0); ++ setup_timer(&dpcm->timer, loopback_timer_function, (unsigned long)dpcm); + + cable = loopback->cables[substream->pcm->device]; + if (!cable) { +-- +2.17.1 + diff --git a/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bb b/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bb new file mode 100644 index 00000000..006f9c51 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Build SND_AVIRT driver" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +inherit module + +PV = "0.1" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/avirt;protocol=https;branch=${AGL_BRANCH}" + +S = "${WORKDIR}/git" +SRCREV = "12c6dc3159cc14cb3456d6d504398ba779538fb3" + +KERNEL_MODULE_AUTOLOAD += "snd-avirt-core snd-avirt-ap-loopback" diff --git a/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend b/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend new file mode 100644 index 00000000..3c9fea0e --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend @@ -0,0 +1,22 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +def prep_version (d) : + KV = d.getVar('KERNEL_VERSION', True) + if not KV : + return "4.12" + else: + return KV + +ORIG_KERN_VER = "${@prep_version(d)}" + +VANILLA_KERNEL_VERSION = "${@str(ORIG_KERN_VER.split("-")[0].split(".")[0]+ORIG_KERN_VER.split("-")[0].split(".")[1])}" + +APPLY_0001 = "${@str('no' if ${VANILLA_KERNEL_VERSION} > 412 else 'yes')}" +APPLY_0002 = "${@str('no' if ${VANILLA_KERNEL_VERSION} > 49 else 'yes')}" + +SRC_URI_append = " \ + file://0001-snd-avirt-backport-kernel-4.12-api.patch;apply=${APPLY_0001} \ + file://0002-snd-avirt-backport-kernel-4.9-api.patch;apply=${APPLY_0002} \ + " +# Make sure we can expose KERNEL_VERSION ... +do_patch[depends] += "virtual/kernel:do_populate_sysroot" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-alsa-core/4a-alsa-core_git.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-alsa-core/4a-alsa-core_git.bb new file mode 100644 index 00000000..b94eff21 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-alsa-core/4a-alsa-core_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "4A - Low Level Alsa Binding" +DESCRIPTION = "Low Level Alsa Binding for 4A (AGL Advanced Audio Agent)" +HOMEPAGE = "https://git.automotivelinux.org/src/4a-alsa-core/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-alsa-core;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "9b71be04ea600189e390bb111624ad5c2d248a4c" + +DEPENDS += "libafb-helpers" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit afb-system-cmake + +# FIXME: Remove once CMake+ninja issues are resolved +OECMAKE_GENERATOR = "Unix Makefiles" + +FILES_${PN}-dev += "${INSTALL_PREFIX}/4a-alsa-core/htdocs" + +FILES_${PN} += "${INSTALL_PREFIX}/4a-alsa-core" +FILES_${PN} += "${INSTALL_PREFIX}/lib" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb new file mode 100644 index 00000000..fc648a1d --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb @@ -0,0 +1,24 @@ +SUMMARY = "4A - HAL Configuration" +DESCRIPTION = "Configuration files for HALs used in 4A (AGL Advanced Audio Agent)" +HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-reference/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "file://asound.conf.template \ + " + +PV = "0.1" + +RPROVIDES_${PN} += "VIRTUAL-RUNTIME_alsa-state" + +inherit afb-system + +do_install () { + install -d ${D}/${sysconfdir} + install -m 0755 ${WORKDIR}/asound.conf.template ${D}/${sysconfdir}/asound.conf + sed -i "s|@INSTALL_PREFIX@|${INSTALL_PREFIX}|g" ${D}/${sysconfdir}/asound.conf +} + +FILES_${PN} += "${sysconfdir}/asound.conf" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template new file mode 100644 index 00000000..5a265db0 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template @@ -0,0 +1,3 @@ +# +#4A pcm configuration is now dynamic, please check hal configuration files in @INSTALL_PREFIX@/4a-hal/etc +# diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.README b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.README new file mode 100644 index 00000000..689f9bf8 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.README @@ -0,0 +1,3 @@ +This is a sample on how the update-alternative system can be used to select +the highest priority hal given. +Downside ... always only one file is possible in the etc folder. No HAL_LIST. diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample new file mode 100644 index 00000000..3bafc3bb --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample @@ -0,0 +1,57 @@ +SUMMARY = "4A - Generic HAL device configuration" +DESCRIPTION = "Generic HAL device configuration in 4A (AGL Advanced Audio Agent)" +HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-configs/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-hal-configs;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "45f205076573a858348c10a52d31382f31deaf55" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +# The package is machine-specific due to variable config content +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit afb-system update-alternative +# This defines INSTALL_PREFIX = "/usr/libexec/agl/" + +# no configure needed +do_configure[noexec] = "1" +# no compile needed +do_compile[noexec] = "1" + + +# when no specific HAL is defined, use a generic usb one +4A_DEFAULT_HAL ??= "2ch-generic-usb" + +# for specific machines, activate only known HAL +4A_DEFAULT_HAL_m3ulcb ?= "rcar-m3" +# Downside: only one file at a time! +4A_DEFAULT_HAL_h3ulcb ?= "rcar-m3" +4A_DEFAULT_HAL_intel-corei7-64 ?= "intel-minnow" +4A_DEFAULT_HAL_qemux86-64 ?= "intel-qemu" + +# Due to bug SPEC-1610, default hal for RPI3 is not active yet +# 4A_DEFAULT_HAL_raspberrypi3 ?= "raspberry-pi-3" + +do_install () { + # get pkgdir for 4a-hal + PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal + + install -d -m 0755 ${PKGDIR}/etc.available + cp -ar ${S}/*/*.json ${PKGDIR}/etc.available/ + chown -R root:root ${PKGDIR}/ +} + +# we define a '4a-default-hal' alternative with a low default priority +# you can deploy your own hal with a higher prio +ALTERNATIVE_${PN} = "4a-default-hal" +ALTERNATIVE_PRIORITY = "10" +ALTERNATIVE_LINK_NAME[4a-default-hal] = "${INSTALL_PREFIX}/4a-hal/etc/4a-default-hal.json" +ALTERNATIVE_TARGET[4a-default-hal] = "${INSTALL_PREFIX}/4a-hal/etc.available/hal-4a-${4A_DEFAULT_HAL}.json" + + +RPROVIDES_${PN} += "virtual/4a-default-hal" \ No newline at end of file diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.README b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.README new file mode 100644 index 00000000..602486a4 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.README @@ -0,0 +1,4 @@ +To keep it simple. + +Just expose 4A_HAL_LIST as-is to conf/local.conf so the user can actually choose any json file. + diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.bb new file mode 100644 index 00000000..e504c3da --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.bb @@ -0,0 +1,58 @@ +SUMMARY = "4A - Generic HAL device configuration" +DESCRIPTION = "Generic HAL device configuration in 4A (AGL Advanced Audio Agent)" +HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-configs/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-hal-configs;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "fdf0e3c4c67ceb5ddc77c9c1f27d85c1be2055a6" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +# The package is machine-specific due to variable config content +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit afb-system +# This defines INSTALL_PREFIX = "/usr/libexec/agl/" + +# no configure needed +do_configure[noexec] = "1" + +# no compile needed +do_compile[noexec] = "1" + +# when no specific HAL is defined, use a generic usb one +4A_HAL_LIST ??= "2ch-generic-usb" + +# for specific machines, activate only known HALs +4A_HAL_LIST_m3ulcb ?= "rcar-m3 rcar-m3kf" +4A_HAL_LIST_h3ulcb ?= "rcar-m3 rcar-m3kf" +4A_HAL_LIST_intel-corei7-64 ?= "intel-minnow intel-upsquared-hdmi" +4A_HAL_LIST_qemux86-64 ?= "intel-qemu" + +# Due to bug SPEC-1610, default hal for RPI3 is not active yet +# 4A_HAL_LIST_raspberrypi3 ?= "raspberry-pi-3" + +do_install () { + + # get pkgdir for 4a-hal + PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal + + install -d -m 0755 ${PKGDIR} + install -d -m 0755 ${PKGDIR}/etc + install -d -m 0755 ${PKGDIR}/etc.available + + cp -ar ${S}/*/*.json ${PKGDIR}/etc.available/ + chown -R root:root ${PKGDIR}/etc.available + + for x in ${4A_HAL_LIST}; do + hal=hal-4a-$x.json + cp -v $PKGDIR/etc.available/${hal} $PKGDIR/etc/ + done +} + + +RPROVIDES_${PN} += "virtual/4a-default-hal" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.README b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.README new file mode 100644 index 00000000..29531ccd --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.README @@ -0,0 +1,3 @@ +This is a sample how a vendor can: +- inject his own hal (as file hal-4a-myhal.json) +- set PREFERRED_RPROVIDER_virtual/4a-default-hal = "4a-hal-vendor-config" on conf/local.conf diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.bbexample b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.bbexample new file mode 100644 index 00000000..105ab1fa --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.bbexample @@ -0,0 +1,46 @@ +SUMMARY = "4A - Vendor HAL device configuration" +DESCRIPTION = "Vendor HAL device configuration in 4A (AGL Advanced Audio Agent)" +HOMEPAGE = "https://example.com/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "file://hal-4a-myhal.json" + +PV = "0.1" +S = "${WORKDIR}/" + +# The package is machine-specific due to variable config content +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit afb-system +# This defines INSTALL_PREFIX = "/usr/libexec/agl/" + +# no configure needed +do_configure[noexec] = "1" + +# no compile needed +do_compile[noexec] = "1" + +# use our local hal +4A_HAL_LIST = "myhal" + +do_install () { + + # get pkgdir for 4a-hal + PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal + + install -d -m 0755 ${PKGDIR}/etc.available + + cp -ar ${S}/*.json ${PKGDIR}/etc.available/ + chown -R root:root ${PKGDIR}/etc.available + + for x in ${4A_HAL_LIST}; do + hal=hal-4a-$x.json + cp -v $PKGDIR/etc.available/${hal} $PKGDIR/etc/ + done +} + + +RPROVIDES_${PN} += "virtual/4a-default-hal" \ No newline at end of file diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/deploy-hal-udev.sh b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/deploy-hal-udev.sh new file mode 100755 index 00000000..f031d58b --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/deploy-hal-udev.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +rm /usr/libexec/agl/4a-hal/etc/* +cp /usr/libexec/agl/4a-hal/etc.available/$i /usr/libexec/agl/4a-hal/etc/ diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/udev-sample-rule.rules b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/udev-sample-rule.rules new file mode 100644 index 00000000..d2d16a17 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/udev-sample-rule.rules @@ -0,0 +1 @@ +ACTION=="add", SUBSYSTEM=="usb", SOMEOTHERMATCH="bar", RUN+="/usr/bin/deploy-hal-udev.sh hal-4a-greenbox.json" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb new file mode 100644 index 00000000..8b20b83d --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb @@ -0,0 +1,30 @@ +SUMMARY = "4A - Generic HAL" +DESCRIPTION = "Generic HAL in 4A (AGL Advanced Audio Agent)" +HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-generic/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-hal-generic;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "0c4921b83a13bcb96bf03fb0e7a0733c3e202474" + +DEPENDS += "lua bluez-alsa liburcu libafb-helpers libappcontroller" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit afb-system-cmake + +# FIXME: Remove once CMake+ninja issues are resolved +OECMAKE_GENERATOR = "Unix Makefiles" + +do_install_append () { + # get pkgdir - note that '4a-hal' comes from project ${project_git_repo}/conf.d/cmake/config.cmake + PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal + + # transition: provided by separate package + rm -rf $PKGDIR/etc +} + +RDEPENDS_${PN} += "virtual/4a-default-hal bluez-alsa" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-unicens/4a-hal-unicens_git.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-unicens/4a-hal-unicens_git.bb new file mode 100644 index 00000000..058d20bb --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-hal-unicens/4a-hal-unicens_git.bb @@ -0,0 +1,32 @@ +SUMMARY = "4A - Unicens (MOST) Binding" +DESCRIPTION = "Unicens binding (MOST audio network support) for 4A (AGL Advanced Audio Agent)" +HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-unicens/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e385f6075dcdf3ad6ff0056fca58a129" + +DEPENDS += "lua libafb-helpers libappcontroller" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-hal-unicens;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "9228c9da5b85f0fdd6b01f0309e57b846618be63" + + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit afb-system-cmake + +# FIXME: Remove once CMake+ninja issues are resolved +OECMAKE_GENERATOR = "Unix Makefiles" + +do_install_append () { + # installation folder for this plugin is '4a-hal' + # get pkgdir - note that '4a-hal' comes from project ${project_git_repo}/conf.d/cmake/config.cmake + PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal + + # transition: provided by separate package + rm -rf $PKGDIR/etc +} + + diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-softmixer/4a-softmixer_git.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-softmixer/4a-softmixer_git.bb new file mode 100644 index 00000000..908809b6 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-softmixer/4a-softmixer_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "4A - Softmixer" +DESCRIPTION = "4A Softmixer (AGL Advanced Audio Agent)" +HOMEPAGE = "https://git.automotivelinux.org/src/4a-softmixer/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-softmixer.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "1a75612274f883aed09d198575582abdc0c9fe0f" + +DEPENDS += "lua liburcu libafb-helpers libappcontroller libavirt" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit afb-system-cmake + +# FIXME: Remove once CMake+ninja issues are resolved +OECMAKE_GENERATOR = "Unix Makefiles" + +#FIXME : +#FILES_${PN}-dev += "${INSTALL_PREFIX}/4a-softmixer/htdocs" +#FILES_${PN} += "${INSTALL_PREFIX}/afb-aaaa" +#FILES_${PN} += "${INSTALL_PREFIX}/lib" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-tools/4a-tools_git.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-tools/4a-tools_git.bb new file mode 100644 index 00000000..ae1117ad --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/4a-tools/4a-tools_git.bb @@ -0,0 +1,22 @@ +SUMMARY = "4A - Tools" +DESCRIPTION = "Tools, utilities, scripts and data related to 4A" +HOMEPAGE = "https://github.com/iotbzh/4a-tools/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "gitsm://github.com/iotbzh/4a-tools;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "flounder_5.99.2" +#SRCREV = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + + +do_install() { + oe_runmake install DESTDIR=${D}${prefix} +} + +RDEPENDS_${PN} += "bash python3-websockets" +FILES_${PN} += "${datadir}/4a/media/*" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb new file mode 100644 index 00000000..014fe119 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb @@ -0,0 +1,58 @@ +SUMMARY = "4A - High Level Audio API Service" +DESCRIPTION = "High Level Audio API service used in 4A (AGL Advanced Audio Agent)" +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-audio-4a/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-audio-4a;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit cmake aglwgt pkgconfig + +DEPENDS += "alsa-lib json-c systemd af-binder glib-2.0 lua libappcontroller" + +do_aglwgt_deploy_append() { + cat <<'EOF' >${D}/${sysconfdir}/agl-postinsts/99_4A_service_patch.sh +N=600 +svcfile="/usr/local/lib/systemd/*/afm-service-agl-service-audio-4a*.service" +set -x +echo "-- TMP 4A INSTALL FIX from meta-agl/meta-app-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb - MUST BE REMOVED !!!" +while ! ls $svcfile > /dev/null; do + if [ $N = 0 ]; then echo "-- TMP 4A INSTALL NOT FIXED"; exit 0; fi + echo . + sleep 0.2 + N=$(expr $N - 1) +done +sed -i '/\[Unit\]/ a Before=pulseaudio.service' $svcfile; +sed -i '/\[Unit\]/ a ConditionPathExistsGlob=/dev/snd/control*' $svcfile; +sed -i '/ExecStartPre=/ a Environment=LIBASOUND_THREAD_SAFE=0' $svcfile; + +sed -i -e 's|/usr/bin/afb-daemon\>|& --ldpath=/usr/libexec/agl/4a-alsa-core/lib:/usr/libexec/agl/4a-hal/lib:/usr/libexec/agl/smixer/lib|' $svcfile + +# binder name matters: it must match "afbd-4a-*" => the config file (controller json file) that will be searched will be "policy-4a-*.json" +sed -i -e 's|--name afbd-agl-\(.*\)|--name afbd-4a-\1|' $svcfile + +# workaround for SPEC-1762 +sed -i -e 's|/usr/bin/afb-daemon\>|/usr/bin/4a_wait_bt.sh &|' $svcfile + +echo "-- TMP 4A INSTALL FIX END" + +EOF + chmod a+x ${D}/${sysconfdir}/agl-postinsts/99_4A_service_patch.sh +} + +############################################## +# workaround for SPEC-1762/SPEC-1763 +RDEPENDS_${PN} += "bash" +SRC_URI += "file://4a_wait_bt.sh" +do_install_append() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/4a_wait_bt.sh ${D}${bindir}/ +} +# +############################################## diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh b/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh new file mode 100755 index 00000000..9dec4350 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +############################################################### +# This is a workaround for SPEC-1762/SPEC-1763 +# +# THIS SCRIPT MUST BE REMOVED ONCE THE ABOVE ISSUES ARE SOLVED +# +# Source recipe is: +# +# meta-audio-4a-framework/ +# recipes-multimedia/ +# agl-service-audio-4a/ +# agl-service-audio-4a_git.bb +# +# Signed-off-by: Stephane Desneux +############################################################### + +# time from script startup +LIMIT=20 +ts0=0 +function ts() { echo $(( $(date +%s) - ts0 )); } +ts0=$(ts) +function havetime() { [[ $(ts) -le ${1:-$LIMIT} ]] || return 1; } + +function waitloop() { + # ensure bt modules are loaded (delay: 5s) + while havetime 4; do + [[ -d /sys/module/bluetooth ]] && { + echo "bluetooth kernel module detected" + break + } + echo "waiting for bluetooth kernel module to be up" + sleep 0.2 + done + havetime 4 || { echo "TIMEOUT REACHED"; return 1; } + + # check that we have at least one controller + HCIDEV= + while havetime 8; do + echo "detecting hci devices..." + for x in $(ls /sys/class/bluetooth/hci* 2>/dev/null); do + [[ -z "$HCIDEV" ]] && HCIDEV=$(basename $x) + done + [[ -n "$HCIDEV" ]] && { + echo "found HCI controller: $HCIDEV" + break + } + sleep 0.2 + done + havetime 8 || { echo "TIMEOUT REACHED"; return 1; } + + # wait for controller to be up and running + while havetime 15; do + state=$(hciconfig $HCIDEV | grep -A 2 ^hci0 | tail -1) + [[ $state =~ UP ]] && [[ $state =~ RUNNING ]] && { + echo "HCI controller $HCIDEV state: $state" + break + } + echo "HCI controller $HCIDEV state: $state ... waiting for UP RUNNING" + sleep 0.2 + done + havetime 15 || { echo "TIMEOUT REACHED"; return 1; } + echo "HCI device up and running after $(ts) seconds" + + # wait for bluetooth-service to return something + while havetime; do + res=$(afb-client-demo -d unix:/run/user/$UID/apis/ws/Bluetooth-Manager adapter_state true) + [[ "$res" =~ \"response\":(.*)}$ ]] && res=${BASH_REMATCH[1]} + [[ "$res" =~ \"powered\":true ]] && { + echo "Bluetooth-Manager/power: $res" + break + } + echo "Bluetooth-Manager/power: not ready yet ($res)" + sleep 0.2 + done + echo "Bluetooth-Manager ready after $(ts) seconds" + + echo "4A now starting..." +} + +waitloop 2>&1 | sed 's/^/4AWAITBT /' >&2 +exec "$@" + diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/alsa/alsa-plugins_%.bbappend b/ATTIC/meta-audio-4a-framework/recipes-multimedia/alsa/alsa-plugins_%.bbappend new file mode 100644 index 00000000..5109a314 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/alsa/alsa-plugins_%.bbappend @@ -0,0 +1,7 @@ +# Remove PulseAudio plugin configuration files + +do_install_append() { + rm -f ${D}${datadir}/alsa/alsa.conf.d/*pulseaudio* +} + +FILES_${PN}-pulseaudio-conf = "${datadir}/alsa/alsa.conf.d" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/libavirt/libavirt_git.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/libavirt/libavirt_git.bb new file mode 100644 index 00000000..6d224e4e --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/libavirt/libavirt_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "AVIRT user-space library" +DESCRIPTION = "ALSA Virtual Dynamic Sound Driver (AVIRT) user-space library for dynamic sound stream creation." +HOMEPAGE = "https://git.automotivelinux.org/src/libavirt/" +SECTION = "libs/multimedia" + +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libavirt;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "379ea3c132f53eb6f5cf26d1c8a5ca335eb32a2e" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "alsa-lib" + +inherit cmake + +ALLOW_EMPTY_${PN} = "1" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/files/default.pa.4a b/ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/files/default.pa.4a new file mode 100644 index 00000000..0efdacc2 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/files/default.pa.4a @@ -0,0 +1,77 @@ +#!/usr/bin/pulseaudio -nF +# +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, see . + +# This startup script is used only if PulseAudio is started per-user +# (i.e. not in system mode) + +.fail + +### Automatically augment property information from .desktop files +### stored in /usr/share/application +load-module module-augment-properties + +### Load several protocols +.ifexists module-esound-protocol-unix.so +load-module module-esound-protocol-unix +.endif +load-module module-native-protocol-unix + +### Network access (may be configured with paprefs, so leave this commented +### here if you plan to use paprefs) +#load-module module-esound-protocol-tcp +#load-module module-native-protocol-tcp + +### Load the RTP receiver module (also configured via paprefs, see above) +#load-module module-rtp-recv + +### Load the RTP sender module (also configured via paprefs, see above) +#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'" +#load-module module-rtp-send source=rtp.monitor + +.ifexists module-4a-client.so +load-module module-null-sink sink_name=aaaa_null_sink sink_properties="device.description='4A Null Output'" +set-default-sink aaaa_null_sink +load-module module-4a-client +.else +load-module module-udev-detect +.endif + +### Automatically move streams to the default sink if the sink they are +### connected to dies, similar for sources +load-module module-rescue-streams + +### Make sure we always have a sink around, even if it is a null sink. +load-module module-always-sink + +### Automatically suspend sinks/sources that become idle for too long +load-module module-suspend-on-idle + +### If autoexit on idle is enabled we want to make sure we only quit +### when no local session needs us anymore. +.ifexists module-console-kit.so +load-module module-console-kit +.endif +.ifexists module-systemd-login.so +load-module module-systemd-login +.endif + +### Modules to allow autoloading of filters (such as echo cancellation) +### on demand. module-filter-heuristics tries to determine what filters +### make sense, and module-filter-apply does the heavy-lifting of +### loading modules and rerouting streams. +load-module module-filter-heuristics +load-module module-filter-apply diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio-module-4a-client_git.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio-module-4a-client_git.bb new file mode 100644 index 00000000..b5e9e011 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio-module-4a-client_git.bb @@ -0,0 +1,20 @@ +SUMMARY = "pulseaudio 4A client module" +DESCRIPTION = "pulseaudio module to work with 4A (AGL Advanced Audio Agent)" +HOMEPAGE = "https://git.automotivelinux.org/src/pulseaudio-module-4a" +SECTION = "plugins" + +LICENSE = "LGPL-2.1+" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/pulseaudio-module-4a.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "9cd72ed153f6615ed826b048e1c344bf4640bd2b" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +DEPENDS += "af-binder systemd json-c pulseaudio" +RDEPENDS_${PN} = "pulseaudio-module-alsa-sink" + +FILES_${PN} += "${libdir}/pulse-*/modules/module-4a-client.so" diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend new file mode 100644 index 00000000..d8a84990 --- /dev/null +++ b/ATTIC/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://default.pa.4a" + +do_install_append () { + cp ${WORKDIR}/default.pa.4a ${D}${sysconfdir}/pulse/default.pa +} diff --git a/meta-audio-4a-framework/README.md b/meta-audio-4a-framework/README.md deleted file mode 100644 index 37dd360a..00000000 --- a/meta-audio-4a-framework/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Collection of recipes for first integration of 4A (Advanced AGL Audio Architecture). - -This layer should disappear and recipes merged into meta-agl. diff --git a/meta-audio-4a-framework/classes/afb-system-cmake.bbclass b/meta-audio-4a-framework/classes/afb-system-cmake.bbclass deleted file mode 100644 index 67ad7260..00000000 --- a/meta-audio-4a-framework/classes/afb-system-cmake.bbclass +++ /dev/null @@ -1,6 +0,0 @@ -inherit afb-system - -DEPENDS += "alsa-lib json-c systemd af-binder cmake-apps-module-native" -inherit cmake pkgconfig - -EXTRA_OECMAKE_append = " -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}" diff --git a/meta-audio-4a-framework/classes/afb-system.bbclass b/meta-audio-4a-framework/classes/afb-system.bbclass deleted file mode 100644 index b553d621..00000000 --- a/meta-audio-4a-framework/classes/afb-system.bbclass +++ /dev/null @@ -1 +0,0 @@ -INSTALL_PREFIX = "${libexecdir}/agl" diff --git a/meta-audio-4a-framework/conf/include/agl-audio-4a-framework.inc b/meta-audio-4a-framework/conf/include/agl-audio-4a-framework.inc deleted file mode 100644 index 12711f66..00000000 --- a/meta-audio-4a-framework/conf/include/agl-audio-4a-framework.inc +++ /dev/null @@ -1,24 +0,0 @@ -# In order to enable the audio-4a-framework features , -# enables the following line: -# -DISTRO_FEATURES_append = " agl-audio-4a-framework " - -# asound.conf is provided by the 4a-hal-config (and not by asound.state) -#VIRTUAL-RUNTIME_alsa-state = "4a-hal-config" -VIRTUAL_RUNTIME_alsa-state = "" -# additionally there is a bug in alsa-utils-alsactl where it pulls in alsa-state directly -RRECOMMENDS_pn-alsa-utils-alsactl = "VIRTUAL-RUNTIME_alsa-state" - -# why should a config package have -dev ... I'll leave that answer to you. -PACKAGES_pn-alsa-state_remove = "alsa-state-dev" -PACKAGES_pn-alsa-state_remove = "alsa-states-dev" -PACKAGES_pn-alsa-state = "alsa-state alsa-states" - -PREFERRED_PROVIDER_virtual/mixer ?= "4a-mixer" -PREFERRED_RPROVIDER_virtual/mixer ?= "4a-mixer" - -PREFERRED_VERSION_alsa-lib = "1.1.6" -PREFERRED_VERSION_alsa-plugins = "1.1.6" -PREFERRED_VERSION_alsa-tools = "1.1.6" -PREFERRED_VERSION_alsa-utils = "1.1.6" -PREFERRED_VERSION_alsa-utils-scripts = "1.1.6" diff --git a/meta-audio-4a-framework/conf/layer.conf b/meta-audio-4a-framework/conf/layer.conf deleted file mode 100644 index dc190b66..00000000 --- a/meta-audio-4a-framework/conf/layer.conf +++ /dev/null @@ -1,23 +0,0 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" - -# Fix for SPEC-1588 -# Let us add layer-specific bbappends which are only applied when that -# layer is included in our configuration - -# e.g. only add layers if a bsp is present. -# This is based on the BBFILE_COLLECTIONS name of the layer. -BBFILES += "${@' '.join('${LAYERDIR}/meta-%s/recipes*/*/*.bbappend' % layer \ - for layer in BBFILE_COLLECTIONS.split())}" -BBFILES += "${@' '.join('${LAYERDIR}/meta-%s/recipes*/*/*.bb' % layer \ - for layer in BBFILE_COLLECTIONS.split())}" - - -# We have recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "4a-framework" -BBFILE_PATTERN_4a-framework = "^${LAYERDIR}/" -BBFILE_PRIORITY_4a-framework = "8" - -LAYERSERIES_COMPAT_4a-framework = "thud" diff --git a/meta-audio-4a-framework/meta-agl-demo/recipes-multimedia/4a-mixer/4a-mixer_git.bb b/meta-audio-4a-framework/meta-agl-demo/recipes-multimedia/4a-mixer/4a-mixer_git.bb deleted file mode 100644 index f87d4d20..00000000 --- a/meta-audio-4a-framework/meta-agl-demo/recipes-multimedia/4a-mixer/4a-mixer_git.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "Mixer for CES2017 AGL Demonstration" -DESCRIPTION = "AGL HMI application for control of PulseAudio mixer elements" -HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/mixer" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" - -SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/mixer;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "${AGL_APP_REVISION}" - -PV = "1.0+git${SRCPV}" -S = "${WORKDIR}/git" - -# build-time dependencies -DEPENDS += "qtquickcontrols2 \ - qtwebsockets \ - qtaglextras \ - libafb-helpers-qt \ -" - -PROVIDES += "virtual/mixer" -RPROVIDES_${PN} += "virtual/mixer" - -inherit cmake_qt5 aglwgt - -OECMAKE_CXX_FLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '' , '-DQT_NO_DEBUG_OUTPUT', d)}" diff --git a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0001-build-and-link-with-a-shared-library.patch b/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0001-build-and-link-with-a-shared-library.patch deleted file mode 100644 index 53ee3ad0..00000000 --- a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0001-build-and-link-with-a-shared-library.patch +++ /dev/null @@ -1,853 +0,0 @@ -From 7625b67a687b7a365d9d758a86ed05e84b2b3a61 Mon Sep 17 00:00:00 2001 -From: Thierry Bultel -Date: Mon, 3 Dec 2018 14:29:07 +0100 -Subject: [PATCH 1/3] build and link with a shared library - -Signed-off-by: Thierry Bultel ---- - configure.ac | 4 +- - includes/bluealsa/bluealsa.h | 21 ++++++ - {src/shared => includes/bluealsa}/ctl-client.h | 2 +- - {src/shared => includes/bluealsa}/ctl-proto.h | 0 - {src/shared => includes/bluealsa}/defs.h | 0 - {src/shared => includes/bluealsa}/ffb.h | 0 - {src/shared => includes/bluealsa}/log.h | 0 - {src/shared => includes/bluealsa}/rt.h | 0 - src/Makefile.am | 11 ++- - src/asound/Makefile.am | 15 ++-- - src/asound/bluealsa-ctl.c | 6 +- - src/asound/bluealsa-pcm.c | 10 +-- - src/at.c | 4 +- - src/bluealsa.h | 2 +- - src/bluealsalib/Makefile.am | 50 ++++++++++++++ - src/bluealsalib/bluealsa.pc.in | 12 ++++ - src/bluez-a2dp.c | 2 +- - src/bluez.c | 2 +- - src/ctl.c | 4 +- - src/ctl.h | 2 +- - src/io.c | 8 +-- - src/main.c | 4 +- - src/ofono.c | 2 +- - src/rfcomm.c | 4 +- - src/shared/ctl-client.c | 4 +- - src/shared/ffb.c | 2 +- - src/shared/log.c | 4 +- - src/shared/rt.c | 2 +- - src/transport.c | 2 +- - src/utils.c | 2 +- - test/Makefile.am | 10 ++- - test/server-mock.c | 3 - - test/test-at.c | 1 - - test/test-bluealsalib.c | 96 ++++++++++++++++++++++++++ - test/test-io.c | 3 - - test/test-utils.c | 8 +-- - utils/Makefile.am | 11 ++- - utils/aplay.c | 8 +-- - utils/rfcomm.c | 4 +- - 39 files changed, 252 insertions(+), 73 deletions(-) - create mode 100644 includes/bluealsa/bluealsa.h - rename {src/shared => includes/bluealsa}/ctl-client.h (98%) - rename {src/shared => includes/bluealsa}/ctl-proto.h (100%) - rename {src/shared => includes/bluealsa}/defs.h (100%) - rename {src/shared => includes/bluealsa}/ffb.h (100%) - rename {src/shared => includes/bluealsa}/log.h (100%) - rename {src/shared => includes/bluealsa}/rt.h (100%) - create mode 100644 src/bluealsalib/Makefile.am - create mode 100644 src/bluealsalib/bluealsa.pc.in - create mode 100644 test/test-bluealsalib.c - -diff --git a/configure.ac b/configure.ac -index 0bb9452..6323d60 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -152,8 +152,10 @@ AC_CONFIG_FILES([ - Makefile - src/Makefile - src/asound/Makefile -+ src/bluealsalib/Makefile - utils/Makefile -- test/Makefile]) -+ test/Makefile -+ src/bluealsalib/bluealsa.pc]) - AC_OUTPUT - - # warn user that alsa-lib thread-safety makes troubles -diff --git a/includes/bluealsa/bluealsa.h b/includes/bluealsa/bluealsa.h -new file mode 100644 -index 0000000..062856a ---- /dev/null -+++ b/includes/bluealsa/bluealsa.h -@@ -0,0 +1,21 @@ -+/* -+ * BlueALSA - bluealsa.h -+ * Copyright (c) 2018 Thierry Bultel -+ * -+ * This file is a part of bluez-alsa. -+ * -+ * This project is licensed under the terms of the MIT license. -+ * -+ */ -+ -+#ifndef BLUEALSA_H -+#define BLUEALSA_H -+ -+#include -+#include -+ -+typedef int (*transport_update_cb) (struct ba_msg_transport *transports); -+ -+extern int bluelsa_register_transport_update_cb(const char * interfance, transport_update_cb cb); -+ -+#endif -diff --git a/src/shared/ctl-client.h b/includes/bluealsa/ctl-client.h -similarity index 98% -rename from src/shared/ctl-client.h -rename to includes/bluealsa/ctl-client.h -index 3dc93a6..b8af154 100644 ---- a/src/shared/ctl-client.h -+++ b/includes/bluealsa/ctl-client.h -@@ -12,7 +12,7 @@ - #define BLUEALSA_SHARED_CTLCLIENT_H_ - - #include --#include "shared/ctl-proto.h" -+#include - - int bluealsa_open(const char *interface); - -diff --git a/src/shared/ctl-proto.h b/includes/bluealsa/ctl-proto.h -similarity index 100% -rename from src/shared/ctl-proto.h -rename to includes/bluealsa/ctl-proto.h -diff --git a/src/shared/defs.h b/includes/bluealsa/defs.h -similarity index 100% -rename from src/shared/defs.h -rename to includes/bluealsa/defs.h -diff --git a/src/shared/ffb.h b/includes/bluealsa/ffb.h -similarity index 100% -rename from src/shared/ffb.h -rename to includes/bluealsa/ffb.h -diff --git a/src/shared/log.h b/includes/bluealsa/log.h -similarity index 100% -rename from src/shared/log.h -rename to includes/bluealsa/log.h -diff --git a/src/shared/rt.h b/includes/bluealsa/rt.h -similarity index 100% -rename from src/shared/rt.h -rename to includes/bluealsa/rt.h -diff --git a/src/Makefile.am b/src/Makefile.am -index fb1241d..5626ae5 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -2,12 +2,9 @@ - # Copyright (c) 2016-2018 Arkadiusz Bokowy - - bin_PROGRAMS = bluealsa --SUBDIRS = asound -+SUBDIRS = bluealsalib asound - - bluealsa_SOURCES = \ -- shared/ffb.c \ -- shared/log.c \ -- shared/rt.c \ - at.c \ - bluealsa.c \ - bluez.c \ -@@ -34,7 +31,8 @@ AM_CFLAGS = \ - @APTX_CFLAGS@ \ - @LDAC_CFLAGS@ \ - @LDAC_ABR_CFLAGS@ \ -- @SBC_CFLAGS@ -+ @SBC_CFLAGS@ \ -+ -I$(top_srcdir)/includes - - LDADD = \ - @BLUEZ_LIBS@ \ -@@ -44,4 +42,5 @@ LDADD = \ - @APTX_LIBS@ \ - @LDAC_LIBS@ \ - @LDAC_ABR_LIBS@ \ -- @SBC_LIBS@ -+ @SBC_LIBS@ \ -+ bluealsalib/libbluealsa.la -diff --git a/src/asound/Makefile.am b/src/asound/Makefile.am -index 923d884..24618f1 100644 ---- a/src/asound/Makefile.am -+++ b/src/asound/Makefile.am -@@ -5,32 +5,35 @@ EXTRA_DIST = 20-bluealsa.conf - - asound_module_ctl_LTLIBRARIES = libasound_module_ctl_bluealsa.la - asound_module_pcm_LTLIBRARIES = libasound_module_pcm_bluealsa.la -+ - asound_module_conf_DATA = 20-bluealsa.conf - - libasound_module_ctl_bluealsa_la_SOURCES = \ -- ../shared/ctl-client.c \ -- ../shared/log.c \ - bluealsa-ctl.c -+ - libasound_module_pcm_bluealsa_la_SOURCES = \ -- ../shared/ctl-client.c \ -- ../shared/log.c \ -- ../shared/rt.c \ - bluealsa-pcm.c - - asound_module_ctldir = @ALSA_PLUGIN_DIR@ - asound_module_pcmdir = @ALSA_PLUGIN_DIR@ -+ - asound_module_confdir = @ALSA_CONF_DIR@ - - AM_CFLAGS = \ - -I$(top_srcdir)/src \ -+ -I$(top_srcdir)/includes \ - @ALSA_CFLAGS@ \ - @BLUEZ_CFLAGS@ \ - @GLIB2_CFLAGS@ - --AM_LDFLAGS = -module -avoid-version -+AM_LDFLAGS = \ -+ -module \ -+ -avoid-version \ -+ ../bluealsalib/libbluealsa.la - - libasound_module_ctl_bluealsa_la_LIBADD = \ - @ALSA_LIBS@ -+ - libasound_module_pcm_bluealsa_la_LIBADD = \ - @ALSA_LIBS@ \ - @BLUEZ_LIBS@ -diff --git a/src/asound/bluealsa-ctl.c b/src/asound/bluealsa-ctl.c -index f4a0181..1b9d124 100644 ---- a/src/asound/bluealsa-ctl.c -+++ b/src/asound/bluealsa-ctl.c -@@ -19,9 +19,9 @@ - #include - #include - --#include "shared/ctl-client.h" --#include "shared/ctl-proto.h" --#include "shared/log.h" -+#include -+#include -+#include - - - enum ctl_elem_type { -diff --git a/src/asound/bluealsa-pcm.c b/src/asound/bluealsa-pcm.c -index 258aebd..42cb61d 100644 ---- a/src/asound/bluealsa-pcm.c -+++ b/src/asound/bluealsa-pcm.c -@@ -23,11 +23,11 @@ - #include - #include - --#include "shared/ctl-client.h" --#include "shared/ctl-proto.h" --#include "shared/defs.h" --#include "shared/log.h" --#include "shared/rt.h" -+#include -+#include -+#include -+#include -+#include - - - struct bluealsa_pcm { -diff --git a/src/at.c b/src/at.c -index e3d1703..bda2255 100644 ---- a/src/at.c -+++ b/src/at.c -@@ -16,8 +16,8 @@ - #include - #include - --#include "shared/defs.h" --#include "shared/log.h" -+#include -+#include - - - /** -diff --git a/src/bluealsa.h b/src/bluealsa.h -index 7968ba9..7eee34f 100644 ---- a/src/bluealsa.h -+++ b/src/bluealsa.h -@@ -27,7 +27,7 @@ - #include "bluez.h" - #include "bluez-a2dp.h" - #include "transport.h" --#include "shared/ctl-proto.h" -+#include - - struct ba_config { - -diff --git a/src/bluealsalib/Makefile.am b/src/bluealsalib/Makefile.am -new file mode 100644 -index 0000000..11d9e00 ---- /dev/null -+++ b/src/bluealsalib/Makefile.am -@@ -0,0 +1,50 @@ -+# BlueALSA - Makefile.am -+# Copyright (c) 2018 Thiery Bultel (thierry.bultel@iot.bzh) -+ -+bluealsalib_LTLIBRARIES = libbluealsa.la -+ -+libbluealsa_la_SOURCES = \ -+ ../shared/ctl-client.c \ -+ ../shared/ffb.c \ -+ ../shared/log.c \ -+ ../shared/rt.c -+ -+EXTRA_DIST=bluealsa.pc.in -+ -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA = bluealsa.pc -+ -+AM_CFLAGS = \ -+ -I$(top_srcdir)/src \ -+ -I$(top_srcdir)/includes \ -+ @ALSA_CFLAGS@ \ -+ @BLUEZ_CFLAGS@ \ -+ @GLIB2_CFLAGS@ -+ -+libbluealsa_la_LIBADD = \ -+ @ALSA_LIBS@ \ -+ @BLUEZ_LIBS@ -+ -+libbluealsa_la_LDFLAGS = \ -+ $(AM_LDFLAGS) \ -+ -version-info 1:0:0 -+ -+bluealsalibdir = $(libdir) -+ -+# install path for published headers -+bluealsalibincludedir=$(includedir)/bluealsa -+ -+bluealsalib_headers_dir=../../includes/bluealsa -+ -+bluealsalib_headers = \ -+ $(bluealsalib_headers_dir)/bluealsa.h \ -+ $(bluealsalib_headers_dir)/ctl-client.h \ -+ $(bluealsalib_headers_dir)/ctl-proto.h \ -+ $(bluealsalib_headers_dir)/defs.h \ -+ $(bluealsalib_headers_dir)/ffb.h \ -+ $(bluealsalib_headers_dir)/log.h \ -+ $(bluealsalib_headers_dir)/rt.h -+ -+libbluealsa_la_SOURCES += $(bluealsalib_headers) -+ -+bluealsalibinclude_HEADERS = $(bluealsalib_headers) -diff --git a/src/bluealsalib/bluealsa.pc.in b/src/bluealsalib/bluealsa.pc.in -new file mode 100644 -index 0000000..93c3c4a ---- /dev/null -+++ b/src/bluealsalib/bluealsa.pc.in -@@ -0,0 +1,12 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+ -+Name: alsa -+Description: Bluez-Alsa - Library -+Version: @VERSION@ -+Requires: -+Libs: -L${libdir} -lbluealsa -+#Libs.private: @ALSA_DEPLIBS@ -+Cflags: -I${includedir}/bluealsa -diff --git a/src/bluez-a2dp.c b/src/bluez-a2dp.c -index 5f81e6e..4c7b07b 100644 ---- a/src/bluez-a2dp.c -+++ b/src/bluez-a2dp.c -@@ -13,7 +13,7 @@ - #endif - - #include "bluez-a2dp.h" --#include "shared/defs.h" -+#include - - static const a2dp_sbc_t a2dp_sbc = { - .frequency = -diff --git a/src/bluez.c b/src/bluez.c -index 537f0fe..591fdce 100644 ---- a/src/bluez.c -+++ b/src/bluez.c -@@ -24,7 +24,7 @@ - #include "ctl.h" - #include "transport.h" - #include "utils.h" --#include "shared/log.h" -+#include - - - /** -diff --git a/src/ctl.c b/src/ctl.c -index ae2b812..dd3ab45 100644 ---- a/src/ctl.c -+++ b/src/ctl.c -@@ -32,8 +32,8 @@ - #include "hfp.h" - #include "transport.h" - #include "utils.h" --#include "shared/defs.h" --#include "shared/log.h" -+#include -+#include - - /* Special PCM type for internal usage only. */ - #define BA_PCM_TYPE_RFCOMM 0x1F -diff --git a/src/ctl.h b/src/ctl.h -index 0e3c46b..593a9fd 100644 ---- a/src/ctl.h -+++ b/src/ctl.h -@@ -11,7 +11,7 @@ - #ifndef BLUEALSA_CTL_H_ - #define BLUEALSA_CTL_H_ - --#include "shared/ctl-proto.h" -+#include - - /* Indexes of special file descriptors in the poll array. */ - #define CTL_IDX_SRV 0 -diff --git a/src/io.c b/src/io.c -index b3d7ac9..f81eeb0 100644 ---- a/src/io.c -+++ b/src/io.c -@@ -44,10 +44,10 @@ - #include "bluealsa.h" - #include "transport.h" - #include "utils.h" --#include "shared/defs.h" --#include "shared/ffb.h" --#include "shared/log.h" --#include "shared/rt.h" -+#include -+#include -+#include -+#include - - - /** -diff --git a/src/main.c b/src/main.c -index 35e6702..9cef402 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -37,8 +37,8 @@ - #endif - #include "transport.h" - #include "utils.h" --#include "shared/defs.h" --#include "shared/log.h" -+#include -+#include - - - static char *get_a2dp_codecs( -diff --git a/src/ofono.c b/src/ofono.c -index 902d099..bfd4e39 100644 ---- a/src/ofono.c -+++ b/src/ofono.c -@@ -27,7 +27,7 @@ - #include "ctl.h" - #include "ofono-iface.h" - #include "transport.h" --#include "shared/log.h" -+#include - - #define OFONO_FAKE_DEV_ID 0xffff - -diff --git a/src/rfcomm.c b/src/rfcomm.c -index a86ae61..2d76725 100644 ---- a/src/rfcomm.c -+++ b/src/rfcomm.c -@@ -17,11 +17,11 @@ - #include - #include - -+#include - #include "bluealsa.h" - #include "ctl.h" - #include "utils.h" --#include "shared/defs.h" --#include "shared/log.h" -+#include - - - /** -diff --git a/src/shared/ctl-client.c b/src/shared/ctl-client.c -index 6cf9402..2da9a54 100644 ---- a/src/shared/ctl-client.c -+++ b/src/shared/ctl-client.c -@@ -8,7 +8,7 @@ - * - */ - --#include "shared/ctl-client.h" -+#include - - #include - #include -@@ -19,7 +19,7 @@ - #include - #include - --#include "shared/log.h" -+#include - - - /** -diff --git a/src/shared/ffb.c b/src/shared/ffb.c -index b31d7d1..ab50f4a 100644 ---- a/src/shared/ffb.c -+++ b/src/shared/ffb.c -@@ -8,7 +8,7 @@ - * - */ - --#include "shared/ffb.h" -+#include "../../includes/bluealsa/ffb.h" - - - /** -diff --git a/src/shared/log.c b/src/shared/log.c -index 65f0fea..884540c 100644 ---- a/src/shared/log.c -+++ b/src/shared/log.c -@@ -8,7 +8,7 @@ - * - */ - --#include "shared/log.h" -+#include - - #include - #include -@@ -17,7 +17,7 @@ - #include - #include - --#include "shared/rt.h" -+#include - - - /* internal logging identifier */ -diff --git a/src/shared/rt.c b/src/shared/rt.c -index edcbebc..40bd721 100644 ---- a/src/shared/rt.c -+++ b/src/shared/rt.c -@@ -8,7 +8,7 @@ - * - */ - --#include "shared/rt.h" -+#include - - #include - -diff --git a/src/transport.c b/src/transport.c -index 7253925..1617dd1 100644 ---- a/src/transport.c -+++ b/src/transport.c -@@ -34,7 +34,7 @@ - #include "io.h" - #include "rfcomm.h" - #include "utils.h" --#include "shared/log.h" -+#include - - - static const char *transport_type_to_string(enum ba_transport_type type) { -diff --git a/src/utils.c b/src/utils.c -index 70d069e..27459d2 100644 ---- a/src/utils.c -+++ b/src/utils.c -@@ -24,7 +24,7 @@ - - #include "a2dp-codecs.h" - #include "bluez.h" --#include "shared/log.h" -+#include - - - /** -diff --git a/test/Makefile.am b/test/Makefile.am -index 104dc63..8f7b2eb 100644 ---- a/test/Makefile.am -+++ b/test/Makefile.am -@@ -6,7 +6,8 @@ TESTS = \ - test-ctl \ - test-io \ - test-pcm \ -- test-utils -+ test-utils \ -+ test-bluealsalib - - check_PROGRAMS = \ - server-mock \ -@@ -14,7 +15,8 @@ check_PROGRAMS = \ - test-ctl \ - test-io \ - test-pcm \ -- test-utils -+ test-utils \ -+ test-bluealsalib - - check_LTLIBRARIES = \ - aloader.la -@@ -25,6 +27,7 @@ aloader_la_LDFLAGS = \ - - AM_CFLAGS = \ - -I$(top_srcdir)/src \ -+ -I$(top_srcdir)/includes \ - @AAC_CFLAGS@ \ - @ALSA_CFLAGS@ \ - @APTX_CFLAGS@ \ -@@ -46,4 +49,5 @@ LDADD = \ - @GLIB2_LIBS@ \ - @LDAC_ABR_LIBS@ \ - @LDAC_LIBS@ \ -- @SBC_LIBS@ -+ @SBC_LIBS@ \ -+ ../src/bluealsalib/libbluealsa.la -diff --git a/test/server-mock.c b/test/server-mock.c -index 8c3a90e..c88fa35 100644 ---- a/test/server-mock.c -+++ b/test/server-mock.c -@@ -31,9 +31,6 @@ - #include "../src/rfcomm.c" - #include "../src/transport.c" - #include "../src/utils.c" --#include "../src/shared/ffb.c" --#include "../src/shared/log.c" --#include "../src/shared/rt.c" - - static const a2dp_sbc_t cconfig = { - .frequency = SBC_SAMPLING_FREQ_44100, -diff --git a/test/test-at.c b/test/test-at.c -index 8cff264..a847c22 100644 ---- a/test/test-at.c -+++ b/test/test-at.c -@@ -11,7 +11,6 @@ - #include - - #include "../src/at.c" --#include "../src/shared/log.c" - - START_TEST(test_at_build) { - -diff --git a/test/test-bluealsalib.c b/test/test-bluealsalib.c -new file mode 100644 -index 0000000..d5fa3ff ---- /dev/null -+++ b/test/test-bluealsalib.c -@@ -0,0 +1,96 @@ -+/* -+ * test-bluealsalib.c -+ * Copyright (c) 2018 Thierry Bultel -+ * -+ * This file is a part of bluez-alsa. -+ * -+ * This project is licensed under the terms of the MIT license. -+ * -+ */ -+ -+// TODO monitor all available interfaces -+const char * ba_interface = "hci0"; -+ -+#include -+#include -+#include -+#include -+#include -+ -+ -+static void * monitor_thread_entry(void* arg) { -+ debug("..."); -+ -+ int ba_fd, ba_event_fd; -+ enum ba_event transport_mask = BA_EVENT_TRANSPORT_ADDED | BA_EVENT_TRANSPORT_CHANGED|BA_EVENT_TRANSPORT_REMOVED; -+ -+ if ((ba_fd = bluealsa_open(ba_interface)) == -1) { -+ error("BlueALSA connection failed: %s", strerror(errno)); -+ goto fail; -+ } -+ -+ if ((ba_event_fd = bluealsa_open(ba_interface)) == -1) { -+ error("BlueALSA connection failed: %s", strerror(errno)); -+ goto fail; -+ } -+ -+ if (bluealsa_subscribe(ba_event_fd, transport_mask) == -1) { -+ error("BlueALSA subscription failed: %s", strerror(errno)); -+ goto fail; -+ } -+ -+goto init; -+ -+ while (true) { -+ -+ struct ba_msg_event event; -+ struct ba_msg_transport *transports; -+ ssize_t ret; -+ size_t i; -+ -+ struct pollfd pfds[] = {{ ba_event_fd, POLLIN, 0 }}; -+ if (poll(pfds, ARRAYSIZE(pfds), -1) == -1 && errno == EINTR) -+ continue; -+ -+ while ((ret = recv(ba_event_fd, &event, sizeof(event), MSG_DONTWAIT)) == -1 && errno == EINTR) -+ continue; -+ if (ret != sizeof(event)) { -+ error("Couldn't read event: %s", strerror(ret == -1 ? errno : EBADMSG)); -+ goto fail; -+ } -+ -+init: -+ debug("Fetching available transports"); -+ if ((ret = bluealsa_get_transports(ba_fd, &transports)) == -1) { -+ error("Couldn't get transports: %s", strerror(errno)); -+ goto fail; -+ } -+ -+ debug("Got %d transports", ret); -+ -+ for (int ix=0; ixaddr, addr); -+ info("Transport %d: type %d, dev %s", ix, transport->type, addr); -+ } -+ -+ } -+ -+fail: -+ info("exit"); -+ return NULL; -+} -+ -+int main(int argc, char * argv[]) { -+ printf("%s... !\n", argv[0]); -+ -+ pthread_t monitor; -+ if (pthread_create(&monitor, NULL, monitor_thread_entry, NULL) == -1) { -+ debug("failed to create the monitor thread"); -+ goto fail; -+ } -+ pthread_join(monitor, NULL); -+fail: -+ return 0; -+} -diff --git a/test/test-io.c b/test/test-io.c -index d913d2f..8ebb1d8 100644 ---- a/test/test-io.c -+++ b/test/test-io.c -@@ -21,9 +21,6 @@ - #include "../src/rfcomm.c" - #include "../src/transport.c" - #include "../src/utils.c" --#include "../src/shared/ffb.c" --#include "../src/shared/log.c" --#include "../src/shared/rt.c" - - static const a2dp_sbc_t config_sbc_44100_stereo = { - .frequency = SBC_SAMPLING_FREQ_44100, -diff --git a/test/test-utils.c b/test/test-utils.c -index b704b42..46475f1 100644 ---- a/test/test-utils.c -+++ b/test/test-utils.c -@@ -10,11 +10,11 @@ - - #include - -+#include -+#include -+#include -+ - #include "../src/utils.c" --#include "../src/shared/defs.h" --#include "../src/shared/ffb.c" --#include "../src/shared/log.c" --#include "../src/shared/rt.c" - - START_TEST(test_dbus_profile_object_path) { - -diff --git a/utils/Makefile.am b/utils/Makefile.am -index 256689a..a6d132c 100644 ---- a/utils/Makefile.am -+++ b/utils/Makefile.am -@@ -6,32 +6,31 @@ bin_PROGRAMS = - if ENABLE_APLAY - bin_PROGRAMS += bluealsa-aplay - bluealsa_aplay_SOURCES = \ -- ../src/shared/ctl-client.c \ -- ../src/shared/ffb.c \ -- ../src/shared/log.c \ - aplay.c - bluealsa_aplay_CFLAGS = \ - -I$(top_srcdir)/src \ -+ -I$(top_srcdir)/includes \ - @ALSA_CFLAGS@ \ - @BLUEZ_CFLAGS@ \ - @GIO2_CFLAGS@ - bluealsa_aplay_LDADD = \ - @ALSA_LIBS@ \ - @BLUEZ_LIBS@ \ -- @GIO2_LIBS@ -+ @GIO2_LIBS@ \ -+ ../src/bluealsalib/libbluealsa.la - endif - - if ENABLE_RFCOMM - bin_PROGRAMS += bluealsa-rfcomm - bluealsa_rfcomm_SOURCES = \ -- ../src/shared/ctl-client.c \ -- ../src/shared/log.c \ - rfcomm.c - bluealsa_rfcomm_CFLAGS = \ - -I$(top_srcdir)/src \ -+ -I$(top_srcdir)/includes \ - @BLUEZ_CFLAGS@ - bluealsa_rfcomm_LDADD = \ - @BLUEZ_LIBS@ \ -+ ../src/bluealsalib/libbluealsa.la \ - -lreadline - endif - -diff --git a/utils/aplay.c b/utils/aplay.c -index f792ce6..4b1372e 100644 ---- a/utils/aplay.c -+++ b/utils/aplay.c -@@ -25,10 +25,10 @@ - #include - #include - --#include "shared/ctl-client.h" --#include "shared/defs.h" --#include "shared/ffb.h" --#include "shared/log.h" -+#include -+#include -+#include -+#include - - struct pcm_worker { - struct ba_msg_transport transport; -diff --git a/utils/rfcomm.c b/utils/rfcomm.c -index cc31f46..38e3b30 100644 ---- a/utils/rfcomm.c -+++ b/utils/rfcomm.c -@@ -24,8 +24,8 @@ - #include - #include - --#include "shared/ctl-client.h" --#include "shared/log.h" -+#include -+#include - - static char *strtrim(char *str) { - while (isspace(*str)) --- -2.16.4 - diff --git a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0002-log-add-calling-function-name.patch b/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0002-log-add-calling-function-name.patch deleted file mode 100644 index 8ed7e0b6..00000000 --- a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0002-log-add-calling-function-name.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 3a7400da79678e749381306e33163ca2c005cb3b Mon Sep 17 00:00:00 2001 -From: Thierry Bultel -Date: Mon, 3 Dec 2018 14:31:31 +0100 -Subject: [PATCH 2/3] log: add calling function name - -Signed-off-by: Thierry Bultel ---- - includes/bluealsa/log.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/includes/bluealsa/log.h b/includes/bluealsa/log.h -index 39663fb..6d4cec3 100644 ---- a/includes/bluealsa/log.h -+++ b/includes/bluealsa/log.h -@@ -31,7 +31,7 @@ void info(const char *format, ...) __attribute__ ((format(printf, 1, 2))); - - #if DEBUG - void _debug(const char *format, ...) __attribute__ ((format(printf, 1, 2))); --# define debug(M, ARGS ...) _debug("%s:%d: " M, __FILE__, __LINE__, ## ARGS) -+# define debug(M, ARGS ...) _debug("%s:%d:%s: " M, __FILE__, __LINE__,__func__, ## ARGS) - #else - # define debug(M, ARGS ...) do {} while (0) - #endif --- -2.16.4 - diff --git a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0003-dbus-request-a-name-on-startup.patch b/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0003-dbus-request-a-name-on-startup.patch deleted file mode 100644 index 1ef59296..00000000 --- a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0003-dbus-request-a-name-on-startup.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 4c14fffbd20a6dd9e6ceca1eb1726ceaafab7410 Mon Sep 17 00:00:00 2001 -From: Thierry Bultel -Date: Fri, 18 Jan 2019 11:45:29 +0100 -Subject: [PATCH 3/3] dbus: request a name on startup - -When the service thread is ready, ask a name to dbus -The advantage of doing that is that client applications -can check dbus for bluez-alsa presence, without having -to implement any kinf of polling logic. Also, this -way, they can be notified on the service exit, to -perform any needed cleanup. -Since there must be an instance of bluealsa daemon -per hci device, the dbus name will be -'org.bluez-alsa.hci0', 'org.bluez-alsa.hci1' ... -and so on. - -Signed-off-by: Thierry Bultel ---- - configure.ac | 10 ++++++++++ - src/Makefile.am | 3 +++ - src/bluez-alsa.conf | 14 ++++++++++++++ - src/main.c | 32 ++++++++++++++++++++++++++++++++ - 4 files changed, 59 insertions(+) - create mode 100644 src/bluez-alsa.conf - -diff --git a/configure.ac b/configure.ac -index 6323d60..d4ec7d4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -130,6 +130,16 @@ AC_ARG_WITH([alsaconfdir], - [alsaconfdir="$sysconfdir/alsa/conf.d"], - [alsaconfdir="$datadir/alsa/alsa.conf.d"])]) - -+AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH], -+ [path to D-Bus config directory]), [path_dbusconf=${withval}], -+ [path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`"]) -+if (test -z "${path_dbusconf}"); then -+ DBUS_CONFDIR="${sysconfdir}/dbus-1/system.d" -+else -+ DBUS_CONFDIR="${path_dbusconf}/dbus-1/system.d" -+fi -+AC_SUBST(DBUS_CONFDIR) -+ - test "x$prefix" = xNONE && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix=$prefix - -diff --git a/src/Makefile.am b/src/Makefile.am -index 5626ae5..c501f2e 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -23,6 +23,9 @@ bluealsa_SOURCES += \ - ofono-iface.c - endif - -+dbusconfdir = @DBUS_CONFDIR@ -+dist_dbusconf_DATA = bluez-alsa.conf -+ - AM_CFLAGS = \ - @BLUEZ_CFLAGS@ \ - @GLIB2_CFLAGS@ \ -diff --git a/src/bluez-alsa.conf b/src/bluez-alsa.conf -new file mode 100644 -index 0000000..6b999d6 ---- /dev/null -+++ b/src/bluez-alsa.conf -@@ -0,0 +1,14 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/src/main.c b/src/main.c -index 9cef402..9183978 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -12,6 +12,7 @@ - # include "config.h" - #endif - -+#define _GNU_SOURCE - #include - #include - #include -@@ -58,6 +59,20 @@ static char *get_a2dp_codecs( - return g_strjoinv(", ", (char **)tmp); - } - -+static void name_acquired_handler( -+ GDBusConnection *connection, -+ const gchar *name, -+ gpointer user_data) { -+ debug("Acquired name: %s", name); -+} -+ -+static void name_lost_handler( -+ GDBusConnection *connection, -+ const gchar *name, -+ gpointer user_data) { -+ debug("Lost name: %s", name); -+} -+ - static GMainLoop *loop = NULL; - static void main_loop_stop(int sig) { - /* Call to this handler restores the default action, so on the -@@ -318,6 +333,7 @@ int main(int argc, char **argv) { - GError *err; - - err = NULL; -+ - address = g_dbus_address_get_for_bus_sync(G_BUS_TYPE_SYSTEM, NULL, NULL); - if ((config.dbus = g_dbus_connection_new_for_address_sync(address, - G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | -@@ -336,6 +352,19 @@ int main(int argc, char **argv) { - ofono_register(); - #endif - -+ char * name_on_bus = NULL; -+ asprintf(&name_on_bus, "org.bluez-alsa.%s", config.hci_dev.name); -+ -+ guint g_dbusid; -+ g_dbusid = g_bus_own_name_on_connection(config.dbus, -+ name_on_bus, -+ G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT | -+ G_BUS_NAME_OWNER_FLAGS_REPLACE, -+ name_acquired_handler, -+ name_lost_handler, -+ NULL, -+ NULL); -+ - /* In order to receive EPIPE while writing to the pipe whose reading end - * is closed, the SIGPIPE signal has to be handled. For more information - * see the io_thread_write_pcm() function. */ -@@ -359,5 +388,8 @@ int main(int argc, char **argv) { - bluealsa_ctl_free(); - bluealsa_config_free(); - -+ g_bus_unown_name (g_dbusid); -+ free(name_on_bus); -+ - return EXIT_SUCCESS; - } --- -2.16.4 - diff --git a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch b/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch deleted file mode 100644 index 7befe733..00000000 --- a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch +++ /dev/null @@ -1,35 +0,0 @@ -From ba292e82928a6a0ea663039ba2d5c030c4cfa80d Mon Sep 17 00:00:00 2001 -From: Thierry Bultel -Date: Fri, 8 Feb 2019 10:21:55 +0100 -Subject: [PATCH] bluealsa-pcm: bump the trigger after pcm prepare - -When a sound application recovers from a EPIPE by calling -snd_pcm_prepare, and goes immediately after to a call to poll, -it would be stuck forever unless the internal event trigger -is bumped. - -Signed-off-by: Thierry Bultel ---- - src/asound/bluealsa-pcm.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/asound/bluealsa-pcm.c b/src/asound/bluealsa-pcm.c -index 42cb61d..4ccbf0d 100644 ---- a/src/asound/bluealsa-pcm.c -+++ b/src/asound/bluealsa-pcm.c -@@ -351,6 +351,12 @@ static int bluealsa_prepare(snd_pcm_ioplug_t *io) { - pcm->io_ptr = 0; - - debug("Prepared: %d", pcm->fd); -+ -+ /* When the sound application calls poll just after snd_pcm_prepare, -+ * it would block forever unless the internal trigger is bumped -+ * */ -+ eventfd_write(pcm->event_fd, 1); -+ - return 0; - } - --- -2.16.4 - diff --git a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend b/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend deleted file mode 100644 index ece43824..00000000 --- a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend +++ /dev/null @@ -1,19 +0,0 @@ -# This brings some mandatory patches for the softmixer and hal-manager. -# -# - patch 1 makes a communication library for hal-manager to get -# the list of audio transports from bluez-alsa -# - patch 2 makes the "debug" macro always display the caller name -# - patch 3 asks dbus for a name like 'org.bluez-alsa.hciX' where hciX -# - patch 4 is a bug fix -# name of the HCI interface that the bluealsa daemon instance is handling -# -# Notice that patch 2 will very likely be replaced by a full dbus interface -# in the future. -# - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://0001-build-and-link-with-a-shared-library.patch" -SRC_URI += "file://0002-log-add-calling-function-name.patch" -SRC_URI += "file://0003-dbus-request-a-name-on-startup.patch" -SRC_URI += "file://0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch" diff --git a/meta-audio-4a-framework/recipes-core/packagegroups/packagegroup-agl-audio.bb b/meta-audio-4a-framework/recipes-core/packagegroups/packagegroup-agl-audio.bb deleted file mode 100644 index bc236ff6..00000000 --- a/meta-audio-4a-framework/recipes-core/packagegroups/packagegroup-agl-audio.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "AGL Audio packages" -DESCRIPTION = "The set of packages required by the AGL Audio" -LICENSE = "MIT" - -inherit packagegroup - -PACKAGES = "\ - packagegroup-agl-audio \ - " - -RDEPENDS_${PN} += "\ - 4a-alsa-core \ - agl-service-audio-4a \ - VIRTUAL-RUNTIME_alsa-state \ - agl-service-unicens \ - bluez-alsa \ - 4a-softmixer \ - 4a-hal-generic \ - 4a-hal-unicens \ - snd-avirt \ - ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '4a-tools', '' , d)} \ -" -# FIXME: Disable for now due to compilation issues against PulseAudio 12.x -# ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-module-4a-client', '' , d)} diff --git a/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0001-snd-avirt-backport-kernel-4.12-api.patch b/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0001-snd-avirt-backport-kernel-4.12-api.patch deleted file mode 100644 index fa737cb4..00000000 --- a/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0001-snd-avirt-backport-kernel-4.12-api.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 2fc07fedd17650f64f9bfcdb8682b55dad75cccd Mon Sep 17 00:00:00 2001 -From: Mark Farrugia -Date: Mon, 8 Apr 2019 16:38:13 +1000 -Subject: [PATCH] 0001-snd-avirt-backport-kernel-4.12-api - ---- - core.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/core.c b/core.c -index c2e32c5..2bb6616 100644 ---- a/core.c -+++ b/core.c -@@ -219,9 +219,8 @@ int snd_avirt_stream_try_complete(struct snd_avirt_stream *stream) - /* Set PCM ops for the Audio Path*/ - PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, pointer); - PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, get_time_info); -- PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, fill_silence); -- PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, copy_user); -- PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, copy_kernel); -+ PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, silence); -+ PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, copy); - PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, mmap); - PCM_OPS_SET(pcm_ops_ap, &stream->pcm_ops, ack); - -@@ -331,9 +330,9 @@ snd_avirt_route_endpoint_copy(struct snd_pcm_substream *substream, - - switch (endpoint) { - case SND_AVIRT_ROUTE_SOURCE: -- return endpoint_ap->pcm_capture_ops->copy_kernel; -+ return endpoint_ap->pcm_capture_ops->copy; - case SND_AVIRT_ROUTE_SINK: -- return endpoint_ap->pcm_playback_ops->copy_kernel; -+ return endpoint_ap->pcm_playback_ops->copy; - } - - return NULL; --- -2.17.1 - diff --git a/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0002-snd-avirt-backport-kernel-4.9-api.patch b/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0002-snd-avirt-backport-kernel-4.9-api.patch deleted file mode 100644 index fa944da0..00000000 --- a/meta-audio-4a-framework/recipes-kernel/snd-avirt/files/0002-snd-avirt-backport-kernel-4.9-api.patch +++ /dev/null @@ -1,63 +0,0 @@ -From fe7fc04e4f685c72b4f971ca0e23b10d683cffe0 Mon Sep 17 00:00:00 2001 -From: Mark Farrugia -Date: Fri, 16 Nov 2018 16:10:12 +1100 -Subject: [PATCH] snd-avirt-backport-kernel-4.9-api - ---- - dummy/dummy.c | 6 +++--- - loopback/loopback.c | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/dummy/dummy.c b/dummy/dummy.c -index f683b92..c37be09 100644 ---- a/dummy/dummy.c -+++ b/dummy/dummy.c -@@ -125,9 +125,9 @@ static int dummy_systimer_prepare(struct snd_pcm_substream *substream) - return 0; - } - --static void dummy_systimer_callback(struct timer_list *t) -+static void dummy_systimer_callback(unsigned long data) - { -- struct dummy_systimer_pcm *dpcm = from_timer(dpcm, t, timer); -+ struct dummy_systimer_pcm *dpcm = (struct dummy_systimer_pcm *)data; - unsigned long flags; - int elapsed = 0; - -@@ -162,7 +162,7 @@ static int dummy_systimer_create(struct snd_pcm_substream *substream) - if (!dpcm) - return -ENOMEM; - substream->runtime->private_data = dpcm; -- timer_setup(&dpcm->timer, dummy_systimer_callback, 0); -+ setup_timer(&dpcm->timer, dummy_systimer_callback, (unsigned long)dpcm); - spin_lock_init(&dpcm->lock); - dpcm->substream = substream; - return 0; -diff --git a/loopback/loopback.c b/loopback/loopback.c -index 4181392..6667a69 100644 ---- a/loopback/loopback.c -+++ b/loopback/loopback.c -@@ -498,9 +498,9 @@ unlock: - return running; - } - --static void loopback_timer_function(struct timer_list *t) -+static void loopback_timer_function(unsigned long data) - { -- struct loopback_pcm *dpcm = from_timer(dpcm, t, timer); -+ struct loopback_pcm *dpcm = (struct loopback_pcm *)data; - unsigned long flags; - - spin_lock_irqsave(&dpcm->cable->lock, flags); -@@ -652,7 +652,7 @@ static int loopback_open(struct snd_pcm_substream *substream) - } - dpcm->loopback = loopback; - dpcm->substream = substream; -- timer_setup(&dpcm->timer, loopback_timer_function, 0); -+ setup_timer(&dpcm->timer, loopback_timer_function, (unsigned long)dpcm); - - cable = loopback->cables[substream->pcm->device]; - if (!cable) { --- -2.17.1 - diff --git a/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bb b/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bb deleted file mode 100644 index 006f9c51..00000000 --- a/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "Build SND_AVIRT driver" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" - -inherit module - -PV = "0.1" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/avirt;protocol=https;branch=${AGL_BRANCH}" - -S = "${WORKDIR}/git" -SRCREV = "12c6dc3159cc14cb3456d6d504398ba779538fb3" - -KERNEL_MODULE_AUTOLOAD += "snd-avirt-core snd-avirt-ap-loopback" diff --git a/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend b/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend deleted file mode 100644 index 3c9fea0e..00000000 --- a/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend +++ /dev/null @@ -1,22 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -def prep_version (d) : - KV = d.getVar('KERNEL_VERSION', True) - if not KV : - return "4.12" - else: - return KV - -ORIG_KERN_VER = "${@prep_version(d)}" - -VANILLA_KERNEL_VERSION = "${@str(ORIG_KERN_VER.split("-")[0].split(".")[0]+ORIG_KERN_VER.split("-")[0].split(".")[1])}" - -APPLY_0001 = "${@str('no' if ${VANILLA_KERNEL_VERSION} > 412 else 'yes')}" -APPLY_0002 = "${@str('no' if ${VANILLA_KERNEL_VERSION} > 49 else 'yes')}" - -SRC_URI_append = " \ - file://0001-snd-avirt-backport-kernel-4.12-api.patch;apply=${APPLY_0001} \ - file://0002-snd-avirt-backport-kernel-4.9-api.patch;apply=${APPLY_0002} \ - " -# Make sure we can expose KERNEL_VERSION ... -do_patch[depends] += "virtual/kernel:do_populate_sysroot" diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-alsa-core/4a-alsa-core_git.bb b/meta-audio-4a-framework/recipes-multimedia/4a-alsa-core/4a-alsa-core_git.bb deleted file mode 100644 index b94eff21..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-alsa-core/4a-alsa-core_git.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "4A - Low Level Alsa Binding" -DESCRIPTION = "Low Level Alsa Binding for 4A (AGL Advanced Audio Agent)" -HOMEPAGE = "https://git.automotivelinux.org/src/4a-alsa-core/" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-alsa-core;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "9b71be04ea600189e390bb111624ad5c2d248a4c" - -DEPENDS += "libafb-helpers" - -PV = "0.1+git${SRCPV}" -S = "${WORKDIR}/git" - -inherit afb-system-cmake - -# FIXME: Remove once CMake+ninja issues are resolved -OECMAKE_GENERATOR = "Unix Makefiles" - -FILES_${PN}-dev += "${INSTALL_PREFIX}/4a-alsa-core/htdocs" - -FILES_${PN} += "${INSTALL_PREFIX}/4a-alsa-core" -FILES_${PN} += "${INSTALL_PREFIX}/lib" diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb b/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb deleted file mode 100644 index fc648a1d..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/4a-hal-config.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "4A - HAL Configuration" -DESCRIPTION = "Configuration files for HALs used in 4A (AGL Advanced Audio Agent)" -HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-reference/" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -SRC_URI = "file://asound.conf.template \ - " - -PV = "0.1" - -RPROVIDES_${PN} += "VIRTUAL-RUNTIME_alsa-state" - -inherit afb-system - -do_install () { - install -d ${D}/${sysconfdir} - install -m 0755 ${WORKDIR}/asound.conf.template ${D}/${sysconfdir}/asound.conf - sed -i "s|@INSTALL_PREFIX@|${INSTALL_PREFIX}|g" ${D}/${sysconfdir}/asound.conf -} - -FILES_${PN} += "${sysconfdir}/asound.conf" diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template b/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template deleted file mode 100644 index 5a265db0..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template +++ /dev/null @@ -1,3 +0,0 @@ -# -#4A pcm configuration is now dynamic, please check hal configuration files in @INSTALL_PREFIX@/4a-hal/etc -# diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.README b/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.README deleted file mode 100644 index 689f9bf8..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.README +++ /dev/null @@ -1,3 +0,0 @@ -This is a sample on how the update-alternative system can be used to select -the highest priority hal given. -Downside ... always only one file is possible in the etc folder. No HAL_LIST. diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample b/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample deleted file mode 100644 index 3bafc3bb..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config-alternatives.bbexample +++ /dev/null @@ -1,57 +0,0 @@ -SUMMARY = "4A - Generic HAL device configuration" -DESCRIPTION = "Generic HAL device configuration in 4A (AGL Advanced Audio Agent)" -HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-configs/" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-hal-configs;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "45f205076573a858348c10a52d31382f31deaf55" - -PV = "0.1+git${SRCPV}" -S = "${WORKDIR}/git" - -# The package is machine-specific due to variable config content -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit afb-system update-alternative -# This defines INSTALL_PREFIX = "/usr/libexec/agl/" - -# no configure needed -do_configure[noexec] = "1" -# no compile needed -do_compile[noexec] = "1" - - -# when no specific HAL is defined, use a generic usb one -4A_DEFAULT_HAL ??= "2ch-generic-usb" - -# for specific machines, activate only known HAL -4A_DEFAULT_HAL_m3ulcb ?= "rcar-m3" -# Downside: only one file at a time! -4A_DEFAULT_HAL_h3ulcb ?= "rcar-m3" -4A_DEFAULT_HAL_intel-corei7-64 ?= "intel-minnow" -4A_DEFAULT_HAL_qemux86-64 ?= "intel-qemu" - -# Due to bug SPEC-1610, default hal for RPI3 is not active yet -# 4A_DEFAULT_HAL_raspberrypi3 ?= "raspberry-pi-3" - -do_install () { - # get pkgdir for 4a-hal - PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal - - install -d -m 0755 ${PKGDIR}/etc.available - cp -ar ${S}/*/*.json ${PKGDIR}/etc.available/ - chown -R root:root ${PKGDIR}/ -} - -# we define a '4a-default-hal' alternative with a low default priority -# you can deploy your own hal with a higher prio -ALTERNATIVE_${PN} = "4a-default-hal" -ALTERNATIVE_PRIORITY = "10" -ALTERNATIVE_LINK_NAME[4a-default-hal] = "${INSTALL_PREFIX}/4a-hal/etc/4a-default-hal.json" -ALTERNATIVE_TARGET[4a-default-hal] = "${INSTALL_PREFIX}/4a-hal/etc.available/hal-4a-${4A_DEFAULT_HAL}.json" - - -RPROVIDES_${PN} += "virtual/4a-default-hal" \ No newline at end of file diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.README b/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.README deleted file mode 100644 index 602486a4..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.README +++ /dev/null @@ -1,4 +0,0 @@ -To keep it simple. - -Just expose 4A_HAL_LIST as-is to conf/local.conf so the user can actually choose any json file. - diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.bb b/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.bb deleted file mode 100644 index e504c3da..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-device-config.bb +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "4A - Generic HAL device configuration" -DESCRIPTION = "Generic HAL device configuration in 4A (AGL Advanced Audio Agent)" -HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-configs/" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-hal-configs;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "fdf0e3c4c67ceb5ddc77c9c1f27d85c1be2055a6" - -PV = "0.1+git${SRCPV}" -S = "${WORKDIR}/git" - -# The package is machine-specific due to variable config content -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit afb-system -# This defines INSTALL_PREFIX = "/usr/libexec/agl/" - -# no configure needed -do_configure[noexec] = "1" - -# no compile needed -do_compile[noexec] = "1" - -# when no specific HAL is defined, use a generic usb one -4A_HAL_LIST ??= "2ch-generic-usb" - -# for specific machines, activate only known HALs -4A_HAL_LIST_m3ulcb ?= "rcar-m3 rcar-m3kf" -4A_HAL_LIST_h3ulcb ?= "rcar-m3 rcar-m3kf" -4A_HAL_LIST_intel-corei7-64 ?= "intel-minnow intel-upsquared-hdmi" -4A_HAL_LIST_qemux86-64 ?= "intel-qemu" - -# Due to bug SPEC-1610, default hal for RPI3 is not active yet -# 4A_HAL_LIST_raspberrypi3 ?= "raspberry-pi-3" - -do_install () { - - # get pkgdir for 4a-hal - PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal - - install -d -m 0755 ${PKGDIR} - install -d -m 0755 ${PKGDIR}/etc - install -d -m 0755 ${PKGDIR}/etc.available - - cp -ar ${S}/*/*.json ${PKGDIR}/etc.available/ - chown -R root:root ${PKGDIR}/etc.available - - for x in ${4A_HAL_LIST}; do - hal=hal-4a-$x.json - cp -v $PKGDIR/etc.available/${hal} $PKGDIR/etc/ - done -} - - -RPROVIDES_${PN} += "virtual/4a-default-hal" diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.README b/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.README deleted file mode 100644 index 29531ccd..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.README +++ /dev/null @@ -1,3 +0,0 @@ -This is a sample how a vendor can: -- inject his own hal (as file hal-4a-myhal.json) -- set PREFERRED_RPROVIDER_virtual/4a-default-hal = "4a-hal-vendor-config" on conf/local.conf diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.bbexample b/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.bbexample deleted file mode 100644 index 105ab1fa..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/4a-hal-vendor-config.bbexample +++ /dev/null @@ -1,46 +0,0 @@ -SUMMARY = "4A - Vendor HAL device configuration" -DESCRIPTION = "Vendor HAL device configuration in 4A (AGL Advanced Audio Agent)" -HOMEPAGE = "https://example.com/" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI = "file://hal-4a-myhal.json" - -PV = "0.1" -S = "${WORKDIR}/" - -# The package is machine-specific due to variable config content -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit afb-system -# This defines INSTALL_PREFIX = "/usr/libexec/agl/" - -# no configure needed -do_configure[noexec] = "1" - -# no compile needed -do_compile[noexec] = "1" - -# use our local hal -4A_HAL_LIST = "myhal" - -do_install () { - - # get pkgdir for 4a-hal - PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal - - install -d -m 0755 ${PKGDIR}/etc.available - - cp -ar ${S}/*.json ${PKGDIR}/etc.available/ - chown -R root:root ${PKGDIR}/etc.available - - for x in ${4A_HAL_LIST}; do - hal=hal-4a-$x.json - cp -v $PKGDIR/etc.available/${hal} $PKGDIR/etc/ - done -} - - -RPROVIDES_${PN} += "virtual/4a-default-hal" \ No newline at end of file diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/deploy-hal-udev.sh b/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/deploy-hal-udev.sh deleted file mode 100755 index f031d58b..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/deploy-hal-udev.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -rm /usr/libexec/agl/4a-hal/etc/* -cp /usr/libexec/agl/4a-hal/etc.available/$i /usr/libexec/agl/4a-hal/etc/ diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/udev-sample-rule.rules b/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/udev-sample-rule.rules deleted file mode 100644 index d2d16a17..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-device-config/files/udev-sample-rule.rules +++ /dev/null @@ -1 +0,0 @@ -ACTION=="add", SUBSYSTEM=="usb", SOMEOTHERMATCH="bar", RUN+="/usr/bin/deploy-hal-udev.sh hal-4a-greenbox.json" diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb b/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb deleted file mode 100644 index 8b20b83d..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-generic/4a-hal-generic_git.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "4A - Generic HAL" -DESCRIPTION = "Generic HAL in 4A (AGL Advanced Audio Agent)" -HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-generic/" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-hal-generic;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "0c4921b83a13bcb96bf03fb0e7a0733c3e202474" - -DEPENDS += "lua bluez-alsa liburcu libafb-helpers libappcontroller" - -PV = "0.1+git${SRCPV}" -S = "${WORKDIR}/git" - -inherit afb-system-cmake - -# FIXME: Remove once CMake+ninja issues are resolved -OECMAKE_GENERATOR = "Unix Makefiles" - -do_install_append () { - # get pkgdir - note that '4a-hal' comes from project ${project_git_repo}/conf.d/cmake/config.cmake - PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal - - # transition: provided by separate package - rm -rf $PKGDIR/etc -} - -RDEPENDS_${PN} += "virtual/4a-default-hal bluez-alsa" diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-unicens/4a-hal-unicens_git.bb b/meta-audio-4a-framework/recipes-multimedia/4a-hal-unicens/4a-hal-unicens_git.bb deleted file mode 100644 index 058d20bb..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-unicens/4a-hal-unicens_git.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "4A - Unicens (MOST) Binding" -DESCRIPTION = "Unicens binding (MOST audio network support) for 4A (AGL Advanced Audio Agent)" -HOMEPAGE = "https://git.automotivelinux.org/src/4a-hal-unicens/" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e385f6075dcdf3ad6ff0056fca58a129" - -DEPENDS += "lua libafb-helpers libappcontroller" - -SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-hal-unicens;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "9228c9da5b85f0fdd6b01f0309e57b846618be63" - - -PV = "0.1+git${SRCPV}" -S = "${WORKDIR}/git" - -inherit afb-system-cmake - -# FIXME: Remove once CMake+ninja issues are resolved -OECMAKE_GENERATOR = "Unix Makefiles" - -do_install_append () { - # installation folder for this plugin is '4a-hal' - # get pkgdir - note that '4a-hal' comes from project ${project_git_repo}/conf.d/cmake/config.cmake - PKGDIR=${D}/${INSTALL_PREFIX}/4a-hal - - # transition: provided by separate package - rm -rf $PKGDIR/etc -} - - diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-softmixer/4a-softmixer_git.bb b/meta-audio-4a-framework/recipes-multimedia/4a-softmixer/4a-softmixer_git.bb deleted file mode 100644 index 908809b6..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-softmixer/4a-softmixer_git.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "4A - Softmixer" -DESCRIPTION = "4A Softmixer (AGL Advanced Audio Agent)" -HOMEPAGE = "https://git.automotivelinux.org/src/4a-softmixer/" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/4a-softmixer.git;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "1a75612274f883aed09d198575582abdc0c9fe0f" - -DEPENDS += "lua liburcu libafb-helpers libappcontroller libavirt" - -PV = "0.1+git${SRCPV}" -S = "${WORKDIR}/git" - -inherit afb-system-cmake - -# FIXME: Remove once CMake+ninja issues are resolved -OECMAKE_GENERATOR = "Unix Makefiles" - -#FIXME : -#FILES_${PN}-dev += "${INSTALL_PREFIX}/4a-softmixer/htdocs" -#FILES_${PN} += "${INSTALL_PREFIX}/afb-aaaa" -#FILES_${PN} += "${INSTALL_PREFIX}/lib" diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-tools/4a-tools_git.bb b/meta-audio-4a-framework/recipes-multimedia/4a-tools/4a-tools_git.bb deleted file mode 100644 index ae1117ad..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/4a-tools/4a-tools_git.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "4A - Tools" -DESCRIPTION = "Tools, utilities, scripts and data related to 4A" -HOMEPAGE = "https://github.com/iotbzh/4a-tools/" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI = "gitsm://github.com/iotbzh/4a-tools;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "flounder_5.99.2" -#SRCREV = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - -PV = "0.1+git${SRCPV}" -S = "${WORKDIR}/git" - - -do_install() { - oe_runmake install DESTDIR=${D}${prefix} -} - -RDEPENDS_${PN} += "bash python3-websockets" -FILES_${PN} += "${datadir}/4a/media/*" diff --git a/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb b/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb deleted file mode 100644 index 014fe119..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "4A - High Level Audio API Service" -DESCRIPTION = "High Level Audio API service used in 4A (AGL Advanced Audio Agent)" -HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-audio-4a/" -SECTION = "apps" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-audio-4a;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "${AGL_APP_REVISION}" - -PV = "0.1+git${SRCPV}" -S = "${WORKDIR}/git" - -inherit cmake aglwgt pkgconfig - -DEPENDS += "alsa-lib json-c systemd af-binder glib-2.0 lua libappcontroller" - -do_aglwgt_deploy_append() { - cat <<'EOF' >${D}/${sysconfdir}/agl-postinsts/99_4A_service_patch.sh -N=600 -svcfile="/usr/local/lib/systemd/*/afm-service-agl-service-audio-4a*.service" -set -x -echo "-- TMP 4A INSTALL FIX from meta-agl/meta-app-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb - MUST BE REMOVED !!!" -while ! ls $svcfile > /dev/null; do - if [ $N = 0 ]; then echo "-- TMP 4A INSTALL NOT FIXED"; exit 0; fi - echo . - sleep 0.2 - N=$(expr $N - 1) -done -sed -i '/\[Unit\]/ a Before=pulseaudio.service' $svcfile; -sed -i '/\[Unit\]/ a ConditionPathExistsGlob=/dev/snd/control*' $svcfile; -sed -i '/ExecStartPre=/ a Environment=LIBASOUND_THREAD_SAFE=0' $svcfile; - -sed -i -e 's|/usr/bin/afb-daemon\>|& --ldpath=/usr/libexec/agl/4a-alsa-core/lib:/usr/libexec/agl/4a-hal/lib:/usr/libexec/agl/smixer/lib|' $svcfile - -# binder name matters: it must match "afbd-4a-*" => the config file (controller json file) that will be searched will be "policy-4a-*.json" -sed -i -e 's|--name afbd-agl-\(.*\)|--name afbd-4a-\1|' $svcfile - -# workaround for SPEC-1762 -sed -i -e 's|/usr/bin/afb-daemon\>|/usr/bin/4a_wait_bt.sh &|' $svcfile - -echo "-- TMP 4A INSTALL FIX END" - -EOF - chmod a+x ${D}/${sysconfdir}/agl-postinsts/99_4A_service_patch.sh -} - -############################################## -# workaround for SPEC-1762/SPEC-1763 -RDEPENDS_${PN} += "bash" -SRC_URI += "file://4a_wait_bt.sh" -do_install_append() { - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/4a_wait_bt.sh ${D}${bindir}/ -} -# -############################################## diff --git a/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh b/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh deleted file mode 100755 index 9dec4350..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -############################################################### -# This is a workaround for SPEC-1762/SPEC-1763 -# -# THIS SCRIPT MUST BE REMOVED ONCE THE ABOVE ISSUES ARE SOLVED -# -# Source recipe is: -# -# meta-audio-4a-framework/ -# recipes-multimedia/ -# agl-service-audio-4a/ -# agl-service-audio-4a_git.bb -# -# Signed-off-by: Stephane Desneux -############################################################### - -# time from script startup -LIMIT=20 -ts0=0 -function ts() { echo $(( $(date +%s) - ts0 )); } -ts0=$(ts) -function havetime() { [[ $(ts) -le ${1:-$LIMIT} ]] || return 1; } - -function waitloop() { - # ensure bt modules are loaded (delay: 5s) - while havetime 4; do - [[ -d /sys/module/bluetooth ]] && { - echo "bluetooth kernel module detected" - break - } - echo "waiting for bluetooth kernel module to be up" - sleep 0.2 - done - havetime 4 || { echo "TIMEOUT REACHED"; return 1; } - - # check that we have at least one controller - HCIDEV= - while havetime 8; do - echo "detecting hci devices..." - for x in $(ls /sys/class/bluetooth/hci* 2>/dev/null); do - [[ -z "$HCIDEV" ]] && HCIDEV=$(basename $x) - done - [[ -n "$HCIDEV" ]] && { - echo "found HCI controller: $HCIDEV" - break - } - sleep 0.2 - done - havetime 8 || { echo "TIMEOUT REACHED"; return 1; } - - # wait for controller to be up and running - while havetime 15; do - state=$(hciconfig $HCIDEV | grep -A 2 ^hci0 | tail -1) - [[ $state =~ UP ]] && [[ $state =~ RUNNING ]] && { - echo "HCI controller $HCIDEV state: $state" - break - } - echo "HCI controller $HCIDEV state: $state ... waiting for UP RUNNING" - sleep 0.2 - done - havetime 15 || { echo "TIMEOUT REACHED"; return 1; } - echo "HCI device up and running after $(ts) seconds" - - # wait for bluetooth-service to return something - while havetime; do - res=$(afb-client-demo -d unix:/run/user/$UID/apis/ws/Bluetooth-Manager adapter_state true) - [[ "$res" =~ \"response\":(.*)}$ ]] && res=${BASH_REMATCH[1]} - [[ "$res" =~ \"powered\":true ]] && { - echo "Bluetooth-Manager/power: $res" - break - } - echo "Bluetooth-Manager/power: not ready yet ($res)" - sleep 0.2 - done - echo "Bluetooth-Manager ready after $(ts) seconds" - - echo "4A now starting..." -} - -waitloop 2>&1 | sed 's/^/4AWAITBT /' >&2 -exec "$@" - diff --git a/meta-audio-4a-framework/recipes-multimedia/alsa/alsa-plugins_%.bbappend b/meta-audio-4a-framework/recipes-multimedia/alsa/alsa-plugins_%.bbappend deleted file mode 100644 index 5109a314..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/alsa/alsa-plugins_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -# Remove PulseAudio plugin configuration files - -do_install_append() { - rm -f ${D}${datadir}/alsa/alsa.conf.d/*pulseaudio* -} - -FILES_${PN}-pulseaudio-conf = "${datadir}/alsa/alsa.conf.d" diff --git a/meta-audio-4a-framework/recipes-multimedia/libavirt/libavirt_git.bb b/meta-audio-4a-framework/recipes-multimedia/libavirt/libavirt_git.bb deleted file mode 100644 index 6d224e4e..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/libavirt/libavirt_git.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "AVIRT user-space library" -DESCRIPTION = "ALSA Virtual Dynamic Sound Driver (AVIRT) user-space library for dynamic sound stream creation." -HOMEPAGE = "https://git.automotivelinux.org/src/libavirt/" -SECTION = "libs/multimedia" - -LICENSE = "GPL-2.0" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libavirt;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "379ea3c132f53eb6f5cf26d1c8a5ca335eb32a2e" - -PV = "0.1+git${SRCPV}" -S = "${WORKDIR}/git" - -DEPENDS = "alsa-lib" - -inherit cmake - -ALLOW_EMPTY_${PN} = "1" diff --git a/meta-audio-4a-framework/recipes-multimedia/pulseaudio/files/default.pa.4a b/meta-audio-4a-framework/recipes-multimedia/pulseaudio/files/default.pa.4a deleted file mode 100644 index 0efdacc2..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/pulseaudio/files/default.pa.4a +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/pulseaudio -nF -# -# This file is part of PulseAudio. -# -# PulseAudio is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# PulseAudio is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with PulseAudio; if not, see . - -# This startup script is used only if PulseAudio is started per-user -# (i.e. not in system mode) - -.fail - -### Automatically augment property information from .desktop files -### stored in /usr/share/application -load-module module-augment-properties - -### Load several protocols -.ifexists module-esound-protocol-unix.so -load-module module-esound-protocol-unix -.endif -load-module module-native-protocol-unix - -### Network access (may be configured with paprefs, so leave this commented -### here if you plan to use paprefs) -#load-module module-esound-protocol-tcp -#load-module module-native-protocol-tcp - -### Load the RTP receiver module (also configured via paprefs, see above) -#load-module module-rtp-recv - -### Load the RTP sender module (also configured via paprefs, see above) -#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'" -#load-module module-rtp-send source=rtp.monitor - -.ifexists module-4a-client.so -load-module module-null-sink sink_name=aaaa_null_sink sink_properties="device.description='4A Null Output'" -set-default-sink aaaa_null_sink -load-module module-4a-client -.else -load-module module-udev-detect -.endif - -### Automatically move streams to the default sink if the sink they are -### connected to dies, similar for sources -load-module module-rescue-streams - -### Make sure we always have a sink around, even if it is a null sink. -load-module module-always-sink - -### Automatically suspend sinks/sources that become idle for too long -load-module module-suspend-on-idle - -### If autoexit on idle is enabled we want to make sure we only quit -### when no local session needs us anymore. -.ifexists module-console-kit.so -load-module module-console-kit -.endif -.ifexists module-systemd-login.so -load-module module-systemd-login -.endif - -### Modules to allow autoloading of filters (such as echo cancellation) -### on demand. module-filter-heuristics tries to determine what filters -### make sense, and module-filter-apply does the heavy-lifting of -### loading modules and rerouting streams. -load-module module-filter-heuristics -load-module module-filter-apply diff --git a/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio-module-4a-client_git.bb b/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio-module-4a-client_git.bb deleted file mode 100644 index b5e9e011..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio-module-4a-client_git.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "pulseaudio 4A client module" -DESCRIPTION = "pulseaudio module to work with 4A (AGL Advanced Audio Agent)" -HOMEPAGE = "https://git.automotivelinux.org/src/pulseaudio-module-4a" -SECTION = "plugins" - -LICENSE = "LGPL-2.1+" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/pulseaudio-module-4a.git;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "9cd72ed153f6615ed826b048e1c344bf4640bd2b" - -PV = "0.1+git${SRCPV}" -S = "${WORKDIR}/git" - -inherit cmake pkgconfig - -DEPENDS += "af-binder systemd json-c pulseaudio" -RDEPENDS_${PN} = "pulseaudio-module-alsa-sink" - -FILES_${PN} += "${libdir}/pulse-*/modules/module-4a-client.so" diff --git a/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend deleted file mode 100644 index d8a84990..00000000 --- a/meta-audio-4a-framework/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI += "file://default.pa.4a" - -do_install_append () { - cp ${WORKDIR}/default.pa.4a ${D}${sysconfdir}/pulse/default.pa -} diff --git a/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0001-Fix-build-with-systemd-209.patch b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0001-Fix-build-with-systemd-209.patch new file mode 100644 index 00000000..5bf6bf88 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0001-Fix-build-with-systemd-209.patch @@ -0,0 +1,30 @@ +From 8080b7395c1638baee60fb3c46667f21e00b87fb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Erik=20Bot=C3=B6?= +Date: Fri, 4 Apr 2014 10:59:18 +0200 +Subject: [PATCH 1/4] Fix build with systemd >= 209 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [Configuration Specific] +Signed-off-by: Erik Botö +--- + src/system/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt +index ce87914..1d0d224 100644 +--- a/src/system/CMakeLists.txt ++++ b/src/system/CMakeLists.txt +@@ -23,7 +23,7 @@ set(dlt_system_SRCS dlt-system.c dlt-system-options.c dlt-system-process-handlin + dlt-system-syslog.c dlt-system-watchdog.c dlt-system-journal.c) + add_executable(dlt-system ${dlt_system_SRCS} ${systemd_SRCS}) + if(WITH_SYSTEMD_JOURNAL) +- target_link_libraries(dlt-system dlt ${ZLIB_LIBRARIES} systemd-journal systemd-id128) ++ target_link_libraries(dlt-system dlt ${ZLIB_LIBRARIES} systemd) + else(WITH_SYSTEMD_JOURNAL) + target_link_libraries(dlt-system dlt ${ZLIB_LIBRARIES}) + endif(WITH_SYSTEMD_JOURNAL) +-- +1.9.3 + diff --git a/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch new file mode 100644 index 00000000..16884799 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0002-Don-t-execute-processes-as-a-specific-user.patch @@ -0,0 +1,81 @@ +From bcca4c99394ba422d03a5e76f2a0023ef248824a Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Tue, 18 Nov 2014 15:47:22 +0100 +Subject: [PATCH 2/4] Don't execute processes as a specific user. + +Upstream-Status: Inappropriate [Configuration Specific] +Signed-off-by: Andrei Gherzan +--- + systemd/dlt-adaptor-udp.service.cmake | 1 - + systemd/dlt-example-user.service.cmake | 1 - + systemd/dlt-receive.service.cmake | 1 - + systemd/dlt-system.service.cmake | 1 - + systemd/dlt.service.cmake | 1 - + 5 files changed, 5 deletions(-) + +diff --git a/systemd/dlt-adaptor-udp.service.cmake b/systemd/dlt-adaptor-udp.service.cmake +index 8dac1f2..ecf9f9e 100644 +--- a/systemd/dlt-adaptor-udp.service.cmake ++++ b/systemd/dlt-adaptor-udp.service.cmake +@@ -21,9 +21,8 @@ Wants=dlt.service + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-adaptor-udp -a @DLT_ADAPTOR_UDP_APPID@ -c @DLT_ADAPTOR_UDP_CTID@ -p @DLT_ADAPTOR_UDP_PORT@ + LimitCORE=infinity + + [Install] +-WantedBy=multi-user.target +\ No newline at end of file ++WantedBy=multi-user.target +diff --git a/systemd/dlt-example-user.service.cmake b/systemd/dlt-example-user.service.cmake +index b665742..35009b0 100644 +--- a/systemd/dlt-example-user.service.cmake ++++ b/systemd/dlt-example-user.service.cmake +@@ -21,6 +21,5 @@ Wants=dlt.service + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-example-user "Hallo from GENIVI DLT example user application" +-LimitCORE=infinity +\ No newline at end of file ++LimitCORE=infinity +diff --git a/systemd/dlt-receive.service.cmake b/systemd/dlt-receive.service.cmake +index c07d447..8f88f00 100644 +--- a/systemd/dlt-receive.service.cmake ++++ b/systemd/dlt-receive.service.cmake +@@ -22,6 +22,5 @@ Wants=dlt.service + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-receive -o /tmp/dlt_receive_log.dlt localhost +-LimitCORE=infinity +\ No newline at end of file ++LimitCORE=infinity +diff --git a/systemd/dlt-system.service.cmake b/systemd/dlt-system.service.cmake +index 0e91f42..1a5b913 100755 +--- a/systemd/dlt-system.service.cmake ++++ b/systemd/dlt-system.service.cmake +@@ -22,7 +22,6 @@ Wants=dlt.service + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-system + WatchdogSec=@DLT_WatchdogSec@ + NotifyAccess=main +diff --git a/systemd/dlt.service.cmake b/systemd/dlt.service.cmake +index 0b3ee2c..e4753a2 100755 +--- a/systemd/dlt.service.cmake ++++ b/systemd/dlt.service.cmake +@@ -21,7 +21,6 @@ Documentation=man:dlt-daemon(1) man:dlt.conf(5) + + [Service] + Type=simple +-User=@DLT_USER@ + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-daemon + WatchdogSec=@DLT_WatchdogSec@ + NotifyAccess=main diff --git a/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0003-systemd-unit-type-should-be-in-lowercase-so-use-Type.patch b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0003-systemd-unit-type-should-be-in-lowercase-so-use-Type.patch new file mode 100644 index 00000000..691a5002 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0003-systemd-unit-type-should-be-in-lowercase-so-use-Type.patch @@ -0,0 +1,98 @@ +From 6804c68ed61f4436818c58cb0abe1c21b4d48aea Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Tue, 18 Nov 2014 15:48:50 +0100 +Subject: [PATCH 3/4] systemd/*: unit type should be in lowercase, so use + Type=simple + +Upstream-Status: Submitted [http://lists.genivi.org/pipermail/genivi-diagnostic-log-and-trace/2014-October/000546.html] +Signed-off-by: Andrei Gherzan +--- + systemd/dlt-adaptor-udp.service.cmake | 2 +- + systemd/dlt-dbus.service.cmake | 2 +- + systemd/dlt-example-user.service.cmake | 2 +- + systemd/dlt-receive.service.cmake | 2 +- + systemd/dlt-system.service.cmake | 2 +- + systemd/dlt.service.cmake | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/systemd/dlt-adaptor-udp.service.cmake b/systemd/dlt-adaptor-udp.service.cmake +index f446757..81a7158 100644 +--- a/systemd/dlt-adaptor-udp.service.cmake ++++ b/systemd/dlt-adaptor-udp.service.cmake +@@ -19,7 +19,7 @@ Description=GENIVI DLT adaptor stdin. Adaptor for forwarding received UDP messag + Wants=dlt.service + + [Service] +-Type=Simple ++Type=simple + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-adaptor-udp -a @DLT_ADAPTOR_UDP_APPID@ -c @DLT_ADAPTOR_UDP_CTID@ -p @DLT_ADAPTOR_UDP_PORT@ + LimitCORE=infinity + +diff --git a/systemd/dlt-dbus.service.cmake b/systemd/dlt-dbus.service.cmake +index d1e3b12..75dcdc3 100755 +--- a/systemd/dlt-dbus.service.cmake ++++ b/systemd/dlt-dbus.service.cmake +@@ -20,7 +20,7 @@ Documentation=man:dlt-dbus(1) man:dlt-dbus.conf(5) + Wants=dlt.service + + [Service] +-Type=Simple ++Type=simple + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-dbus + WatchdogSec=@DLT_WatchdogSec@ + NotifyAccess=main +diff --git a/systemd/dlt-example-user.service.cmake b/systemd/dlt-example-user.service.cmake +index b67a83c..fe9c567 100644 +--- a/systemd/dlt-example-user.service.cmake ++++ b/systemd/dlt-example-user.service.cmake +@@ -19,6 +19,6 @@ Description=GENIVI DLT example user. Generate DLT messages and store them to fil + Wants=dlt.service + + [Service] +-Type=Simple ++Type=simple + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-example-user "Hallo from GENIVI DLT example user application" + LimitCORE=infinity +\ No newline at end of file +diff --git a/systemd/dlt-receive.service.cmake b/systemd/dlt-receive.service.cmake +index 4bbdfc2..3b47dd3 100644 +--- a/systemd/dlt-receive.service.cmake ++++ b/systemd/dlt-receive.service.cmake +@@ -20,6 +20,6 @@ Documentation=man:dlt-receive(1) + Wants=dlt.service + + [Service] +-Type=Simple ++Type=simple + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-receive -o /tmp/dlt_receive_log.dlt localhost + LimitCORE=infinity +\ No newline at end of file +diff --git a/systemd/dlt-system.service.cmake b/systemd/dlt-system.service.cmake +index 7ec995c..d4a4c96 100755 +--- a/systemd/dlt-system.service.cmake ++++ b/systemd/dlt-system.service.cmake +@@ -20,7 +20,7 @@ Documentation=man:dlt-system(1) man:dlt-system.conf(5) + Wants=dlt.service + + [Service] +-Type=Simple ++Type=simple + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-system + WatchdogSec=@DLT_WatchdogSec@ + NotifyAccess=main +diff --git a/systemd/dlt.service.cmake b/systemd/dlt.service.cmake +index 7bb05bc..5386ffd 100755 +--- a/systemd/dlt.service.cmake ++++ b/systemd/dlt.service.cmake +@@ -19,7 +19,7 @@ Description=GENIVI DLT logging daemon + Documentation=man:dlt-daemon(1) man:dlt.conf(5) + + [Service] +-Type=Simple ++Type=simple + ExecStart=@CMAKE_INSTALL_PREFIX@/bin/dlt-daemon + WatchdogSec=@DLT_WatchdogSec@ + NotifyAccess=main +-- +1.9.3 + diff --git a/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch new file mode 100644 index 00000000..685dfcdd --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon/0004-Modify-systemd-config-directory.patch @@ -0,0 +1,24 @@ +From 9a5e655cf57301008cd61d53c8a410a7f397e650 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Tue, 18 Nov 2014 15:51:30 +0100 +Subject: [PATCH 4/4] Modify systemd config directory + +Upstream-Status: Inappropriate [Configuration Specific] +Signed-off-by: Andrei Gherzan +--- + systemd/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e6b44a2..0e885bf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -175,7 +175,7 @@ if(WITH_SYSTEMD OR WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD_JOURNAL) + + set( systemd_SRCS ${CMAKE_SOURCE_DIR}/systemd/3rdparty/sd-daemon.c) + +- set(SYSTEMD_UNITDIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system" CACHE PATH ++ set(SYSTEMD_UNITDIR "/lib/systemd/system" CACHE PATH + "Set directory to install systemd unit files") + + add_subdirectory( systemd ) diff --git a/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb new file mode 100644 index 00000000..b521bca9 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb @@ -0,0 +1,54 @@ +SUMMARY = "Diagnostic Log and Trace" +DESCRIPTION = "This component provides a standardised log and trace interface, \ +based on the standardised protocol specified in the AUTOSAR standard 4.0 DLT. \ +This component can be used by GENIVI components and other applications as \ +logging facility providing: \ +- the DLT shared library \ +- the DLT daemon, including startup scripts \ +- the DLT daemon adaptors- the DLT client console utilities \ +- the DLT test applications" +HOMEPAGE = "https://www.genivi.org/" +SECTION = "console/utils" +LICENSE = "MPLv2" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=99ba60c3fad7eaf8c56bca6dd75cba09 \ + file://MPL.txt;md5=ccdb2761cef70c8b2612624c323f89dc" + +DEPENDS = "dbus zlib pigz-native" +do_unpack[depends] += "pigz-native:do_populate_sysroot" + +# FIX ME +# This should be TAG = "v${PV}" but yocto doesn't support lightweight tags for now +# https://bugzilla.yoctoproject.org/show_bug.cgi?id=6881 +TAG = "b8b3ea3a31f7deb681941a19878c82e7b7350ae7" +BRANCH = "v2.11.x" +SRC_URI = "git://git.projects.genivi.org/${PN}.git;branch=${BRANCH};tag=${TAG} \ + file://0001-Fix-build-with-systemd-209.patch \ + file://0002-Don-t-execute-processes-as-a-specific-user.patch \ + file://0003-systemd-unit-type-should-be-in-lowercase-so-use-Type.patch \ + file://0004-Modify-systemd-config-directory.patch" +S = "${WORKDIR}/git" + +inherit autotools gettext cmake systemd + +# -fPIC is needed to prevent relocation errors when we compile gtest with +# Yocto security flags. See this issue for more details: +# +# https://github.com/google/googletest/issues/854 +# +# If that issue is fixed, we can probably remove the manual -fPIC flags here. +OECMAKE_C_FLAGS += "-fPIC" +OECMAKE_CXX_FLAGS += "-fPIC" + +PACKAGES += "${PN}-systemd" +SYSTEMD_PACKAGES = "${PN} ${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "dlt-system.service dlt.service" +SYSTEMD_AUTO_ENABLE_${PN} = "enable" +SYSTEMD_SERVICE_${PN}-systemd = "dlt-example-user.service \ + dlt-dbus.service \ + dlt-adaptor-udp.service \ + dlt-receive.service" +SYSTEMD_AUTO_ENABLE_${PN}-systemd = "disable" + +EXTRA_OECMAKE = "-DWITH_SYSTEMD=ON" + +FILES_${PN}-doc += "/usr/share/dlt-filetransfer" diff --git a/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon_2.15.0.bb b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon_2.15.0.bb new file mode 100644 index 00000000..dbc87c9a --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-extended/dlt-daemon/dlt-daemon_2.15.0.bb @@ -0,0 +1,52 @@ +SUMMARY = "Diagnostic Log and Trace" +DESCRIPTION = "This component provides a standardised log and trace interface, \ +based on the standardised protocol specified in the AUTOSAR standard 4.0 DLT. \ +This component can be used by GENIVI components and other applications as \ +logging facility providing: \ +- the DLT shared library \ +- the DLT daemon, including startup scripts \ +- the DLT daemon adaptors- the DLT client console utilities \ +- the DLT test applications" +HOMEPAGE = "https://www.genivi.org/" +SECTION = "console/utils" +LICENSE = "MPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8184208060df880fe3137b93eb88aeea" + +DEPENDS = "dbus zlib pigz-native" +do_unpack[depends] += "pigz-native:do_populate_sysroot" + +SRCREV = "e9a486a08fff6d3cc7133a350cec3ee10f463207" +SRC_URI = "git://git.projects.genivi.org/${BPN}.git;protocol=http \ + file://0002-Don-t-execute-processes-as-a-specific-user.patch \ + file://0004-Modify-systemd-config-directory.patch \ + " +S = "${WORKDIR}/git" + +inherit autotools gettext cmake systemd + +# -fPIC is needed to prevent relocation errors when we compile gtest with +# Yocto security flags. See this issue for more details: +# +# https://github.com/google/googletest/issues/854 +# +# If that issue is fixed, we can probably remove the manual -fPIC flags here. +OECMAKE_C_FLAGS += "-fPIC" +OECMAKE_CXX_FLAGS += "-fPIC" + +PACKAGES += "${PN}-systemd" +SYSTEMD_PACKAGES = "${PN} ${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "dlt-system.service dlt.service" +SYSTEMD_AUTO_ENABLE_${PN} = "enable" +SYSTEMD_SERVICE_${PN}-systemd = "dlt-example-user.service \ + dlt-dbus.service \ + dlt-adaptor-udp.service \ + dlt-receive.service" +SYSTEMD_AUTO_ENABLE_${PN}-systemd = "disable" + +EXTRA_OECMAKE = "-DWITH_SYSTEMD=ON" + +FILES_${PN}-doc += "/usr/share/dlt-filetransfer" + +do_install_append() { + rm -f ${D}${bindir}/dlt-test-* +} diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/amcp_dbus.conf b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/amcp_dbus.conf new file mode 100644 index 00000000..49544d5e --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/amcp_dbus.conf @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/amrp_dbus.conf b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/amrp_dbus.conf new file mode 100644 index 00000000..6832d305 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/amrp_dbus.conf @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/configuration.xml b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/configuration.xml new file mode 100644 index 00000000..9e2d05ee --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/configuration.xml @@ -0,0 +1,522 @@ + + + + + 0 + UNKNOWN + SourceTemplate + 0 + TRUE + UNKNOWN + SS_OFF + CF_GENIVI_STEREO + CF_GENIVI_MONO + IS_OFF + + A_AVAILABLE + AR_UNKNOWN + + + SP_GENIVI_TREBLE + 5 + + + SP_GENIVI_MID + 5 + + + SP_GENIVI_BASS + 5 + + + MSP_GENIVI_TREBLE + 5 + + + MSP_GENIVI_MID + 5 + + + MSP_GENIVI_BASS + 5 + + REG_TEMPLATE + TRUE + 1 + + MSP_UNKNOWN,SP_UNKNOWN + MSP_GENIVI_TREBLE,SP_GENIVI_TREBLE + + + + 1 + PulseAudio + mediaplayer + BASE + REG_ROUTER + + + 2 + PulseAudio + ALSA#Playback + BASE + REG_ROUTER + + + 3 + PulseAudio + music + BASE + REG_ROUTER + + + 4 + PulseAudio + Navi + INT + REG_ROUTER + + + 5 + PulseAudio + phone + PHONE + REG_ROUTER + + + + + 0 + UNKNOWN + SinkTemplate + 0 + TRUE + 100 + BASE + MS_UNMUTED + CF_GENIVI_STEREO + CF_GENIVI_MONO + + A_AVAILABLE + AR_GENIVI_NEWMEDIA + + + SP_GENIVI_TREBLE + 5 + + + SP_GENIVI_MID + 5 + + + SP_GENIVI_BASS + 5 + + + MSP_GENIVI_TREBLE + 5 + + + MSP_GENIVI_MID + 5 + + + MSP_GENIVI_BASS + 5 + + REG_TEMPLATE + TRUE + 1 + + 0,0.0 + 1,0.01 + 2,0.02 + 3,0.03 + 4,0.04 + 5,0.05 + 6,0.06 + 7,0.07 + 8,0.08 + 9,0.09 + 10,0.1 + 11,0.11 + 12,0.12 + 14,0.14 + 15,0.15 + 17,0.17 + 20,0.2 + 22,0.22 + 25,0.25 + 28,0.28 + 31,0.31 + 35,0.35 + 40,0.4 + 45,0.45 + 50,0.5 + 56,0.56 + 62,0.62 + 70,0.7 + 80,0.8 + 90,0.9 + 100,1.0 + + + 0.0,-192.0 + 0.01,-40.0 + 0.02,-34.0 + 0.03,-30.0 + 0.04,-27.0 + 0.05,-26.0 + 0.06,-24.0 + 0.07,-23.0 + 0.08,-22.0 + 0.09,-21.0 + 0.1,-20.0 + 0.11,-19.0 + 0.12,-18.0 + 0.14,-17.0 + 0.15,-16.0 + 0.17,-15.0 + 0.2,-14.0 + 0.22,-13.0 + 0.25,-12.0 + 0.28,-11.0 + 0.31,-10.0 + 0.35,-9.0 + 0.4,-8.0 + 0.45,-7.0 + 0.5,-6.0 + 0.56,-5.0 + 0.62,-4.0 + 0.7,-3.0 + 0.8,-2.0 + 0.9,-1.0 + 1.0,0.0 + + + MSP_UNKNOWN,SP_UNKNOWN + MSP_GENIVI_TREBLE,SP_GENIVI_TREBLE + + + + 1 + PulseAudio + rsnd-dai.0-ak4642-hifi#Analog#Stereo + BASE + REG_ROUTER + + + 2 + PulseAudio + Microchip#MOST:0#Multichannel + BASE + REG_ROUTER + + + + + + + + 0 + PulseAudio + org.genivi.audiomanager + pulseaudio + FALSE + TRUE + DS_CONTROLLED + REG_ROUTER + + + + + BASE + C_PLAYBACK + 1 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=mediaplayer^music^ALSA#Playback + + + INT + C_PLAYBACK + 2 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=Navi + + + PHONE + C_PLAYBACK + 3 + Microchip#MOST:0#Multichannel^rsnd-dai.0-ak4642-hifi#Analog#Stereo=phone + + + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "BASE" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_SUSPEND + + "BASE" + CS_CONNECTED + + + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "INT" + + ACTION_LIMIT + + "BASE" + -1000 + 01 + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + priority(CONNECTIONOFCLASS, REQUESTING, OTHERS) LT priority(CONNECTION, REQUESTING) + + ACTION_PUSH + + "INT" + O_NEWEST + + + TRUE + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_PUSH + + "INT" + O_OLDEST + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, "PHONE") INC CS_CONNECTED + + ACTION_MUTE + + REQUESTING + + + + ACTION_CONNECT + + REQUESTING + + + TRUE + + + + + USER_CONNECTION_REQUEST + + name(CLASS, REQUESTING) EQ "PHONE" + + ACTION_LIMIT + + "BASE" + -1000 + 02 + + + + + name(CLASS, REQUESTING) EQ "PHONE" + connectionState(CONNECTIONOFCLASS, "INT") INC CS_CONNECTED + + ACTION_MUTE + + "INT" + + + + + name(SINK, REQUESTING) EQ "AMP" + + ACTION_CONNECT + + REQUESTING + 5000 + + + TRUE + + + + + + USER_DISCONNECTION_REQUEST + + + ACTION_DISCONNECT + + REQUESTING + REQUESTING + + + + + name(CLASS, REQUESTING) EQ "INT" + + ACTION_UNLIMIT + + "BASE" + 01 + + + + + name(CLASS, REQUESTING) EQ "INT" + connectionState(CONNECTIONOFCLASS, REQUESTING, OTHERS) INC CS_CONNECTED + + ACTION_POP + + "INT" + O_OLDEST + + + + + name(CLASS, REQUESTING) EQ "PHONE" + connectionState(CONNECTIONOFCLASS, "INT") INC CS_CONNECTED + + ACTION_UNMUTE + + "INT" + + + + + name(CLASS, REQUESTING) EQ "PHONE" + + ACTION_UNLIMIT + + "BASE" + 02 + + + + + name(CLASS, REQUESTING) EQ "BASE" + connectionState(CONNECTIONOFCLASS, "BASE") INC CS_SUSPENDED + + ACTION_RESUME + + "BASE" + CS_SUSPENDED + + + + + + + USER_SET_VOLUME + + + ACTION_SET_VOLUME + + REQUESTING + + + + + + + + USER_SET_SINK_MUTE_STATE + + muteState(USER,REQUESTING) EQ MS_MUTED + + ACTION_MUTE + + REQUESTING + + + + + muteState(USER,REQUESTING) EQ MS_UNMUTED + + ACTION_UNMUTE + + REQUESTING + + + + + + + + USER_SET_SINK_MAIN_SOUND_PROPERTY + + + ACTION_SET_PROPERTY + + REQUESTING + + + + + + + + USER_SET_SOURCE_MAIN_SOUND_PROPERTY + + + ACTION_SET_PROPERTY + + REQUESTING + + + + + + + + USER_CONNECTION_REQUEST + + + ACTION_MUTE + + REQUESTING + 5000 + + + + ACTION_CONNECT + + REQUESTING + 5000 + + + + ACTION_UNMUTE + + REQUESTING + + + + + + + + + SYP_DEBUG_LOG + 5 + + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/customtypes.xsd b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/customtypes.xsd new file mode 100644 index 00000000..2604fb71 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/customtypes.xsd @@ -0,0 +1,63 @@ + + + + + This enumeration list the source/sink availability change reason. + + + + + + + This enumeration list the source and sink sound property. The sound properties of Genivi Audio manager can be extended to include project specific properties. Three sound properties like volume persistence, connection persistence and volume support are extended. + + + + + + + This enumeration lists the connection format for the source and sinks. + + + + + + + This enumeration contains the type of notification possible. + + + + + + + This enumeration lists the system properties. + + + + + 1 + + + + + + + + + + + + This enumeration lists the Main Properties for source and sinks. + + + + + + + + + + + + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/org.genivi.audiomanager.routing.pulseaudio.conf b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/org.genivi.audiomanager.routing.pulseaudio.conf new file mode 100644 index 00000000..f77845a3 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config/org.genivi.audiomanager.routing.pulseaudio.conf @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config_7.4.bb b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config_7.4.bb new file mode 100644 index 00000000..59d68f9a --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config_7.4.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "Configurations for Audiomanager Plugins for AGL Demo" +HOMEPAGE = "" +LICENSE = "MPLv2" +SECTION = "multimedia" + +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" +RDEPENDS_${PN} = "libxml2 zlib dbus-lib" + +SRC_URI = " \ + file://amcp_dbus.conf \ + file://amrp_dbus.conf \ + file://configuration.xml \ + file://customtypes.xsd \ + file://org.genivi.audiomanager.routing.pulseaudio.conf \ +" + +FILES_${PN} = " \ + ${sysconfdir}/dbus-1/system.d/amcp_dbus.conf \ + ${sysconfdir}/dbus-1/system.d/amrp_dbus.conf \ + ${sysconfdir}/dbus-1/system.d/org.genivi.audiomanager.routing.pulseaudio.conf \ + ${sysconfdir}/audiomanager/control/configuration.xml \ + ${sysconfdir}/audiomanager/control/customtypes.xsd \ +" + +FILES_${PN}-dbg += " \ + /usr/lib/audiomanager/command/.debug \ + /usr/lib/audiomanager/routing/.debug \ +" + +do_install() { + install -d ${D}${sysconfdir}/dbus-1/system.d + install -m 644 ${WORKDIR}/amcp_dbus.conf ${D}${sysconfdir}/dbus-1/system.d/ + install -m 644 ${WORKDIR}/amrp_dbus.conf ${D}${sysconfdir}/dbus-1/system.d/ + install -m 644 ${WORKDIR}/org.genivi.audiomanager.routing.pulseaudio.conf ${D}${sysconfdir}/dbus-1/system.d/ + install -d ${D}${sysconfdir}/audiomanager/control + install -m 644 ${WORKDIR}/configuration.xml ${D}${sysconfdir}/audiomanager/control/ + install -m 644 ${WORKDIR}/customtypes.xsd ${D}${sysconfdir}/audiomanager/control/ +} + +RPROVIDES_${PN} = "virtual/audiomanager-plugins-config" diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins/audiomanager-plugins_git.bb b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins/audiomanager-plugins_git.bb new file mode 100644 index 00000000..9b099ebc --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager-plugins/audiomanager-plugins_git.bb @@ -0,0 +1,60 @@ +DESCRIPTION = "GENIVI Audio Manager Plugins" +HOMEPAGE = "http://projects.genivi.org/audio-manager/home" +LICENSE = "MPLv2" +SECTION = "multimedia" +DEPENDS = "audiomanager libxml2 dbus pulseaudio" + +LIC_FILES_CHKSUM = "file://PluginControlInterfaceGeneric/LICENSE.txt;md5=815ca599c9df247a0c7f619bab123dad" + +SRC_URI = " \ + git://github.com/tisogai/AudioManagerPlugins.git;protocol=https;branch=unknown_element_support \ + " + +SRCREV = "bf5c5e8198b85e84363770150d5a02f553f43296" + +S = "${WORKDIR}/git" +inherit cmake +OECMAKE_CXX_FLAGS += "-std=c++11" +EXTRA_OECMAKE = " \ + -DWITH_COMMAND_INTERFACE_CAPI=OFF \ + -DWITH_COMMAND_INTERFACE_DBUS=ON \ + -DWITH_ROUTING_INTERFACE_ASYNC=OFF \ + -DWITH_ROUTING_INTERFACE_CAPI=OFF \ + -DWITH_ROUTING_INTERFACE_DBUS=ON \ + -DWITH_TEST_CONTROLLER=OFF \ + -DWITH_GENERIC_CONTROLLER=ON \ + -DCONTROLLER_CONFIG_DIR="/etc/audiomanager/control" \ +" + +# NOTE: The specific product should have a separate customtypes.xsd +# and should be appended to FILES_${PN} in product specific +# audiomanager-generic-controller_git.bbappend +FILES_${PN} = " \ + ${libdir}/audiomanager/control/libPluginControlInterfaceGeneric.so \ + ${sysconfdir}/audiomanager/control/audiomanagertypes.xsd \ + ${libdir}/audiomanager/command/libPluginCommandInterfaceDbus.so \ + ${libdir}/audiomanager/routing/libPluginRoutingInterfaceDbus.so \ + /usr/share/audiomanager/audiomanager/CommandInterface.xml \ + /usr/share/audiomanager/audiomanager/RoutingReceiver.xml \ +" + +# NOTE: The specific product should have a separate customtypes.h +# and should be appended to FILES_${PN}-dev in product specific +# audiomanager-generic-controller_git.bbappend +FILES_${PN}-dev = " \ + ${sysconfdir}/audiomanager/control/xsd2header.pl \ +" + +FILES_${PN}-dbg += " \ + ${libdir}/audiomanager/control/.debug/libPluginControlInterfaceGeneric.so \ + ${libdir}/audiomanager/command/.debug/libPluginCommandInterfaceDbus.so \ + ${libdir}/audiomanager/routing/.debug/libPluginRoutingInterfaceDbus.so \ +" + +# remove example configurations +do_install_append() { + rm -rf ${D}${sysconfdir}/audiomanager/control/*.xml + rm -rf ${D}${sysconfdir}/audiomanager/control/customtypes.xsd +} + +RDEPENDS_${PN} = "virtual/audiomanager-plugins-config" diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager/0001-Fix-duplicated-command-line-arg-t.patch b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager/0001-Fix-duplicated-command-line-arg-t.patch new file mode 100644 index 00000000..fcdf9c54 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager/0001-Fix-duplicated-command-line-arg-t.patch @@ -0,0 +1,25 @@ +From c4b6030f575e38dfc9cca7dfd029d207f3af6a13 Mon Sep 17 00:00:00 2001 +From: "Andre Moreira Magalhaes (andrunko)" +Date: Thu, 5 May 2016 00:01:19 -0300 +Subject: [PATCH] Fix duplicated command line arg -t. + +--- + AudioManagerDaemon/src/main.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp +index 795795d..67c0977 100755 +--- a/AudioManagerDaemon/src/main.cpp ++++ b/AudioManagerDaemon/src/main.cpp +@@ -87,7 +87,7 @@ TCLAP::ValueArg commandPluginDir("l","CommandPluginDir","path for l + TCLAP::ValueArg databasePath ("p","databasePath","path for sqlite database (default is in memory)",false,":memory:","string"); + TCLAP::ValueArg telnetPort ("t","telnetport","The port that is used for telnet",false,DEFAULT_TELNETPORT,"int"); + TCLAP::ValueArg maxConnections ("m","maxConnections","Maximal number of connections for telnet",false,MAX_TELNETCONNECTIONS,"int"); +-TCLAP::SwitchArg dbusWrapperTypeBool ("t","dbusType","DbusType to be used by CAmDbusWrapper: if option is selected, DBUS_SYSTEM is used otherwise DBUS_SESSION",false); ++TCLAP::SwitchArg dbusWrapperTypeBool ("T","dbusType","DbusType to be used by CAmDbusWrapper: if option is selected, DBUS_SYSTEM is used otherwise DBUS_SESSION",false); + TCLAP::SwitchArg enableNoDLTDebug ("V","logDlt","print DLT logs to stdout",false); + TCLAP::SwitchArg currentSettings("i","currentSettings","print current settings and exit",false); + TCLAP::SwitchArg daemonizeAM("d","daemonize","daemonize Audiomanager. Better use systemd...",false); +-- +2.5.0 + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager/audiomanager.service b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager/audiomanager.service new file mode 100644 index 00000000..2210a377 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager/audiomanager.service @@ -0,0 +1,17 @@ +# AudioManager systemd service file + +[Unit] +Description=GENIVI AudioManager +Requires=dbus.service +After=dbus.service +Before=pulseaudio.service + +[Service] +Type=notify +ExecStart=/usr/bin/AudioManager -T +Restart=always +TimeoutSec=2 +WatchdogSec=2 + +[Install] +WantedBy=multi-user.target diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager_7.4.bb b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager_7.4.bb new file mode 100644 index 00000000..15eb3625 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/audiomanager/audiomanager_7.4.bb @@ -0,0 +1,56 @@ +DESCRIPTION = "GENIVI Audio Manager" +HOMEPAGE = "http://projects.genivi.org/audio-manager/home" +LICENSE = "MPLv2" +SECTION = "multimedia" +DEPENDS = "dbus dlt-daemon systemd" +LIC_FILES_CHKSUM = "file://LICENCE;md5=f164349b56ed530a6642e9b9f244eec5" + +SRC_URI = " \ + git://github.com/GENIVI/AudioManager.git;protocol=https;branch=master \ + file://audiomanager.service \ +" +RDEPENDS_${PN} = "audiomanager-plugins module-router" +SRCREV = "daf851ee7a41d1b0572c0c95e15f61e427ce97f1" + +S = "${WORKDIR}/git" +inherit cmake systemd +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "audiomanager.service" +SYSTEMD_AUTO_ENABLE = "enable" + +EXTRA_OECMAKE = " \ + -DWITH_TESTS=OFF \ + -DWITH_DOCUMENTATION=OFF \ + -DWITH_DLT=ON \ + -DWITH_TELNET=OFF \ + -DWITH_SYSTEMD_WATCHDOG=ON \ + -DGLIB_DBUS_TYPES_TOLERANT=ON \ + -DWITH_CAPI_WRAPPER=OFF \ + -DWITH_DBUS_WRAPPER=ON \ + -DWITH_SHARED_UTILITIES=ON \ + -DWITH_SHARED_CORE=ON \ +" + +FILES_${PN} = " \ + ${bindir}/AudioManager \ + ${libdir}/libAudioManagerCore.so.7 \ + ${libdir}/libAudioManagerCore.so.7.4 \ + ${libdir}/libAudioManagerCore.so.7.4.12 \ + ${libdir}/libAudioManagerUtilities.so.7 \ + ${libdir}/libAudioManagerUtilities.so.7.4 \ + ${libdir}/libAudioManagerUtilities.so.7.4.12 \ + ${systemd_unitdir}/audiomanager.service \ +" + +FILES_${PN}-dev = " \ + ${includedir}/audiomanager/* \ + ${libdir}/cmake/* \ + ${libdir}/pkgconfig/* \ + ${libdir}/libAudioManagerCore.so \ + ${libdir}/libAudioManagerUtilities.so \ +" + +do_install_append() { + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/audiomanager.service ${D}${systemd_unitdir}/system/ +} diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/module-router/module-router_git.bb b/meta-audio-soundmanager-framework/recipes-multimedia/module-router/module-router_git.bb new file mode 100755 index 00000000..cd52b68a --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/module-router/module-router_git.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "Pulseaudio router module" +HOMEPAGE = "https://github.com/tisogai/module-router" +LICENSE = "LGPLv2" +SECTION = "multimedia" +DEPENDS = "pulseaudio" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=fc178bcd425090939a8b634d1d6a9594" + +SRC_URI = " \ + git://github.com/tisogai/module-router.git;protocol=https;branch=master \ + " + +SRCREV = "8104a3174e6f54ace53066ab1797d9b9bd2bdf63" + +S = "${WORKDIR}/git" +inherit cmake +OECMAKE_CXX_FLAGS += "-std=c++11" + +# NOTE: The specific product should have a separate customtypes.xsd +# and should be appended to FILES_${PN} in product specific +# audiomanager-generic-controller_git.bbappend +FILES_${PN} = " \ + ${libdir}/pulse-*/modules/module-router.so \ +" + + +FILES_${PN}-dbg += " \ + ${libdir}/pulse-*/modules/.debug/module-router.so \ +" + + diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/pulseaudio-config-module-router/files/20-module-router.pa b/meta-audio-soundmanager-framework/recipes-multimedia/pulseaudio-config-module-router/files/20-module-router.pa new file mode 100644 index 00000000..4060feb4 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/pulseaudio-config-module-router/files/20-module-router.pa @@ -0,0 +1,3 @@ +.ifexists module-router.so +load-module module-router +.endif diff --git a/meta-audio-soundmanager-framework/recipes-multimedia/pulseaudio-config-module-router/pulseaudio-config-module-router_1.0.bb b/meta-audio-soundmanager-framework/recipes-multimedia/pulseaudio-config-module-router/pulseaudio-config-module-router_1.0.bb new file mode 100644 index 00000000..d7c2f68b --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-multimedia/pulseaudio-config-module-router/pulseaudio-config-module-router_1.0.bb @@ -0,0 +1,13 @@ +SUMMARY = "PulseAudio configuration to enable router module" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://20-module-router.pa" + +do_install () { + install -d ${D}${sysconfdir}/pulse/default.d + install -m 0644 ${WORKDIR}/20-module-router.pa ${D}${sysconfdir}/pulse/default.d/ +} + +RDEPENDS_${PN} = "module-router" +RPROVIDES_${PN} = "virtual/pulseaudio-config" diff --git a/meta-audio-soundmanager-framework/recipes-platform/packagegroups/packagegroup-agl-demo.bbappend b/meta-audio-soundmanager-framework/recipes-platform/packagegroups/packagegroup-agl-demo.bbappend new file mode 100644 index 00000000..a69cfb80 --- /dev/null +++ b/meta-audio-soundmanager-framework/recipes-platform/packagegroups/packagegroup-agl-demo.bbappend @@ -0,0 +1,4 @@ + +RDEPENDS_${PN} += " \ + audiomanager + " diff --git a/templates/feature/agl-audio-4a-framework/50_bblayers.conf.inc b/templates/feature/agl-audio-4a-framework/50_bblayers.conf.inc deleted file mode 100644 index a4889083..00000000 --- a/templates/feature/agl-audio-4a-framework/50_bblayers.conf.inc +++ /dev/null @@ -1,5 +0,0 @@ - -BBLAYERS =+ " \ - ${METADIR}/meta-agl-devel/meta-audio-4a-framework \ - " - diff --git a/templates/feature/agl-audio-4a-framework/50_local.conf.inc b/templates/feature/agl-audio-4a-framework/50_local.conf.inc deleted file mode 100644 index 91d4c863..00000000 --- a/templates/feature/agl-audio-4a-framework/50_local.conf.inc +++ /dev/null @@ -1,2 +0,0 @@ -#see meta-agl-devel/meta-audio-4a-framework/conf/include/agl-audio-4a-framework.inc -require conf/include/agl-audio-4a-framework.inc diff --git a/templates/feature/agl-audio-soundmanager-framework/50_local.conf.inc b/templates/feature/agl-audio-soundmanager-framework/50_local.conf.inc index 58a53389..70852b7d 100644 --- a/templates/feature/agl-audio-soundmanager-framework/50_local.conf.inc +++ b/templates/feature/agl-audio-soundmanager-framework/50_local.conf.inc @@ -1,4 +1,6 @@ DISTRO_FEATURES_append = " agl-audio-soundmanager-framework pulseaudio" +IMAGE_INSTALL_append += "agl-service-audio-soundmanager pulseaudio-config-soundmanager audiomanager-plugins-config-soundmanager" + PREFERRED_PROVIDER_virtual/audio-framework = "agl-service-audio-soundmanager" PREFERRED_RPROVIDER_virtual/pulseaudio-config = "pulseaudio-config-soundmanager" PREFERRED_RPROVIDER_virtual/audiomanager-plugins-config = "audiomanager-plugins-config-soundmanager" -- cgit 1.2.3-korg