aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-10-19 09:20:08 -0400
committerJaroslav Kysela <perex@suse.cz>2006-10-22 04:51:14 -0400
commitda43deb116c0cea9ca2174f2ac64985c4d53077e (patch)
tree428fc211c4d166941845d0858c32e6be3ed7f1a7
parentdbedca39fe30db87b6401e4396f959c63d90082e (diff)
[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>
-rw-r--r--sound/pci/ac97/ac97_codec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index a79e91850ba3..6577b2325357 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
570 ac97->power_up &= ~(1 << (reg>>1)); 570 ac97->power_up &= ~(1 << (reg>>1));
571 else 571 else
572 ac97->power_up |= 1 << (reg>>1); 572 ac97->power_up |= 1 << (reg>>1);
573 if (power_save) 573 update_power_regs(ac97);
574 update_power_regs(ac97);
575 } 574 }
576#endif 575#endif
577 return err; 576 return err;
@@ -2337,10 +2336,7 @@ int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup)
2337 } 2336 }
2338 } 2337 }
2339 2338
2340 if (! power_save) 2339 if (power_save && !powerup && ac97->power_workq)
2341 return 0;
2342
2343 if (! powerup && ac97->power_workq)
2344 /* adjust power-down bits after two seconds delay 2340 /* adjust power-down bits after two seconds delay
2345 * (for avoiding loud click noises for many (OSS) apps 2341 * (for avoiding loud click noises for many (OSS) apps
2346 * that open/close frequently) 2342 * that open/close frequently)