]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: cs42l42: PLL must be running when changing MCLK_SRC_SEL
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 5 Aug 2021 16:11:04 +0000 (17:11 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 5 Aug 2021 19:17:13 +0000 (20:17 +0100)
commitf1040e86f83b0f7d5f45724500a6a441731ff4b7
tree74021cd97498288e0673e3b8fdadb1087aa13d62
parent8b353bbeae20e2214c9d9d88bcb2fda4ba145d83
ASoC: cs42l42: PLL must be running when changing MCLK_SRC_SEL

Both SCLK and PLL clocks must be running to drive the glitch-free mux
behind MCLK_SRC_SEL and complete the switchover.

This patch moves the writing of MCLK_SRC_SEL to when the PLL is started
and stopped, so that it only transitions while the PLL is running.
The unconditional write MCLK_SRC_SEL=0 in cs42l42_mute_stream() is safe
because if the PLL is not running MCLK_SRC_SEL is already 0.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 43fc357199f9 ("ASoC: cs42l42: Set clock source for both ways of stream")
Link: https://lore.kernel.org/r/20210805161111.10410-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l42.c
sound/soc/codecs/cs42l42.h