Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Heiko Schmid <heiko@future-machines.org>
To: linux-sound@vger.kernel.org
Cc: tiwai@suse.com, perex@perex.cz, Heiko Schmid <heiko@future-machines.org>
Subject: [PATCH] ALSA: hda: Fix SSID detection for HP Dragonfly Folio G3
Date: Thu, 14 May 2026 15:31:10 +0200	[thread overview]
Message-ID: <20260514133110.12302-1-heiko@future-machines.org> (raw)

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>
---
 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),
 	SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
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;
+		}
 	}
 
 	codec_vendor = codec->core.subsystem_id >> 16;
-- 
2.54.0


             reply	other threads:[~2026-05-14 13:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14 13:31 Heiko Schmid [this message]
2026-05-15  9:03 ` [PATCH] ALSA: hda: Fix SSID detection for HP Dragonfly Folio G3 Takashi Iwai
     [not found]   ` <04D6DA87-AFD0-44CA-800E-0BA15BEAEA61@getmailspring.com>
2026-05-15 10:48     ` Takashi Iwai
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=20260514133110.12302-1-heiko@future-machines.org \
    --to=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