summaryrefslogtreecommitdiffstats
path: root/meta-speech-framework/meta-aac/recipes-modules/aac-module-system-audio/files/0001-update-pipewire-gstreamer-plugins.patch
blob: bc2775887ce9238e684c25824a565e9c62696c89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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);