Commit a9d247b1 authored by Takashi Iwai's avatar Takashi Iwai Committed by Kamal Mostafa

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

commit 415d555e upstream.

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: default avatarHui Wang <hui.wang@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 8d487b18
...@@ -3157,8 +3157,9 @@ static void alc269_fixup_mic_mute_hook(void *private_data, int enabled) ...@@ -3157,8 +3157,9 @@ static void alc269_fixup_mic_mute_hook(void *private_data, int enabled)
if (spec->mute_led_polarity) if (spec->mute_led_polarity)
enabled = !enabled; enabled = !enabled;
pinval = AC_PINCTL_IN_EN | pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid);
(enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80); pinval &= ~AC_PINCTL_VREFEN;
pinval |= enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80;
if (spec->mute_led_nid) if (spec->mute_led_nid)
snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment