]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ALSA: HDA: Realtek: Fixup jack detection to input subsystem
authorDavid Henningsson <david.henningsson@canonical.com>
Mon, 28 Feb 2011 14:58:07 +0000 (15:58 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 28 Feb 2011 15:23:13 +0000 (16:23 +0100)
This patch fixes an error in the jack detection reporting,
causing the jack detection sometimes not to be reported
correctly to the input subsystem. It should apply to several
Realtek codecs.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_realtek.c

index 3328a259a2421bd6f68692ca6766079b8e7d0a8f..c052fc5ad0c9efb6b74aa17ed6dff9dcc63844a5 100644 (file)
@@ -1133,11 +1133,8 @@ static void alc_automute_speaker(struct hda_codec *codec, int pinctl)
                nid = spec->autocfg.hp_pins[i];
                if (!nid)
                        break;
-               if (snd_hda_jack_detect(codec, nid)) {
-                       spec->jack_present = 1;
-                       break;
-               }
-               alc_report_jack(codec, spec->autocfg.hp_pins[i]);
+               alc_report_jack(codec, nid);
+               spec->jack_present |= snd_hda_jack_detect(codec, nid);
        }
 
        mute = spec->jack_present ? HDA_AMP_MUTE : 0;