From 3d274192340f3e2e4476c293689d349a1be35554 Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Wed, 31 Aug 2022 20:12:01 +0800 Subject: [PATCH] ASoC: rockchip: mdais: Fix residue pop on DRAIN path There is no need to refine pointer for playback. Signed-off-by: Sugar Zhang Change-Id: Iae94a26fbe7e4b667c7b666c80a26e43079263bf --- sound/soc/rockchip/rockchip_multi_dais_pcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/rockchip/rockchip_multi_dais_pcm.c b/sound/soc/rockchip/rockchip_multi_dais_pcm.c index 20caa74b6a51..d69395f70139 100644 --- a/sound/soc/rockchip/rockchip_multi_dais_pcm.c +++ b/sound/soc/rockchip/rockchip_multi_dais_pcm.c @@ -598,6 +598,9 @@ static snd_pcm_uframes_t dmaengine_mpcm_pointer(struct snd_soc_component *compon pos = buf_size - state.residue; frames = bytes_to_frames(substream->runtime, pos); + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + return frames; + #ifdef CONFIG_SND_SOC_ROCKCHIP_VAD if (prtd->vpos) frames = bytes_to_frames(substream->runtime, prtd->vpos);