Commit 474e09ca authored by Mark Brown's avatar Mark Brown

ASoC: Provide default set_bias_level() implementation

If the CODEC does not provide a set_bias_level() then update the
bias_level variable for it since other parts of the system expect
that to be maintained.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent d1a5e44b
...@@ -148,8 +148,12 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev, ...@@ -148,8 +148,12 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev,
if (card->set_bias_level) if (card->set_bias_level)
ret = card->set_bias_level(card, level); ret = card->set_bias_level(card, level);
if (ret == 0 && codec->set_bias_level) if (ret == 0) {
ret = codec->set_bias_level(codec, level); if (codec->set_bias_level)
ret = codec->set_bias_level(codec, level);
else
codec->bias_level = level;
}
return ret; return ret;
} }
......
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