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 | 54 | ||||
-rw-r--r-- | sound/pci/hda/hda_tegra.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 2 | ||||
-rw-r--r-- | sound/soc/intel/Kconfig | 6 |
6 files changed, 11 insertions, 117 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 | ||
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 | |||
291 | endif | 229 | endif |
292 | 230 | ||
293 | endmenu | 231 | endmenu |
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); | |||
172 | MODULE_PARM_DESC(beep_mode, "Select HDA Beep registration mode " | 172 | MODULE_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 |
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"); | ||
178 | 175 | ||
179 | #ifdef CONFIG_PM | 176 | #ifdef CONFIG_PM |
180 | static int param_set_xint(const char *val, const struct kernel_param *kp); | 177 | static 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/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 83befd8d43e8..97a176d817a0 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c | |||
@@ -234,10 +234,12 @@ static int hda_tegra_suspend(struct device *dev) | |||
234 | struct snd_card *card = dev_get_drvdata(dev); | 234 | struct snd_card *card = dev_get_drvdata(dev); |
235 | struct azx *chip = card->private_data; | 235 | struct azx *chip = card->private_data; |
236 | struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); | 236 | struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); |
237 | struct hdac_bus *bus = azx_bus(chip); | ||
237 | 238 | ||
238 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 239 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
239 | 240 | ||
240 | azx_stop_chip(chip); | 241 | azx_stop_chip(chip); |
242 | synchronize_irq(bus->irq); | ||
241 | azx_enter_link_reset(chip); | 243 | azx_enter_link_reset(chip); |
242 | hda_tegra_disable_clocks(hda); | 244 | hda_tegra_disable_clocks(hda); |
243 | 245 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a4f4a9dd488d..aee4cbd29d53 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -6501,7 +6501,7 @@ static const struct hda_fixup alc269_fixups[] = { | |||
6501 | [ALC294_FIXUP_ASUS_HEADSET_MIC] = { | 6501 | [ALC294_FIXUP_ASUS_HEADSET_MIC] = { |
6502 | .type = HDA_FIXUP_PINS, | 6502 | .type = HDA_FIXUP_PINS, |
6503 | .v.pins = (const struct hda_pintbl[]) { | 6503 | .v.pins = (const struct hda_pintbl[]) { |
6504 | { 0x19, 0x01a1113c }, /* use as headset mic, without its own jack detect */ | 6504 | { 0x19, 0x01a1103c }, /* use as headset mic */ |
6505 | { } | 6505 | { } |
6506 | }, | 6506 | }, |
6507 | .chained = true, | 6507 | .chained = true, |
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/ |