Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: hda/conexant: Use the new codec SSID matching

Now we can perform the codec ID matching primarily, and reduce the
conditional application of the quirk for conflicting PCI SSID between
System76 and Tuxedo devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241008120233.7154-3-tiwai@suse.de

+7 -21
+7 -21
sound/pci/hda/patch_conexant.c
··· 816 816 {} 817 817 }; 818 818 819 - /* pincfg quirk for Tuxedo Sirius; 820 - * unfortunately the (PCI) SSID conflicts with System76 Pangolin pang14, 821 - * which has incompatible pin setup, so we check the codec SSID (luckily 822 - * different one!) and conditionally apply the quirk here 823 - */ 824 - static void cxt_fixup_sirius_top_speaker(struct hda_codec *codec, 825 - const struct hda_fixup *fix, 826 - int action) 827 - { 828 - /* ignore for incorrectly picked-up pang14 */ 829 - if (codec->core.subsystem_id == 0x278212b3) 830 - return; 831 - /* set up the top speaker pin */ 832 - if (action == HDA_FIXUP_ACT_PRE_PROBE) 833 - snd_hda_codec_set_pincfg(codec, 0x1d, 0x82170111); 834 - } 835 - 836 819 static const struct hda_fixup cxt_fixups[] = { 837 820 [CXT_PINCFG_LENOVO_X200] = { 838 821 .type = HDA_FIXUP_PINS, ··· 976 993 .v.pins = cxt_pincfg_sws_js201d, 977 994 }, 978 995 [CXT_PINCFG_TOP_SPEAKER] = { 979 - .type = HDA_FIXUP_FUNC, 980 - .v.func = cxt_fixup_sirius_top_speaker, 996 + .type = HDA_FIXUP_PINS, 997 + .v.pins = (const struct hda_pintbl[]) { 998 + { 0x1d, 0x82170111 }, 999 + { } 1000 + }, 981 1001 }, 982 1002 }; 983 1003 ··· 1078 1092 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI), 1079 1093 SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004), 1080 1094 SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205), 1081 - SND_PCI_QUIRK(0x2782, 0x12c3, "Sirius Gen1", CXT_PINCFG_TOP_SPEAKER), 1082 - SND_PCI_QUIRK(0x2782, 0x12c5, "Sirius Gen2", CXT_PINCFG_TOP_SPEAKER), 1095 + HDA_CODEC_QUIRK(0x2782, 0x12c3, "Sirius Gen1", CXT_PINCFG_TOP_SPEAKER), 1096 + HDA_CODEC_QUIRK(0x2782, 0x12c5, "Sirius Gen2", CXT_PINCFG_TOP_SPEAKER), 1083 1097 {} 1084 1098 }; 1085 1099