summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMihai Serban <mihai.serban@nxp.com>2017-06-08 15:48:50 +0300
committerAnson Huang <Anson.Huang@nxp.com>2017-06-14 16:43:09 +0800
commitd2871d526e7d8b017b08c1fa9243fd064acdbb35 (patch)
treeb71e37a570ea1a05c8561fd1ad8913910c29a415 /sound
parent2a248b61dce7ea23d88148a8c65b0b608a29f3f9 (diff)
MLK-15039: ASoC: fsl_esai: Fix channels swap when recording 3 channels audio
The change introduced by commit 00c174b3b28a ("MLK-14525: ASoC: fsl_esai: channel swap issue in 3 channels or 5 channels") is no longer valid after improvements added with commit c35bc6ae5c48 ("MLK-14778: ASoC: fsl: imx-cs42888: Improve support for odd number of channels") Because we use TDM instead of I2S for 3,5 and 7 channels we must initialize ESAI with the actual number of channels. There is no need to count the additional channel required when I2S was used. Signed-off-by: Mihai Serban <mihai.serban@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> (cherry picked from commit 85a9aa0a73f80968445d8929f5ae9acb1972c8fe)
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_esai.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 70e6f355b24e..93b5f59a27cc 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -624,7 +624,7 @@ static int fsl_esai_trigger(struct snd_pcm_substream *substream, int cmd,
ESAI_xFCR_xFEN_MASK, ESAI_xFCR_xFEN);
/* Write initial words reqiured by ESAI as normal procedure */
- for (i = 0; tx && i < pins * esai_priv->slots; i++)
+ for (i = 0; tx && i < channels; i++)
regmap_write(esai_priv->regmap, REG_ESAI_ETDR, 0x0);
regmap_update_bits(esai_priv->regmap, REG_ESAI_xCR(tx),