Commit f0ce2799 authored by David Henningsson's avatar David Henningsson Committed by Takashi Iwai

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: default avatarDavid Henningsson <david.henningsson@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 11be6a26
...@@ -1133,11 +1133,8 @@ static void alc_automute_speaker(struct hda_codec *codec, int pinctl) ...@@ -1133,11 +1133,8 @@ static void alc_automute_speaker(struct hda_codec *codec, int pinctl)
nid = spec->autocfg.hp_pins[i]; nid = spec->autocfg.hp_pins[i];
if (!nid) if (!nid)
break; break;
if (snd_hda_jack_detect(codec, nid)) { alc_report_jack(codec, nid);
spec->jack_present = 1; spec->jack_present |= snd_hda_jack_detect(codec, nid);
break;
}
alc_report_jack(codec, spec->autocfg.hp_pins[i]);
} }
mute = spec->jack_present ? HDA_AMP_MUTE : 0; mute = spec->jack_present ? HDA_AMP_MUTE : 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment