Commit 2a0bda27 authored by Michael Walle's avatar Michael Walle Committed by Mark Brown

ASoC: wm8904: fix automatic sysclk configuration

The simple-card tries to signal the codec to disable rate constraints,
see commit 2458adb8 ("SoC: simple-card-utils: set 0Hz to sysclk when
shutdown"). This wasn't handled by the codec, instead it would set the
FLL frequency to 0Hz which isn't working. Since we don't have any rate
constraints just ignore this request.

Fixes: 13409d27 ("ASoC: wm8904: configure sysclk/FLL automatically")
Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20191122232532.22258-1-michael@walle.ccSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent fb319441
...@@ -1806,6 +1806,12 @@ static int wm8904_set_sysclk(struct snd_soc_dai *dai, int clk_id, ...@@ -1806,6 +1806,12 @@ static int wm8904_set_sysclk(struct snd_soc_dai *dai, int clk_id,
switch (clk_id) { switch (clk_id) {
case WM8904_CLK_AUTO: case WM8904_CLK_AUTO:
/* We don't have any rate constraints, so just ignore the
* request to disable constraining.
*/
if (!freq)
return 0;
mclk_freq = clk_get_rate(priv->mclk); mclk_freq = clk_get_rate(priv->mclk);
/* enable FLL if a different sysclk is desired */ /* enable FLL if a different sysclk is desired */
if (mclk_freq != freq) { if (mclk_freq != freq) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment