提交 2377c3c3 编写于 作者: L Lu, Han 提交者: Takashi Iwai

ALSA: hda: Intel: enable automatic runtime pm for HDMI codecs by default

Enable runtime PM of the HDMI audio codec on the latest Intel platforms.
So the HD-A controller or HDMI codec can suspend when idle timeout by
default and release the GFX power well.
The patch influences HSW/BDW/BYT/BSW/SKL. Eariler platforms and third
party analog codecs will not be influenced.
Signed-off-by: NLu, Han <han.lu@intel.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 8654844c
...@@ -3496,6 +3496,9 @@ static void codec_set_power_save(struct hda_codec *codec, int delay) ...@@ -3496,6 +3496,9 @@ static void codec_set_power_save(struct hda_codec *codec, int delay)
{ {
struct device *dev = hda_codec_dev(codec); struct device *dev = hda_codec_dev(codec);
if (delay == 0 && codec->auto_runtime_pm)
delay = 3000;
if (delay > 0) { if (delay > 0) {
pm_runtime_set_autosuspend_delay(dev, delay); pm_runtime_set_autosuspend_delay(dev, delay);
pm_runtime_use_autosuspend(dev); pm_runtime_use_autosuspend(dev);
......
...@@ -251,6 +251,7 @@ struct hda_codec { ...@@ -251,6 +251,7 @@ struct hda_codec {
unsigned int dp_mst:1; /* support DP1.2 Multi-stream transport */ unsigned int dp_mst:1; /* support DP1.2 Multi-stream transport */
unsigned int dump_coef:1; /* dump processing coefs in codec proc file */ unsigned int dump_coef:1; /* dump processing coefs in codec proc file */
unsigned int power_save_node:1; /* advanced PM for each widget */ unsigned int power_save_node:1; /* advanced PM for each widget */
unsigned int auto_runtime_pm:1; /* enable automatic codec runtime pm */
#ifdef CONFIG_PM #ifdef CONFIG_PM
unsigned long power_on_acct; unsigned long power_on_acct;
unsigned long power_off_acct; unsigned long power_off_acct;
......
...@@ -2356,6 +2356,10 @@ static int patch_generic_hdmi(struct hda_codec *codec) ...@@ -2356,6 +2356,10 @@ static int patch_generic_hdmi(struct hda_codec *codec)
codec->dp_mst = true; codec->dp_mst = true;
} }
/* Enable runtime pm for HDMI audio codec of HSW/BDW/SKL/BYT/BSW */
if (is_haswell_plus(codec) || is_valleyview_plus(codec))
codec->auto_runtime_pm = 1;
generic_hdmi_init_per_pins(codec); generic_hdmi_init_per_pins(codec);
init_channel_allocations(); init_channel_allocations();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册