Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: hda - Fix silent speaker output due to mute LED fixup

The recent fixups for HP laptops to support the mute LED made the
speaker output silent on some machines. It turned out that they use
the NID 0x18 for the speaker while it's also used for controlling the
LED via VREF bits although the current driver code blindly assumes
that such a node is a mic pin (where 0x18 is usually so).

This patch fixes the problem by only changing the VREF bits and
keeping the other pin ctl bits.

Reported-and-tested-by: Hui Wang <hui.wang@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+3 -2
+3 -2
sound/pci/hda/patch_realtek.c
··· 3371 3371 3372 3372 if (spec->mute_led_polarity) 3373 3373 enabled = !enabled; 3374 - pinval = AC_PINCTL_IN_EN | 3375 - (enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80); 3374 + pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid); 3375 + pinval &= ~AC_PINCTL_VREFEN; 3376 + pinval |= enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80; 3376 3377 if (spec->mute_led_nid) 3377 3378 snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); 3378 3379 }