]> git.dujemihanovic.xyz Git - linux.git/commitdiff
ALSA: hda/conexant: Fix conflicting quirk for System76 Pangolin
authorTakashi Iwai <tiwai@suse.de>
Fri, 4 Oct 2024 08:25:58 +0000 (10:25 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 4 Oct 2024 08:26:58 +0000 (10:26 +0200)
We received a regression report for System76 Pangolin (pang14) due to
the recent fix for Tuxedo Sirius devices to support the top speaker.
The reason was the conflicting PCI SSID, as often seen.

As a workaround, now the codec SSID is checked and the quirk is
applied conditionally only to Sirius devices.

Fixes: 4178d78cd7a8 ("ALSA: hda/conexant: Add pincfg quirk to enable top speakers on Sirius devices")
Reported-by: Christian Heusel <christian@heusel.eu>
Reported-by: Jerry <jerryluo225@gmail.com>
Closes: https://lore.kernel.org/c930b6a6-64e5-498f-b65a-1cd5e0a1d733@heusel.eu
Link: https://patch.msgid.link/20241004082602.29016-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_conexant.c

index ade42a8209c243189b800fb306f71bd3a7fa404e..b61ce5e6f5ec56eb2653536d08f0dc9dc0c50ebf 100644 (file)
@@ -816,6 +816,23 @@ static const struct hda_pintbl cxt_pincfg_sws_js201d[] = {
        {}
 };
 
+/* pincfg quirk for Tuxedo Sirius;
+ * unfortunately the (PCI) SSID conflicts with System76 Pangolin pang14,
+ * which has incompatible pin setup, so we check the codec SSID (luckily
+ * different one!) and conditionally apply the quirk here
+ */
+static void cxt_fixup_sirius_top_speaker(struct hda_codec *codec,
+                                        const struct hda_fixup *fix,
+                                        int action)
+{
+       /* ignore for incorrectly picked-up pang14 */
+       if (codec->core.subsystem_id == 0x278212b3)
+               return;
+       /* set up the top speaker pin */
+       if (action == HDA_FIXUP_ACT_PRE_PROBE)
+               snd_hda_codec_set_pincfg(codec, 0x1d, 0x82170111);
+}
+
 static const struct hda_fixup cxt_fixups[] = {
        [CXT_PINCFG_LENOVO_X200] = {
                .type = HDA_FIXUP_PINS,
@@ -976,11 +993,8 @@ static const struct hda_fixup cxt_fixups[] = {
                .v.pins = cxt_pincfg_sws_js201d,
        },
        [CXT_PINCFG_TOP_SPEAKER] = {
-               .type = HDA_FIXUP_PINS,
-               .v.pins = (const struct hda_pintbl[]) {
-                       { 0x1d, 0x82170111 },
-                       { }
-               },
+               .type = HDA_FIXUP_FUNC,
+               .v.func = cxt_fixup_sirius_top_speaker,
        },
 };