pipewire config: enable bluez modules in pipewire and wireplumber
[AGL/meta-agl-devel.git] / meta-pipewire / recipes-multimedia / pipewire / pipewire / 0014-gst-pwaudiosink-set-the-default-latency-time-buffer-.patch
1 From 460ce06c9cc6fd7b0106e0ce8a265bbeff4ae406 Mon Sep 17 00:00:00 2001
2 From: George Kiagiadakis <george.kiagiadakis@collabora.com>
3 Date: Thu, 11 Jul 2019 17:07:15 +0300
4 Subject: [PATCH] gst/pwaudiosink: set the default latency time (buffer size)
5  to be 21.3ms
6
7 This is to solve underrun issues that seem to appear with the default
8 10ms latency that GstBaseAudioSink has.
9 Hopefully in the future we will have a better mechanism to pick
10 the appropriate latency instead of hardcoding it here.
11
12 Upstream-Status: Submitted [https://github.com/PipeWire/pipewire/pull/140]
13 ---
14  src/gst/gstpwaudiosink.c | 7 +++++++
15  1 file changed, 7 insertions(+)
16
17 diff --git a/src/gst/gstpwaudiosink.c b/src/gst/gstpwaudiosink.c
18 index 6cb71385..069996c3 100644
19 --- a/src/gst/gstpwaudiosink.c
20 +++ b/src/gst/gstpwaudiosink.c
21 @@ -57,6 +57,13 @@ static void
22  gst_pw_audio_sink_init (GstPwAudioSink * self)
23  {
24    self->props.fd = -1;
25 +
26 +  /* Bump the default buffer size up to 21.3 ms, which is the default on most
27 +   * sound cards, in hope to match the alsa buffer size on the pipewire server.
28 +   * This may not always happen, but it still sounds better than the 10ms
29 +   * default latency. This is temporary until we have a better mechanism to
30 +   * select the appropriate latency */
31 +  GST_AUDIO_BASE_SINK (self)->latency_time = 21333;
32  }
33  
34  static void
35 -- 
36 2.20.1
37