[alsa-cvslog] alsa-kernel: Fix AC97 power-saving mode
Brought to you by:
perex
From: Takashi I. <ti...@su...> - 2006-10-19 13:20:48
|
changeset: 4659:58513675bc0e84b79a6f7711643a70359c40ca48 tag: tip user: tiwai date: Thu Oct 19 15:20:08 2006 +0200 files: pci/ac97/ac97_codec.c description: 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. Patch-level: ASAP diff -r 74a0618b5f3e58cf16cad0da2444935b9ce246d0 -r 58513675bc0e84b79a6f7711643a70359c40ca48 pci/ac97/ac97_codec.c --- a/pci/ac97/ac97_codec.c Wed Oct 18 19:09:46 2006 +0200 +++ b/pci/ac97/ac97_codec.c Thu Oct 19 15:20:08 2006 +0200 @@ -570,8 +570,7 @@ int snd_ac97_put_volsw(struct snd_kcontr 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_ac9 } } - 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) |