]> git.pld-linux.org Git - packages/pipewire.git/blame - pipewire-samplerate.patch
upstream patch for setting correct sample rate on device; rel 2
[packages/pipewire.git] / pipewire-samplerate.patch
CommitLineData
02862e89
JP
1From ee0fcf05c17db0e5d5775d94c8911af7821c868f Mon Sep 17 00:00:00 2001
2From: Wim Taymans <wtaymans@redhat.com>
3Date: Thu, 16 Dec 2021 11:39:46 +0100
4Subject: [PATCH] context: apply new quantum and rate when driver is idle
5
6When the driver is IDLE, apply the quantum and rate immediately
7so that we can use the values when starting the driver.
8
9See #1913
10---
11 src/pipewire/context.c | 6 ++++++
12 1 file changed, 6 insertions(+)
13
14diff --git a/src/pipewire/context.c b/src/pipewire/context.c
15index 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--
32GitLab
33
This page took 0.041473 seconds and 4 git commands to generate.