diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-11-26 03:58:46 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-11-26 07:43:02 -0500 |
commit | 3e9bc58fef3b7a1ee95b36c26671198a985293c7 (patch) | |
tree | 0372db0a21da295747c59991eb4dbd29918ec797 /sound/pci | |
parent | b1920c21102af1d22f27ce36378aa48d97a62bc0 (diff) |
ALSA: hda - Disable runtime PM when EPSS is unavailable
According to Mengdong, we shouldn't enable runtime PM when a codec
doesn't support EPSS, based on the experiences on Windows.
We have already this check in HDMI codec drivers, but now apply it in
general in hda_codec.c.
Credit goes to Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 7 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 11 |
2 files changed, 5 insertions, 13 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 8f7295bdccbd..6deb8d1852cc 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1510,11 +1510,14 @@ int snd_hda_codec_new(struct hda_bus *bus, | |||
1510 | #ifdef CONFIG_PM | 1510 | #ifdef CONFIG_PM |
1511 | codec->d3_stop_clk = snd_hda_codec_get_supported_ps(codec, fg, | 1511 | codec->d3_stop_clk = snd_hda_codec_get_supported_ps(codec, fg, |
1512 | AC_PWRST_CLKSTOP); | 1512 | AC_PWRST_CLKSTOP); |
1513 | if (!codec->d3_stop_clk) | ||
1514 | bus->power_keep_link_on = 1; | ||
1515 | #endif | 1513 | #endif |
1516 | codec->epss = snd_hda_codec_get_supported_ps(codec, fg, | 1514 | codec->epss = snd_hda_codec_get_supported_ps(codec, fg, |
1517 | AC_PWRST_EPSS); | 1515 | AC_PWRST_EPSS); |
1516 | #ifdef CONFIG_PM | ||
1517 | if (!codec->d3_stop_clk || !codec->epss) | ||
1518 | bus->power_keep_link_on = 1; | ||
1519 | #endif | ||
1520 | |||
1518 | 1521 | ||
1519 | /* power-up all before initialization */ | 1522 | /* power-up all before initialization */ |
1520 | hda_set_power_state(codec, AC_PWRST_D0); | 1523 | hda_set_power_state(codec, AC_PWRST_D0); |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 1773a640e72e..4098196b2300 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1692,17 +1692,6 @@ static int hdmi_parse_codec(struct hda_codec *codec) | |||
1692 | } | 1692 | } |
1693 | } | 1693 | } |
1694 | 1694 | ||
1695 | #ifdef CONFIG_PM | ||
1696 | /* | ||
1697 | * G45/IbexPeak don't support EPSS: the unsolicited pin hot plug event | ||
1698 | * can be lost and presence sense verb will become inaccurate if the | ||
1699 | * HDA link is powered off at hot plug or hw initialization time. | ||
1700 | */ | ||
1701 | if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) & | ||
1702 | AC_PWRST_EPSS)) | ||
1703 | codec->bus->power_keep_link_on = 1; | ||
1704 | #endif | ||
1705 | |||
1706 | return 0; | 1695 | return 0; |
1707 | } | 1696 | } |
1708 | 1697 | ||