From a3fe226eac3d52514c90c22157533e162a1a719d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 8 Sep 2021 11:28:05 +0200 Subject: [PATCH] context: don't try to change the quantum when idle When the driver is going to be idle or not running, avoid updating the quantum. This is mostly when a node is moved to another driver. Changing the quantum of the old driver would have the clients briefly see the useless quantum before being moved to the new driver. --- src/pipewire/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 8e3107109..48ddfa92f 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -1321,7 +1321,7 @@ again: if (context->settings.clock_power_of_two_quantum) quantum = flp2(quantum); - if (quantum != n->rt.position->clock.duration && !lock_quantum) { + if (running && quantum != n->rt.position->clock.duration && !lock_quantum) { pw_log_info("(%s-%u) new quantum:%"PRIu64"->%u", n->name, n->info.id, n->rt.position->clock.duration,