diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-01-09 11:15:13 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-09 11:15:13 +0100 |
commit | 6ab317419c62850a71e2adfd1573e5ee87d8774f (patch) | |
tree | cb5f0fa631f10797649e40faa6dc257ad72c769c /sound/pci/hda/hda_intel.c | |
parent | f4f0a8c4783a0258f2d0020a67fd619ce41a02a3 (diff) |
ALSA: hda - Allow power_save_controller option override DCAPS
Change the power_save_controller option to bint from bool so that user
can override the runtime PM capability bit and force to enable or
disable the runtime PM.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index cca87277baf0..988323577834 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -134,8 +134,8 @@ MODULE_PARM_DESC(power_save, "Automatic power-saving timeout " * this may give more power-saving, but will take longer time to * wake up. */ -static bool power_save_controller = 1; -module_param(power_save_controller, bool, 0644); +static int power_save_controller = -1; +module_param(power_save_controller, bint, 0644); MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode."); #endif /* CONFIG_PM */ @@ -2711,6 +2711,8 @@ static int azx_runtime_idle(struct device *dev) struct snd_card *card = dev_get_drvdata(dev); struct azx *chip = card->private_data; + if (power_save_controller > 0) + return 0; if (!power_save_controller || !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) return -EBUSY; |