aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-08-19 14:18:53 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-08-19 14:18:53 +0100
commit474e09ca017bd0f6e9bf41af643364a21bc27f43 (patch)
tree622ea31cfaae4a20e4b39d8f1c53734ef6768b6f /sound/soc/soc-dapm.c
parentASoC: Remove duplicate ADC/DAC widgets from wm_hubs.c (diff)
downloadlinux-dev-474e09ca017bd0f6e9bf41af643364a21bc27f43.tar.xz
linux-dev-474e09ca017bd0f6e9bf41af643364a21bc27f43.zip
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>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 88461310dc96..5cfc90941e49 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -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;
}