ASoC: dapm: Make sure we update the bias level for CODECs with no op
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 23 Aug 2012 17:10:42 +0000 (18:10 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 25 Aug 2012 12:50:21 +0000 (13:50 +0100)
Commit 412312 (ASoC: dapm: Make sure all dapm contexts are updated)
ensures that we update non-CODEC DAPM contexts but means that if a
CODEC has no set_bias_level() operation it'll not be updated. Fix
that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-dapm.c

index dd7c49fafd754f949014f88b9a2ad0b80d59cc20..145ec4b56ca9e1891d3835a64c2e249168aaa6ca 100644 (file)
@@ -291,6 +291,8 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
                if (dapm->codec->driver->set_bias_level)
                        ret = dapm->codec->driver->set_bias_level(dapm->codec,
                                                                  level);
+               else
+                       dapm->bias_level = level;
        } else
                dapm->bias_level = level;