Skip to content

Commit becc794

Browse files
gentoo-roottiwai
authored andcommitted
ALSA: hda: intel: Add Lenovo IdeaPad Z570 to probe denylist
Lenovo IdeaPad Z570 with NVIDIA GeForce Ge 540M doesn't have sound on the discrete GPU. The HDA controller in DGPU is disabled by BIOS, but then reenabled by quirk_nvidia_hda(). The probe fails and ends up with the "GPU sound probed, but not operational" error. Add this laptop to DMI-based denylist to prevent probe early. DMI is used, because the audio device has zero subsystem IDs, and this entry would be too much, blocking all 540M chips: PCI_DEVICE_SUB(0x10de, 0x0bea, 0x0000, 0x0000) Also, this laptop comes in a variety of modifications with different NVIDIA GPUs, so the DMI check will cover them all. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Link: https://patch.msgid.link/20250208214602.39607-3-maxtram95@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 2b360ba commit becc794

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

sound/pci/hda/hda_intel.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <linux/completion.h>
3838
#include <linux/acpi.h>
3939
#include <linux/pgtable.h>
40+
#include <linux/dmi.h>
4041

4142
#ifdef CONFIG_X86
4243
/* for snoop control */
@@ -2074,6 +2075,27 @@ static const struct pci_device_id driver_denylist[] = {
20742075
{}
20752076
};
20762077

2078+
static struct pci_device_id driver_denylist_ideapad_z570[] = {
2079+
{ PCI_DEVICE_SUB(0x10de, 0x0bea, 0x0000, 0x0000) }, /* NVIDIA GF108 HDA */
2080+
{}
2081+
};
2082+
2083+
/* DMI-based denylist, to be used when:
2084+
* - PCI subsystem IDs are zero, impossible to distinguish from valid sound cards.
2085+
* - Different modifications of the same laptop use different GPU models.
2086+
*/
2087+
static const struct dmi_system_id driver_denylist_dmi[] = {
2088+
{
2089+
/* No HDA in NVIDIA DGPU. BIOS disables it, but quirk_nvidia_hda() reenables. */
2090+
.matches = {
2091+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
2092+
DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"),
2093+
},
2094+
.driver_data = &driver_denylist_ideapad_z570,
2095+
},
2096+
{}
2097+
};
2098+
20772099
static const struct hda_controller_ops pci_hda_ops = {
20782100
.disable_msi_reset_irq = disable_msi_reset_irq,
20792101
.position_check = azx_position_check,
@@ -2084,6 +2106,7 @@ static DECLARE_BITMAP(probed_devs, SNDRV_CARDS);
20842106
static int azx_probe(struct pci_dev *pci,
20852107
const struct pci_device_id *pci_id)
20862108
{
2109+
const struct dmi_system_id *dmi;
20872110
struct snd_card *card;
20882111
struct hda_intel *hda;
20892112
struct azx *chip;
@@ -2096,6 +2119,12 @@ static int azx_probe(struct pci_dev *pci,
20962119
return -ENODEV;
20972120
}
20982121

2122+
dmi = dmi_first_match(driver_denylist_dmi);
2123+
if (dmi && pci_match_id(dmi->driver_data, pci)) {
2124+
dev_info(&pci->dev, "Skipping the device on the DMI denylist\n");
2125+
return -ENODEV;
2126+
}
2127+
20992128
dev = find_first_zero_bit(probed_devs, SNDRV_CARDS);
21002129
if (dev >= SNDRV_CARDS)
21012130
return -ENODEV;

0 commit comments

Comments
 (0)