Skip to contentSkip to conversation

sound: realtek: Add pincfg for ASUS G533Z

PATCH Superseded Luke D. Jones 2 participants 3 messages Aug 25, 2022 – Aug 26, 2022 Sound

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sound: realtek: Add pincfg for ASUS G533Z

Fixes up the pincfg for ASUS ROG Strix G15 (G533Z) laptop.

---
 sound/pci/hda/patch_realtek.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
sound/pci/hda/patch_realtek.c +14 -1
index fd630d62b5a0..e9cad49ee2a5 100644
@@ -5828,7 +5828,7 @@ static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec,
 		struct alc_spec *spec = codec->spec;
 		spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
 		alc255_set_default_jack_type(codec);
-	} 
+	}
 	else
 		alc_fixup_headset_mode(codec, fix, action);
 }
@@ -7022,6 +7022,7 @@ enum {
 	ALC294_FIXUP_ASUS_GX502_HP,
 	ALC294_FIXUP_ASUS_GX502_PINS,
 	ALC294_FIXUP_ASUS_GX502_VERBS,
+	ALC285_FIXUP_ASUS_G533Z_PINS,
 	ALC294_FIXUP_ASUS_GU502_HP,
 	ALC294_FIXUP_ASUS_GU502_PINS,
 	ALC294_FIXUP_ASUS_GU502_VERBS,
@@ -8363,6 +8364,17 @@ static const struct hda_fixup alc269_fixups[] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc294_fixup_gu502_hp,
 	},
+	[ALC285_FIXUP_ASUS_G533Z_PINS] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x14, 0x90170120 },
+			{ 0x19, 0x03A11050 }, /* front HP mic */
+			{ 0x1B, 0x03A11C30 }, /* rear external mic */
+			{ 0x21, 0x03211420 }, /* front HP out */
+			{ }
+		},
+		.chained = false,
+	},
 	[ALC294_FIXUP_ASUS_COEF_1B] = {
 		.type = HDA_FIXUP_VERBS,
 		.v.verbs = (const struct hda_verb[]) {
@@ -9294,6 +9306,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
 	SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
 	SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
+	SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
 	SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
Signature · 1 line
2.37.2
#1 lore raw

PATCH 2/2 sound: realtek: Add pincfg for ASUS G513

Fixes up the pincfg for ASUS ROG Strix G513

---
 sound/pci/hda/patch_realtek.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
sound/pci/hda/patch_realtek.c +12 -0
index e9cad49ee2a5..abf3fb50692a 100644
@@ -7023,6 +7023,7 @@ enum {
 	ALC294_FIXUP_ASUS_GX502_PINS,
 	ALC294_FIXUP_ASUS_GX502_VERBS,
 	ALC285_FIXUP_ASUS_G533Z_PINS,
+	ALC294_FIXUP_ASUS_G513_PINS,
 	ALC294_FIXUP_ASUS_GU502_HP,
 	ALC294_FIXUP_ASUS_GU502_PINS,
 	ALC294_FIXUP_ASUS_GU502_VERBS,
@@ -8308,6 +8309,16 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
 	},
+	[ALC294_FIXUP_ASUS_G513_PINS] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x19, 0x03a11050 }, /* front HP mic */
+			{ 0x1a, 0x03a11c30 }, /* rear external mic */
+			{ 0x21, 0x03211420 }, /* front HP out */
+			{ }
+		},
+		.chained = false
+	},
 	[ALC294_FIXUP_ASUS_GX502_PINS] = {
 		.type = HDA_FIXUP_PINS,
 		.v.pins = (const struct hda_pintbl[]) {
@@ -9307,6 +9318,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
 	SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
 	SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
+	SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS),
 	SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
Signature · 1 line
2.37.2
#2 lore raw
In reply to Luke D. Jones
Quoted 4 lines · Luke D. Jones

Fixes up the pincfg for ASUS ROG Strix G15 (G533Z) laptop.

Just minor nitpicking:

sound/pci/hda/patch_realtek.c static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec, · line 5834

Quoted 11 lines
sound/pci/hda/patch_realtek.c +1 -1
@@ -5828,7 +5828,7 @@ static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec,
 		struct alc_spec *spec = codec->spec;
 		spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
 		alc255_set_default_jack_type(codec);
-	} 
+	}
 	else
 		alc_fixup_headset_mode(codec, fix, action);
 }

Please avoid touching unnecessary parts.

sound/pci/hda/patch_realtek.c static const struct hda_fixup alc269_fixups[] = { · line 8373

Quoted 11 lines
sound/pci/hda/patch_realtek.c +7 -0
@@ -8363,6 +8364,17 @@ static const struct hda_fixup alc269_fixups[] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc294_fixup_gu502_hp,
 	},
+	[ALC285_FIXUP_ASUS_G533Z_PINS] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x14, 0x90170120 },
+			{ 0x19, 0x03A11050 }, /* front HP mic */
+			{ 0x1B, 0x03A11C30 }, /* rear external mic */
+			{ 0x21, 0x03211420 }, /* front HP out */

We prefer the lower letters for hex numbers.

sound/pci/hda/patch_realtek.c static const struct hda_fixup alc269_fixups[] = { · line 8376

Quoted 3 lines
sound/pci/hda/patch_realtek.c +3 -0
+			{ }
+		},
+		.chained = false,

This is initialization superfluous, please drop.

Last but not least, the subject prefix should be rather "ALSA:" instead of "sound:".

The same applied to the second patch. Could you try to address those and resubmit as v2?

thanks,

Takashi