Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270767
b: refs/heads/master
c: f9de6d7
h: refs/heads/master
i:
  270765: 3056b7b
  270763: 445eab3
  270759: 395b5a0
  270751: 4331910
v: v3
  • Loading branch information
Mark Brown committed Oct 4, 2011
1 parent 079e4c0 commit 0aae928
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 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: 05623c4314cba3971f8476151aff73126127925f
refs/heads/master: f9de6d741d246583a8fdcf212cf14456a1622ce1
44 changes: 23 additions & 21 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,6 @@ static void dapm_power_one_widget(struct snd_soc_dapm_widget *w,
struct list_head *up_list,
struct list_head *down_list)
{
struct snd_soc_dapm_context *d;
int power;

switch (w->id) {
Expand All @@ -1238,26 +1237,6 @@ static void dapm_power_one_widget(struct snd_soc_dapm_widget *w,
else
power = 1;

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;
}
}

dapm_widget_set_power(w, power, up_list, down_list);
break;
}
Expand Down Expand Up @@ -1302,6 +1281,29 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
dapm_power_one_widget(w, &up_list, &down_list);
}

list_for_each_entry(w, &card->widgets, list) {
if (w->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 there are no DAPM widgets then try to figure out power from the
* event type.
*/
Expand Down

0 comments on commit 0aae928

Please sign in to comment.