Skip to content

Commit

Permalink
ASoC: Only provide a default bias level update for CODEC contexts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Jun 6, 2011
1 parent d4c6005 commit cc4c670
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,13 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
if (ret != 0)
goto out;

if (dapm->codec && dapm->codec->driver->set_bias_level)
ret = dapm->codec->driver->set_bias_level(dapm->codec, level);
else
dapm->bias_level = level;
if (dapm->codec) {
if (dapm->codec->driver->set_bias_level)
ret = dapm->codec->driver->set_bias_level(dapm->codec,
level);
else
dapm->bias_level = level;
}
if (ret != 0)
goto out;

Expand Down

0 comments on commit cc4c670

Please sign in to comment.