aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index b52f56ffedf4..8cbe3bf1e317 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1625,19 +1625,26 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
1625 1625
1626 nid = codec->start_nid; 1626 nid = codec->start_nid;
1627 for (i = 0; i < codec->num_nodes; i++, nid++) { 1627 for (i = 0; i < codec->num_nodes; i++, nid++) {
1628 if (get_wcaps(codec, nid) & AC_WCAP_POWER) { 1628 unsigned int wcaps = get_wcaps(codec, nid);
1629 unsigned int pincap; 1629 if (wcaps & AC_WCAP_POWER) {
1630 /* 1630 unsigned int wid_type = (wcaps & AC_WCAP_TYPE) >>
1631 * don't power down the widget if it controls eapd 1631 AC_WCAP_TYPE_SHIFT;
1632 * and EAPD_BTLENABLE is set. 1632 if (wid_type == AC_WID_PIN) {
1633 */ 1633 unsigned int pincap;
1634 pincap = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); 1634 /*
1635 if (pincap & AC_PINCAP_EAPD) { 1635 * don't power down the widget if it controls
1636 int eapd = snd_hda_codec_read(codec, nid, 1636 * eapd and EAPD_BTLENABLE is set.
1637 0, AC_VERB_GET_EAPD_BTLENABLE, 0); 1637 */
1638 eapd &= 0x02; 1638 pincap = snd_hda_param_read(codec, nid,
1639 if (power_state == AC_PWRST_D3 && eapd) 1639 AC_PAR_PIN_CAP);
1640 continue; 1640 if (pincap & AC_PINCAP_EAPD) {
1641 int eapd = snd_hda_codec_read(codec,
1642 nid, 0,
1643 AC_VERB_GET_EAPD_BTLENABLE, 0);
1644 eapd &= 0x02;
1645 if (power_state == AC_PWRST_D3 && eapd)
1646 continue;
1647 }
1641 } 1648 }
1642 snd_hda_codec_write(codec, nid, 0, 1649 snd_hda_codec_write(codec, nid, 0,
1643 AC_VERB_SET_POWER_STATE, 1650 AC_VERB_SET_POWER_STATE,