summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-12-31 13:02:01 -0500
committerTakashi Iwai <tiwai@suse.de>2019-01-01 14:43:01 -0500
commit3e9ad24b0e91c066311a958afbd6210dda8a43eb (patch)
tree1a651275f7c3a7486ec9ff86979a1ae8a768eacc
parent63d2a9ec310d8bcc955574220d4631aa55c1a80c (diff)
ALSA: hda - Revert DSP detection on legacy HD-audio driver
This essentially reverts the commits c337104b1a16 ("ALSA: HD-Audio: SKL+: abort probe if DSP is present and Skylake driver selected") and d82b51c855a2 ("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: c337104b1a16 ("ALSA: HD-Audio: SKL+: abort probe if DSP is present and Skylake driver selected") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Reported-by: Hans de Goede <hdegoede@redhat.com> Reported-by: Azat Khuzhin <dohardgopro@gmail.com> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/Kconfig62
-rw-r--r--sound/pci/hda/hda_controller.h2
-rw-r--r--sound/pci/hda/hda_intel.c54
-rw-r--r--sound/soc/intel/Kconfig6
4 files changed, 8 insertions, 116 deletions
diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig
index 0d38c006e182..4235907b7858 100644
--- a/sound/pci/hda/Kconfig
+++ b/sound/pci/hda/Kconfig
@@ -226,68 +226,6 @@ config SND_HDA_POWER_SAVE_DEFAULT
226 The default time-out value in seconds for HD-audio automatic 226 The default time-out value in seconds for HD-audio automatic
227 power-save mode. 0 means to disable the power-save mode. 227 power-save mode. 0 means to disable the power-save mode.
228 228
229if 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
240config 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
247config 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
254config 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
261config 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
268config 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
275config 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
282config 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
289endif ## SND_HDA_INTEL
290
291endif 229endif
292 230
293endmenu 231endmenu
diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index e0c3fcbaa028..7185ed574b41 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -37,7 +37,7 @@
37#else 37#else
38#define AZX_DCAPS_I915_COMPONENT 0 /* NOP */ 38#define AZX_DCAPS_I915_COMPONENT 0 /* NOP */
39#endif 39#endif
40#define AZX_DCAPS_INTEL_SHARED (1 << 14) /* shared with ASoC */ 40/* 14 unused */
41#define AZX_DCAPS_CTX_WORKAROUND (1 << 15) /* X-Fi workaround */ 41#define AZX_DCAPS_CTX_WORKAROUND (1 << 15) /* X-Fi workaround */
42#define AZX_DCAPS_POSFIX_LPIB (1 << 16) /* Use LPIB as default */ 42#define AZX_DCAPS_POSFIX_LPIB (1 << 16) /* Use LPIB as default */
43/* 17 unused */ 43/* 17 unused */
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index e42cc2230977..e784130ea4e0 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -172,9 +172,6 @@ module_param_array(beep_mode, bool, NULL, 0444);
172MODULE_PARM_DESC(beep_mode, "Select HDA Beep registration mode " 172MODULE_PARM_DESC(beep_mode, "Select HDA Beep registration mode "
173 "(0=off, 1=on) (default=1)."); 173 "(0=off, 1=on) (default=1).");
174#endif 174#endif
175static int skl_pci_binding;
176module_param_named(pci_binding, skl_pci_binding, int, 0444);
177MODULE_PARM_DESC(pci_binding, "PCI binding (0=auto, 1=only legacy, 2=only asoc");
178 175
179#ifdef CONFIG_PM 176#ifdef CONFIG_PM
180static int param_set_xint(const char *val, const struct kernel_param *kp); 177static int param_set_xint(const char *val, const struct kernel_param *kp);
@@ -360,7 +357,6 @@ enum {
360 AZX_DCAPS_NO_64BIT |\ 357 AZX_DCAPS_NO_64BIT |\
361 AZX_DCAPS_4K_BDLE_BOUNDARY | AZX_DCAPS_SNOOP_OFF) 358 AZX_DCAPS_4K_BDLE_BOUNDARY | AZX_DCAPS_SNOOP_OFF)
362 359
363#define AZX_DCAPS_INTEL_DSP_DETECTION(conf) (IS_ENABLED(CONFIG_SND_HDA_INTEL_DSP_DETECTION_##conf) ? AZX_DCAPS_INTEL_SHARED : 0)
364/* 360/*
365 * vga_switcheroo support 361 * vga_switcheroo support
366 */ 362 */
@@ -2052,28 +2048,6 @@ static int azx_probe(struct pci_dev *pci,
2052 bool schedule_probe; 2048 bool schedule_probe;
2053 int err; 2049 int err;
2054 2050
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
2077 if (dev >= SNDRV_CARDS) 2051 if (dev >= SNDRV_CARDS)
2078 return -ENODEV; 2052 return -ENODEV;
2079 if (!enable[dev]) { 2053 if (!enable[dev]) {
@@ -2380,48 +2354,34 @@ static const struct pci_device_id azx_ids[] = {
2380 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, 2354 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE },
2381 /* Sunrise Point-LP */ 2355 /* Sunrise Point-LP */
2382 { PCI_DEVICE(0x8086, 0x9d70), 2356 { PCI_DEVICE(0x8086, 0x9d70),
2383 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE | 2357 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE },
2384 AZX_DCAPS_INTEL_DSP_DETECTION(SKL)
2385 },
2386 /* Kabylake */ 2358 /* Kabylake */
2387 { PCI_DEVICE(0x8086, 0xa171), 2359 { PCI_DEVICE(0x8086, 0xa171),
2388 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, 2360 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE },
2389 /* Kabylake-LP */ 2361 /* Kabylake-LP */
2390 { PCI_DEVICE(0x8086, 0x9d71), 2362 { PCI_DEVICE(0x8086, 0x9d71),
2391 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE | 2363 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE },
2392 AZX_DCAPS_INTEL_DSP_DETECTION(KBL)
2393 },
2394 /* Kabylake-H */ 2364 /* Kabylake-H */
2395 { PCI_DEVICE(0x8086, 0xa2f0), 2365 { PCI_DEVICE(0x8086, 0xa2f0),
2396 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, 2366 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE },
2397 /* Coffelake */ 2367 /* Coffelake */
2398 { PCI_DEVICE(0x8086, 0xa348), 2368 { PCI_DEVICE(0x8086, 0xa348),
2399 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE | 2369 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
2400 AZX_DCAPS_INTEL_DSP_DETECTION(CFL)
2401 },
2402 /* Cannonlake */ 2370 /* Cannonlake */
2403 { PCI_DEVICE(0x8086, 0x9dc8), 2371 { PCI_DEVICE(0x8086, 0x9dc8),
2404 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE | 2372 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
2405 AZX_DCAPS_INTEL_DSP_DETECTION(CNL)
2406 },
2407 /* Icelake */ 2373 /* Icelake */
2408 { PCI_DEVICE(0x8086, 0x34c8), 2374 { PCI_DEVICE(0x8086, 0x34c8),
2409 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE | 2375 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
2410 AZX_DCAPS_INTEL_DSP_DETECTION(ICL)
2411 },
2412 /* Broxton-P(Apollolake) */ 2376 /* Broxton-P(Apollolake) */
2413 { PCI_DEVICE(0x8086, 0x5a98), 2377 { PCI_DEVICE(0x8086, 0x5a98),
2414 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON | 2378 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON },
2415 AZX_DCAPS_INTEL_DSP_DETECTION(APL)
2416 },
2417 /* Broxton-T */ 2379 /* Broxton-T */
2418 { PCI_DEVICE(0x8086, 0x1a98), 2380 { PCI_DEVICE(0x8086, 0x1a98),
2419 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON }, 2381 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON },
2420 /* Gemini-Lake */ 2382 /* Gemini-Lake */
2421 { PCI_DEVICE(0x8086, 0x3198), 2383 { PCI_DEVICE(0x8086, 0x3198),
2422 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON | 2384 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON },
2423 AZX_DCAPS_INTEL_DSP_DETECTION(GLK)
2424 },
2425 /* Haswell */ 2385 /* Haswell */
2426 { PCI_DEVICE(0x8086, 0x0a0c), 2386 { PCI_DEVICE(0x8086, 0x0a0c),
2427 .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, 2387 .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
index 2fd1b61e8331..99a62ba409df 100644
--- a/sound/soc/intel/Kconfig
+++ b/sound/soc/intel/Kconfig
@@ -188,12 +188,6 @@ config SND_SOC_INTEL_SKYLAKE_COMMON
188 select SND_SOC_TOPOLOGY 188 select SND_SOC_TOPOLOGY
189 select SND_SOC_INTEL_SST 189 select SND_SOC_INTEL_SST
190 select SND_SOC_HDAC_HDA if SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC 190 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
197 select SND_SOC_ACPI_INTEL_MATCH 191 select SND_SOC_ACPI_INTEL_MATCH
198 help 192 help
199 If you have a Intel Skylake/Broxton/ApolloLake/KabyLake/ 193 If you have a Intel Skylake/Broxton/ApolloLake/KabyLake/