ASoC: amd: modifications in dma stop sequence
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Fri, 9 Mar 2018 15:21:32 +0000 (20:51 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 9 Mar 2018 15:46:16 +0000 (15:46 +0000)
As per design, non-circular dma also need to be
stopped explicitly for both playback and capture
scenarios.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp-pcm-dma.c

index 935c8fd42a7ad1e624d325f30720c24a214bc653..a1c6534455e680390713be7ba8947ae01a1c1937 100644 (file)
@@ -949,12 +949,16 @@ static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd)
                 * completes : SYSRAM_TO_ACP_CH_NUM / ACP_TO_SYSRAM_CH_NUM
                 */
                if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+                       ret = acp_dma_stop(rtd->acp_mmio,
+                                               SYSRAM_TO_ACP_CH_NUM);
                        ret = acp_dma_stop(rtd->acp_mmio,
                                        ACP_TO_I2S_DMA_CH_NUM);
                        rtd->i2ssp_renderbytescount = 0;
                } else {
                        ret = acp_dma_stop(rtd->acp_mmio,
                                        I2S_TO_ACP_DMA_CH_NUM);
+                       ret = acp_dma_stop(rtd->acp_mmio,
+                                               ACP_TO_SYSRAM_CH_NUM);
                        rtd->i2ssp_capturebytescount = 0;
                }
                break;