mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
ALSA: hda: Allow non-Intel device probe gracefully
The recent addition of snd_intel_dsp_driver_probe() check caused a
spurious kernel warning when the driver is loaded for a non-Intel
hardware due to snd_BUG_ON(). Moreover, for such a hardware, we
should always return SND_INTEL_DSP_DRIVER_ANY, not check the
dsp_driver option at all.
This patch fixes these issues for non-Intel devices.
Fixes: 82d9d54a6c
("ALSA: hda: add Intel DSP configuration / probe code")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20191028130634.3501-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
ca58f55108
commit
91636a8204
@ -307,13 +307,13 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci)
|
||||
{
|
||||
const struct config_entry *cfg;
|
||||
|
||||
/* Intel vendor only */
|
||||
if (pci->vendor != 0x8086)
|
||||
return SND_INTEL_DSP_DRIVER_ANY;
|
||||
|
||||
if (dsp_driver > 0 && dsp_driver <= SND_INTEL_DSP_DRIVER_LAST)
|
||||
return dsp_driver;
|
||||
|
||||
/* Intel vendor only */
|
||||
if (snd_BUG_ON(pci->vendor != 0x8086))
|
||||
return SND_INTEL_DSP_DRIVER_ANY;
|
||||
|
||||
/*
|
||||
* detect DSP by checking class/subclass/prog-id information
|
||||
* class=04 subclass 03 prog-if 00: no DSP, use legacy driver
|
||||
|
Loading…
Reference in New Issue
Block a user