]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: cs42l42: Don't reconfigure the PLL while it is running
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Fri, 15 Oct 2021 13:36:04 +0000 (14:36 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 15 Oct 2021 15:14:11 +0000 (16:14 +0100)
commit8be7c90a87da3d741816cadd602c519f69d075f1
tree8c6928f1b5373b9db8b9b5cfee6429532713f3e3
parentdcf0432a18a043cec28cbeacc5788f0dfe2d46ec
ASoC: cs42l42: Don't reconfigure the PLL while it is running

When capture and playback substreams are both running at the same time,
cs42l42_pcm_hw_params() would be called for each direction. The first
call will configure the PLL. The second call must not write the PLL
configuration registers again if the first substream is already running,
as this could destabilize the PLL.

The DAI is marked symmetric sample bits and sample rate, so the two
directions will always have the same SCLK (I2S always has 2 channel slots
so the DAI does not need to require symmetric channels to guarantee the
same SCLK). However, since cs42l42_pll_config() is checking for an active
stream it may as well test that the requested SCLK is the same as the
currently active configuration.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211015133619.4698-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l42.c