mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 15:47:36 +00:00
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
d1a5e44b89
commit
474e09ca01
1 changed files with 6 additions and 2 deletions
|
@ -148,8 +148,12 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev,
|
|||
|
||||
if (card->set_bias_level)
|
||||
ret = card->set_bias_level(card, level);
|
||||
if (ret == 0 && codec->set_bias_level)
|
||||
ret = codec->set_bias_level(codec, level);
|
||||
if (ret == 0) {
|
||||
if (codec->set_bias_level)
|
||||
ret = codec->set_bias_level(codec, level);
|
||||
else
|
||||
codec->bias_level = level;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue