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>
This commit is contained in:
David Henningsson 2011-02-28 15:58:07 +01:00 коммит произвёл Takashi Iwai
Родитель 11be6a269d
Коммит f0ce279962
1 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -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;