From: Takashi Iwai Date: Wed, 17 Oct 2007 08:09:32 +0000 (+0200) Subject: [ALSA] hda-codec - Fix AD1986A Lenovo auto-mute X-Git-Tag: v2.6.24-rc1~35^2~10 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=53eb1b85402f108d5151338cff4430f30fd9727f;p=linux-2.6-omap-h63xx.git [ALSA] hda-codec - Fix AD1986A Lenovo auto-mute The jack detection bit on AD1986A Lenovo N100 seems inverse from the standard definition. Now fixed the detection properly. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 54cfd4526d2..9bf38f92ba7 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -612,7 +612,8 @@ 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); - spec->jack_present = (present & 0x80000000) != 0; + /* Lenovo N100 seems to report the reversed bit for HP jack-sensing */ + spec->jack_present = !(present & 0x80000000); ad1986a_update_hp(codec); }