public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek: Enable rear line-out pins on MSI EC79 (ALCS1200A)
@ 2026-03-15 10:19 James Waschbisch
  2026-03-16 17:08 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: James Waschbisch @ 2026-03-15 10:19 UTC (permalink / raw)
  To: perex, tiwai; +Cc: linux-sound, linux-kernel, james

On MSI systems with subsystem ID 1462:ec79 using the Realtek ALCS1200A
codec, the rear line-out pins (0x14, 0x15, 0x16) are parsed as line
outputs but do not come up with active pin widget control after boot.
This leaves analog output on the rear jacks unavailable until userspace
manually reprograms the codec.

Add a board-specific fixup that disables line-out/speaker automute and
forces pins 0x14, 0x15, and 0x16 to PIN_OUT during HDA_FIXUP_ACT_INIT,
while also clearing the output amp mute on those nodes.

Tested-on: MSI X570 Gaming Pro WiFi (1462:ec79, ALCS1200A)

Signed-off-by: James Waschbisch <james@jaytek.org>
---
 sound/hda/codecs/realtek/alc882.c | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/sound/hda/codecs/realtek/alc882.c b/sound/hda/codecs/realtek/alc882.c
index 529fecd5b..2bf266a25 100644
--- a/sound/hda/codecs/realtek/alc882.c
+++ b/sound/hda/codecs/realtek/alc882.c
@@ -60,6 +60,7 @@ enum {
 	ALC887_FIXUP_ASUS_AUDIO,
 	ALC887_FIXUP_ASUS_HMIC,
 	ALCS1200A_FIXUP_MIC_VREF,
+	ALCS1200A_FIXUP_MSI_EC79,
 	ALC888VD_FIXUP_MIC_100VREF,
 };
 
@@ -261,6 +262,36 @@ static void alc887_fixup_asus_jack(struct hda_codec *codec,
 	spec->gen.hp_automute_hook = alc887_asus_hp_automute_hook;
 }
 
+static void alcs1200a_fixup_msi_ec79(struct hda_codec *codec,
+				     const struct hda_fixup *fix, int action)
+{
+	struct alc_spec *spec = codec->spec;
+
+	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+		spec->gen.automute_lo = 0;
+		spec->gen.automute_speaker = 0;
+		return;
+	}
+
+	if (action != HDA_FIXUP_ACT_INIT)
+		return;
+
+	/* Front / Surround / CLFE line-out pins */
+	snd_hda_set_pin_ctl(codec, 0x14, PIN_OUT);
+	snd_hda_set_pin_ctl(codec, 0x15, PIN_OUT);
+	snd_hda_set_pin_ctl(codec, 0x16, PIN_OUT);
+
+	/* Unmute both output amp channels on all three pins */
+	snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0, 0x80, 0);
+	snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0, 0x80, 0);
+
+	snd_hda_codec_amp_update(codec, 0x15, 0, HDA_OUTPUT, 0, 0x80, 0);
+	snd_hda_codec_amp_update(codec, 0x15, 1, HDA_OUTPUT, 0, 0x80, 0);
+
+	snd_hda_codec_amp_update(codec, 0x16, 0, HDA_OUTPUT, 0, 0x80, 0);
+	snd_hda_codec_amp_update(codec, 0x16, 1, HDA_OUTPUT, 0, 0x80, 0);
+}
+
 static const struct hda_fixup alc882_fixups[] = {
 	[ALC882_FIXUP_ABIT_AW9D_MAX] = {
 		.type = HDA_FIXUP_PINS,
@@ -553,6 +584,12 @@ static const struct hda_fixup alc882_fixups[] = {
 			{}
 		}
 	},
+	[ALCS1200A_FIXUP_MSI_EC79] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alcs1200a_fixup_msi_ec79,
+		.chained = true,
+		.chain_id = ALCS1200A_FIXUP_MIC_VREF,
+	},
 	[ALC888VD_FIXUP_MIC_100VREF] = {
 		.type = HDA_FIXUP_PINCTLS,
 		.v.pins = (const struct hda_pintbl[]) {
@@ -636,6 +673,7 @@ static const struct hda_quirk alc882_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570),
 	SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_GB_X570),
 	SND_PCI_QUIRK(0x1458, 0xa0d5, "Gigabyte X570S Aorus Master", ALC1220_FIXUP_GB_X570),
+	SND_PCI_QUIRK(0x1462, 0xec79, "MSI ALCS1200A", ALCS1200A_FIXUP_MSI_EC79),
 	SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950),
 	SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950),
 	SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950),
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-03-27 11:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-15 10:19 [PATCH] ALSA: hda/realtek: Enable rear line-out pins on MSI EC79 (ALCS1200A) James Waschbisch
2026-03-16 17:08 ` Takashi Iwai
2026-03-17  8:57   ` James
2026-03-17  9:03     ` Takashi Iwai
2026-03-17 11:02       ` Takashi Iwai
2026-03-18 22:12         ` James
2026-03-27 11:33           ` Takashi Iwai

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