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: Update MCLK rate in set_sysclk()

Simple-card/audio-graph-card drivers do not handle MCLK clock when it
is specified in the codec device node. The expectation here is that,
the codec should actually own up the MCLK clock and do necessary setup
in the driver.

This is inspired from,
commit dbf54a953435 ("ASoC: rt5659: Update MCLK rate in set_sysclk()").

Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1675953417-8686-2-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Sameer Pujar and committed by
Mark Brown
9f138bb2 2512839d

+5
+5
sound/soc/codecs/rt5640.c
··· 1838 1838 struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component); 1839 1839 unsigned int reg_val = 0; 1840 1840 unsigned int pll_bit = 0; 1841 + int ret; 1841 1842 1842 1843 switch (clk_id) { 1843 1844 case RT5640_SCLK_S_MCLK: 1845 + ret = clk_set_rate(rt5640->mclk, freq); 1846 + if (ret) 1847 + return ret; 1848 + 1844 1849 reg_val |= RT5640_SCLK_SRC_MCLK; 1845 1850 break; 1846 1851 case RT5640_SCLK_S_PLL1: