* [PATCH] ASoC: es8316: fix MCLK_DIV clearing and 20dB mic boost routing
@ 2026-11-28 3:42 Harry Bit
0 siblings, 0 replies; only message in thread
From: Harry Bit @ 2026-11-28 3:42 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: Jaroslav Kysela, Takashi Iwai, Daniel Drake, Katsuhiro Suzuki,
Matteo Martelli, Binbin Zhou, linux-sound, linux-kernel,
Harry Bit
Clear ES8316_CLKMGR_CLKSW_MCLK_DIV when switching from a halved MCLK
back to an unhalved MCLK rate, and wire the missing 20 dB microphone
boost Differential Mux DAPM routes for MIC1 and MIC2.
Fixes: b8b88b70875a ("ASoC: add es8316 codec driver")
Fixes: 869f30782cda ("ASoC: es8316: Enable support for MCLK div by 2")
Signed-off-by: Harry Bit <idleassetsd@gmail.com>
---
sound/soc/codecs/es8316.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index 334ac9119c..f329771bf9 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -305,6 +305,8 @@ static const struct snd_soc_dapm_route es8316_dapm_routes[] = {
{"Differential Mux", "lin1-rin1", "MIC1"},
{"Differential Mux", "lin2-rin2", "MIC2"},
+ {"Differential Mux", "lin1-rin1 with 20db Boost", "MIC1"},
+ {"Differential Mux", "lin2-rin2 with 20db Boost", "MIC2"},
{"Line input PGA", NULL, "Differential Mux"},
{"Mono ADC", NULL, "ADC Clock"},
@@ -514,11 +516,10 @@ static int es8316_pcm_hw_params(struct snd_pcm_substream *substream,
}
} while (!clk_valid);
- if (clk != es8316->sysclk) {
- snd_soc_component_update_bits(component, ES8316_CLKMGR_CLKSW,
- ES8316_CLKMGR_CLKSW_MCLK_DIV,
- ES8316_CLKMGR_CLKSW_MCLK_DIV);
- }
+ snd_soc_component_update_bits(component, ES8316_CLKMGR_CLKSW,
+ ES8316_CLKMGR_CLKSW_MCLK_DIV,
+ clk != es8316->sysclk ?
+ ES8316_CLKMGR_CLKSW_MCLK_DIV : 0);
lrck_divider = clk / params_rate(params);
bclk_divider = lrck_divider / 4;
--
2.47.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-28 3:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-28 3:42 [PATCH] ASoC: es8316: fix MCLK_DIV clearing and 20dB mic boost routing Harry Bit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®