diff options
-rw-r--r-- | sound/pci/hda/Kconfig | 62 | ||||
-rw-r--r-- | sound/pci/hda/hda_controller.h | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 34 | ||||
-rw-r--r-- | sound/soc/intel/Kconfig | 6 |
4 files changed, 96 insertions, 8 deletions
diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig index 4235907b7858..0d38c006e182 100644 --- a/sound/pci/hda/Kconfig +++ b/sound/pci/hda/Kconfig | |||
@@ -226,6 +226,68 @@ 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 | ||
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 | |||
229 | endif | 291 | endif |
230 | 292 | ||
231 | endmenu | 293 | endmenu |
diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h index 7185ed574b41..e0c3fcbaa028 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 | /* 14 unused */ | 40 | #define AZX_DCAPS_INTEL_SHARED (1 << 14) /* shared with ASoC */ |
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 e784130ea4e0..2ec9c896ebc0 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -357,6 +357,7 @@ enum { | |||
357 | AZX_DCAPS_NO_64BIT |\ | 357 | AZX_DCAPS_NO_64BIT |\ |
358 | AZX_DCAPS_4K_BDLE_BOUNDARY | AZX_DCAPS_SNOOP_OFF) | 358 | AZX_DCAPS_4K_BDLE_BOUNDARY | AZX_DCAPS_SNOOP_OFF) |
359 | 359 | ||
360 | #define AZX_DCAPS_INTEL_DSP_DETECTION(conf) (IS_ENABLED(CONFIG_SND_HDA_INTEL_DSP_DETECTION_##conf) ? AZX_DCAPS_INTEL_SHARED : 0) | ||
360 | /* | 361 | /* |
361 | * vga_switcheroo support | 362 | * vga_switcheroo support |
362 | */ | 363 | */ |
@@ -2048,6 +2049,11 @@ static int azx_probe(struct pci_dev *pci, | |||
2048 | bool schedule_probe; | 2049 | bool schedule_probe; |
2049 | int err; | 2050 | int err; |
2050 | 2051 | ||
2052 | /* check if this driver can be used on SKL+ Intel platforms */ | ||
2053 | if ((pci_id->driver_data & AZX_DCAPS_INTEL_SHARED) && | ||
2054 | pci->class != 0x040300) | ||
2055 | return -ENODEV; | ||
2056 | |||
2051 | if (dev >= SNDRV_CARDS) | 2057 | if (dev >= SNDRV_CARDS) |
2052 | return -ENODEV; | 2058 | return -ENODEV; |
2053 | if (!enable[dev]) { | 2059 | if (!enable[dev]) { |
@@ -2354,34 +2360,48 @@ static const struct pci_device_id azx_ids[] = { | |||
2354 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, | 2360 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, |
2355 | /* Sunrise Point-LP */ | 2361 | /* Sunrise Point-LP */ |
2356 | { PCI_DEVICE(0x8086, 0x9d70), | 2362 | { PCI_DEVICE(0x8086, 0x9d70), |
2357 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, | 2363 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE | |
2364 | AZX_DCAPS_INTEL_DSP_DETECTION(SKL) | ||
2365 | }, | ||
2358 | /* Kabylake */ | 2366 | /* Kabylake */ |
2359 | { PCI_DEVICE(0x8086, 0xa171), | 2367 | { PCI_DEVICE(0x8086, 0xa171), |
2360 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, | 2368 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, |
2361 | /* Kabylake-LP */ | 2369 | /* Kabylake-LP */ |
2362 | { PCI_DEVICE(0x8086, 0x9d71), | 2370 | { PCI_DEVICE(0x8086, 0x9d71), |
2363 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, | 2371 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE | |
2372 | AZX_DCAPS_INTEL_DSP_DETECTION(KBL) | ||
2373 | }, | ||
2364 | /* Kabylake-H */ | 2374 | /* Kabylake-H */ |
2365 | { PCI_DEVICE(0x8086, 0xa2f0), | 2375 | { PCI_DEVICE(0x8086, 0xa2f0), |
2366 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, | 2376 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, |
2367 | /* Coffelake */ | 2377 | /* Coffelake */ |
2368 | { PCI_DEVICE(0x8086, 0xa348), | 2378 | { PCI_DEVICE(0x8086, 0xa348), |
2369 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, | 2379 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE | |
2380 | AZX_DCAPS_INTEL_DSP_DETECTION(CFL) | ||
2381 | }, | ||
2370 | /* Cannonlake */ | 2382 | /* Cannonlake */ |
2371 | { PCI_DEVICE(0x8086, 0x9dc8), | 2383 | { PCI_DEVICE(0x8086, 0x9dc8), |
2372 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, | 2384 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE | |
2385 | AZX_DCAPS_INTEL_DSP_DETECTION(CNL) | ||
2386 | }, | ||
2373 | /* Icelake */ | 2387 | /* Icelake */ |
2374 | { PCI_DEVICE(0x8086, 0x34c8), | 2388 | { PCI_DEVICE(0x8086, 0x34c8), |
2375 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, | 2389 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE | |
2390 | AZX_DCAPS_INTEL_DSP_DETECTION(ICL) | ||
2391 | }, | ||
2376 | /* Broxton-P(Apollolake) */ | 2392 | /* Broxton-P(Apollolake) */ |
2377 | { PCI_DEVICE(0x8086, 0x5a98), | 2393 | { PCI_DEVICE(0x8086, 0x5a98), |
2378 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON }, | 2394 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON | |
2395 | AZX_DCAPS_INTEL_DSP_DETECTION(APL) | ||
2396 | }, | ||
2379 | /* Broxton-T */ | 2397 | /* Broxton-T */ |
2380 | { PCI_DEVICE(0x8086, 0x1a98), | 2398 | { PCI_DEVICE(0x8086, 0x1a98), |
2381 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON }, | 2399 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON }, |
2382 | /* Gemini-Lake */ | 2400 | /* Gemini-Lake */ |
2383 | { PCI_DEVICE(0x8086, 0x3198), | 2401 | { PCI_DEVICE(0x8086, 0x3198), |
2384 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON }, | 2402 | .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON | |
2403 | AZX_DCAPS_INTEL_DSP_DETECTION(GLK) | ||
2404 | }, | ||
2385 | /* Haswell */ | 2405 | /* Haswell */ |
2386 | { PCI_DEVICE(0x8086, 0x0a0c), | 2406 | { PCI_DEVICE(0x8086, 0x0a0c), |
2387 | .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, | 2407 | .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, |
diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index 99a62ba409df..2fd1b61e8331 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig | |||
@@ -188,6 +188,12 @@ 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 | ||
191 | select SND_SOC_ACPI_INTEL_MATCH | 197 | select SND_SOC_ACPI_INTEL_MATCH |
192 | help | 198 | help |
193 | If you have a Intel Skylake/Broxton/ApolloLake/KabyLake/ | 199 | If you have a Intel Skylake/Broxton/ApolloLake/KabyLake/ |