summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-08-13 16:10:30 +0200
committerJaroslav Kysela <perex@perex.cz>2007-10-16 15:58:50 +0200
commitdee1b66ce4f406d36fef70d1dd4360c5f1d26218 (patch)
tree0e72125049f8243e5787b16b8d2d77d0e852a306
parentae0a8ed8bf9c2edee4b831dee91ae914b9641fdd (diff)
downloadop-kernel-dev-dee1b66ce4f406d36fef70d1dd4360c5f1d26218.zip
op-kernel-dev-dee1b66ce4f406d36fef70d1dd4360c5f1d26218.tar.gz
[ALSA] hda-intel - Add power_save_controller module option
Add power_save_controller module option instead of define flag. Also, added descriptions of new module options in ALSA-Configuration.txt. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt10
-rw-r--r--sound/pci/hda/hda_intel.c25
2 files changed, 21 insertions, 14 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index f71ed68..2bdabe2 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -768,6 +768,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
single_cmd - Use single immediate commands to communicate with
codecs (for debugging only)
enable_msi - Enable Message Signaled Interrupt (MSI) (default = off)
+ power_save - Automatic power-saving timtout (in second, 0 =
+ disable, default = 10)
+ power_save_controller - Reset HD-audio controller in power-saving mode
+ (default = on)
This module supports one card and autoprobe.
@@ -993,6 +997,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
subsystem ID (output of "lspci -nv") to ALSA BTS or alsa-devel
ML (see the section "Links and Addresses").
+ When CONFIG_SND_HDA_POWER_SAVE is set, two options, power_save and
+ power_save_controller become available. power_save specifies the
+ time to turn off the power automatically at idle status. When
+ power_save_controller is true, the controller is also turned off.
+ This might result in more obvious click noise at turning on/off.
+
Note 2: If you get click noises on output, try the module option
position_fix=1 or 2. position_fix=1 will use the SD_LPIB
register value without FIFO size correction as the current
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index f9c7c2e..e20629a 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -75,8 +75,18 @@ MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs "
module_param(enable_msi, int, 0);
MODULE_PARM_DESC(enable_msi, "Enable Message Signaled Interrupt (MSI)");
+#ifdef CONFIG_SND_HDA_POWER_SAVE
/* power_save option is defined in hda_codec.c */
+/* reset the HD-audio controller in power save mode.
+ * this may give more power-saving, but will take longer time to
+ * wake up.
+ */
+static int power_save_controller = 1;
+module_param(power_save_controller, bool, 0644);
+MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode.");
+#endif
+
/* just for backward compatibility */
static int enable;
module_param(enable, bool, 0444);
@@ -102,17 +112,6 @@ MODULE_DESCRIPTION("Intel HDA driver");
#define SFX "hda-intel: "
-/*
- * build flags
- */
-
-/*
- * reset the HD-audio controller in power save mode.
- * this may give more power-saving, but will take longer time to
- * wake up.
- */
-#define HDA_POWER_SAVE_RESET_CONTROLLER
-
/*
* registers
@@ -1533,10 +1532,8 @@ static void azx_power_notify(struct hda_codec *codec)
}
if (power_on)
azx_init_chip(chip);
-#ifdef HDA_POWER_SAVE_RESET_CONTROLLER
- else if (chip->running)
+ else if (chip->running && power_save_controller)
azx_stop_chip(chip);
-#endif
}
#endif /* CONFIG_SND_HDA_POWER_SAVE */
OpenPOWER on IntegriCloud