[PATCH 2/3] ASoC: tlv320aic3x: use BCLK instead of MCLK if not in master mode

From: Andreas Kemnade
Date: Wed Jul 05 2023 - 15:05:07 EST


Required to have audio output on Epson Moverio BT-200.
Audio chip there is marked with AC31051. Audio output is silent there
without that clock register set.

Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>
---
sound/soc/codecs/tlv320aic3x.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 56e795a00e22f..87929e210b55e 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1234,6 +1234,10 @@ static int aic3x_set_dai_sysclk(struct snd_soc_dai *codec_dai,
struct snd_soc_component *component = codec_dai->component;
struct aic3x_priv *aic3x = snd_soc_component_get_drvdata(component);

+ /* probably no mclk if not master, so rely on bitclk */
+ if (!aic3x->master)
+ clk_id = 2;
+
/* set clock on MCLK or GPIO2 or BCLK */
snd_soc_component_update_bits(component, AIC3X_CLKGEN_CTRL_REG, PLLCLK_IN_MASK,
clk_id << PLLCLK_IN_SHIFT);
--
2.39.2