aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_sai.c
diff options
context:
space:
mode:
authorNicolin Chen <Guangyu.Chen@freescale.com>2014-07-18 06:15:48 -0400
committerNicolin Chen <Guangyu.Chen@freescale.com>2014-07-18 06:54:46 -0400
commitb85f840a60de8d0a5ca8fbe7eda15f611ff5b622 (patch)
treeb6bcf00f2a9fc97f8fb281fa87f5b93652994c2c /sound/soc/fsl/fsl_sai.c
parent8532e80d479ef7ea61e288b321c10d1b14933196 (diff)
ENGR00323404-1 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. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Diffstat (limited to 'sound/soc/fsl/fsl_sai.c')
-rw-r--r--sound/soc/fsl/fsl_sai.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 896f40a91def..37c950779694 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -371,10 +371,15 @@ 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, 0);
376 regmap_update_bits(sai->regmap, FSL_SAI_RCSR, 377 regmap_update_bits(sai->regmap, FSL_SAI_RCSR,
377 FSL_SAI_CSR_TERE, 0); 378 FSL_SAI_CSR_TERE, 0);
379 regmap_update_bits(sai->regmap, FSL_SAI_TCSR,
380 FSL_SAI_CSR_FR, FSL_SAI_CSR_FR);
381 regmap_update_bits(sai->regmap, FSL_SAI_RCSR,
382 FSL_SAI_CSR_FR, FSL_SAI_CSR_FR);
378 } 383 }
379 break; 384 break;
380 default: 385 default: