summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@freescale.com>2015-12-03 10:47:05 +0800
committerNitin Garg <nitin.garg@nxp.com>2016-01-14 11:02:40 -0600
commit3d2a9c7c38d7b011723d22f810ecf07dea5960a9 (patch)
tree18987fe920ddf772d0e62769c8c2bf4a83d3f4cf /sound
parent1c917ffbb81d8e5f3564fdd112da6a2da55b9ee4 (diff)
MLK-11948: ASoC: fsl_esai: fix the channel swap issue after bootup
Patch 11626b6a79e27c716f3731b7dc2208631afbc665 is not a complete workaround. The complete workaround is that: Each time playback/recording, firstly clear the xSMA/xSMB, then enable TE/RE, then enable xSMB and xSMA (xSMB must be enabled before xSMA). Because the xSMA and xSMB is in enabled state after reset, so in original fix the first time playback/recording after bootup, didn't follow the workaround flow. There maybe still have channel swap issue. The PDM ticket of this issue is TKT251104. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_esai.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 1d43da33c94a..62b66e20ca1b 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -597,10 +597,11 @@ static int fsl_esai_trigger(struct snd_pcm_substream *substream, int cmd,
tx ? ESAI_xCR_TE_MASK : ESAI_xCR_RE_MASK,
tx ? ESAI_xCR_TE(pins) : ESAI_xCR_RE(pins));
mask = tx ? esai_priv->tx_mask : esai_priv->rx_mask;
- regmap_update_bits(esai_priv->regmap, REG_ESAI_xSMA(tx),
- ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(mask));
+
regmap_update_bits(esai_priv->regmap, REG_ESAI_xSMB(tx),
ESAI_xSMB_xS_MASK, ESAI_xSMB_xS(mask));
+ regmap_update_bits(esai_priv->regmap, REG_ESAI_xSMA(tx),
+ ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(mask));
break;
case SNDRV_PCM_TRIGGER_SUSPEND:
@@ -1012,6 +1013,12 @@ static int fsl_esai_probe(struct platform_device *pdev)
return ret;
}
+ /* Clear the TSMA, TSMB, RSMA, RSMB */
+ regmap_write(esai_priv->regmap, REG_ESAI_TSMA, 0);
+ regmap_write(esai_priv->regmap, REG_ESAI_TSMB, 0);
+ regmap_write(esai_priv->regmap, REG_ESAI_RSMA, 0);
+ regmap_write(esai_priv->regmap, REG_ESAI_RSMB, 0);
+
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_esai_component,
&fsl_esai_dai, 1);
if (ret) {