From 2071a14c82f21865c13b762027c90535575d4235 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 8 Sep 2021 11:53:08 +0200 Subject: [PATCH] context: only apply lock-quantum for unsuspended nodes When the node is suspended, don't take into account the lock-quantum settings or else the graph would not want to change to the requested quantum of the node. Say we have a jack node with node.lock-quantum = true and node.latency=256/48000. When it joins the graph and is suspended, the lock-quantum is ignored and the node.latency is set on the graph. After that, the lock-quantum ensures the graph quantum doesn't change anymore until the node is suspended. --- src/pipewire/context.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 48ddfa92f..fe8d6f696 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -1246,8 +1246,10 @@ again: /* collect quantum and rate */ spa_list_for_each(s, &n->follower_list, follower_link) { - lock_quantum |= s->lock_quantum; - lock_rate |= s->lock_rate; + if (s->info.state > PW_NODE_STATE_SUSPENDED) { + lock_quantum |= s->lock_quantum; + lock_rate |= s->lock_rate; + } /* smallest latencies */ if (latency.denom == 0 ||