summaryrefslogtreecommitdiffstats
path: root/meta-speech-framework/meta-aac
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2021-08-26 13:24:34 -0400
committerScott Murray <scott.murray@konsulko.com>2021-08-26 17:43:44 +0000
commitddd772668c68cbe77e2ca40b4e56f445473c2d0f (patch)
tree870f68c5b64ba1ca8398cb3a3bda30e5c9e94c72 /meta-speech-framework/meta-aac
parentf3cf2abb8e29a977cd54dae8caf41cd94b78dd10 (diff)
aac-module-system-audio: Update PipeWire gstreamer pluginskoi_11.0.5koi_11.0.4koi/11.0.5koi/11.0.411.0.511.0.4koi
Update PipeWire sink and source to handle drop of pwaudiosink and pwaudiosrc in favor of pipewire* replacements. However, testing has found that Alexa does not work with pipewiresrc (input hangs after first interaction), so for now use "alsasrc device=pipewire" as a workaround as recommended by upstream. This should be revisited when PipeWire is next updated. Bug-AGL: SPEC-4058 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I5f0ebbe80bbafa656dd8e6c542bab666cb481395
Diffstat (limited to 'meta-speech-framework/meta-aac')
-rw-r--r--meta-speech-framework/meta-aac/recipes-modules/aac-module-system-audio/aac-module-system-audio.bbappend4
-rw-r--r--meta-speech-framework/meta-aac/recipes-modules/aac-module-system-audio/files/0001-update-pipewire-gstreamer-plugins.patch44
2 files changed, 48 insertions, 0 deletions
diff --git a/meta-speech-framework/meta-aac/recipes-modules/aac-module-system-audio/aac-module-system-audio.bbappend b/meta-speech-framework/meta-aac/recipes-modules/aac-module-system-audio/aac-module-system-audio.bbappend
index 35847170..94e9f94b 100644
--- a/meta-speech-framework/meta-aac/recipes-modules/aac-module-system-audio/aac-module-system-audio.bbappend
+++ b/meta-speech-framework/meta-aac/recipes-modules/aac-module-system-audio/aac-module-system-audio.bbappend
@@ -1,6 +1,10 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
# Needed for the required gstreamer-app-1.0 pkgconfig bits
DEPENDS += "gstreamer1.0-plugins-base"
+AAC_PATCHES += "file://0001-update-pipewire-gstreamer-plugins.patch"
+
# Need to enable PipeWire support
EXTRA_OECMAKE += "-DUSE_PIPEWIRE=1"
diff --git a/meta-speech-framework/meta-aac/recipes-modules/aac-module-system-audio/files/0001-update-pipewire-gstreamer-plugins.patch b/meta-speech-framework/meta-aac/recipes-modules/aac-module-system-audio/files/0001-update-pipewire-gstreamer-plugins.patch
new file mode 100644
index 00000000..bc277588
--- /dev/null
+++ b/meta-speech-framework/meta-aac/recipes-modules/aac-module-system-audio/files/0001-update-pipewire-gstreamer-plugins.patch
@@ -0,0 +1,44 @@
+Update PipeWire gstreamer plugins
+
+Update PipeWire sink and source to handle drop of pwaudiosink and
+pwaudiosrc in favor of pipewire* replacements. However, testing
+has found that Alexa does not work with pipewiresrc (input hangs
+after first interaction), so for now use "alsasrc device=pipewire"
+as a workaround as recommended by upstream.
+
+Given that Amazon has dropped AGL support, this patch will need to
+be carried locally.
+
+Upstream-Status: Inappropriate [no upstream]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ lib/aal/src/gstreamer/player.c | 2 +-
+ lib/aal/src/gstreamer/recorder.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/aal/src/gstreamer/player.c b/lib/aal/src/gstreamer/player.c
+index 5dd6627..5ff9402 100644
+--- a/lib/aal/src/gstreamer/player.c
++++ b/lib/aal/src/gstreamer/player.c
+@@ -142,7 +142,7 @@ static aal_handle_t gstreamer_player_create(const aal_attributes_t* attr, aal_au
+ } else {
+ #ifdef USE_PIPEWIRE
+ g_info("Using Pipewire device: %s\n", attr->device);
+- sink = gstreamer_create_and_add_element(bin, "pwaudiosink", "sink");
++ sink = gstreamer_create_and_add_element(bin, "pipewiresink", "sink");
+ if (sink) {
+ GstStructure* s = gst_structure_new("properties", "media.role", G_TYPE_STRING, attr->device, NULL);
+ g_object_set(G_OBJECT(sink), "stream-properties", s, NULL);
+diff --git a/lib/aal/src/gstreamer/recorder.c b/lib/aal/src/gstreamer/recorder.c
+index ff6d464..a13b000 100644
+--- a/lib/aal/src/gstreamer/recorder.c
++++ b/lib/aal/src/gstreamer/recorder.c
+@@ -69,7 +69,7 @@ static aal_handle_t gstreamer_recorder_create(const aal_attributes_t* attr, aal_
+ strncpy(src_desc, "autoaudiosrc", sizeof(src_desc) - 1);
+ } else {
+ #ifdef USE_PIPEWIRE
+- snprintf(src_desc, sizeof(src_desc), "pwaudiosrc stream-properties=\"properties,media.role=%s\"", attr->device);
++ snprintf(src_desc, sizeof(src_desc), "alsasrc device=pipewire");
+ #else
+ g_info("Using ALSA device: %s\n", attr->device);
+ snprintf(src_desc, sizeof(src_desc), "alsasrc device=%s", attr->device);