Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: rt5640: Handle 0Hz sysclk during stream shutdown

Commit 2458adb8f92a ("SoC: simple-card-utils: set 0Hz to sysclk when
shutdown") sends a 0Hz sysclk request during stream shutdown to clear
codec rate constraints. The rt5640 codec forwards this 0Hz to
clk_set_rate(), which can cause clock controller firmware faults on
platforms where MCLK is SoC-driven (e.g. Tegra) and 0Hz falls below
the hardware minimum rate.

Handle the 0Hz case by clearing the internal sysclk state and
returning early, avoiding the invalid clk_set_rate() call.

Signed-off-by: Sheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20260406090547.988966-1-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Sheetal and committed by
Mark Brown
247d1c13 cba9ce8c

+5
+5
sound/soc/codecs/rt5640.c
··· 1838 1838 unsigned int pll_bit = 0; 1839 1839 int ret; 1840 1840 1841 + if (!freq) { 1842 + rt5640->sysclk = 0; 1843 + return 0; 1844 + } 1845 + 1841 1846 switch (clk_id) { 1842 1847 case RT5640_SCLK_S_MCLK: 1843 1848 ret = clk_set_rate(rt5640->mclk, freq);