From 9c3a673987e169539c75e6b57d80dd61f8eb78d9 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 26 Jun 2019 21:04:24 -0400 Subject: ondemandnavi: add patches for pipewire and running as non-root Changes include: * Add a patch to replace the use of 4A via 4a-play with just using ALSA via a gst-launch pipeline. gstreamer is used to provide the flexibility to easily switch to a pipewire output sink and likely add back setting a role via a property. * Add a patch to set the new audio and display permissions for running as non-root. These patches should be removed when they get upstream. Bug-AGL: SPEC-2576 Change-Id: I5d24bb7c1d263a664d1c924f01d118d6d351d232 Signed-off-by: Scott Murray --- .../ondemandnavi/0001-switch-to-alsa-output.patch | 34 ++++++++++++++++++++++ .../ondemandnavi/0002-update-permissions.patch | 22 ++++++++++++++ recipes-demo-hmi/navigation/ondemandnavi_git.bb | 6 +++- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 recipes-demo-hmi/navigation/ondemandnavi/0001-switch-to-alsa-output.patch create mode 100644 recipes-demo-hmi/navigation/ondemandnavi/0002-update-permissions.patch mode change 100755 => 100644 recipes-demo-hmi/navigation/ondemandnavi_git.bb diff --git a/recipes-demo-hmi/navigation/ondemandnavi/0001-switch-to-alsa-output.patch b/recipes-demo-hmi/navigation/ondemandnavi/0001-switch-to-alsa-output.patch new file mode 100644 index 000000000..a93e8f987 --- /dev/null +++ b/recipes-demo-hmi/navigation/ondemandnavi/0001-switch-to-alsa-output.patch @@ -0,0 +1,34 @@ +ondemandnavi: Switch to ALSA output + +Update the talk scripts to use ALSA output via gst-launch-1.0 instead +of 4A's 4a-play. gstreamer is used since it is likely that a further +revision will change to a pipewire output sink and add back setting a +role property. + +Upstream-Status: pending + +Signed-off-by: Scott Murray + +diff --git a/package/flite b/package/flite +index 4c17b80..c837149 100755 +--- a/package/flite ++++ b/package/flite +@@ -1,5 +1,4 @@ + #!/bin/sh + TMP=/tmp/navi.wav + echo "$1" | flite_hts_engine -m /usr/share/Voice/us/cmu_us_arctic_slt.htsvoice -o $TMP +-4a-play $TMP hw:0,0,3 navigation +- ++gst-launch-1.0 filesrc location=$TMP ! decodebin ! audioconvert ! audioresample ! alsasink +diff --git a/package/jtalk b/package/jtalk +index ed82281..c075317 100755 +--- a/package/jtalk ++++ b/package/jtalk +@@ -1,6 +1,4 @@ + #!/bin/sh + TMP=/tmp/navi.wav + echo "$1" | open_jtalk -ow $TMP -m /usr/share/Voice/mei/mei_normal.htsvoice -x /usr/share/dic/ +-4a-play $TMP hw:0,0,3 navigation +- +- ++gst-launch-1.0 filesrc location=$TMP ! decodebin ! audioconvert ! audioresample ! alsasink diff --git a/recipes-demo-hmi/navigation/ondemandnavi/0002-update-permissions.patch b/recipes-demo-hmi/navigation/ondemandnavi/0002-update-permissions.patch new file mode 100644 index 000000000..cff5fa952 --- /dev/null +++ b/recipes-demo-hmi/navigation/ondemandnavi/0002-update-permissions.patch @@ -0,0 +1,22 @@ +ondemandnavi: Update permissions + +Add the new display and audio permissions required with the change to +running as non-root. + +Upstream-Status: pending + +Signed-off-by: Scott Murray + +diff --git a/package/config.xml b/package/config.xml +index ae5c1f6..10b2d99 100755 +--- a/package/config.xml ++++ b/package/config.xml +@@ -13,6 +13,8 @@ + + + ++ ++ + + + diff --git a/recipes-demo-hmi/navigation/ondemandnavi_git.bb b/recipes-demo-hmi/navigation/ondemandnavi_git.bb old mode 100755 new mode 100644 index 1e85ef40a..6cc268177 --- a/recipes-demo-hmi/navigation/ondemandnavi_git.bb +++ b/recipes-demo-hmi/navigation/ondemandnavi_git.bb @@ -9,6 +9,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" inherit qmake5 aglwgt pkgconfig SRC_URI = "git://github.com/YoshitoMomiyama/aglqtnavigation.git;branch=master \ + file://0001-switch-to-alsa-output.patch \ + file://0002-update-permissions.patch \ file://org.agl.naviapi.conf \ " SRCREV = "a6930c2dff988e45e18f91a2368d829c08942b30" @@ -20,7 +22,9 @@ DEPENDS += " qtbase qtquickcontrols2 \ " RDEPENDS_${PN} += " qtlocation \ - flite openjtalk \ + flite \ + openjtalk \ + gstreamer1.0 \ ondemandnavi-config \ " -- cgit 1.2.3-korg