From: David Henningsson Date: Mon, 28 Feb 2011 14:58:07 +0000 (+0100) Subject: ALSA: HDA: Realtek: Fixup jack detection to input subsystem X-Git-Tag: v2.6.38-rc8~7^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0ce27996217d06207c8bfda1b1bbec2fbab48c6;p=platform%2Fkernel%2Flinux-exynos.git ALSA: HDA: Realtek: Fixup jack detection to input subsystem 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 Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3328a25..c052fc5 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -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;