Skip to content

Commit

Permalink
ALSA: hda/realtek: Always honor no_shutup_pins
Browse files Browse the repository at this point in the history
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 <oleg.goro@gmail.com>
Link: https://patch.msgid.link/20250315143020.27184-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Mar 15, 2025
1 parent de69d56 commit 5a0c72c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ static void alc_shutup_pins(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;

if (spec->no_shutup_pins)
return;

switch (codec->core.vendor_id) {
case 0x10ec0236:
case 0x10ec0256:
Expand All @@ -601,8 +604,7 @@ static void alc_shutup_pins(struct hda_codec *codec)
alc_headset_mic_no_shutup(codec);
break;
default:
if (!spec->no_shutup_pins)
snd_hda_shutup_pins(codec);
snd_hda_shutup_pins(codec);
break;
}
}
Expand Down

0 comments on commit 5a0c72c

Please sign in to comment.