aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 239cdd855dfe..187533e477c6 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1630,10 +1630,24 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
1630 1630
1631 nid = codec->start_nid; 1631 nid = codec->start_nid;
1632 for (i = 0; i < codec->num_nodes; i++, nid++) { 1632 for (i = 0; i < codec->num_nodes; i++, nid++) {
1633 if (get_wcaps(codec, nid) & AC_WCAP_POWER) 1633 if (get_wcaps(codec, nid) & AC_WCAP_POWER) {
1634 unsigned int pincap;
1635 /*
1636 * don't power down the widget if it controls eapd
1637 * and EAPD_BTLENABLE is set.
1638 */
1639 pincap = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP);
1640 if (pincap & AC_PINCAP_EAPD) {
1641 int eapd = snd_hda_codec_read(codec, nid,
1642 0, AC_VERB_GET_EAPD_BTLENABLE, 0);
1643 eapd &= 0x02;
1644 if (power_state == AC_PWRST_D3 && eapd)
1645 continue;
1646 }
1634 snd_hda_codec_write(codec, nid, 0, 1647 snd_hda_codec_write(codec, nid, 0,
1635 AC_VERB_SET_POWER_STATE, 1648 AC_VERB_SET_POWER_STATE,
1636 power_state); 1649 power_state);
1650 }
1637 } 1651 }
1638 1652
1639 if (power_state == AC_PWRST_D0) { 1653 if (power_state == AC_PWRST_D0) {