From b14775355481aa6b07eb212873253417a66071a6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 1 Feb 2024 10:42:57 +0100 Subject: [PATCH] alsa: always reevaluate matching when driver changed Always reevaluate the rate matching even when we did not change the follower state. It is possible that we were a follower from some node with the same clock and now become a follower of a node with a different clock. The follower state doesn't change but we need to activate the rate matching logic in that case. Fixes rate matching in pro audio (playback) when capture and playback are moved to another driver. --- spa/plugins/alsa/alsa-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 5756c4b58..fd1057eae 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -3476,8 +3476,8 @@ int spa_alsa_reassign_follower(struct state *state) if (following != state->following) { spa_log_debug(state->log, "%p: reassign follower %d->%d", state, state->following, following); state->following = following; - setup_matching(state); } + setup_matching(state); if (state->started) spa_loop_invoke(state->data_loop, do_state_sync, 0, NULL, 0, true, state);