diff mbox series

ALSA: hda/realtek: fix speakers and micmute on HP 855 G8

Message ID 20220113210930.dtryx4ifjsmb33lz@localhost.localdomain (mailing list archive)
State New, archived
Headers show
Series ALSA: hda/realtek: fix speakers and micmute on HP 855 G8 | expand

Commit Message

Alexander Sergeyev Jan. 13, 2022, 9:09 p.m. UTC
There are several PCI ids associated with HP EliteBook 855 G8 Notebook
PC. Commit 0e68c4b11f1e6 ("ALSA: hda/realtek: fix mute/micmute LEDs for
HP 855 G8") covers 0x103c:0x8896, while this commit covers 0x103c:0x8895
which needs some additional work on top of the quirk from 0e68c4b11f1e6.

Note that the device can boot up with working speakers and micmute LED
without this patch, but the success rate would be quite low (order of
16 working boots across 709 boots) at least for the built-in drivers
scenario. This also means that there are some timing issues during early
boot and this patch is a workaround.

Changes are tested on v5.16. Speakers and headphones are consistenly
working, as well as mute/micmute LEDs and the internal microphone.

Signed-off-by: Alexander Sergeyev <sergeev917@gmail.com>
---
 sound/pci/hda/patch_realtek.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Takashi Iwai Jan. 14, 2022, 4:08 p.m. UTC | #1
On Thu, 13 Jan 2022 22:09:30 +0100,
Alexander Sergeyev wrote:
> 
> There are several PCI ids associated with HP EliteBook 855 G8 Notebook
> PC. Commit 0e68c4b11f1e6 ("ALSA: hda/realtek: fix mute/micmute LEDs for
> HP 855 G8") covers 0x103c:0x8896, while this commit covers 0x103c:0x8895
> which needs some additional work on top of the quirk from 0e68c4b11f1e6.
> 
> Note that the device can boot up with working speakers and micmute LED
> without this patch, but the success rate would be quite low (order of
> 16 working boots across 709 boots) at least for the built-in drivers
> scenario. This also means that there are some timing issues during early
> boot and this patch is a workaround.
> 
> Changes are tested on v5.16. Speakers and headphones are consistenly
> working, as well as mute/micmute LEDs and the internal microphone.
> 
> Signed-off-by: Alexander Sergeyev <sergeev917@gmail.com>
> ---

The change looks OK, but it doesn't apply to the latest tree.
Could you rebase it with either sound.git tree for-linus branch or
the latest Linus tree, and resubmit?


thanks,

Takashi
Alexander Sergeyev Jan. 14, 2022, 4:29 p.m. UTC | #2
On Fri, Jan 14, 2022 at 05:08:51PM +0100, Takashi Iwai wrote:
>The change looks OK, but it doesn't apply to the latest tree.
>Could you rebase it with either sound.git tree for-linus branch or
>the latest Linus tree, and resubmit?

Sure, I'll rebase on the sound.git branch.
diff mbox series

Patch

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 28255e752c4a..b809de2b9759 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6784,6 +6784,7 @@  enum {
 	ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
 	ALC233_FIXUP_NO_AUDIO_JACK,
 	ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME,
+	ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -8514,6 +8515,16 @@  static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
 	},
+	[ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = {
+		.type = HDA_FIXUP_VERBS,
+		.v.verbs = (const struct hda_verb[]) {
+			 { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 },
+			 { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 },
+			 { }
+		},
+		.chained = true,
+		.chain_id = ALC285_FIXUP_HP_MUTE_LED,
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -8727,6 +8738,7 @@  static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
 	SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
 	SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED),
+	SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED),
 	SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
 	SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
 	SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),