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 <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by David Henningsson and committed by Takashi Iwai f0ce2799 11be6a26

+2 -5
+2 -5
sound/pci/hda/patch_realtek.c
··· 1133 1133 nid = spec->autocfg.hp_pins[i]; 1134 1134 if (!nid) 1135 1135 break; 1136 - if (snd_hda_jack_detect(codec, nid)) { 1137 - spec->jack_present = 1; 1138 - break; 1139 - } 1140 - alc_report_jack(codec, spec->autocfg.hp_pins[i]); 1136 + alc_report_jack(codec, nid); 1137 + spec->jack_present |= snd_hda_jack_detect(codec, nid); 1141 1138 } 1142 1139 1143 1140 mute = spec->jack_present ? HDA_AMP_MUTE : 0;