All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl_sai: Enable MCTL_MCLK_EN bit for master mode
@ 2022-05-19 12:36 Shengjiu Wang
  2022-05-19 13:23   ` Fabio Estevam
  2022-06-08 20:46   ` Mark Brown
  0 siblings, 2 replies; 24+ messages in thread
From: Shengjiu Wang @ 2022-05-19 12:36 UTC (permalink / raw)
  To: nicoleotsuka, Xiubo.Lee, festevam, shengjiu.wang, lgirdwood,
	broonie, perex, tiwai, alsa-devel
  Cc: linuxppc-dev, linux-kernel

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>
---
 sound/soc/fsl/fsl_sai.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index fa950dde5310..dae16a14f177 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;
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-07-06 22:01 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 12:36 [PATCH] ASoC: fsl_sai: Enable MCTL_MCLK_EN bit for master mode Shengjiu Wang
2022-05-19 13:23 ` Fabio Estevam
2022-05-19 13:23   ` Fabio Estevam
2022-05-19 13:23   ` Fabio Estevam
2022-05-19 13:41   ` Shengjiu Wang
2022-05-19 13:41     ` Shengjiu Wang
2023-07-06  8:47   ` Andreas Henriksson
2023-07-06  8:47     ` Andreas Henriksson
2023-07-06 11:06     ` Shengjiu Wang
2023-07-06 11:06       ` Shengjiu Wang
2023-07-06 11:08     ` Fabio Estevam
2023-07-06 11:08       ` Fabio Estevam
2023-07-06 11:19       ` Shengjiu Wang
2023-07-06 11:19         ` Shengjiu Wang
2023-07-06 11:32         ` Fabio Estevam
2023-07-06 11:32           ` Fabio Estevam
2023-07-06 12:34           ` Andreas Henriksson
2023-07-06 12:34             ` Andreas Henriksson
2023-07-06 13:22             ` Fabio Estevam
2023-07-06 13:22               ` Fabio Estevam
2023-07-06 22:00         ` Fabio Estevam
2023-07-06 22:00           ` Fabio Estevam
2022-06-08 20:46 ` Mark Brown
2022-06-08 20:46   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.