diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-10-19 15:20:08 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-10-22 10:51:14 +0200 |
commit | da43deb116c0cea9ca2174f2ac64985c4d53077e (patch) | |
tree | 428fc211c4d166941845d0858c32e6be3ed7f1a7 /sound/pci/ac97 | |
parent | dbedca39fe30db87b6401e4396f959c63d90082e (diff) | |
download | op-kernel-dev-da43deb116c0cea9ca2174f2ac64985c4d53077e.zip op-kernel-dev-da43deb116c0cea9ca2174f2ac64985c4d53077e.tar.gz |
[ALSA] Fix AC97 power-saving mode
Fix the bug in AC97 power-saving mode that the power isn't turned on
when power_save is set to 1 via sysfs during the power off state.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ac97')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index a79e918..6577b23 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -570,8 +570,7 @@ int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value ac97->power_up &= ~(1 << (reg>>1)); else ac97->power_up |= 1 << (reg>>1); - if (power_save) - update_power_regs(ac97); + update_power_regs(ac97); } #endif return err; @@ -2337,10 +2336,7 @@ int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup) } } - if (! power_save) - return 0; - - if (! powerup && ac97->power_workq) + if (power_save && !powerup && ac97->power_workq) /* adjust power-down bits after two seconds delay * (for avoiding loud click noises for many (OSS) apps * that open/close frequently) |