From c43c7ff5ed7fcfeb6d8da31b31d5c2cef71b5725 Mon Sep 17 00:00:00 2001 From: Owen Chen Date: Thu, 26 Nov 2020 21:08:32 +0800 Subject: [PATCH] pcm: snd_pcm_readi - plugin type multi, the overun appears when read After type route use type multi, merge the two input streams.There was PCM error due to insufficient readable data.Cause the underlying read pointer cannot be updated, and then it will be overrun. --- src/pcm/pcm_plugin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c index 5739cfc2e..bb5077699 100644 --- a/src/pcm/pcm_plugin.c +++ b/src/pcm/pcm_plugin.c @@ -498,6 +498,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_avail_update(snd_pcm_t *pcm) * there is more data available. */ slave_size = snd_pcm_avail_update(slave); + slave_frames = slave_size; result = snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames); if (result < 0) { err = result;