Skip to content

Commit d397b6e

Browse files
KailangYangtiwai
authored andcommitted
ALSA: hda/realtek - Fix headset Mic no show at resume back for Lenovo ALC897 platform
Headset Mic will no show at resume back. This patch will fix this issue. Fixes: d7f3279 ("ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform") Cc: <stable@vger.kernel.org> Signed-off-by: Kailang Yang <kailang@realtek.com> Link: https://lore.kernel.org/r/4713d48a372e47f98bba0c6120fd8254@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 17c6a0c commit d397b6e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11684,8 +11684,7 @@ static void alc897_hp_automute_hook(struct hda_codec *codec,
1168411684

1168511685
snd_hda_gen_hp_automute(codec, jack);
1168611686
vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP;
11687-
snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
11688-
vref);
11687+
snd_hda_set_pin_ctl(codec, 0x1b, vref);
1168911688
}
1169011689

1169111690
static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec,
@@ -11694,6 +11693,10 @@ static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec,
1169411693
struct alc_spec *spec = codec->spec;
1169511694
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
1169611695
spec->gen.hp_automute_hook = alc897_hp_automute_hook;
11696+
spec->no_shutup_pins = 1;
11697+
}
11698+
if (action == HDA_FIXUP_ACT_PROBE) {
11699+
snd_hda_set_pin_ctl_cache(codec, 0x1a, PIN_IN | AC_PINCTL_VREF_100);
1169711700
}
1169811701
}
1169911702

0 commit comments

Comments
 (0)