Skip to content

Commit 3e9ad24

Browse files
committed
ALSA: hda - Revert DSP detection on legacy HD-audio driver
This essentially reverts the commits c337104 ("ALSA: HD-Audio: SKL+: abort probe if DSP is present and Skylake driver selected") and d82b51c ("ALSA: HD-Audio: SKL+: force HDaudio legacy or SKL+ driver selection") for the path of legacy HD-audio controller (snd-hda-intel). The automatic DSP detection and skip of binding with the legacy driver caused regressions on several machines like Dell XPS13. They give the PCI class 0x40380 indicating the availability of DSP while they don't work with ASoC SKL driver (yet). As the support of ASoC driver for such devices isn't available, it's better to revert the whole DSP-detection-and-skip behavior of the legacy driver, so that we can get the old good driver working on such devices. The pci_binding option for ASoC SKL driver is still kept so that it can work without blacklisting. Fixes: c337104 ("ALSA: HD-Audio: SKL+: abort probe if DSP is present and Skylake driver selected") Reported-by: Linus Torvalds <[email protected]> Reported-by: Hans de Goede <[email protected]> Reported-by: Azat Khuzhin <[email protected]> Cc: Pierre-Louis Bossart <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 63d2a9e commit 3e9ad24

File tree

4 files changed

+8
-116
lines changed

4 files changed

+8
-116
lines changed

sound/pci/hda/Kconfig

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -226,68 +226,6 @@ config SND_HDA_POWER_SAVE_DEFAULT
226226
The default time-out value in seconds for HD-audio automatic
227227
power-save mode. 0 means to disable the power-save mode.
228228

229-
if SND_HDA_INTEL
230-
231-
# The options below should not be enabled by distributions or
232-
# users. They are selected by Intel/Skylake or SOF drivers when they
233-
# register for a PCI ID which is also handled by the HDAudio legacy
234-
# driver. When this option is selected and the DSP is detected based on
235-
# the PCI class/subclass/prog-if, the probe of the HDAudio legacy
236-
# aborts. This mechanism removes the need for distributions to use
237-
# blacklists. It can be bypassed with module parameters should the
238-
# Intel/Skylake or SOF drivers fail to handle a specific platform.
239-
240-
config SND_HDA_INTEL_DSP_DETECTION_SKL
241-
bool
242-
help
243-
This option is selected by SOF or SST drivers, not users or distros.
244-
It enables DSP detection based on PCI class information for
245-
Skylake machines.
246-
247-
config SND_HDA_INTEL_DSP_DETECTION_APL
248-
bool
249-
help
250-
This option is selected by SOF or SST drivers, not users or distros.
251-
It enables DSP detection based on PCI class information for
252-
Broxton/ApolloLake machines
253-
254-
config SND_HDA_INTEL_DSP_DETECTION_KBL
255-
bool
256-
help
257-
This option is selected by SOF or SST drivers, not users or distros.
258-
It enables DSP detection based on PCI class information for
259-
KabyLake machines
260-
261-
config SND_HDA_INTEL_DSP_DETECTION_GLK
262-
bool
263-
help
264-
This option is selected by SOF or SST drivers, not users or distros.
265-
It enables DSP detection based on PCI class information for
266-
GeminiLake machines
267-
268-
config SND_HDA_INTEL_DSP_DETECTION_CNL
269-
bool
270-
help
271-
This option is selected by SOF or SST drivers, not users or distros.
272-
It enables DSP detection based on PCI class information for
273-
CannonLake machines
274-
275-
config SND_HDA_INTEL_DSP_DETECTION_CFL
276-
bool
277-
help
278-
This option is selected by SOF or SST drivers, not users or distros.
279-
It enables DSP detection based on PCI class information for
280-
CoffeeLake machines
281-
282-
config SND_HDA_INTEL_DSP_DETECTION_ICL
283-
bool
284-
help
285-
This option is selected by SOF or SST drivers, not users or distros.
286-
It enables DSP detection based on PCI class information for
287-
IceLake machines
288-
289-
endif ## SND_HDA_INTEL
290-
291229
endif
292230

293231
endmenu

sound/pci/hda/hda_controller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#else
3838
#define AZX_DCAPS_I915_COMPONENT 0 /* NOP */
3939
#endif
40-
#define AZX_DCAPS_INTEL_SHARED (1 << 14) /* shared with ASoC */
40+
/* 14 unused */
4141
#define AZX_DCAPS_CTX_WORKAROUND (1 << 15) /* X-Fi workaround */
4242
#define AZX_DCAPS_POSFIX_LPIB (1 << 16) /* Use LPIB as default */
4343
/* 17 unused */

sound/pci/hda/hda_intel.c

Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@ module_param_array(beep_mode, bool, NULL, 0444);
172172
MODULE_PARM_DESC(beep_mode, "Select HDA Beep registration mode "
173173
"(0=off, 1=on) (default=1).");
174174
#endif
175-
static int skl_pci_binding;
176-
module_param_named(pci_binding, skl_pci_binding, int, 0444);
177-
MODULE_PARM_DESC(pci_binding, "PCI binding (0=auto, 1=only legacy, 2=only asoc");
178175

179176
#ifdef CONFIG_PM
180177
static int param_set_xint(const char *val, const struct kernel_param *kp);
@@ -360,7 +357,6 @@ enum {
360357
AZX_DCAPS_NO_64BIT |\
361358
AZX_DCAPS_4K_BDLE_BOUNDARY | AZX_DCAPS_SNOOP_OFF)
362359

