Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157670
b: refs/heads/master
c: b14b76a
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Aug 17, 2009
1 parent f36c701 commit 7136475
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c093fb5421a648fae46fce17277bdb358fe017b
refs/heads/master: b14b76a56e49946488637ee68926c5180c39fdb1
16 changes: 16 additions & 0 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,22 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event)
}
}

/* If there are no DAPM widgets then try to figure out power from the
* event type.
*/
if (list_empty(&codec->dapm_widgets)) {
switch (event) {
case SND_SOC_DAPM_STREAM_START:
case SND_SOC_DAPM_STREAM_RESUME:
sys_power = 1;
break;
case SND_SOC_DAPM_STREAM_NOP:
sys_power = codec->bias_level != SND_SOC_BIAS_STANDBY;
default:
break;
}
}

/* If we're changing to all on or all off then prepare */
if ((sys_power && codec->bias_level == SND_SOC_BIAS_STANDBY) ||
(!sys_power && codec->bias_level == SND_SOC_BIAS_ON)) {
Expand Down

0 comments on commit 7136475

Please sign in to comment.