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.
This commit is contained in:
Wim Taymans 2024-02-01 10:42:57 +01:00
parent db7b764bf2
commit 0b67c10a9c

View file

@ -3483,8 +3483,8 @@ int spa_alsa_reassign_follower(struct state *state)
if (following != state->following) { if (following != state->following) {
spa_log_debug(state->log, "%p: reassign follower %d->%d", state, state->following, following); spa_log_debug(state->log, "%p: reassign follower %d->%d", state, state->following, following);
state->following = following; state->following = following;
setup_matching(state);
} }
setup_matching(state);
if (state->started) if (state->started)
spa_loop_invoke(state->data_loop, do_state_sync, 0, NULL, 0, true, state); spa_loop_invoke(state->data_loop, do_state_sync, 0, NULL, 0, true, state);