diff options
author | Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> | 2020-01-27 16:56:03 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-01-27 17:51:48 +0000 |
commit | 90b141614a4133ffeb1075049a49c702f98e26df (patch) | |
tree | 04ea368e44adb59f7575c42b3e11e9cab558377b /sound | |
parent | 0c75419a94a20b2bf791825a665d8b64cf7c560d (diff) | |
download | linux-90b141614a4133ffeb1075049a49c702f98e26df.tar.bz2 |
ASoC: amd: Fix for Subsequent Playback issue.
If we play audio back to back, which kills one playback
and immediately start another, we can hear clicks.
This patch fixes the issue.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/1580124397-19842-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/amd/raven/acp3x-pcm-dma.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 5c3ec3c58e3b..aecc3c061679 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -349,13 +349,6 @@ static int acp3x_dma_close(struct snd_soc_component *component, component = snd_soc_rtdcom_lookup(prtd, DRV_NAME); adata = dev_get_drvdata(component->dev); - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - adata->play_stream = NULL; - adata->i2ssp_play_stream = NULL; - } else { - adata->capture_stream = NULL; - adata->i2ssp_capture_stream = NULL; - } /* Disable ACP irq, when the current stream is being closed and * another stream is also not active. @@ -363,6 +356,13 @@ static int acp3x_dma_close(struct snd_soc_component *component, if (!adata->play_stream && !adata->capture_stream && !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream) rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB); + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + adata->play_stream = NULL; + adata->i2ssp_play_stream = NULL; + } else { + adata->capture_stream = NULL; + adata->i2ssp_capture_stream = NULL; + } return 0; } |