diff options
author | Nicolin Chen <Guangyu.Chen@freescale.com> | 2014-03-31 23:17:07 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:58:13 -0400 |
commit | 247e5d997c7a3551afcad29e68d735eff1d927aa (patch) | |
tree | e1c8af2d991f149f28d1d6f7b8c29c2f41d6b4fe /sound/soc/fsl/fsl_sai.c | |
parent | 7d168f14ff7c0efdb1973a2bde62881e465b525e (diff) |
ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams
We only enable one side interrupt for each stream since over/underrun
on the opposite stream would be resulted from what we previously did,
enabling TERE but remaining FRDE disabled, even though the xrun on the
opposite direction will not break the current stream.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Acked-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 20ea0d31528f7a461a4ecfb5924ca228bf3ca3c5)
Diffstat (limited to 'sound/soc/fsl/fsl_sai.c')
-rw-r--r-- | sound/soc/fsl/fsl_sai.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index bdfd497811bd..d64c33f32bf9 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c | |||
@@ -396,6 +396,8 @@ static int fsl_sai_trigger(struct snd_pcm_substream *substream, int cmd, | |||
396 | } | 396 | } |
397 | 397 | ||
398 | regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx), | 398 | regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx), |
399 | FSL_SAI_CSR_xIE_MASK, FSL_SAI_FLAGS); | ||
400 | regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx), | ||
399 | FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE); | 401 | FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE); |
400 | break; | 402 | break; |
401 | case SNDRV_PCM_TRIGGER_STOP: | 403 | case SNDRV_PCM_TRIGGER_STOP: |
@@ -403,6 +405,8 @@ static int fsl_sai_trigger(struct snd_pcm_substream *substream, int cmd, | |||
403 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | 405 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
404 | regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx), | 406 | regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx), |
405 | FSL_SAI_CSR_FRDE, 0); | 407 | FSL_SAI_CSR_FRDE, 0); |
408 | regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx), | ||
409 | FSL_SAI_CSR_xIE_MASK, 0); | ||
406 | 410 | ||
407 | if (!(tcsr & FSL_SAI_CSR_FRDE || rcsr & FSL_SAI_CSR_FRDE)) { | 411 | if (!(tcsr & FSL_SAI_CSR_FRDE || rcsr & FSL_SAI_CSR_FRDE)) { |
408 | regmap_update_bits(sai->regmap, FSL_SAI_TCSR, | 412 | regmap_update_bits(sai->regmap, FSL_SAI_TCSR, |
@@ -463,8 +467,8 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai) | |||
463 | { | 467 | { |
464 | struct fsl_sai *sai = dev_get_drvdata(cpu_dai->dev); | 468 | struct fsl_sai *sai = dev_get_drvdata(cpu_dai->dev); |
465 | 469 | ||
466 | regmap_update_bits(sai->regmap, FSL_SAI_TCSR, 0xffffffff, FSL_SAI_FLAGS); | 470 | regmap_update_bits(sai->regmap, FSL_SAI_TCSR, 0xffffffff, 0x0); |
467 | regmap_update_bits(sai->regmap, FSL_SAI_RCSR, 0xffffffff, FSL_SAI_FLAGS); | 471 | regmap_update_bits(sai->regmap, FSL_SAI_RCSR, 0xffffffff, 0x0); |
468 | regmap_update_bits(sai->regmap, FSL_SAI_TCR1, FSL_SAI_CR1_RFW_MASK, | 472 | regmap_update_bits(sai->regmap, FSL_SAI_TCR1, FSL_SAI_CR1_RFW_MASK, |
469 | FSL_SAI_MAXBURST_TX * 2); | 473 | FSL_SAI_MAXBURST_TX * 2); |
470 | regmap_update_bits(sai->regmap, FSL_SAI_RCR1, FSL_SAI_CR1_RFW_MASK, | 474 | regmap_update_bits(sai->regmap, FSL_SAI_RCR1, FSL_SAI_CR1_RFW_MASK, |