Skip to content

Commit 6ab3174

Browse files
committed
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>
1 parent f4f0a8c commit 6ab3174

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎Documentation/sound/alsa/ALSA-Configuration.txt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
890890
enable_msi - Enable Message Signaled Interrupt (MSI) (default = off)
891891
power_save - Automatic power-saving timeout (in second, 0 =
892892
disable)
893-
power_save_controller - Reset HD-audio controller in power-saving mode
894-
(default = on)
893+
power_save_controller - Support runtime D3 of HD-audio controller
894+
(-1 = on for supported chip (default), false = off,
895+
true = force to on even for unsupported hardware)
895896
align_buffer_size - Force rounding of buffer/period sizes to multiples
896897
of 128 bytes. This is more efficient in terms of memory
897898
access but isn't required by the HDA spec and prevents

‎sound/pci/hda/hda_intel.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ MODULE_PARM_DESC(power_save, "Automatic power-saving timeout "
134134
* this may give more power-saving, but will take longer time to
135135
* wake up.
136136
*/
137-
static bool power_save_controller = 1;
138-
module_param(power_save_controller, bool, 0644);
137+
static int power_save_controller = -1;
138+
module_param(power_save_controller, bint, 0644);
139139
MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode.");
140140
#endif /* CONFIG_PM */
141141

@@ -2711,6 +2711,8 @@ static int azx_runtime_idle(struct device *dev)
27112711
struct snd_card *card = dev_get_drvdata(dev);
27122712
struct azx *chip = card->private_data;
27132713

2714+
if (power_save_controller > 0)
2715+
return 0;
27142716
if (!power_save_controller ||
27152717
!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
27162718
return -EBUSY;

0 commit comments

Comments
 (0)