Commit 38f58227 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] ac97 - Fix power_save option value as time-out

The power_save option was set as boot although it was meant to be a
timeout value like the same option of snd-hda-intel originally.
Now fixed to the same style.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 05a076de
...@@ -49,8 +49,9 @@ MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control"); ...@@ -49,8 +49,9 @@ MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control");
#ifdef CONFIG_SND_AC97_POWER_SAVE #ifdef CONFIG_SND_AC97_POWER_SAVE
static int power_save = CONFIG_SND_AC97_POWER_SAVE_DEFAULT; static int power_save = CONFIG_SND_AC97_POWER_SAVE_DEFAULT;
module_param(power_save, bool, 0644); module_param(power_save, int, 0644);
MODULE_PARM_DESC(power_save, "Enable AC97 power-saving control"); MODULE_PARM_DESC(power_save, "Automatic power-saving timeout "
"(in second, 0 = disable).");
#endif #endif
/* /*
...@@ -2362,7 +2363,7 @@ int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup) ...@@ -2362,7 +2363,7 @@ int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup)
* that open/close frequently) * that open/close frequently)
*/ */
schedule_delayed_work(&ac97->power_work, schedule_delayed_work(&ac97->power_work,
msecs_to_jiffies(2000)); msecs_to_jiffies(power_save * 1000));
else { else {
cancel_delayed_work(&ac97->power_work); cancel_delayed_work(&ac97->power_work);
update_power_regs(ac97); update_power_regs(ac97);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment