From: Takashi Iwai Date: Tue, 26 Nov 2013 08:58:46 +0000 (+0100) Subject: ALSA: hda - Disable runtime PM when EPSS is unavailable X-Git-Tag: v4.0~2455^2~11^2~68^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e9bc58fef3b7a1ee95b36c26671198a985293c7;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 8f7295b..6deb8d1 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, #ifdef CONFIG_PM codec->d3_stop_clk = snd_hda_codec_get_supported_ps(codec, fg, AC_PWRST_CLKSTOP); - if (!codec->d3_stop_clk) - bus->power_keep_link_on = 1; #endif codec->epss = snd_hda_codec_get_supported_ps(codec, fg, AC_PWRST_EPSS); +#ifdef CONFIG_PM + if (!codec->d3_stop_clk || !codec->epss) + bus->power_keep_link_on = 1; +#endif + /* power-up all before initialization */ 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 1773a64..4098196 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) } } -#ifdef CONFIG_PM - /* - * G45/IbexPeak don't support EPSS: the unsolicited pin hot plug event - * can be lost and presence sense verb will become inaccurate if the - * HDA link is powered off at hot plug or hw initialization time. - */ - if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) & - AC_PWRST_EPSS)) - codec->bus->power_keep_link_on = 1; -#endif - return 0; }