Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257494
b: refs/heads/master
c: dfcc904
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Jun 6, 2011
1 parent a049a74 commit d1084b5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 56fba41f8f6444f9e2db3bfe2c4cc5c5bac43d1d
refs/heads/master: dfcc9047c97ca99b151e30133c9bccf5ab258ca6
23 changes: 21 additions & 2 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,8 +1147,27 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
power = w->power_check(w);
else
power = 1;
if (power)
w->dapm->target_bias_level = SND_SOC_BIAS_ON;

if (power) {
d = w->dapm;

/* Supplies and micbiases only bring
* the context up to STANDBY as unless
* something else is active and
* passing audio they generally don't
* require full power.
*/
switch (w->id) {
case snd_soc_dapm_supply:
case snd_soc_dapm_micbias:
if (d->target_bias_level < SND_SOC_BIAS_STANDBY)
d->target_bias_level = SND_SOC_BIAS_STANDBY;
break;
default:
d->target_bias_level = SND_SOC_BIAS_ON;
break;
}
}

if (w->power == power)
continue;
Expand Down

0 comments on commit d1084b5

Please sign in to comment.