aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/via82xx.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-06-27 12:28:53 -0400
committerJaroslav Kysela <perex@suse.cz>2006-09-23 04:37:08 -0400
commit6dbe662874ba08585eaf732d126762c25ac8e3f7 (patch)
tree7460c36d4d848f223b682f7a700866bcf6dbc7d5 /sound/pci/via82xx.c
parent2b29b13c5794f648cd5e839796496704d787f5a6 (diff)
[ALSA] Add experimental support of aggressive AC97 power-saving mode
Added CONFIG_SND_AC97_POWER_SAVE kernel config to enable the support of aggressive AC97 power-saving mode. In this mode, the AC97 powerdown register bits are dynamically controlled at each open/close of PCM streams. The mode is activated via power_save option for snd-ac97-codec driver. As default it's off. It can be turned on/off on the fly via sysfs, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r--sound/pci/via82xx.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 08da9234efb3..2c23a665c3e3 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -1277,7 +1277,18 @@ static int snd_via82xx_pcm_close(struct snd_pcm_substream *substream)
1277 if (! ratep->used) 1277 if (! ratep->used)
1278 ratep->rate = 0; 1278 ratep->rate = 0;
1279 spin_unlock_irq(&ratep->lock); 1279 spin_unlock_irq(&ratep->lock);
1280 1280 if (! ratep->rate) {
1281 if (! viadev->direction) {
1282 snd_ac97_update_power(chip->ac97,
1283 AC97_PCM_FRONT_DAC_RATE, 0);
1284 snd_ac97_update_power(chip->ac97,
1285 AC97_PCM_SURR_DAC_RATE, 0);
1286 snd_ac97_update_power(chip->ac97,
1287 AC97_PCM_LFE_DAC_RATE, 0);
1288 } else
1289 snd_ac97_update_power(chip->ac97,
1290 AC97_PCM_LR_ADC_RATE, 0);
1291 }
1281 viadev->substream = NULL; 1292 viadev->substream = NULL;
1282 return 0; 1293 return 0;
1283} 1294}