Skip to content

Commit d981c3d

Browse files
gentoo-rootgregkh
authored andcommitted
ALSA: hda: intel: Add Lenovo IdeaPad Z570 to probe denylist
[ Upstream commit becc794 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 97ae1d5 commit d981c3d

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 */
@@ -2084,6 +2085,27 @@ static const struct pci_device_id driver_denylist[] = {
20842085
{}
20852086
};
20862087

2088+
static struct pci_device_id driver_denylist_ideapad_z570[] = {
2089+
{ PCI_DEVICE_SUB(0x10de, 0x0bea, 0x0000, 0x0000) }, /* NVIDIA GF108 HDA */
2090+
{}
2091+
};
2092+
2093+
/* DMI-based denylist, to be used when:
2094+
* - PCI subsystem IDs are zero, impossible to distinguish from valid sound cards.
2095+
* - Different modifications of the same laptop use different GPU models.
2096+
*/
2097+
static const struct dmi_system_id driver_denylist_dmi[] = {
2098+
{
2099+
/* No HDA in NVIDIA DGPU. BIOS disables it, but quirk_nvidia_hda() reenables. */
2100+
.matches = {
2101+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
2102+
DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"),
2103+
},
2104+
.driver_data = &driver_denylist_ideapad_z570,
2105+
},
2106+
{}
2107+
};
2108+
20872109
static const struct hda_controller_ops pci_hda_ops = {
20882110
.disable_msi_reset_irq = disable_msi_reset_irq,
20892111
.position_check = azx_position_check,
@@ -2094,6 +2116,7 @@ static DECLARE_BITMAP(probed_devs, SNDRV_CARDS);
20942116
static int azx_probe(struct pci_dev *pci,
20952117
const struct pci_device_id *pci_id)
20962118
{
2119+
const struct dmi_system_id *dmi;
20972120
struct snd_card *card;
20982121
struct hda_intel *hda;
20992122
struct azx *chip;
@@ -2106,6 +2129,12 @@ static int azx_probe(struct pci_dev *pci,
21062129
return -ENODEV;
21072130
}
21082131

2132+
dmi = dmi_first_match(driver_denylist_dmi);
2133+
if (dmi && pci_match_id(dmi->driver_data, pci)) {
2134+
dev_info(&pci->dev, "Skipping the device on the DMI denylist\n");
2135+
return -ENODEV;
2136+
}
2137+
21092138
dev = find_first_zero_bit(probed_devs, SNDRV_CARDS);
21102139
if (dev >= SNDRV_CARDS)
21112140
return -ENODEV;

0 commit comments

Comments
 (0)