]> git.pld-linux.org Git - packages/pipewire.git/blob - pipewire-samplerate.patch
upstream patch for setting correct sample rate on device; rel 2
[packages/pipewire.git] / pipewire-samplerate.patch
1 From ee0fcf05c17db0e5d5775d94c8911af7821c868f Mon Sep 17 00:00:00 2001
2 From: Wim Taymans <wtaymans@redhat.com>
3 Date: Thu, 16 Dec 2021 11:39:46 +0100
4 Subject: [PATCH] context: apply new quantum and rate when driver is idle
5
6 When the driver is IDLE, apply the quantum and rate immediately
7 so that we can use the values when starting the driver.
8
9 See #1913
10 ---
11  src/pipewire/context.c | 6 ++++++
12  1 file changed, 6 insertions(+)
13
14 diff --git a/src/pipewire/context.c b/src/pipewire/context.c
15 index 84eca3bda..a3551c2b8 100644
16 --- a/src/pipewire/context.c
17 +++ b/src/pipewire/context.c
18 @@ -1246,6 +1246,12 @@ again:
19                         n->current_pending = true;
20                 }
21  
22 +               if (n->info.state < PW_NODE_STATE_RUNNING && n->current_pending) {
23 +                       n->rt.position->clock.duration = n->current_quantum;
24 +                       n->rt.position->clock.rate = n->current_rate;
25 +                       n->current_pending = false;
26 +               }
27 +
28                 pw_log_debug("%p: driving %p running:%d passive:%d quantum:%u '%s'",
29                                 context, n, running, n->passive, quantum, n->name);
30  
31 -- 
32 GitLab
33
This page took 0.16997 seconds and 3 git commands to generate.