From 54e128367daf082ed10ab43b3a43f77d52a24f65 Mon Sep 17 00:00:00 2001 From: qiaohaijiao1 Date: Thu, 18 Jan 2024 17:54:28 +0800 Subject: [PATCH] sim/alsa: clear AUDIO_APB_FINAL flag before DEQUEUE Signed-off-by: qiaohaijiao1 --- arch/sim/src/sim/posix/sim_alsa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sim/src/sim/posix/sim_alsa.c b/arch/sim/src/sim/posix/sim_alsa.c index 440ef37993..f464c2161f 100644 --- a/arch/sim/src/sim/posix/sim_alsa.c +++ b/arch/sim/src/sim/posix/sim_alsa.c @@ -633,6 +633,7 @@ static int sim_audio_flush(struct audio_lowerhalf_s *dev) struct ap_buffer_s *apb; apb = (struct ap_buffer_s *)dq_remfirst(&priv->pendq); + apb->flags &= ~AUDIO_APB_FINAL; #ifdef CONFIG_AUDIO_MULTI_SESSION priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_DEQUEUE, apb, OK, NULL); #else