363-
#define AZX_DCAPS_INTEL_DSP_DETECTION(conf) (IS_ENABLED(CONFIG_SND_HDA_INTEL_DSP_DETECTION_##conf) ? AZX_DCAPS_INTEL_SHARED : 0)
364360
/*
365361
* vga_switcheroo support
366362
*/
@@ -2052,28 +2048,6 @@ static int azx_probe(struct pci_dev *pci,
20522048
bool schedule_probe;
20532049
int err;
20542050

2055-
/* check if this driver can be used on SKL+ Intel platforms */
2056-
if (pci_id->driver_data & AZX_DCAPS_INTEL_SHARED) {
2057-
switch (skl_pci_binding) {
2058-
case SND_SKL_PCI_BIND_AUTO:
2059-
if (pci->class != 0x040300) {
2060-
dev_info(&pci->dev, "The DSP is enabled on this platform, aborting probe\n");
2061-
return -ENODEV;
2062-
}
2063-
dev_info(&pci->dev, "No DSP detected, continuing HDaudio legacy probe\n");
2064-
break;
2065-
case SND_SKL_PCI_BIND_LEGACY:
2066-
dev_info(&pci->dev, "Module parameter forced binding with HDaudio legacy, bypassed detection logic\n");
2067-
break;
2068-
case SND_SKL_PCI_BIND_ASOC:
2069-
dev_info(&pci->dev, "Module parameter forced binding with SKL+ ASoC driver, aborting probe\n");
2070-
return -ENODEV;
2071-
default:
2072-
dev_err(&pci->dev, "invalid value for skl_pci_binding module parameter, ignored\n");
2073-
break;
2074-
}
2075-
}
2076-
20772051
if (dev >= SNDRV_CARDS)
20782052
return -ENODEV;
20792053
if (!enable[dev]) {
@@ -2380,48 +2354,34 @@ static const struct pci_device_id azx_ids[] = {
23802354
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE },
23812355
/* Sunrise Point-LP */
23822356
{ PCI_DEVICE(0x8086, 0x9d70),
2383-
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE |
2384-
AZX_DCAPS_INTEL_DSP_DETECTION(SKL)
2385-
},
2357+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE },
23862358
/* Kabylake */
23872359
{ PCI_DEVICE(0x8086, 0xa171),
23882360
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE },
23892361
/* Kabylake-LP */
23902362
{ PCI_DEVICE(0x8086, 0x9d71),
2391-
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE |
2392-
AZX_DCAPS_INTEL_DSP_DETECTION(KBL)
2393-
},
2363+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE },
23942364
/* Kabylake-H */
23952365
{ PCI_DEVICE(0x8086, 0xa2f0),
23962366
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE },
23972367
/* Coffelake */
23982368
{ PCI_DEVICE(0x8086, 0xa348),
2399-
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE |
2400-
AZX_DCAPS_INTEL_DSP_DETECTION(CFL)
2401-
},
2369+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
24022370
/* Cannonlake */
24032371
{ PCI_DEVICE(0x8086, 0x9dc8),
2404-
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE |
2405-
AZX_DCAPS_INTEL_DSP_DETECTION(CNL)
2406-
},
2372+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
24072373
/* Icelake */
24082374
{ PCI_DEVICE(0x8086, 0x34c8),
2409-
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE |
2410-
AZX_DCAPS_INTEL_DSP_DETECTION(ICL)
2411-
},
2375+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
24122376
/* Broxton-P(Apollolake) */
24132377
{ PCI_DEVICE(0x8086, 0x5a98),
2414-
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON |
2415-
AZX_DCAPS_INTEL_DSP_DETECTION(APL)
2416-
},
2378+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON },
24172379
/* Broxton-T */
24182380
{ PCI_DEVICE(0x8086, 0x1a98),
24192381
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON },
24202382
/* Gemini-Lake */
24212383
{ PCI_DEVICE(0x8086, 0x3198),
2422-
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON |
2423-
AZX_DCAPS_INTEL_DSP_DETECTION(GLK)
2424-
},
2384+
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON },
24252385
/* Haswell */
24262386
{ PCI_DEVICE(0x8086, 0x0a0c),
24272387
.driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },

sound/soc/intel/Kconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,6 @@ config SND_SOC_INTEL_SKYLAKE_COMMON
188188
select SND_SOC_TOPOLOGY
189189
select SND_SOC_INTEL_SST
190190
select SND_SOC_HDAC_HDA if SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC
191-
select SND_HDA_INTEL_DSP_DETECTION_SKL if SND_SOC_INTEL_SKL
192-
select SND_HDA_INTEL_DSP_DETECTION_APL if SND_SOC_INTEL_APL
193-
select SND_HDA_INTEL_DSP_DETECTION_KBL if SND_SOC_INTEL_KBL
194-
select SND_HDA_INTEL_DSP_DETECTION_GLK if SND_SOC_INTEL_GLK
195-
select SND_HDA_INTEL_DSP_DETECTION_CNL if SND_SOC_INTEL_CNL
196-
select SND_HDA_INTEL_DSP_DETECTION_CFL if SND_SOC_INTEL_CFL
197191
select SND_SOC_ACPI_INTEL_MATCH
198192
help
199193
If you have a Intel Skylake/Broxton/ApolloLake/KabyLake/

0 commit comments

Comments
 (0)