summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorGaurav Suman <gauravsuman007@gmail.com>2026-11-09 22:33:47 +0000
committerMark Brown <broonie@kernel.org>2026-11-18 15:28:39 +0000
commit34430741db6b166f5bce6363c93ca6825758db63 (patch)
tree430143606a9fdac03d3eb22c6c0a6e1d6ef939b4 /tools/perf/scripts/python
parentfd3b0fc97ea72d027359e7603a1224703cec1864 (diff)
ASoC: codecs: wcd934x: keep MCLK enabled so init writes reach the codec
On an LG G8x (SM8150, WCD9340 over SLIMbus) the microphones record digital silence on roughly half of all boots. Register dumps look correct because they are served from the regmap cache, but the writes never reached the hardware: the WCD934x digital core ignores register writes while its MCLK/sysclk is off. wcd934x_comp_init() runs with MCLK off unless the SoundWire master happened to probe first and enabled the clock through wcd934x_swrm_clock(); __wcd934x_cdc_mclk_enable(false) then leaves it running because the SWR clock bit is set. Probe ordering is not deterministic, which matches the random good and bad boots. Enable MCLK before wcd934x_comp_init() and leave it enabled, which is what the good boots already do. With this change 8 of 8 boots had a working microphone (before: about 3 in 5 silent). Enabling MCLK only around wcd934x_comp_init() (and disabling it again afterwards, as wcd934x_enable_efuse_sensing() does) was not enough: 2 of 4 boots were silent again, so later writes made while the clock is off are lost as well. An alternative would be to mark the cache dirty and resync whenever MCLK goes from off to on; this patch takes the simpler route at the cost of keeping MCLK running. The fault was found, the change written and the boot tests run with the help of an AI coding assistant (Claude Opus 5.5, Anthropic); I reviewed the change and the test results. Signed-off-by: Gaurav Suman <gauravsuman007@gmail.com> Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec") Link: https://patch.msgid.link/20261109-wcd934x-mclk-v1-1-ab86342e7ead@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions