From 96c12c2988a8e4c9cece91710c6ba2485b1cb788 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 2 Oct 2023 15:38:52 +0200 Subject: [PATCH] alsa: do playback sync even when alsa is paused We only start the ALSA pcm after we get our first buffer. We still need to do the sync through (and get the number of prefilled samples) to make sure we set our new timeout and don't keep on waking up quickly while the graph fetches the first buffer. --- spa/plugins/alsa/alsa-pcm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 16399dadb..ef148d76b 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -2395,9 +2395,6 @@ static int alsa_write_sync(struct state *state, uint64_t current_time) snd_pcm_uframes_t avail, delay, target; bool following = state->following; - if (SPA_UNLIKELY(!state->alsa_started)) - return 0; - if (SPA_UNLIKELY((res = check_position_config(state)) < 0)) return res;