From 5e0e1204d7cf9cad6ad49a07f7a4762dc0ad6f1d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 26 Nov 2024 10:59:54 +0100 Subject: [PATCH] impl-node: remove old check Remove the check for the target rate and duration. The drivers are supposed to update that now. The check is a little racy because a new target could have been configured right after the driver emitted the ready signal. In that case we should not update the clock values but let the driver run with the old values and let the new values become active in the next cycle. --- src/pipewire/impl-node.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/pipewire/impl-node.c b/src/pipewire/impl-node.c index c76953a41..4d8d8b6c0 100644 --- a/src/pipewire/impl-node.c +++ b/src/pipewire/impl-node.c @@ -2105,20 +2105,6 @@ static int node_ready(void *data, int status) } } - /* This update is done too late, the driver should do this - * before calling the ready callback so that it can use the new target - * duration and rate to schedule the next update. We do this here to - * help drivers that don't support this yet */ - if (SPA_UNLIKELY(cl->duration != cl->target_duration || - cl->rate.denom != cl->target_rate.denom)) { - pw_log_warn("driver %s did not update duration/rate (%"PRIu64"/%"PRIu64" %u/%u)", - node->name, - cl->duration, cl->target_duration, - cl->rate.denom, cl->target_rate.denom); - cl->duration = cl->target_duration; - cl->rate = cl->target_rate; - } - sync_type = check_updates(node, &reposition_owner); owner[0] = SPA_ATOMIC_LOAD(a->segment_owner[0]); owner[1] = SPA_ATOMIC_LOAD(a->segment_owner[1]);