summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-11-23 13:37:04 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-11-23 13:37:04 +0000
commit97cef58521288ade8d957e4d568a3d409dea7d64 (patch)
treeda15a7d4741ff4a1651e205d72e2be717116e347 /sound
parentdcdec639ad74f20427df82284f98b68f6ac7c0ae (diff)
parent50b6bce59d154b5db137907a5c0ed45a4e7a3829 (diff)
Merge branch 'for-2.6.32' into for-2.6.33
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-dapm.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index eaadb4b742f..0d294ef7259 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -977,9 +977,19 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event)
if (!w->power_check)
continue;
- power = w->power_check(w);
- if (power)
- sys_power = 1;
+ /* If we're suspending then pull down all the
+ * power. */
+ switch (event) {
+ case SND_SOC_DAPM_STREAM_SUSPEND:
+ power = 0;
+ break;
+
+ default:
+ power = w->power_check(w);
+ if (power)
+ sys_power = 1;
+ break;
+ }
if (w->power == power)
continue;
@@ -1003,8 +1013,12 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event)
case SND_SOC_DAPM_STREAM_RESUME:
sys_power = 1;
break;
+ case SND_SOC_DAPM_STREAM_SUSPEND:
+ sys_power = 0;
+ break;
case SND_SOC_DAPM_STREAM_NOP:
sys_power = codec->bias_level != SND_SOC_BIAS_STANDBY;
+ break;
default:
break;
}