Skip to content

Commit 5a0c72c

Browse files
committed
ALSA: hda/realtek: Always honor no_shutup_pins
The workaround for Dell machines to skip the pin-shutup for mic pins introduced alc_headset_mic_no_shutup() that is replaced from the generic snd_hda_shutup_pins() for certain codecs. The problem is that the call is done unconditionally even if spec->no_shutup_pins is set. This seems causing problems on other platforms like Lenovo. This patch corrects the behavior and the driver honors always spec->no_shutup_pins flag and skips alc_headset_mic_no_shutup() if it's set. Fixes: dad3197 ("ALSA: hda/realtek - Fixup headphone noise via runtime suspend") Reported-and-tested-by: Oleg Gorobets <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent de69d56 commit 5a0c72c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,9 @@ static void alc_shutup_pins(struct hda_codec *codec)
586586
{
587587
struct alc_spec *spec = codec->spec;
588588

589+
if (spec->no_shutup_pins)
590+
return;
591+
589592
switch (codec->core.vendor_id) {
590593
case 0x10ec0236:
591594
case 0x10ec0256:
@@ -601,8 +604,7 @@ static void alc_shutup_pins(struct hda_codec *codec)
601604
alc_headset_mic_no_shutup(codec);
602605
break;
603606
default:
604-
if (!spec->no_shutup_pins)
605-
snd_hda_shutup_pins(codec);
607+
snd_hda_shutup_pins(codec);
606608
break;
607609
}
608610
}

0 commit comments

Comments
 (0)