From 0ccad38df1026c9958db11209be359dae983d28f Mon Sep 17 00:00:00 2001 From: Jonas Holmberg Date: Thu, 28 Jan 2021 16:44:33 +0100 Subject: [PATCH] alsa-pcm: Fix target calculation Use threshold instead of last_threshold so that early wakeup is detected in handle_capture() when duration changes. --- 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 d3126c4f7..a92d646ae 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -802,7 +802,7 @@ static int get_status(struct state *state, snd_pcm_uframes_t *delay, snd_pcm_ufr } - *target = state->last_threshold + state->headroom; + *target = state->threshold + state->headroom; #define MARGIN 48 if (state->resample && state->rate_match) {