diff options
author | Nicolin Chen <nicoleotsuka@gmail.com> | 2014-07-17 09:21:37 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-17 13:10:41 -0400 |
commit | eff952b733d4c1ff3a6b35accce940b223372978 (patch) | |
tree | 0ca507468b33225ab4b6acbe58c9585b02d70d8b | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) |
ASoC: fsl_sai: Reset FIFOs after disabling TE/RE
SAI will not clear their FIFOs after disabling TE/RE. Therfore, the driver
should take care the task so as not to let useless data remain in the FIFO.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/fsl/fsl_sai.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index c5a0e8af8226..b10dbd835d5c 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c | |||
@@ -371,10 +371,13 @@ static int fsl_sai_trigger(struct snd_pcm_substream *substream, int cmd, | |||
371 | 371 | ||
372 | /* Check if the opposite FRDE is also disabled */ | 372 | /* Check if the opposite FRDE is also disabled */ |
373 | if (!(tx ? rcsr & FSL_SAI_CSR_FRDE : tcsr & FSL_SAI_CSR_FRDE)) { | 373 | if (!(tx ? rcsr & FSL_SAI_CSR_FRDE : tcsr & FSL_SAI_CSR_FRDE)) { |
374 | /* Disable both directions and reset their FIFOs */ | ||
374 | regmap_update_bits(sai->regmap, FSL_SAI_TCSR, | 375 | regmap_update_bits(sai->regmap, FSL_SAI_TCSR, |
375 | FSL_SAI_CSR_TERE, 0); | 376 | FSL_SAI_CSR_TERE | FSL_SAI_CSR_FR, |
377 | FSL_SAI_CSR_FR); | ||
376 | regmap_update_bits(sai->regmap, FSL_SAI_RCSR, | 378 | regmap_update_bits(sai->regmap, FSL_SAI_RCSR, |
377 | FSL_SAI_CSR_TERE, 0); | 379 | FSL_SAI_CSR_TERE | FSL_SAI_CSR_FR, |
380 | FSL_SAI_CSR_FR); | ||
378 | } | 381 | } |
379 | break; | 382 | break; |
380 | default: | 383 | default: |