Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: AMD: Simplify trigger handler

Now that the I2S channel names are fixed, and DMA data flow order is
consistent (ch1 then ch2), we can simplify channel start order:
start the upstream channel and then the downstream channel for both
playback and capture cases.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Daniel Kurtz and committed by
Mark Brown
df61f9f7 1a337a1e

+3 -6
+3 -6
sound/soc/amd/acp-pcm-dma.c
··· 1024 1024 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 1025 1025 case SNDRV_PCM_TRIGGER_RESUME: 1026 1026 rtd->bytescount = acp_get_byte_count(rtd); 1027 - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 1028 - acp_dma_start(rtd->acp_mmio, rtd->ch1); 1029 - acp_dma_start(rtd->acp_mmio, rtd->ch2); 1030 - } else { 1027 + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { 1031 1028 if (rtd->capture_channel == CAP_CHANNEL0) { 1032 1029 acp_dma_cap_channel_disable(rtd->acp_mmio, 1033 1030 CAP_CHANNEL1); ··· 1037 1040 acp_dma_cap_channel_enable(rtd->acp_mmio, 1038 1041 CAP_CHANNEL1); 1039 1042 } 1040 - acp_dma_start(rtd->acp_mmio, rtd->ch2); 1041 - acp_dma_start(rtd->acp_mmio, rtd->ch1); 1042 1043 } 1044 + acp_dma_start(rtd->acp_mmio, rtd->ch1); 1045 + acp_dma_start(rtd->acp_mmio, rtd->ch2); 1043 1046 ret = 0; 1044 1047 break; 1045 1048 case SNDRV_PCM_TRIGGER_STOP: