summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2022-05-19 20:36:48 +0800
committerMark Brown <broonie@kernel.org>2022-06-08 18:03:51 +0100
commitff87d619ac180444db297f043962a5c325ded47b (patch)
tree2d82d4db016c1c11f8045ca985758c2ead136861 /sound/soc
parentb09654e39c89a86680528345f3a95b832236ee82 (diff)
downloadlinux-stable-ff87d619ac180444db297f043962a5c325ded47b.tar.gz
linux-stable-ff87d619ac180444db297f043962a5c325ded47b.tar.bz2
linux-stable-ff87d619ac180444db297f043962a5c325ded47b.zip
ASoC: fsl_sai: Enable MCTL_MCLK_EN bit for master mode
On i.MX8MM, the MCTL_MCLK_EN bit it is not only the gate for MCLK output to PAD, but also the gate bit between root clock and SAI module, So it is need to be enabled for master mode, otherwise there is no bclk generated. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1652963808-14515-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/fsl/fsl_sai.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index b65c9c7cf54a..b4dd3122c45e 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -437,6 +437,12 @@ static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq)
FSL_SAI_CR2_DIV_MASK | FSL_SAI_CR2_BYP,
savediv / 2 - 1);
+ if (sai->soc_data->max_register >= FSL_SAI_MCTL) {
+ /* SAI is in master mode at this point, so enable MCLK */
+ regmap_update_bits(sai->regmap, FSL_SAI_MCTL,
+ FSL_SAI_MCTL_MCLK_EN, FSL_SAI_MCTL_MCLK_EN);
+ }
+
return 0;
}