提交 6ab31741 编写于 作者: T Takashi Iwai

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: NTakashi Iwai <tiwai@suse.de>
上级 f4f0a8c4
...@@ -890,8 +890,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ...@@ -890,8 +890,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
enable_msi - Enable Message Signaled Interrupt (MSI) (default = off) enable_msi - Enable Message Signaled Interrupt (MSI) (default = off)
power_save - Automatic power-saving timeout (in second, 0 = power_save - Automatic power-saving timeout (in second, 0 =
disable) disable)
power_save_controller - Reset HD-audio controller in power-saving mode power_save_controller - Support runtime D3 of HD-audio controller
(default = on) (-1 = on for supported chip (default), false = off,
true = force to on even for unsupported hardware)
align_buffer_size - Force rounding of buffer/period sizes to multiples align_buffer_size - Force rounding of buffer/period sizes to multiples
of 128 bytes. This is more efficient in terms of memory of 128 bytes. This is more efficient in terms of memory
access but isn't required by the HDA spec and prevents access but isn't required by the HDA spec and prevents
......
...@@ -134,8 +134,8 @@ MODULE_PARM_DESC(power_save, "Automatic power-saving timeout " ...@@ -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 * this may give more power-saving, but will take longer time to
* wake up. * wake up.
*/ */
static bool power_save_controller = 1; static int power_save_controller = -1;
module_param(power_save_controller, bool, 0644); module_param(power_save_controller, bint, 0644);
MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode."); MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode.");
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
...@@ -2711,6 +2711,8 @@ static int azx_runtime_idle(struct device *dev) ...@@ -2711,6 +2711,8 @@ static int azx_runtime_idle(struct device *dev)
struct snd_card *card = dev_get_drvdata(dev); struct snd_card *card = dev_get_drvdata(dev);
struct azx *chip = card->private_data; struct azx *chip = card->private_data;
if (power_save_controller > 0)
return 0;
if (!power_save_controller || if (!power_save_controller ||
!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
return -EBUSY; return -EBUSY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册