mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek: Enable GPIO amp on Razer Blade 14 (2021)
@ 2026-04-17 20:53 Prasanna Raghavan via B4 Relay
  0 siblings, 0 replies; only message in thread
From: Prasanna Raghavan via B4 Relay @ 2026-04-17 20:53 UTC (permalink / raw)
  To: perex; +Cc: linux-kernel, Prasanna Raghavan

From: Prasanna Raghavan <email2trprasanna@gmail.com>

The Razer Blade 14 (2021, RZ09-0370) uses an ALC897 codec with
subsystem ID 0x1a582014. The headphone output is routed through a
GPIO-controlled external amplifier. The Windows driver enables GPIO
pins 0-2 at init, but Linux has no quirk for this board, leaving the
amp disabled -- resulting in ~15dB lower output with degraded frequency
response.

Add a fixup to enable GPIO 0-2 as outputs set high, matching the
Windows driver behavior.

Signed-off-by: Prasanna Raghavan <email2trprasanna@gmail.com>
---
 sound/hda/codecs/realtek/alc662.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sound/hda/codecs/realtek/alc662.c b/sound/hda/codecs/realtek/alc662.c
index 2cf3664a3..a8ebe06ae 100644
--- a/sound/hda/codecs/realtek/alc662.c
+++ b/sound/hda/codecs/realtek/alc662.c
@@ -325,6 +325,7 @@ enum {
 	ALC897_FIXUP_UNIS_H3C_X500S,
 	ALC897_FIXUP_HEADSET_MIC_PIN3,
 	ALC662_FIXUP_CSL_GPIO,
+	ALC897_FIXUP_RAZER_BLADE_14,
 };
 
 static const struct hda_fixup alc662_fixups[] = {
@@ -782,6 +783,16 @@ static const struct hda_fixup alc662_fixups[] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc662_fixup_csl_amp,
 	},
+	[ALC897_FIXUP_RAZER_BLADE_14] = {
+		.type = HDA_FIXUP_VERBS,
+		.v.verbs = (const struct hda_verb[]) {
+			/* Enable GPIO 0-2 for headphone amp */
+			{ 0x01, AC_VERB_SET_GPIO_MASK, 0x07 },
+			{ 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x07 },
+			{ 0x01, AC_VERB_SET_GPIO_DATA, 0x07 },
+			{ }
+		},
+	},
 };
 
 static const struct hda_quirk alc662_fixup_tbl[] = {
@@ -846,6 +857,7 @@ static const struct hda_quirk alc662_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2),
 	SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
 	SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
+	SND_PCI_QUIRK(0x1a58, 0x2014, "Razer Blade 14 (2021)", ALC897_FIXUP_RAZER_BLADE_14),
 	SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
 	SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68),
 	SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),

---
base-commit: f43a4c2158239c8247f25758eea6cecfab90d98c
change-id: 20260417-for-next-204910ddb8ff

Best regards,
--  
Prasanna Raghavan <email2trprasanna@gmail.com>



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-17 20:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-17 20:53 [PATCH] ALSA: hda/realtek: Enable GPIO amp on Razer Blade 14 (2021) Prasanna Raghavan via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®