diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-09-17 13:07:46 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 10:50:51 -0400 |
commit | 7a5a27cfaedf8589600b7ae585f3ca42b2d3c78a (patch) | |
tree | dc93b1d409d338e53518e79576c0e679df98d9cc | |
parent | ec1e7949327a709c83fc7338f89a8c2d1f978fa9 (diff) |
[ALSA] Add default values for power-saving as Kconfig options
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>
-rw-r--r-- | sound/pci/Kconfig | 15 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 |
3 files changed, 17 insertions, 2 deletions
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 5d0732c09f2e..2c6486c23a52 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig | |||
@@ -589,6 +589,14 @@ config SND_HDA_POWER_SAVE | |||
589 | HD-audio driver. The power-saving timeout can be configured | 589 | HD-audio driver. The power-saving timeout can be configured |
590 | via power_save option or over sysfs on-the-fly. | 590 | via power_save option or over sysfs on-the-fly. |
591 | 591 | ||
592 | config SND_HDA_POWER_SAVE_DEFAULT | ||
593 | int "Default time-out for HD-audio power-save mode" | ||
594 | depends on SND_HDA_POWER_SAVE | ||
595 | default 0 | ||
596 | help | ||
597 | The default time-out value in seconds for HD-audio automatic | ||
598 | power-save mode. 0 means to disable the power-save mode. | ||
599 | |||
592 | config SND_HDSP | 600 | config SND_HDSP |
593 | tristate "RME Hammerfall DSP Audio" | 601 | tristate "RME Hammerfall DSP Audio" |
594 | depends on SND | 602 | depends on SND |
@@ -888,4 +896,11 @@ config SND_AC97_POWER_SAVE | |||
888 | snd-ac97-codec driver. You can toggle it dynamically over | 896 | snd-ac97-codec driver. You can toggle it dynamically over |
889 | sysfs, too. | 897 | sysfs, too. |
890 | 898 | ||
899 | config SND_AC97_POWER_SAVE_DEFAULT | ||
900 | int "Default time-out for AC97 power-save mode" | ||
901 | depends on SND_AC97_POWER_SAVE | ||
902 | default 0 | ||
903 | The default time-out value in seconds for AC97 automatic | ||
904 | power-save mode. 0 means to disable the power-save mode. | ||
905 | |||
891 | endmenu | 906 | endmenu |
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 3e5ff29fc499..0906f1717f2b 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -49,7 +49,7 @@ module_param(enable_loopback, bool, 0444); | |||
49 | MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control"); | 49 | MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control"); |
50 | 50 | ||
51 | #ifdef CONFIG_SND_AC97_POWER_SAVE | 51 | #ifdef CONFIG_SND_AC97_POWER_SAVE |
52 | static int power_save; | 52 | static int power_save = CONFIG_SND_AC97_POWER_SAVE_DEFAULT; |
53 | module_param(power_save, bool, 0644); | 53 | module_param(power_save, bool, 0644); |
54 | MODULE_PARM_DESC(power_save, "Enable AC97 power-saving control"); | 54 | MODULE_PARM_DESC(power_save, "Enable AC97 power-saving control"); |
55 | #endif | 55 | #endif |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 535bcb7601b5..18ef0aa69d98 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 36 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
37 | /* define this option here to hide as static */ | 37 | /* define this option here to hide as static */ |
38 | static int power_save = 10; | 38 | static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT; |
39 | module_param(power_save, int, 0644); | 39 | module_param(power_save, int, 0644); |
40 | MODULE_PARM_DESC(power_save, "Automatic power-saving timeout " | 40 | MODULE_PARM_DESC(power_save, "Automatic power-saving timeout " |
41 | "(in second, 0 = disable)."); | 41 | "(in second, 0 = disable)."); |