aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-06 14:03:34 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-06 16:47:05 -0400
commitcc4c670a416a36464443f465f0ddbdc9940d16dd (patch)
treef30435a2de6d31256c6269330ae7d6bd8455f309 /sound/soc/soc-dapm.c
parentd4c6005f8e90da10067c35e1182f533582d01a69 (diff)
ASoC: Only provide a default bias level update for CODEC contexts
This allows the card driver to use the bias level variable more easily in multi component systems. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 1682834f8c38..34106bca63cf 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -146,10 +146,13 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
146 if (ret != 0) 146 if (ret != 0)
147 goto out; 147 goto out;
148 148
149 if (dapm->codec && dapm->codec->driver->set_bias_level) 149 if (dapm->codec) {
150 ret = dapm->codec->driver->set_bias_level(dapm->codec, level); 150 if (dapm->codec->driver->set_bias_level)
151 else 151 ret = dapm->codec->driver->set_bias_level(dapm->codec,
152 dapm->bias_level = level; 152 level);
153 else
154 dapm->bias_level = level;
155 }
153 if (ret != 0) 156 if (ret != 0)
154 goto out; 157 goto out;
155 158