pipewire config: enable bluez modules in pipewire and wireplumber
[AGL/meta-agl-devel.git] / meta-pipewire / recipes-multimedia / pipewire / pipewire / 0015-audioconvert-fmtconvert-assume-F32-on-the-other-port.patch
1 From aa5de0cfc31df9cd8fb6d24367d2852dbbc8dcb9 Mon Sep 17 00:00:00 2001
2 From: George Kiagiadakis <george.kiagiadakis@collabora.com>
3 Date: Mon, 29 Jul 2019 16:12:45 +0300
4 Subject: [PATCH] audioconvert/fmtconvert: assume F32 on the other port when
5  listing formats
6
7 This allows picking F32LE as the default format on links that have
8 no restriction and it avoids failing negotiation when the restricted
9 end cannot handle S16/F32/F32P
10
11 For instance this pipeline would previously fail:
12
13   audio-dsp mode=merge ! audio-dsp mode=convert ! alsa-sink
14 old negotiation:     S16LE                   S24_32LE
15 new negotiation:     F32LE                   S24_32LE
16
17 The link between the audio-dsp nodes has no restriction, so previously
18 it would negotiate S16LE, which would then fail to negotiate with alsa-sink
19 because fmtconvert does not know how to convert S16LE to S24_32LE directly.
20
21 With this change, the middle link negotiates to F32LE, which can be
22 converted to anything.
23
24 Upstream-Status: Submitted [https://github.com/PipeWire/pipewire/pull/169]
25 ---
26  spa/plugins/audioconvert/fmtconvert.c | 2 +-
27  1 file changed, 1 insertion(+), 1 deletion(-)
28
29 diff --git a/spa/plugins/audioconvert/fmtconvert.c b/spa/plugins/audioconvert/fmtconvert.c
30 index df4ffb6b..a330f68f 100644
31 --- a/spa/plugins/audioconvert/fmtconvert.c
32 +++ b/spa/plugins/audioconvert/fmtconvert.c
33 @@ -338,7 +338,7 @@ static int port_enum_formats(struct spa_node *node,
34                         if (other->have_format)
35                                 info = other->format;
36                         else
37 -                               info.info.raw.format = SPA_AUDIO_FORMAT_S16;
38 +                               info.info.raw.format = SPA_AUDIO_FORMAT_F32;
39  
40                         if (info.info.raw.format == SPA_AUDIO_FORMAT_F32P ||
41                             info.info.raw.format == SPA_AUDIO_FORMAT_F32) {
42 -- 
43 2.20.1
44