Pulseaudio configuration fixes 65/11965/1
authorScott Murray <scott.murray@konsulko.com>
Tue, 14 Nov 2017 20:37:40 +0000 (15:37 -0500)
committerScott Murray <scott.murray@konsulko.com>
Tue, 14 Nov 2017 20:37:40 +0000 (15:37 -0500)
Some fixes to work when 4A is enabled:
- Simplified the echo that adds /etc/pulse/default.d to
  /etc/pulse/default.pa, as it was resulting in "-e -n" in the file
  sometimes for reasons unknown.
- PulseAudio does not like the /etc/pulse/default.d directory being
  empty, and additionally it was realized that the module unloads that
  are in module-router.pa are useful in all our usecases and should
  likely always be present.  To kill two birds with one stone, the
  unload lines have been moved to a 10-unload-modules.pa file that
  is installed by the pulseaudio bbappend, and those lines have been
  removed from the module-router.pa files, which has been renamed to
  20-module-router.pa so that ordering will be maintained if someone
  needs to reenable it.

Change-Id: I70cd1d0dfc596b894009c1bdd7520ffe6394e60e
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
recipes-multimedia/pulseaudio-config-module-router/files/20-module-router.pa [new file with mode: 0644]
recipes-multimedia/pulseaudio-config-module-router/pulseaudio-config-module-router_1.0.bb
recipes-multimedia/pulseaudio/files/10-unload-modules.pa [moved from recipes-multimedia/pulseaudio-config-module-router/files/module-router.pa with 69% similarity]
recipes-multimedia/pulseaudio/pulseaudio_%.bbappend

diff --git a/recipes-multimedia/pulseaudio-config-module-router/files/20-module-router.pa b/recipes-multimedia/pulseaudio-config-module-router/files/20-module-router.pa
new file mode 100644 (file)
index 0000000..4060feb
--- /dev/null
@@ -0,0 +1,3 @@
+.ifexists module-router.so
+load-module module-router
+.endif
index 710d82f..d7c2f68 100644 (file)
@@ -2,11 +2,11 @@ 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"
+SRC_URI = "file://20-module-router.pa"
 
 do_install () {
     install -d ${D}${sysconfdir}/pulse/default.d
-    install -m 0644 ${WORKDIR}/module-router.pa ${D}${sysconfdir}/pulse/default.d/
+    install -m 0644 ${WORKDIR}/20-module-router.pa ${D}${sysconfdir}/pulse/default.d/
 }
 
 RDEPENDS_${PN} = "module-router"
@@ -1,7 +1,4 @@
-.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
index 88cd450..30ef4f7 100644 (file)
@@ -1,4 +1,10 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://10-unload-modules.pa"
+
 # Add .include directive to default.pa so optional configuration can be added
 do_install_append () {
-    echo -e -n "\n.include ${sysconfdir}/pulse/default.d\n" >> ${D}${sysconfdir}/pulse/default.pa
+    echo ".include ${sysconfdir}/pulse/default.d" >> ${D}${sysconfdir}/pulse/default.pa
+    install -d ${D}${sysconfdir}/pulse/default.d
+    install -m 0644 ${WORKDIR}/10-unload-modules.pa ${D}${sysconfdir}/pulse/default.d/
 }