From 0d29ff059d328feb85bfdb362dee1f45b66dd854 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 20 Dec 2017 19:39:54 -0500 Subject: [PATCH] agl-service-radio: Set appropriate sink if 4A is configured If 4A is enabled in DISTRO_FEATURES, add an extension conf file to add setting PULSE_SINK to the systemd service unit. This will direct the radio output into the matching PulseAudio sink for the 4A Radio role. Change-Id: Ic67f3bcf1bd64636813e426f4471e666d2c33938 Signed-off-by: Scott Murray --- recipes-demo-hmi/agl-service-radio/agl-service-radio_git.bb | 13 ++++++++++++- .../agl-service-radio/files/set-4a-output-sink.conf | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 recipes-demo-hmi/agl-service-radio/files/set-4a-output-sink.conf diff --git a/recipes-demo-hmi/agl-service-radio/agl-service-radio_git.bb b/recipes-demo-hmi/agl-service-radio/agl-service-radio_git.bb index 0e913af15..46dc48a21 100644 --- a/recipes-demo-hmi/agl-service-radio/agl-service-radio_git.bb +++ b/recipes-demo-hmi/agl-service-radio/agl-service-radio_git.bb @@ -8,7 +8,9 @@ LICENSE = "Apache-2.0 & GPLv2+" LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984 \ file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/agl-service-radio;protocol=https;branch=${AGL_BRANCH}" +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/agl-service-radio;protocol=https;branch=${AGL_BRANCH} \ + file://set-4a-output-sink.conf \ +" SRCREV = "${AGL_APP_REVISION}" PV = "1.0+git${SRCPV}" @@ -18,3 +20,12 @@ S = "${WORKDIR}/git" DEPENDS = "rtl-sdr glib-2.0 pulseaudio alsa-lib" inherit cmake aglwgt pkgconfig + +do_install_append() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'agl-audio-4a-framework', 'true', 'false', d)}; then + install -d ${D}${systemd_user_unitdir}/afm-service-agl-service-radio@1.0.service.d + install -m 0644 ${WORKDIR}/set-4a-output-sink.conf ${D}${systemd_user_unitdir}/afm-service-agl-service-radio@1.0.service.d/ + fi +} + +FILES_${PN} += "${systemd_user_unitdir}" diff --git a/recipes-demo-hmi/agl-service-radio/files/set-4a-output-sink.conf b/recipes-demo-hmi/agl-service-radio/files/set-4a-output-sink.conf new file mode 100644 index 000000000..c574ca17e --- /dev/null +++ b/recipes-demo-hmi/agl-service-radio/files/set-4a-output-sink.conf @@ -0,0 +1,2 @@ +[Service] +Environment=PULSE_SINK=alsa_output.Radio -- 2.16.6