diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/soc-dapm.c | 20 |
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 | } |