From 0da2560aff81911c2f98390fef45f38f4e36d4f8 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Thu, 12 Oct 2017 14:01:19 +0800 Subject: MLK-13946-3: ASoC: fsl_sai: fix the xMR setting When there is multi data line enabled, the xMR setting is wrong if according to the channel number. which should according to the slot number Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_sai.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'sound/soc/fsl/fsl_sai.c') diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index db7bc6f79fbb..c733c33d512c 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -80,7 +80,7 @@ static struct fsl_sai_soc_data fsl_sai_imx8mq = { static struct fsl_sai_soc_data fsl_sai_imx8qm = { .imx = true, - .dataline = 0x3, + .dataline = 0xf, .fifos = 1, .fifo_depth = 64, .flags = 0, @@ -571,7 +571,7 @@ static int fsl_sai_hw_params(struct snd_pcm_substream *substream, regmap_update_bits(sai->regmap, FSL_SAI_xCR5(tx, offset), FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK | FSL_SAI_CR5_FBT_MASK, val_cr5); - regmap_write(sai->regmap, FSL_SAI_xMR(tx), ~0UL - ((1 << channels) - 1)); + regmap_write(sai->regmap, FSL_SAI_xMR(tx), ~0UL - ((1 << slots) - 1)); return 0; } @@ -858,11 +858,23 @@ static bool fsl_sai_readable_reg(struct device *dev, unsigned int reg) switch (reg) { case FSL_SAI_TFR0: case FSL_SAI_TFR1: + case FSL_SAI_TFR2: + case FSL_SAI_TFR3: + case FSL_SAI_TFR4: + case FSL_SAI_TFR5: + case FSL_SAI_TFR6: + case FSL_SAI_TFR7: case FSL_SAI_TMR: case FSL_SAI_RDR0: case FSL_SAI_RDR1: case FSL_SAI_RFR0: case FSL_SAI_RFR1: + case FSL_SAI_RFR2: + case FSL_SAI_RFR3: + case FSL_SAI_RFR4: + case FSL_SAI_RFR5: + case FSL_SAI_RFR6: + case FSL_SAI_RFR7: case FSL_SAI_RMR: return true; default: @@ -881,8 +893,20 @@ static bool fsl_sai_volatile_reg(struct device *dev, unsigned int reg) switch (reg) { case FSL_SAI_TFR0: case FSL_SAI_TFR1: + case FSL_SAI_TFR2: + case FSL_SAI_TFR3: + case FSL_SAI_TFR4: + case FSL_SAI_TFR5: + case FSL_SAI_TFR6: + case FSL_SAI_TFR7: case FSL_SAI_RFR0: case FSL_SAI_RFR1: + case FSL_SAI_RFR2: + case FSL_SAI_RFR3: + case FSL_SAI_RFR4: + case FSL_SAI_RFR5: + case FSL_SAI_RFR6: + case FSL_SAI_RFR7: case FSL_SAI_RDR0: case FSL_SAI_RDR1: return true; -- cgit v1.2.3