Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73911
b: refs/heads/master
c: 7eba5c9
h: refs/heads/master
i:
  73909: 626327d
  73907: 1c9e5e3
  73903: efbcac6
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Nov 19, 2007
1 parent 7ca9998 commit b244a18
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60fac85fffc74cdd2fbdae821f269594ca25b6b1
refs/heads/master: 7eba5c9dc3735b14e3df7366671adc15e0c8a048
33 changes: 20 additions & 13 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1625,19 +1625,26 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,

nid = codec->start_nid;
for (i = 0; i < codec->num_nodes; i++, nid++) {
if (get_wcaps(codec, nid) & AC_WCAP_POWER) {
unsigned int pincap;
/*
* don't power down the widget if it controls eapd
* and EAPD_BTLENABLE is set.
*/
pincap = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP);
if (pincap & AC_PINCAP_EAPD) {
int eapd = snd_hda_codec_read(codec, nid,
0, AC_VERB_GET_EAPD_BTLENABLE, 0);
eapd &= 0x02;
if (power_state == AC_PWRST_D3 && eapd)
continue;
unsigned int wcaps = get_wcaps(codec, nid);
if (wcaps & AC_WCAP_POWER) {
unsigned int wid_type = (wcaps & AC_WCAP_TYPE) >>
AC_WCAP_TYPE_SHIFT;
if (wid_type == AC_WID_PIN) {
unsigned int pincap;
/*
* don't power down the widget if it controls
* eapd and EAPD_BTLENABLE is set.
*/
pincap = snd_hda_param_read(codec, nid,
AC_PAR_PIN_CAP);
if (pincap & AC_PINCAP_EAPD) {
int eapd = snd_hda_codec_read(codec,
nid, 0,
AC_VERB_GET_EAPD_BTLENABLE, 0);
eapd &= 0x02;
if (power_state == AC_PWRST_D3 && eapd)
continue;
}
}
snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_POWER_STATE,
Expand Down

0 comments on commit b244a18

Please sign in to comment.