mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PCI: Override Intel Apollo Lake audio class on Gauteng W3S laptops [8086:5a98]
@ 2026-11-19  0:52 Steven 'Steve' Kendall
  2026-11-19 10:35 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 2+ messages in thread
From: Steven 'Steve' Kendall @ 2026-11-19  0:52 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Takashi Iwai, linux-sound,
	Steven 'Steve' Kendall

Gauteng Education Dept MODEL-W3S laptops advertise PCI class 0x040300
to use the legacy HDA driver rather than the Audio DSP on the Intel
Apollo Lake audio controller ([8086:5a98]). However, this board uses an
I2S ES8336 codec with no analog HDA codec, and its firmware otherwise
sets up the hardware to enable the DSP.

Add a PCI header fixup for [8086:5a98] on Gauteng W3S systems to
override class 0x040300 to 0x040100 so the SOF driver can claim the
device. Notably this fixes the internal speakers and headphones but
not jack detection.

This patch and its initial changelog were generated by Gemini during
an interactive debugging session given dmesg, lspci and similar
dumps from Gauteng W3S and MODEL-W3S laptops. The resulting quirk
was reviewed and tested on physical MODEL-W3S hardware and on a W3S
with slightly different hardware.

Signed-off-by: Steven 'Steve' Kendall <skend@chromium.org>
---
 drivers/pci/quirks.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 7f1f47ea2ee4..908d038fa29a 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -754,6 +754,40 @@ DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_SYNOPSYS, PCI_ANY_ID,
 			       PCI_CLASS_SERIAL_USB_XHCI, 0,
 			       quirk_synopsys_haps);
 
+/*
+ * Gauteng Education Dept MODEL-W3S laptops report PCI class 0x040300
+ * (PCI_CLASS_MULTIMEDIA_HD_AUDIO) on the Apollo Lake audio controller
+ * ([8086:5a98]) even though the Audio DSP (BAR 4), NHLT ACPI table, and I2S
+ * ESSX8336 codec are enabled and no analog HDA codec is present.
+ *
+ * Override the class to 0x040100 (PCI_CLASS_MULTIMEDIA_AUDIO << 8) so SOF can
+ * claim the device.
+ */
+static const struct dmi_system_id gauteng_w3s_dmi_table[] = {
+	{
+		.ident = "Gauteng Education Dept W3S",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Gauteng Education Dept"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "W3S"),
+		}
+	},
+	{}
+};
+
+static void quirk_gauteng_w3s_audio_class(struct pci_dev *pdev)
+{
+	u32 class = pdev->class;
+
+	if (dmi_check_system(gauteng_w3s_dmi_table)) {
+		pdev->class = PCI_CLASS_MULTIMEDIA_AUDIO << 8;
+		pci_info(pdev, FW_BUG "PCI class overridden (%#08x -> %#08x) so SOF driver can claim this instead of snd_hda_intel\n",
+			 class, pdev->class);
+	}
+}
+DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_APL,
+			       PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8, 0,
+			       quirk_gauteng_w3s_audio_class);
+
 /*
  * Let's make the southbridge information explicit instead of having to
  * worry about people probing the ACPI areas, for example.. (Yes, it

---
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
change-id: 20261119-gauteng-audio-class-set-256f769ca134

Best regards,
--  
Steven 'Steve' Kendall <skend@chromium.org>


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

end of thread, other threads:[~2026-11-19 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19  0:52 [PATCH] PCI: Override Intel Apollo Lake audio class on Gauteng W3S laptops [8086:5a98] Steven 'Steve' Kendall
2026-11-19 10:35 ` Pierre-Louis Bossart

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

all inboxes | Powered by JetHome®