Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c715a98 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Update jack-sense info even when no automute is set



The internal states, jack_present and line_jack_present should be
updated upon unsolicited events even if no automute is set.
Otherwise the wrong state is referred when the automute behavior is
changed by the mixer control.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 675c1aa3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -565,11 +565,11 @@ static void alc_hp_automute(struct hda_codec *codec)
{
	struct alc_spec *spec = codec->spec;

	if (!spec->automute)
		return;
	spec->jack_present =
		detect_jacks(codec, ARRAY_SIZE(spec->autocfg.hp_pins),
			     spec->autocfg.hp_pins);
	if (!spec->automute)
		return;
	update_speakers(codec);
}

@@ -578,11 +578,11 @@ static void alc_line_automute(struct hda_codec *codec)
{
	struct alc_spec *spec = codec->spec;

	if (!spec->automute || !spec->detect_line)
		return;
	spec->line_jack_present =
		detect_jacks(codec, ARRAY_SIZE(spec->autocfg.line_out_pins),
			     spec->autocfg.line_out_pins);
	if (!spec->automute || !spec->detect_line)
		return;
	update_speakers(codec);
}