diff options
| -rw-r--r-- | sound/pci/hda/hda_codec.c | 5 | ||||
| -rw-r--r-- | sound/pci/hda/hda_codec.h | 1 | ||||
| -rw-r--r-- | sound/pci/hda/patch_hdmi.c | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index d91c87e41756..20a171ac4bb2 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
| @@ -2899,8 +2899,9 @@ static int hda_codec_runtime_suspend(struct device *dev) | |||
| 2899 | list_for_each_entry(pcm, &codec->pcm_list_head, list) | 2899 | list_for_each_entry(pcm, &codec->pcm_list_head, list) |
| 2900 | snd_pcm_suspend_all(pcm->pcm); | 2900 | snd_pcm_suspend_all(pcm->pcm); |
| 2901 | state = hda_call_codec_suspend(codec); | 2901 | state = hda_call_codec_suspend(codec); |
| 2902 | if (codec_has_clkstop(codec) && codec_has_epss(codec) && | 2902 | if (codec->link_down_at_suspend || |
| 2903 | (state & AC_PWRST_CLK_STOP_OK)) | 2903 | (codec_has_clkstop(codec) && codec_has_epss(codec) && |
| 2904 | (state & AC_PWRST_CLK_STOP_OK))) | ||
| 2904 | snd_hdac_codec_link_down(&codec->core); | 2905 | snd_hdac_codec_link_down(&codec->core); |
| 2905 | snd_hdac_link_power(&codec->core, false); | 2906 | snd_hdac_link_power(&codec->core, false); |
| 2906 | return 0; | 2907 | return 0; |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 681c360f29f9..a8b1b31f161c 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
| @@ -258,6 +258,7 @@ struct hda_codec { | |||
| 258 | unsigned int power_save_node:1; /* advanced PM for each widget */ | 258 | unsigned int power_save_node:1; /* advanced PM for each widget */ |
| 259 | unsigned int auto_runtime_pm:1; /* enable automatic codec runtime pm */ | 259 | unsigned int auto_runtime_pm:1; /* enable automatic codec runtime pm */ |
| 260 | unsigned int force_pin_prefix:1; /* Add location prefix */ | 260 | unsigned int force_pin_prefix:1; /* Add location prefix */ |
| 261 | unsigned int link_down_at_suspend:1; /* link down at runtime suspend */ | ||
| 261 | #ifdef CONFIG_PM | 262 | #ifdef CONFIG_PM |
| 262 | unsigned long power_on_acct; | 263 | unsigned long power_on_acct; |
| 263 | unsigned long power_off_acct; | 264 | unsigned long power_off_acct; |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 8840daf9c6a3..98e1c411c56a 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
| @@ -3741,6 +3741,11 @@ static int patch_atihdmi(struct hda_codec *codec) | |||
| 3741 | 3741 | ||
| 3742 | spec->chmap.channels_max = max(spec->chmap.channels_max, 8u); | 3742 | spec->chmap.channels_max = max(spec->chmap.channels_max, 8u); |
| 3743 | 3743 | ||
| 3744 | /* AMD GPUs have neither EPSS nor CLKSTOP bits, hence preventing | ||
| 3745 | * the link-down as is. Tell the core to allow it. | ||
| 3746 | */ | ||
| 3747 | codec->link_down_at_suspend = 1; | ||
| 3748 | |||
| 3744 | return 0; | 3749 | return 0; |
| 3745 | } | 3750 | } |
| 3746 | 3751 | ||
