]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] Add default values for power-saving as Kconfig options
authorTakashi Iwai <tiwai@suse.de>
Mon, 17 Sep 2007 17:07:46 +0000 (19:07 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 Oct 2007 14:50:51 +0000 (16:50 +0200)
Added CONFIG_SND_AC97_POWER_SAVE_DEFAULT and CONFIG_SND_HDA_POWER_SAVE_DEFAULT
Kconfig options as the default values for power-saving mode of AC97 and
HD-audio drivers, respectively.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/Kconfig
sound/pci/ac97/ac97_codec.c
sound/pci/hda/hda_codec.c

index 5d0732c09f2e395267b7bbcaace0f22585b151cf..2c6486c23a52f718e87f78ff8622da75d72fe386 100644 (file)
@@ -589,6 +589,14 @@ config SND_HDA_POWER_SAVE
          HD-audio driver.  The power-saving timeout can be configured
          via power_save option or over sysfs on-the-fly.
 
+config SND_HDA_POWER_SAVE_DEFAULT
+       int "Default time-out for HD-audio power-save mode"
+       depends on SND_HDA_POWER_SAVE
+       default 0
+       help
+         The default time-out value in seconds for HD-audio automatic
+         power-save mode.  0 means to disable the power-save mode.
+
 config SND_HDSP
        tristate "RME Hammerfall DSP Audio"
        depends on SND
@@ -888,4 +896,11 @@ config SND_AC97_POWER_SAVE
          snd-ac97-codec driver.  You can toggle it dynamically over
          sysfs, too.
 
+config SND_AC97_POWER_SAVE_DEFAULT
+       int "Default time-out for AC97 power-save mode"
+       depends on SND_AC97_POWER_SAVE
+       default 0
+         The default time-out value in seconds for AC97 automatic
+         power-save mode.  0 means to disable the power-save mode.
+
 endmenu
index 3e5ff29fc4991e1eacf05d82f57ea047fb229a70..0906f1717f2b6760126e6d9cb539a6e8a69ea7a6 100644 (file)
@@ -49,7 +49,7 @@ module_param(enable_loopback, bool, 0444);
 MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control");
 
 #ifdef CONFIG_SND_AC97_POWER_SAVE
-static int power_save;
+static int power_save = CONFIG_SND_AC97_POWER_SAVE_DEFAULT;
 module_param(power_save, bool, 0644);
 MODULE_PARM_DESC(power_save, "Enable AC97 power-saving control");
 #endif
index 535bcb7601b5bc3dd580ad7ca1ff4a422f10bf06..18ef0aa69d984001b8924e44b77ed21956e6e08f 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifdef CONFIG_SND_HDA_POWER_SAVE
 /* define this option here to hide as static */
-static int power_save = 10;
+static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT;
 module_param(power_save, int, 0644);
 MODULE_PARM_DESC(power_save, "Automatic power-saving timeout "
                 "(in second, 0 = disable).");