aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2017-11-03 10:13:50 -0400
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-11-03 19:20:24 +0000
commit3294d066144cc61df3717af95bca8032f8386375 (patch)
tree13b0b3ac1dbe6342e9c7633f216d43a26948c3e0
parente96107e981c04b71e81986dc2528e06ae7515488 (diff)
Rework PulseAudio / audiomanager config setup to allow over-rides
Changes include: - Move from having PulseAudio configuration changes in the recipe bbappend as patches to using the .include directive in default.pa to pick up configuration fragments provided by other recipes. - Use virtual/pulseaudio-config to pick up the previously hard-coded configuration for enabling module-router.so, which is now provided by a new recipe that sets RPROVIDES appropriately. This allows over-riding the desired configuration if needed. - Switch the audiomanager-plugins-config dependency to using virtual/audiomanager-plugins-config so that it can be over-ridden with PREFERRED_PROVIDER if needed. Bug-AGL: SPEC-1025, SPEC-1026, SPEC-1027 Change-Id: Ifdf16871cddc2bec7761b8c63239623b63c9e984 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
-rw-r--r--recipes-core/packagegroups/packagegroup-ivi-common-core-multimedia.bbappend2
-rw-r--r--recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config_7.4.bb2
-rw-r--r--recipes-multimedia/audiomanager-plugins/audiomanager-plugins_git.bb3
-rw-r--r--recipes-multimedia/pulseaudio-config-module-router/files/module-router.pa7
-rw-r--r--recipes-multimedia/pulseaudio-config-module-router/pulseaudio-config-module-router_1.0.bb13
-rw-r--r--recipes-multimedia/pulseaudio/pulseaudio/0001-disable-module-role-cork-by-default.patch30
-rw-r--r--recipes-multimedia/pulseaudio/pulseaudio/0006-auto-load-module-router.patch26
-rw-r--r--recipes-multimedia/pulseaudio/pulseaudio_%.bbappend8
8 files changed, 29 insertions, 62 deletions
diff --git a/recipes-core/packagegroups/packagegroup-ivi-common-core-multimedia.bbappend b/recipes-core/packagegroups/packagegroup-ivi-common-core-multimedia.bbappend
index 3623601c6..dfc6edac0 100644
--- a/recipes-core/packagegroups/packagegroup-ivi-common-core-multimedia.bbappend
+++ b/recipes-core/packagegroups/packagegroup-ivi-common-core-multimedia.bbappend
@@ -1,4 +1,4 @@
RDEPENDS_${PN} += "\
audiomanager \
+ virtual/pulseaudio-config \
"
- \ No newline at end of file
diff --git a/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config_7.4.bb b/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config_7.4.bb
index 8e5edd833..59d68f9a1 100644
--- a/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config_7.4.bb
+++ b/recipes-multimedia/audiomanager-plugins-config/audiomanager-plugins-config_7.4.bb
@@ -36,3 +36,5 @@ do_install() {
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/recipes-multimedia/audiomanager-plugins/audiomanager-plugins_git.bb b/recipes-multimedia/audiomanager-plugins/audiomanager-plugins_git.bb
index c81f414b2..9b099ebcb 100644
--- a/recipes-multimedia/audiomanager-plugins/audiomanager-plugins_git.bb
+++ b/recipes-multimedia/audiomanager-plugins/audiomanager-plugins_git.bb
@@ -3,7 +3,6 @@ HOMEPAGE = "http://projects.genivi.org/audio-manager/home"
LICENSE = "MPLv2"
SECTION = "multimedia"
DEPENDS = "audiomanager libxml2 dbus pulseaudio"
-RDEPENDS_${PN} = "audiomanager-plugins-config"
LIC_FILES_CHKSUM = "file://PluginControlInterfaceGeneric/LICENSE.txt;md5=815ca599c9df247a0c7f619bab123dad"
@@ -57,3 +56,5 @@ 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/recipes-multimedia/pulseaudio-config-module-router/files/module-router.pa b/recipes-multimedia/pulseaudio-config-module-router/files/module-router.pa
new file mode 100644
index 000000000..4ead26e39
--- /dev/null
+++ b/recipes-multimedia/pulseaudio-config-module-router/files/module-router.pa
@@ -0,0 +1,7 @@
+.ifexists module-router.so
+unload-module module-role-cork
+unload-module module-device-restore
+unload-module module-stream-restore
+unload-module module-card-restore
+load-module module-router
+.endif
diff --git a/recipes-multimedia/pulseaudio-config-module-router/pulseaudio-config-module-router_1.0.bb b/recipes-multimedia/pulseaudio-config-module-router/pulseaudio-config-module-router_1.0.bb
new file mode 100644
index 000000000..710d82fb3
--- /dev/null
+++ b/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://module-router.pa"
+
+do_install () {
+ install -d ${D}${sysconfdir}/pulse/default.d
+ install -m 0644 ${WORKDIR}/module-router.pa ${D}${sysconfdir}/pulse/default.d/
+}
+
+RDEPENDS_${PN} = "module-router"
+RPROVIDES_${PN} = "virtual/pulseaudio-config"
diff --git a/recipes-multimedia/pulseaudio/pulseaudio/0001-disable-module-role-cork-by-default.patch b/recipes-multimedia/pulseaudio/pulseaudio/0001-disable-module-role-cork-by-default.patch
deleted file mode 100644
index 7472b47b6..000000000
--- a/recipes-multimedia/pulseaudio/pulseaudio/0001-disable-module-role-cork-by-default.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 9cbdc0472973c23b4e93200ed30afecbd0ef24d6 Mon Sep 17 00:00:00 2001
-From: Matt Porter <mporter@konsulko.com>
-Date: Tue, 27 Jun 2017 21:50:23 +0300
-Subject: [PATCH] disable module-role-cork by default
-
-module-role-cork's hardcoded default corking policies can conflict
-with module-router and AudioManager's configurable routing policies.
-Disable it to avoid unwanted corking changes on streams.
-
-Signed-off-by: Matt Porter <mporter@konsulko.com>
----
- src/daemon/default.pa.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
-index d46bd5e..023e680 100755
---- a/src/daemon/default.pa.in
-+++ b/src/daemon/default.pa.in
-@@ -151,7 +151,7 @@ load-module module-systemd-login
- load-module module-position-event-sounds
-
- ### Cork music/video streams when a phone stream is active
--load-module module-role-cork
-+#load-module module-role-cork
-
- ### Modules to allow autoloading of filters (such as echo cancellation)
- ### on demand. module-filter-heuristics tries to determine what filters
---
-2.11.0
-
diff --git a/recipes-multimedia/pulseaudio/pulseaudio/0006-auto-load-module-router.patch b/recipes-multimedia/pulseaudio/pulseaudio/0006-auto-load-module-router.patch
deleted file mode 100644
index e1ae914fe..000000000
--- a/recipes-multimedia/pulseaudio/pulseaudio/0006-auto-load-module-router.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
-index 783e326..3c68638 100755
---- a/src/daemon/default.pa.in
-+++ b/src/daemon/default.pa.in
-@@ -35,9 +35,9 @@ load-sample-dir-lazy %WINDIR%\Media\*.wav
- .fail
-
- ### Automatically restore the volume of streams and devices
--load-module module-device-restore
--load-module module-stream-restore
--load-module module-card-restore
-+#load-module module-device-restore
-+#load-module module-stream-restore
-+#load-module module-card-restore
-
- ### Automatically augment property information from .desktop files
- ### stored in /usr/share/application
-@@ -195,3 +195,8 @@ ifelse(@HAVE_X11@, 1, [dnl
- ### Make some devices default
- #set-default-sink output
- #set-default-source input
-+
-+.ifexists module-router.so
-+load-module module-router
-+.endif
-+
diff --git a/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
index 986305489..5b779b765 100644
--- a/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
+++ b/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
@@ -1,4 +1,4 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://0006-auto-load-module-router.patch"
-SRC_URI += "file://0001-disable-module-role-cork-by-default.patch"
+# Add .include directive to default.pa so optional configuration can be added
+do_install_append () {
+ echo -n "\n.include ${sysconfdir}/pulse/default.d\n" >> ${D}${sysconfdir}/pulse/default.pa
+}