summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMihai Serban <mihai.serban@nxp.com>2017-04-27 18:47:42 +0300
committerAnson Huang <Anson.Huang@nxp.com>2017-06-09 22:22:50 +0800
commit9f6011dca05997b73dd6fbab095dfe571918e1f7 (patch)
tree42e7ede26d02e03cb4b3159240a77ae93aacbf85 /sound
parent77561559571e88bf3a3545b75d56025147744a55 (diff)
MLK-14935: ASoC: fsl_sai: Fix mixing initialization data with actual audio samples
When starting a playback the initialization data used to reduce underruns was send to the transmit data register after the DMA requests were enabled. This patch moves the initialization phase before enabling the DMA so the data is transmitted in correct order. Signed-off-by: Mihai Serban <mihai.serban@nxp.com> (cherry picked from commit 44e5c11332390a8b1c09d33d5653cb6673e9eea4)
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_sai.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 7f533a421853..6c308a490132 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -598,15 +598,14 @@ static int fsl_sai_trigger(struct snd_pcm_substream *substream, int cmd,
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx),
- FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE);
-
for (i = 0; tx && i < channels; i++)
regmap_write(sai->regmap, FSL_SAI_TDR0, 0x0);
if (tx)
udelay(10);
regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx),
+ FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE);
+ regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx),
FSL_SAI_CSR_TERE, FSL_SAI_CSR_TERE);
regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx),
FSL_SAI_CSR_SE, FSL_SAI_CSR_SE);