Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154523
b: refs/heads/master
c: 03c405a
h: refs/heads/master
i:
  154521: c74bc3d
  154519: 415417e
v: v3
  • Loading branch information
Takashi Iwai committed Jun 24, 2009
1 parent 375101b commit f2c39b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: 16d11a829ed197b719723f81d82e7f1a42f5c681
refs/heads/master: 03c405ad314d3c4e049b8d04500e54e833d16747
10 changes: 8 additions & 2 deletions trunk/sound/pci/hda/patch_analog.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ struct ad198x_spec {
hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS];

unsigned int jack_present :1;
unsigned int inv_jack_detect:1;

#ifdef CONFIG_SND_HDA_POWER_SAVE
struct hda_loopback_check loopback;
Expand Down Expand Up @@ -756,8 +757,9 @@ static void ad1986a_hp_automute(struct hda_codec *codec)
unsigned int present;

present = snd_hda_codec_read(codec, 0x1a, 0, AC_VERB_GET_PIN_SENSE, 0);
/* Lenovo N100 seems to report the reversed bit for HP jack-sensing */
spec->jack_present = !(present & 0x80000000);
spec->jack_present = !!(present & 0x80000000);
if (spec->inv_jack_detect)
spec->jack_present = !spec->jack_present;
ad1986a_update_hp(codec);
}

Expand Down Expand Up @@ -1113,6 +1115,10 @@ static int patch_ad1986a(struct hda_codec *codec)
spec->input_mux = &ad1986a_laptop_eapd_capture_source;
codec->patch_ops.unsol_event = ad1986a_hp_unsol_event;
codec->patch_ops.init = ad1986a_hp_init;
/* Lenovo N100 seems to report the reversed bit
* for HP jack-sensing
*/
spec->inv_jack_detect = 1;
break;
case AD1986A_ULTRA:
spec->mixers[0] = ad1986a_laptop_eapd_mixers;
Expand Down

0 comments on commit f2c39b6

Please sign in to comment.