]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - sound/pci/hda/patch_realtek.c
ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master after reboot...
[thirdparty/linux.git] / sound / pci / hda / patch_realtek.c
index 2f1727faec698c37322c086a2399d623f6bce35e..2eea70605fd324e3f3765d67cc7d4eb7e968eb0d 100644 (file)
@@ -1924,6 +1924,7 @@ enum {
        ALC887_FIXUP_ASUS_BASS,
        ALC887_FIXUP_BASS_CHMAP,
        ALC1220_FIXUP_GB_DUAL_CODECS,
+       ALC1220_FIXUP_GB_X570,
        ALC1220_FIXUP_CLEVO_P950,
        ALC1220_FIXUP_CLEVO_PB51ED,
        ALC1220_FIXUP_CLEVO_PB51ED_PINS,
@@ -2113,6 +2114,29 @@ static void alc1220_fixup_gb_dual_codecs(struct hda_codec *codec,
        }
 }
 
+static void alc1220_fixup_gb_x570(struct hda_codec *codec,
+                                    const struct hda_fixup *fix,
+                                    int action)
+{
+       static const hda_nid_t conn1[] = { 0x0c };
+       static const struct coef_fw gb_x570_coefs[] = {
+               WRITE_COEF(0x1a, 0x01c1),
+               WRITE_COEF(0x1b, 0x0202),
+               WRITE_COEF(0x43, 0x3005),
+               {}
+       };
+
+       switch (action) {
+       case HDA_FIXUP_ACT_PRE_PROBE:
+               snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1);
+               snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1);
+               break;
+       case HDA_FIXUP_ACT_INIT:
+               alc_process_coef_fw(codec, gb_x570_coefs);
+               break;
+       }
+}
+
 static void alc1220_fixup_clevo_p950(struct hda_codec *codec,
                                     const struct hda_fixup *fix,
                                     int action)
@@ -2415,6 +2439,10 @@ static const struct hda_fixup alc882_fixups[] = {
                .type = HDA_FIXUP_FUNC,
                .v.func = alc1220_fixup_gb_dual_codecs,
        },
+       [ALC1220_FIXUP_GB_X570] = {
+               .type = HDA_FIXUP_FUNC,
+               .v.func = alc1220_fixup_gb_x570,
+       },
        [ALC1220_FIXUP_CLEVO_P950] = {
                .type = HDA_FIXUP_FUNC,
                .v.func = alc1220_fixup_clevo_p950,
@@ -2517,7 +2545,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
        SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD),
        SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
        SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
-       SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_CLEVO_P950),
+       SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_GB_X570),
        SND_PCI_QUIRK(0x1458, 0xa0ce, "Gigabyte X570 Aorus Xtreme", ALC1220_FIXUP_CLEVO_P950),
        SND_PCI_QUIRK(0x1462, 0x11f7, "MSI-GE63", ALC1220_FIXUP_CLEVO_P950),
        SND_PCI_QUIRK(0x1462, 0x1228, "MSI-GP63", ALC1220_FIXUP_CLEVO_P950),