diff options
Diffstat (limited to 'sys-kernel_arch-sources-g14_files_0007-snd-hda-realtek-g401-ga502.patch')
-rw-r--r-- | sys-kernel_arch-sources-g14_files_0007-snd-hda-realtek-g401-ga502.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/sys-kernel_arch-sources-g14_files_0007-snd-hda-realtek-g401-ga502.patch b/sys-kernel_arch-sources-g14_files_0007-snd-hda-realtek-g401-ga502.patch new file mode 100644 index 000000000000..f1ff2418b149 --- /dev/null +++ b/sys-kernel_arch-sources-g14_files_0007-snd-hda-realtek-g401-ga502.patch @@ -0,0 +1,77 @@ +--- a/sound/pci/hda/patch_realtek.c 2020-09-27 19:57:22.699000000 +0200 ++++ b/sound/pci/hda/patch_realtek.c 2020-09-27 22:06:26.887560162 +0200 +@@ -6004,6 +6004,28 @@ + snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); + } + ++static void alc289_fixup_ga401(struct hda_codec *codec, ++ const struct hda_fixup *fix, int action) ++{ ++ static const hda_nid_t conn[] = { 0x02 }; ++ static const struct hda_pintbl pincfgs[] = { ++ { 0x17, 0x90170130 }, /* bass speaker */ ++ { 0x19, 0x03a11050 }, /* headphone mic with jack detect */ ++ { 0x21, 0x03211430 }, /* headphone playback */ ++ }; ++ static const struct coef_fw coef0289[] = { ++ WRITE_COEF(0x45, 0x5289), ++ WRITE_COEF(0x46, 0x0004), // not working for a reason.. (plugged redetect not working) ++ {} ++ }; ++ ++ if (action == HDA_FIXUP_ACT_PRE_PROBE) { ++ snd_hda_apply_pincfgs(codec, pincfgs); ++ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); // maps correct mixer ++ } else if (action == HDA_FIXUP_ACT_INIT) { ++ alc_process_coef_fw(codec, coef0289); ++ } ++} + + static void alc294_gx502_toggle_output(struct hda_codec *codec, + struct hda_jack_callback *cb) +@@ -6218,6 +6240,7 @@ + ALC285_FIXUP_THINKPAD_HEADSET_JACK, + ALC294_FIXUP_ASUS_HPE, + ALC294_FIXUP_ASUS_COEF_1B, ++ ALC294_FIXUP_ASUS_GA502, + ALC294_FIXUP_ASUS_GX502_HP, + ALC294_FIXUP_ASUS_GX502_PINS, + ALC294_FIXUP_ASUS_GX502_VERBS, +@@ -6230,7 +6253,6 @@ + ALC269VC_FIXUP_ACER_HEADSET_MIC, + ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE, + ALC289_FIXUP_ASUS_GA401, +- ALC289_FIXUP_ASUS_GA502, + ALC256_FIXUP_ACER_MIC_NO_PRESENCE, + ALC285_FIXUP_HP_GPIO_AMP_INIT, + ALC269_FIXUP_CZC_B20, +@@ -7483,16 +7505,13 @@ + .chain_id = ALC269_FIXUP_HEADSET_MIC + }, + [ALC289_FIXUP_ASUS_GA401] = { +- .type = HDA_FIXUP_PINS, +- .v.pins = (const struct hda_pintbl[]) { +- { 0x19, 0x03a11020 }, /* headset mic with jack detect */ +- { } +- }, ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc289_fixup_ga401 + }, +- [ALC289_FIXUP_ASUS_GA502] = { ++ [ALC294_FIXUP_ASUS_GA502] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { +- { 0x19, 0x03a11020 }, /* headset mic with jack detect */ ++ { 0x19, 0x03a11050 }, /* headphone mic with jack detect */ + { } + }, + }, +@@ -7795,7 +7814,7 @@ + SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), + SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), +- SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), ++ SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC294_FIXUP_ASUS_GA502), + SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), + SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), + SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), |