Skip to content

Commit 86867ac

Browse files
Fabio Estevambroonie
authored andcommitted
ASoC: fsl_sai: Revert "ASoC: fsl_sai: Enable MCTL_MCLK_EN bit for master mode"
This reverts commit ff87d61. Andreas reports that on an i.MX8MP-based system where MCLK needs to be used as an input, the MCLK pin is actually an output, despite not having the 'fsl,sai-mclk-direction-output' property present in the devicetree. This is caused by commit ff87d61 ("ASoC: fsl_sai: Enable MCTL_MCLK_EN bit for master mode") that sets FSL_SAI_MCTL_MCLK_EN unconditionally for imx8mm/8mn/8mp/93, causing the MCLK to always be configured as output. FSL_SAI_MCTL_MCLK_EN corresponds to the MOE (MCLK Output Enable) bit of register MCR and the drivers sets it when the 'fsl,sai-mclk-direction-output' devicetree property is present. Revert the commit to allow SAI to use MCLK as input as well. Cc: stable@vger.kernel.org Fixes: ff87d61 ("ASoC: fsl_sai: Enable MCTL_MCLK_EN bit for master mode") Reported-by: Andreas Henriksson <andreas@fatal.se> Signed-off-by: Fabio Estevam <festevam@denx.de> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20230706221827.1938990-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 980d97e commit 86867ac

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

sound/soc/fsl/fsl_sai.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,6 @@ static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq)
507507
savediv / 2 - 1);
508508
}
509509

510-
if (sai->soc_data->max_register >= FSL_SAI_MCTL) {
511-
/* SAI is in master mode at this point, so enable MCLK */
512-
regmap_update_bits(sai->regmap, FSL_SAI_MCTL,
513-
FSL_SAI_MCTL_MCLK_EN, FSL_SAI_MCTL_MCLK_EN);
514-
}
515-
516510
return 0;
517511
}
518512

0 commit comments

Comments
 (0)