sound fix for 2.6.32
Linus,
please pull a sound (ASoC) fix for v2.6.32 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git fix/asoc
containing only the following fix.
This should be the last pull request wrt the sound bits... hopefully.
Thanks!
Takashi
===
Mark Brown (1):
ASoC: Fix suspend with active audio streams
--- sound/soc/soc-dapm.c | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-)
sound/soc/soc-dapm.c +17 -3
@@ -973,9 +973,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 ;
@@ -999,8 +1009,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 ; }