aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-11-23 08:37:04 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-11-23 08:37:04 -0500
commit97cef58521288ade8d957e4d568a3d409dea7d64 (patch)
treeda15a7d4741ff4a1651e205d72e2be717116e347 /sound/soc/soc-dapm.c
parentdcdec639ad74f20427df82284f98b68f6ac7c0ae (diff)
parent50b6bce59d154b5db137907a5c0ed45a4e7a3829 (diff)
Merge branch 'for-2.6.32' into for-2.6.33
Diffstat (limited to 'sound/soc/soc-dapm.c')
-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 eaadb4b742f4..0d294ef72590 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)
977 if (!w->power_check) 977 if (!w->power_check)
978 continue; 978 continue;
979 979
980 power = w->power_check(w); 980 /* If we're suspending then pull down all the
981 if (power) 981 * power. */
982 sys_power = 1; 982 switch (event) {
983 case SND_SOC_DAPM_STREAM_SUSPEND:
984 power = 0;
985 break;
986
987 default:
988 power = w->power_check(w);
989 if (power)
990 sys_power = 1;
991 break;
992 }
983 993
984 if (w->power == power) 994 if (w->power == power)
985 continue; 995 continue;
@@ -1003,8 +1013,12 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event)
1003 case SND_SOC_DAPM_STREAM_RESUME: 1013 case SND_SOC_DAPM_STREAM_RESUME:
1004 sys_power = 1; 1014 sys_power = 1;
1005 break; 1015 break;
1016 case SND_SOC_DAPM_STREAM_SUSPEND:
1017 sys_power = 0;
1018 break;
1006 case SND_SOC_DAPM_STREAM_NOP: 1019 case SND_SOC_DAPM_STREAM_NOP:
1007 sys_power = codec->bias_level != SND_SOC_BIAS_STANDBY; 1020 sys_power = codec->bias_level != SND_SOC_BIAS_STANDBY;
1021 break;
1008 default: 1022 default:
1009 break; 1023 break;
1010 } 1024 }