aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolin Chen <Guangyu.Chen@freescale.com>2014-05-06 04:56:02 -0400
committerMark Brown <broonie@linaro.org>2014-05-12 18:13:13 -0400
commit4f8210f66e5a200c63770ea9445ff913a28a3be2 (patch)
treea7ff3110a8aa5ae93022644559ee0eea00d51235
parent57ebbcafab0ce8cce4493c6a243ecdd7066e6ef1 (diff)
ASoC: fsl_esai: Set PCRC and PRRC registers at the end of hw_params()
According to Reference Manual -- ESAI Initialization chapter, as the standard procedure of ESAI personal reset, the PCRC and PRRC registers should be remained in its reset value and then configured after T/RCCR and T/RCR configurations's done but before TE/RE's enabling. So this patch moves PCRC and PRRC settings to the end of hw_params(). Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/fsl/fsl_esai.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index c674fd99158b..496ce2eb2f1f 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -461,12 +461,6 @@ static int fsl_esai_startup(struct snd_pcm_substream *substream,
461 } 461 }
462 462
463 if (!dai->active) { 463 if (!dai->active) {
464 /* Reset Port C */
465 regmap_update_bits(esai_priv->regmap, REG_ESAI_PRRC,
466 ESAI_PRRC_PDC_MASK, ESAI_PRRC_PDC(ESAI_GPIO));
467 regmap_update_bits(esai_priv->regmap, REG_ESAI_PCRC,
468 ESAI_PCRC_PC_MASK, ESAI_PCRC_PC(ESAI_GPIO));
469
470 /* Set synchronous mode */ 464 /* Set synchronous mode */
471 regmap_update_bits(esai_priv->regmap, REG_ESAI_SAICR, 465 regmap_update_bits(esai_priv->regmap, REG_ESAI_SAICR,
472 ESAI_SAICR_SYNC, esai_priv->synchronous ? 466 ESAI_SAICR_SYNC, esai_priv->synchronous ?
@@ -526,6 +520,11 @@ static int fsl_esai_hw_params(struct snd_pcm_substream *substream,
526 520
527 regmap_update_bits(esai_priv->regmap, REG_ESAI_xCR(tx), mask, val); 521 regmap_update_bits(esai_priv->regmap, REG_ESAI_xCR(tx), mask, val);
528 522
523 /* Remove ESAI personal reset by configuring ESAI_PCRC and ESAI_PRRC */
524 regmap_update_bits(esai_priv->regmap, REG_ESAI_PRRC,
525 ESAI_PRRC_PDC_MASK, ESAI_PRRC_PDC(ESAI_GPIO));
526 regmap_update_bits(esai_priv->regmap, REG_ESAI_PCRC,
527 ESAI_PCRC_PC_MASK, ESAI_PCRC_PC(ESAI_GPIO));
529 return 0; 528 return 0;
530} 529}
531 530