[alsa-devel] [PATCH 7/9] ASoC: amd: modifications in dma stop sequence

Vijendar Mukunda Vijendar.Mukunda at amd.com
Fri Feb 16 08:33:52 CET 2018


As per design, non-circular dma also need to be
stopped explicitly for both playback and capture
scenarios.

Added condition checks to stop non-circular dma for
both the I2S controller instances.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
---
 sound/soc/amd/acp-pcm-dma.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 0e2dc05..a16e2bb 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -1178,11 +1178,15 @@ static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd)
 			switch (rtd->i2s_play_instance) {
 			case I2S_BT_INSTANCE:
 				ret = acp_dma_stop(rtd->acp_mmio,
+						SYSRAM_TO_ACP_BT_INSTANCE_CH_NUM);
+				ret = acp_dma_stop(rtd->acp_mmio,
 						ACP_TO_I2S_DMA_BT_INSTANCE_CH_NUM);
 				rtd->i2sbt_renderbytescount = 0;
 				break;
 			case I2S_SP_INSTANCE:
 			default:
+				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;
@@ -1192,12 +1196,16 @@ static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd)
 			case I2S_BT_INSTANCE:
 				ret = acp_dma_stop(rtd->acp_mmio,
 						I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM);
+				ret = acp_dma_stop(rtd->acp_mmio,
+						ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM);
 				rtd->i2sbt_capturebytescount = 0;
 				break;
 			case I2S_SP_INSTANCE:
 			default:
 				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;
 			}
 		}
-- 
2.7.4



More information about the Alsa-devel mailing list