Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Heiko S <heiko@future-machines.org>
Cc: Takashi Iwai <tiwai@suse.de>,
	"linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"perex@perex.cz" <perex@perex.cz>
Subject: Re: [PATCH] ALSA: hda: Fix SSID detection for HP Dragonfly Folio G3
Date: Fri, 15 May 2026 12:48:28 +0200	[thread overview]
Message-ID: <874ik9t0cj.wl-tiwai@suse.de> (raw)
In-Reply-To: <04D6DA87-AFD0-44CA-800E-0BA15BEAEA61@getmailspring.com>

On Fri, 15 May 2026 12:46:11 +0200,
Heiko S wrote:
> 
> 
> Tested-by: Heiko Schmid heiko@future-machines.org
> 
> Confirmed working on HP Dragonfly Folio 13.5 inch G3 with Fedora 44, kernel
> 6.19.14.

Thanks for quick testing.  I'm going to submit a proper patch.


Takashi

> 
>  Dr. Heiko Schmid              
>  http://www.future-machines.org
> On Mai 15 2026, at 11:03 am, Takashi Iwai <tiwai@suse.de> wrote:
> 
>     On Thu, 14 May 2026 15:31:10 +0200,
>     Heiko Schmid wrote:
>     >
>     > The HP Dragonfly Folio 13.5 inch G3 (PCI SSID 103c:8a05/8a06) BIOS does
>     > not program the PCI subsystem ID correctly when the SOF audio driver is
>     > used. This causes the codec fixup lookup to fail as the PCI SSID reads
>     > as 0x0000:0x0000 instead of the correct 103c:8a06.
>     >
>     > Fix this by falling back to the codec SSID when the PCI SSID is zero,
>     > and add the device-specific quirk entry for the HP Dragonfly Folio G3.
>     >
>     > Signed-off-by: Heiko Schmid <heiko@future-machines.org>
>    
>     I think the idea is good, but we don't have to restrict to both PCI
>     vendor and device being 0; PCI device 0 is used for wildcard, and
>     can't work in anyway.
>    
>     About the patch:
>    
>     > ---
>     > sound/hda/codecs/realtek/alc269.c | 2 ++
>     > sound/hda/common/auto_parser.c | 10 ++++++++++
>     > 2 files changed, 12 insertions(+)
>     >
>     > diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/
>     realtek/alc269.c
>     > index 22b2f67..494dd0a 100644
>     > --- a/sound/hda/codecs/realtek/alc269.c
>     > +++ b/sound/hda/codecs/realtek/alc269.c
>     > @@ -6990,6 +6990,8 @@ static const struct hda_quirk alc269_fixup_tbl[] =
>     {
>     > SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9",
>     ALC236_FIXUP_HP_GPIO_LED),
>     > SND_PCI_QUIRK(0x103c, 0x89c0, "HP ZBook Power 15.6 G9",
>     ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
>     > SND_PCI_QUIRK(0x103c, 0x8a06, "HP Dragonfly Folio 13.5 G3",
>     ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
>     > + SND_PCI_QUIRK(0x103c, 0x8a06, "HP Dragonfly Folio 13.5 G3",
>     ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
>     > + SND_PCI_QUIRK(0x103c, 0x8a06, "HP Dragonfly Folio 13.5 G3",
>     ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
>    
>     Those additions are simply superfluous, no? Also...
>    
>     > diff --git a/sound/hda/common/auto_parser.c b/sound/hda/common/
>     auto_parser.c
>     > index 8923813..e876378 100644
>     > --- a/sound/hda/common/auto_parser.c
>     > +++ b/sound/hda/common/auto_parser.c
>     > @@ -1048,6 +1048,16 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
>     > if (codec->bus->pci) {
>     > pci_vendor = codec->bus->pci->subsystem_vendor;
>     > pci_device = codec->bus->pci->subsystem_device;
>     > + /* Fallback: use codec SSID if PCI SSID is zero (e.g. HP Dragonfly
>     Folio G3 with SOF) */
>     > + if (!pci_vendor && !pci_device) {
>     > + pci_vendor = codec->core.subsystem_id >> 16;
>     > + pci_device = codec->core.subsystem_id & 0xffff;
>     > + }
>     > + /* Fallback: use codec SSID if PCI SSID is zero (e.g. HP Dragonfly
>     Folio G3 with SOF) */
>     > + if (!pci_vendor && !pci_device) {
>     > + pci_vendor = codec->core.subsystem_id >> 16;
>     > + pci_device = codec->core.subsystem_id & 0xffff;
>     > + }
>    
>     ... here checking twice? The patch looks somehow odd-merged.
>    
>     And, I think we can just skip the PCI matching when either vendor or
>     device is 0. So, something like below instead.
>    
>     Could you verify whether it works?
> 
>     Takashi
>    
>     diff --git a/sound/hda/common/auto_parser.c b/sound/hda/common/
>     auto_parser.c
>     index 8923813ce424..5bc95d3116ff 100644
>     --- a/sound/hda/common/auto_parser.c
>     +++ b/sound/hda/common/auto_parser.c
>     @@ -1013,7 +1013,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
>     const char *name = NULL;
>     const char *type = NULL;
>     unsigned int vendor, device;
>     - u16 pci_vendor, pci_device;
>     + u16 pci_vendor = 0, pci_device = 0;
>     u16 codec_vendor, codec_device;
>    
>     if (codec->fixup_id != HDA_FIXUP_ID_NOT_SET)
>     @@ -1066,7 +1066,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
>     /* match primarily with the PCI SSID */
>     for (q = quirk; q->subvendor || q->subdevice; q++) {
>     /* if the entry is specific to codec SSID, check with it */
>     - if (!codec->bus->pci || q->match_codec_ssid) {
>     + if (!pci_vendor || !pci_device || q->match_codec_ssid) {
>     if (hda_quirk_match(codec_vendor, codec_device, q)) {
>     type = "codec SSID";
>     goto found_device;
> 

  parent reply	other threads:[~2026-05-15 10:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14 13:31 [PATCH] ALSA: hda: Fix SSID detection for HP Dragonfly Folio G3 Heiko Schmid
2026-05-15  9:03 ` Takashi Iwai
     [not found]   ` <04D6DA87-AFD0-44CA-800E-0BA15BEAEA61@getmailspring.com>
2026-05-15 10:48     ` Takashi Iwai [this message]
2026-05-15 11:08   ` Stefan Binding (Opensource)
2026-05-15 11:12     ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2026-04-29  9:53 Heiko Schmid

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=874ik9t0cj.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=heiko@future-machines.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox