All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Steven 'Steve' Kendall <skend@chromium.org>,
	Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org
Subject: Re: [PATCH] PCI: Override Intel Apollo Lake audio class on Gauteng W3S laptops [8086:5a98]
Date: Thu, 19 Nov 2026 11:35:57 +0100	[thread overview]
Message-ID: <13462768-b7c2-4049-8e0e-44bd1e0fd659@linux.dev> (raw)
In-Reply-To: <20261119-gauteng-audio-class-set-v1-1-e81d6fd620ad@chromium.org>

On 11/19/26 01:52, Steven 'Steve' Kendall wrote:
> 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

Humm, this sort of quirks is usually in sound/hda/core/intel-dsp-config.c.

I don't think we've ever touched drivers/pci/quirks.c for DSP-related
changes, did we?

And last you could do this driver selection with the kernel parameter
snd_intel_dspcfg.dsp_driver=2.

> 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);
> +	}

also is SOF really used for an ApolloLake product? I thought all
SOF-based Chromebooks started with GeminiLake?



      parent reply	other threads:[~2026-11-19 10:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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  0:57 ` sashiko-bot
2026-11-19 10:35 ` Pierre-Louis Bossart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13462768-b7c2-4049-8e0e-44bd1e0fd659@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=skend@chromium.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.