Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Slightly bulky changes are seen at this time, mostly for dealing with
the messed up Kconfig for ASoC Intel SOF stuff. The driver and its
code was split to each module per platform now, which is far more
straightforward. This should cover the randconfig problems, and more
importantly, improve the actual device handling as well.

Other than that, nothing particular stands out: the HDMI PCM
assignment fix for Intel Tigerlake, MIPS n64 error handling fix, and
the usual suspects, HD-audio / USB-audio quirks"

* tag 'sound-5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits)
ALSA: hda/realtek: Apply dual codec quirks for MSI Godlike X570 board
ALSA: hda/realtek: Add quirk for Intel NUC 10
ALSA: hda/hdmi: let new platforms assign the pcm slot dynamically
ALSA: hda/realtek: Add quirk for Clevo NH55RZQ
ALSA: hda: intel-sdw-acpi: add missing include files
ALSA: hda: move Intel SoundWire ACPI scan to dedicated module
ASoC: SOF: Intel: SoundWire: simplify Kconfig
ASoC: SOF: pci: move DSP_CONFIG use to platform-specific drivers
ASoC: SOF: pci: split PCI into different drivers
ASoC: SOF: ACPI: avoid reverse module dependency
ASoC: soc-acpi: allow for partial match in parent name
ALSA: hda: intel-nhlt: verify config type
ALSA: hda: fix kernel-doc warnings
ALSA: usb-audio: Fix Pioneer DJM devices URB_CONTROL request direction to set samplerate
ALSA: usb-audio: use Corsair Virtuoso mapping for Corsair Virtuoso SE
ALSA: hda/realtek: Enable headset mic of Acer SWIFT with ALC256
ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits
ALSA: usb-audio: Allow modifying parameters with succeeding hw_params calls
ALSA: usb-audio: Drop bogus dB range in too low level
ALSA: usb-audio: Don't abort even if the clock rate differs
...

+1159 -862
-2
drivers/soundwire/intel.h
··· 48 48 #endif 49 49 }; 50 50 51 - #define SDW_INTEL_QUIRK_MASK_BUS_DISABLE BIT(1) 52 - 53 51 int intel_master_startup(struct platform_device *pdev); 54 52 int intel_master_process_wakeen_event(struct platform_device *pdev); 55 53
-158
drivers/soundwire/intel_init.c
··· 18 18 #include "cadence_master.h" 19 19 #include "intel.h" 20 20 21 - #define SDW_LINK_TYPE 4 /* from Intel ACPI documentation */ 22 - #define SDW_MAX_LINKS 4 23 21 #define SDW_SHIM_LCAP 0x0 24 22 #define SDW_SHIM_BASE 0x2C000 25 23 #define SDW_ALH_BASE 0x2C800 26 24 #define SDW_LINK_BASE 0x30000 27 25 #define SDW_LINK_SIZE 0x10000 28 - 29 - static int ctrl_link_mask; 30 - module_param_named(sdw_link_mask, ctrl_link_mask, int, 0444); 31 - MODULE_PARM_DESC(sdw_link_mask, "Intel link mask (one bit per link)"); 32 - 33 - static bool is_link_enabled(struct fwnode_handle *fw_node, int i) 34 - { 35 - struct fwnode_handle *link; 36 - char name[32]; 37 - u32 quirk_mask = 0; 38 - 39 - /* Find master handle */ 40 - snprintf(name, sizeof(name), 41 - "mipi-sdw-link-%d-subproperties", i); 42 - 43 - link = fwnode_get_named_child_node(fw_node, name); 44 - if (!link) 45 - return false; 46 - 47 - fwnode_property_read_u32(link, 48 - "intel-quirk-mask", 49 - &quirk_mask); 50 - 51 - if (quirk_mask & SDW_INTEL_QUIRK_MASK_BUS_DISABLE) 52 - return false; 53 - 54 - return true; 55 - } 56 26 57 27 static int sdw_intel_cleanup(struct sdw_intel_ctx *ctx) 58 28 { ··· 46 76 47 77 if (!link->clock_stop_quirks) 48 78 pm_runtime_put_noidle(link->dev); 49 - } 50 - 51 - return 0; 52 - } 53 - 54 - static int 55 - sdw_intel_scan_controller(struct sdw_intel_acpi_info *info) 56 - { 57 - struct acpi_device *adev; 58 - int ret, i; 59 - u8 count; 60 - 61 - if (acpi_bus_get_device(info->handle, &adev)) 62 - return -EINVAL; 63 - 64 - /* Found controller, find links supported */ 65 - count = 0; 66 - ret = fwnode_property_read_u8_array(acpi_fwnode_handle(adev), 67 - "mipi-sdw-master-count", &count, 1); 68 - 69 - /* 70 - * In theory we could check the number of links supported in 71 - * hardware, but in that step we cannot assume SoundWire IP is 72 - * powered. 73 - * 74 - * In addition, if the BIOS doesn't even provide this 75 - * 'master-count' property then all the inits based on link 76 - * masks will fail as well. 77 - * 78 - * We will check the hardware capabilities in the startup() step 79 - */ 80 - 81 - if (ret) { 82 - dev_err(&adev->dev, 83 - "Failed to read mipi-sdw-master-count: %d\n", ret); 84 - return -EINVAL; 85 - } 86 - 87 - /* Check count is within bounds */ 88 - if (count > SDW_MAX_LINKS) { 89 - dev_err(&adev->dev, "Link count %d exceeds max %d\n", 90 - count, SDW_MAX_LINKS); 91 - return -EINVAL; 92 - } 93 - 94 - if (!count) { 95 - dev_warn(&adev->dev, "No SoundWire links detected\n"); 96 - return -EINVAL; 97 - } 98 - dev_dbg(&adev->dev, "ACPI reports %d SDW Link devices\n", count); 99 - 100 - info->count = count; 101 - info->link_mask = 0; 102 - 103 - for (i = 0; i < count; i++) { 104 - if (ctrl_link_mask && !(ctrl_link_mask & BIT(i))) { 105 - dev_dbg(&adev->dev, 106 - "Link %d masked, will not be enabled\n", i); 107 - continue; 108 - } 109 - 110 - if (!is_link_enabled(acpi_fwnode_handle(adev), i)) { 111 - dev_dbg(&adev->dev, 112 - "Link %d not selected in firmware\n", i); 113 - continue; 114 - } 115 - 116 - info->link_mask |= BIT(i); 117 79 } 118 80 119 81 return 0; ··· 258 356 259 357 return 0; 260 358 } 261 - 262 - static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level, 263 - void *cdata, void **return_value) 264 - { 265 - struct sdw_intel_acpi_info *info = cdata; 266 - struct acpi_device *adev; 267 - acpi_status status; 268 - u64 adr; 269 - 270 - status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &adr); 271 - if (ACPI_FAILURE(status)) 272 - return AE_OK; /* keep going */ 273 - 274 - if (acpi_bus_get_device(handle, &adev)) { 275 - pr_err("%s: Couldn't find ACPI handle\n", __func__); 276 - return AE_NOT_FOUND; 277 - } 278 - 279 - info->handle = handle; 280 - 281 - /* 282 - * On some Intel platforms, multiple children of the HDAS 283 - * device can be found, but only one of them is the SoundWire 284 - * controller. The SNDW device is always exposed with 285 - * Name(_ADR, 0x40000000), with bits 31..28 representing the 286 - * SoundWire link so filter accordingly 287 - */ 288 - if (FIELD_GET(GENMASK(31, 28), adr) != SDW_LINK_TYPE) 289 - return AE_OK; /* keep going */ 290 - 291 - /* device found, stop namespace walk */ 292 - return AE_CTRL_TERMINATE; 293 - } 294 - 295 - /** 296 - * sdw_intel_acpi_scan() - SoundWire Intel init routine 297 - * @parent_handle: ACPI parent handle 298 - * @info: description of what firmware/DSDT tables expose 299 - * 300 - * This scans the namespace and queries firmware to figure out which 301 - * links to enable. A follow-up use of sdw_intel_probe() and 302 - * sdw_intel_startup() is required for creation of devices and bus 303 - * startup 304 - */ 305 - int sdw_intel_acpi_scan(acpi_handle *parent_handle, 306 - struct sdw_intel_acpi_info *info) 307 - { 308 - acpi_status status; 309 - 310 - info->handle = NULL; 311 - status = acpi_walk_namespace(ACPI_TYPE_DEVICE, 312 - parent_handle, 1, 313 - sdw_intel_acpi_cb, 314 - NULL, info, NULL); 315 - if (ACPI_FAILURE(status) || info->handle == NULL) 316 - return -ENODEV; 317 - 318 - return sdw_intel_scan_controller(info); 319 - } 320 - EXPORT_SYMBOL_NS(sdw_intel_acpi_scan, SOUNDWIRE_INTEL_INIT); 321 359 322 360 /** 323 361 * sdw_intel_probe() - SoundWire Intel probe routine
+2
include/linux/soundwire/sdw_intel.h
··· 187 187 188 188 irqreturn_t sdw_intel_thread(int irq, void *dev_id); 189 189 190 + #define SDW_INTEL_QUIRK_MASK_BUS_DISABLE BIT(1) 191 + 190 192 #endif
+5
include/sound/intel-nhlt.h
··· 113 113 } __packed; 114 114 115 115 enum { 116 + NHLT_CONFIG_TYPE_GENERIC = 0, 117 + NHLT_CONFIG_TYPE_MIC_ARRAY = 1 118 + }; 119 + 120 + enum { 116 121 NHLT_MIC_ARRAY_2CH_SMALL = 0xa, 117 122 NHLT_MIC_ARRAY_2CH_BIG = 0xb, 118 123 NHLT_MIC_ARRAY_4CH_1ST_GEOM = 0xc,
+1 -1
include/sound/soc-acpi.h
··· 174 174 static inline bool snd_soc_acpi_sof_parent(struct device *dev) 175 175 { 176 176 return dev->parent && dev->parent->driver && dev->parent->driver->name && 177 - !strcmp(dev->parent->driver->name, "sof-audio-acpi"); 177 + !strncmp(dev->parent->driver->name, "sof-audio-acpi", strlen("sof-audio-acpi")); 178 178 } 179 179 180 180 #endif
+4
sound/hda/Kconfig
··· 44 44 config SND_INTEL_DSP_CONFIG 45 45 tristate 46 46 select SND_INTEL_NHLT if ACPI 47 + select SND_INTEL_SOUNDWIRE_ACPI if ACPI 47 48 # this config should be selected only for Intel DSP platforms. 48 49 # A fallback is provided so that the code compiles in all cases. 50 + 51 + config SND_INTEL_SOUNDWIRE_ACPI 52 + tristate 49 53 50 54 config SND_INTEL_BYT_PREFER_SOF 51 55 bool "Prefer SOF driver over SST on BY/CHT platforms"
+3
sound/hda/Makefile
··· 17 17 snd-intel-dspcfg-objs := intel-dsp-config.o 18 18 snd-intel-dspcfg-$(CONFIG_SND_INTEL_NHLT) += intel-nhlt.o 19 19 obj-$(CONFIG_SND_INTEL_DSP_CONFIG) += snd-intel-dspcfg.o 20 + 21 + snd-intel-sdw-acpi-objs := intel-sdw-acpi.o 22 + obj-$(CONFIG_SND_INTEL_SOUNDWIRE_ACPI) += snd-intel-sdw-acpi.o
+1 -1
sound/hda/ext/hdac_ext_controller.c
··· 133 133 EXPORT_SYMBOL_GPL(snd_hdac_link_free_all); 134 134 135 135 /** 136 - * snd_hdac_ext_bus_get_link_index - get link based on codec name 136 + * snd_hdac_ext_bus_get_link - get link based on codec name 137 137 * @bus: the pointer to HDAC bus object 138 138 * @codec_name: codec name 139 139 */
+1 -1
sound/hda/ext/hdac_ext_stream.c
··· 133 133 EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_decouple); 134 134 135 135 /** 136 - * snd_hdac_ext_linkstream_start - start a stream 136 + * snd_hdac_ext_link_stream_start - start a stream 137 137 * @stream: HD-audio ext core stream to start 138 138 */ 139 139 void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *stream)
+1 -1
sound/hda/hdac_regmap.c
··· 386 386 EXPORT_SYMBOL_GPL(snd_hdac_regmap_init); 387 387 388 388 /** 389 - * snd_hdac_regmap_init - Release the regmap from HDA codec 389 + * snd_hdac_regmap_exit - Release the regmap from HDA codec 390 390 * @codec: the codec object 391 391 */ 392 392 void snd_hdac_regmap_exit(struct hdac_device *codec)
+1 -1
sound/hda/intel-dsp-config.c
··· 557 557 558 558 MODULE_LICENSE("GPL v2"); 559 559 MODULE_DESCRIPTION("Intel DSP config driver"); 560 - MODULE_IMPORT_NS(SOUNDWIRE_INTEL_INIT); 560 + MODULE_IMPORT_NS(SND_INTEL_SOUNDWIRE_ACPI);
+45 -9
sound/hda/intel-nhlt.c
··· 31 31 struct nhlt_endpoint *epnt; 32 32 struct nhlt_dmic_array_config *cfg; 33 33 struct nhlt_vendor_dmic_array_config *cfg_vendor; 34 + struct nhlt_fmt *fmt_configs; 34 35 unsigned int dmic_geo = 0; 35 - u8 j; 36 + u16 max_ch = 0; 37 + u8 i, j; 36 38 37 39 if (!nhlt) 38 40 return 0; 39 41 40 - epnt = (struct nhlt_endpoint *)nhlt->desc; 42 + for (j = 0, epnt = nhlt->desc; j < nhlt->endpoint_count; j++, 43 + epnt = (struct nhlt_endpoint *)((u8 *)epnt + epnt->length)) { 41 44 42 - for (j = 0; j < nhlt->endpoint_count; j++) { 43 - if (epnt->linktype == NHLT_LINK_DMIC) { 44 - cfg = (struct nhlt_dmic_array_config *) 45 - (epnt->config.caps); 45 + if (epnt->linktype != NHLT_LINK_DMIC) 46 + continue; 47 + 48 + cfg = (struct nhlt_dmic_array_config *)(epnt->config.caps); 49 + fmt_configs = (struct nhlt_fmt *)(epnt->config.caps + epnt->config.size); 50 + 51 + /* find max number of channels based on format_configuration */ 52 + if (fmt_configs->fmt_count) { 53 + dev_dbg(dev, "%s: found %d format definitions\n", 54 + __func__, fmt_configs->fmt_count); 55 + 56 + for (i = 0; i < fmt_configs->fmt_count; i++) { 57 + struct wav_fmt_ext *fmt_ext; 58 + 59 + fmt_ext = &fmt_configs->fmt_config[i].fmt_ext; 60 + 61 + if (fmt_ext->fmt.channels > max_ch) 62 + max_ch = fmt_ext->fmt.channels; 63 + } 64 + dev_dbg(dev, "%s: max channels found %d\n", __func__, max_ch); 65 + } else { 66 + dev_dbg(dev, "%s: No format information found\n", __func__); 67 + } 68 + 69 + if (cfg->device_config.config_type != NHLT_CONFIG_TYPE_MIC_ARRAY) { 70 + dmic_geo = max_ch; 71 + } else { 46 72 switch (cfg->array_type) { 47 73 case NHLT_MIC_ARRAY_2CH_SMALL: 48 74 case NHLT_MIC_ARRAY_2CH_BIG: ··· 85 59 dmic_geo = cfg_vendor->nb_mics; 86 60 break; 87 61 default: 88 - dev_warn(dev, "undefined DMIC array_type 0x%0x\n", 89 - cfg->array_type); 62 + dev_warn(dev, "%s: undefined DMIC array_type 0x%0x\n", 63 + __func__, cfg->array_type); 64 + } 65 + 66 + if (dmic_geo > 0) { 67 + dev_dbg(dev, "%s: Array with %d dmics\n", __func__, dmic_geo); 68 + } 69 + if (max_ch > dmic_geo) { 70 + dev_dbg(dev, "%s: max channels %d exceed dmic number %d\n", 71 + __func__, max_ch, dmic_geo); 90 72 } 91 73 } 92 - epnt = (struct nhlt_endpoint *)((u8 *)epnt + epnt->length); 93 74 } 75 + 76 + dev_dbg(dev, "%s: dmic number %d max_ch %d\n", 77 + __func__, dmic_geo, max_ch); 94 78 95 79 return dmic_geo; 96 80 }
+179
sound/hda/intel-sdw-acpi.c
··· 1 + // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 + // Copyright(c) 2015-2021 Intel Corporation. 3 + 4 + /* 5 + * SDW Intel ACPI scan helpers 6 + */ 7 + 8 + #include <linux/acpi.h> 9 + #include <linux/bits.h> 10 + #include <linux/bitfield.h> 11 + #include <linux/device.h> 12 + #include <linux/errno.h> 13 + #include <linux/export.h> 14 + #include <linux/fwnode.h> 15 + #include <linux/module.h> 16 + #include <linux/soundwire/sdw_intel.h> 17 + #include <linux/string.h> 18 + 19 + #define SDW_LINK_TYPE 4 /* from Intel ACPI documentation */ 20 + #define SDW_MAX_LINKS 4 21 + 22 + static int ctrl_link_mask; 23 + module_param_named(sdw_link_mask, ctrl_link_mask, int, 0444); 24 + MODULE_PARM_DESC(sdw_link_mask, "Intel link mask (one bit per link)"); 25 + 26 + static bool is_link_enabled(struct fwnode_handle *fw_node, int i) 27 + { 28 + struct fwnode_handle *link; 29 + char name[32]; 30 + u32 quirk_mask = 0; 31 + 32 + /* Find master handle */ 33 + snprintf(name, sizeof(name), 34 + "mipi-sdw-link-%d-subproperties", i); 35 + 36 + link = fwnode_get_named_child_node(fw_node, name); 37 + if (!link) 38 + return false; 39 + 40 + fwnode_property_read_u32(link, 41 + "intel-quirk-mask", 42 + &quirk_mask); 43 + 44 + if (quirk_mask & SDW_INTEL_QUIRK_MASK_BUS_DISABLE) 45 + return false; 46 + 47 + return true; 48 + } 49 + 50 + static int 51 + sdw_intel_scan_controller(struct sdw_intel_acpi_info *info) 52 + { 53 + struct acpi_device *adev; 54 + int ret, i; 55 + u8 count; 56 + 57 + if (acpi_bus_get_device(info->handle, &adev)) 58 + return -EINVAL; 59 + 60 + /* Found controller, find links supported */ 61 + count = 0; 62 + ret = fwnode_property_read_u8_array(acpi_fwnode_handle(adev), 63 + "mipi-sdw-master-count", &count, 1); 64 + 65 + /* 66 + * In theory we could check the number of links supported in 67 + * hardware, but in that step we cannot assume SoundWire IP is 68 + * powered. 69 + * 70 + * In addition, if the BIOS doesn't even provide this 71 + * 'master-count' property then all the inits based on link 72 + * masks will fail as well. 73 + * 74 + * We will check the hardware capabilities in the startup() step 75 + */ 76 + 77 + if (ret) { 78 + dev_err(&adev->dev, 79 + "Failed to read mipi-sdw-master-count: %d\n", ret); 80 + return -EINVAL; 81 + } 82 + 83 + /* Check count is within bounds */ 84 + if (count > SDW_MAX_LINKS) { 85 + dev_err(&adev->dev, "Link count %d exceeds max %d\n", 86 + count, SDW_MAX_LINKS); 87 + return -EINVAL; 88 + } 89 + 90 + if (!count) { 91 + dev_warn(&adev->dev, "No SoundWire links detected\n"); 92 + return -EINVAL; 93 + } 94 + dev_dbg(&adev->dev, "ACPI reports %d SDW Link devices\n", count); 95 + 96 + info->count = count; 97 + info->link_mask = 0; 98 + 99 + for (i = 0; i < count; i++) { 100 + if (ctrl_link_mask && !(ctrl_link_mask & BIT(i))) { 101 + dev_dbg(&adev->dev, 102 + "Link %d masked, will not be enabled\n", i); 103 + continue; 104 + } 105 + 106 + if (!is_link_enabled(acpi_fwnode_handle(adev), i)) { 107 + dev_dbg(&adev->dev, 108 + "Link %d not selected in firmware\n", i); 109 + continue; 110 + } 111 + 112 + info->link_mask |= BIT(i); 113 + } 114 + 115 + return 0; 116 + } 117 + 118 + static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level, 119 + void *cdata, void **return_value) 120 + { 121 + struct sdw_intel_acpi_info *info = cdata; 122 + struct acpi_device *adev; 123 + acpi_status status; 124 + u64 adr; 125 + 126 + status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &adr); 127 + if (ACPI_FAILURE(status)) 128 + return AE_OK; /* keep going */ 129 + 130 + if (acpi_bus_get_device(handle, &adev)) { 131 + pr_err("%s: Couldn't find ACPI handle\n", __func__); 132 + return AE_NOT_FOUND; 133 + } 134 + 135 + info->handle = handle; 136 + 137 + /* 138 + * On some Intel platforms, multiple children of the HDAS 139 + * device can be found, but only one of them is the SoundWire 140 + * controller. The SNDW device is always exposed with 141 + * Name(_ADR, 0x40000000), with bits 31..28 representing the 142 + * SoundWire link so filter accordingly 143 + */ 144 + if (FIELD_GET(GENMASK(31, 28), adr) != SDW_LINK_TYPE) 145 + return AE_OK; /* keep going */ 146 + 147 + /* device found, stop namespace walk */ 148 + return AE_CTRL_TERMINATE; 149 + } 150 + 151 + /** 152 + * sdw_intel_acpi_scan() - SoundWire Intel init routine 153 + * @parent_handle: ACPI parent handle 154 + * @info: description of what firmware/DSDT tables expose 155 + * 156 + * This scans the namespace and queries firmware to figure out which 157 + * links to enable. A follow-up use of sdw_intel_probe() and 158 + * sdw_intel_startup() is required for creation of devices and bus 159 + * startup 160 + */ 161 + int sdw_intel_acpi_scan(acpi_handle *parent_handle, 162 + struct sdw_intel_acpi_info *info) 163 + { 164 + acpi_status status; 165 + 166 + info->handle = NULL; 167 + status = acpi_walk_namespace(ACPI_TYPE_DEVICE, 168 + parent_handle, 1, 169 + sdw_intel_acpi_cb, 170 + NULL, info, NULL); 171 + if (ACPI_FAILURE(status) || info->handle == NULL) 172 + return -ENODEV; 173 + 174 + return sdw_intel_scan_controller(info); 175 + } 176 + EXPORT_SYMBOL_NS(sdw_intel_acpi_scan, SND_INTEL_SOUNDWIRE_ACPI); 177 + 178 + MODULE_LICENSE("Dual BSD/GPL"); 179 + MODULE_DESCRIPTION("Intel Soundwire ACPI helpers");
+4 -4
sound/mips/snd-n64.c
··· 312 312 } 313 313 314 314 priv->mi_reg_base = devm_platform_ioremap_resource(pdev, 0); 315 - if (!priv->mi_reg_base) { 316 - err = -EINVAL; 315 + if (IS_ERR(priv->mi_reg_base)) { 316 + err = PTR_ERR(priv->mi_reg_base); 317 317 goto fail_dma_alloc; 318 318 } 319 319 320 320 priv->ai_reg_base = devm_platform_ioremap_resource(pdev, 1); 321 - if (!priv->ai_reg_base) { 322 - err = -EINVAL; 321 + if (IS_ERR(priv->ai_reg_base)) { 322 + err = PTR_ERR(priv->ai_reg_base); 323 323 goto fail_dma_alloc; 324 324 } 325 325
+1 -1
sound/pci/ctxfi/cthw20k2.c
··· 991 991 992 992 if (idx < 4) { 993 993 /* S/PDIF output */ 994 - switch ((conf & 0x7)) { 994 + switch ((conf & 0xf)) { 995 995 case 1: 996 996 set_field(&ctl->txctl[idx], ATXCTL_NUC, 0); 997 997 break;
+3 -3
sound/pci/hda/hda_codec.c
··· 3483 3483 */ 3484 3484 3485 3485 /** 3486 - * snd_hda_input_mux_info_info - Info callback helper for the input-mux enum 3486 + * snd_hda_input_mux_info - Info callback helper for the input-mux enum 3487 3487 * @imux: imux helper object 3488 3488 * @uinfo: pointer to get/store the data 3489 3489 */ ··· 3506 3506 EXPORT_SYMBOL_GPL(snd_hda_input_mux_info); 3507 3507 3508 3508 /** 3509 - * snd_hda_input_mux_info_put - Put callback helper for the input-mux enum 3509 + * snd_hda_input_mux_put - Put callback helper for the input-mux enum 3510 3510 * @codec: the HDA codec 3511 3511 * @imux: imux helper object 3512 3512 * @ucontrol: pointer to get/store the data ··· 3941 3941 EXPORT_SYMBOL_GPL(snd_hda_correct_pin_ctl); 3942 3942 3943 3943 /** 3944 - * _snd_hda_pin_ctl - Helper to set pin ctl value 3944 + * _snd_hda_set_pin_ctl - Helper to set pin ctl value 3945 3945 * @codec: the HDA codec 3946 3946 * @pin: referred pin NID 3947 3947 * @val: pin control value to set
+2 -2
sound/pci/hda/hda_generic.c
··· 3923 3923 } 3924 3924 3925 3925 /** 3926 - * snd_dha_gen_add_mute_led_cdev - Create a LED classdev and enable as vmaster mute LED 3926 + * snd_hda_gen_add_mute_led_cdev - Create a LED classdev and enable as vmaster mute LED 3927 3927 * @codec: the HDA codec 3928 3928 * @callback: the callback for LED classdev brightness_set_blocking 3929 3929 */ ··· 4074 4074 } 4075 4075 4076 4076 /** 4077 - * snd_dha_gen_add_micmute_led_cdev - Create a LED classdev and enable as mic-mute LED 4077 + * snd_hda_gen_add_micmute_led_cdev - Create a LED classdev and enable as mic-mute LED 4078 4078 * @codec: the HDA codec 4079 4079 * @callback: the callback for LED classdev brightness_set_blocking 4080 4080 *
+2 -2
sound/pci/hda/hda_jack.c
··· 213 213 } 214 214 215 215 /** 216 - * snd_hda_set_dirty_all - Mark all the cached as dirty 216 + * snd_hda_jack_set_dirty_all - Mark all the cached as dirty 217 217 * @codec: the HDA codec 218 218 * 219 219 * This function sets the dirty flag to all entries of jack table. ··· 293 293 } 294 294 295 295 /** 296 - * snd_hda_jack_detect_enable_mst - enable the jack-detection 296 + * snd_hda_jack_detect_enable_callback_mst - enable the jack-detection 297 297 * @codec: the HDA codec 298 298 * @nid: pin NID to enable 299 299 * @func: callback function to register
+4 -5
sound/pci/hda/patch_ca0132.c
··· 2338 2338 } 2339 2339 2340 2340 /** 2341 - * Prepare and send the SCP message to DSP 2341 + * dspio_scp - Prepare and send the SCP message to DSP 2342 2342 * @codec: the HDA codec 2343 2343 * @mod_id: ID of the DSP module to send the command 2344 2344 * @src_id: ID of the source ··· 2865 2865 } 2866 2866 2867 2867 /** 2868 - * Allocate router ports 2868 + * dsp_allocate_router_ports - Allocate router ports 2869 2869 * 2870 2870 * @codec: the HDA codec 2871 2871 * @num_chans: number of channels in the stream ··· 3178 3178 } 3179 3179 3180 3180 /** 3181 - * Write a block of data into DSP code or data RAM using pre-allocated 3182 - * DMA engine. 3181 + * dspxfr_one_seg - Write a block of data into DSP code or data RAM using pre-allocated DMA engine. 3183 3182 * 3184 3183 * @codec: the HDA codec 3185 3184 * @fls: pointer to a fast load image ··· 3375 3376 } 3376 3377 3377 3378 /** 3378 - * Write the entire DSP image of a DSP code/data overlay to DSP memories 3379 + * dspxfr_image - Write the entire DSP image of a DSP code/data overlay to DSP memories 3379 3380 * 3380 3381 * @codec: the HDA codec 3381 3382 * @fls_data: pointer to a fast load image
+17 -1
sound/pci/hda/patch_hdmi.c
··· 157 157 158 158 bool dyn_pin_out; 159 159 bool dyn_pcm_assign; 160 + bool dyn_pcm_no_legacy; 160 161 bool intel_hsw_fixup; /* apply Intel platform-specific fixups */ 161 162 /* 162 163 * Non-generic VIA/NVIDIA specific ··· 1346 1345 { 1347 1346 int i; 1348 1347 1348 + /* on the new machines, try to assign the pcm slot dynamically, 1349 + * not use the preferred fixed map (legacy way) anymore. 1350 + */ 1351 + if (spec->dyn_pcm_no_legacy) 1352 + goto last_try; 1353 + 1349 1354 /* 1350 1355 * generic_hdmi_build_pcms() may allocate extra PCMs on some 1351 1356 * platforms (with maximum of 'num_nids + dev_num - 1') ··· 1381 1374 return i; 1382 1375 } 1383 1376 1377 + last_try: 1384 1378 /* the last try; check the empty slots in pins */ 1385 1379 for (i = 0; i < spec->num_nids; i++) { 1386 1380 if (!test_bit(i, &spec->pcm_bitmap)) ··· 2995 2987 * the index indicate the port number. 2996 2988 */ 2997 2989 static const int map[] = {0x4, 0x6, 0x8, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}; 2990 + int ret; 2998 2991 2999 - return intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map)); 2992 + ret = intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map)); 2993 + if (!ret) { 2994 + struct hdmi_spec *spec = codec->spec; 2995 + 2996 + spec->dyn_pcm_no_legacy = true; 2997 + } 2998 + 2999 + return ret; 3000 3000 } 3001 3001 3002 3002 /* Intel Baytrail and Braswell; with eld notifier */
+26
sound/pci/hda/patch_realtek.c
··· 2532 2532 SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950), 2533 2533 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950), 2534 2534 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD), 2535 + SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS), 2535 2536 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), 2536 2537 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), 2537 2538 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), ··· 6397 6396 ALC269_FIXUP_LEMOTE_A1802, 6398 6397 ALC269_FIXUP_LEMOTE_A190X, 6399 6398 ALC256_FIXUP_INTEL_NUC8_RUGGED, 6399 + ALC256_FIXUP_INTEL_NUC10, 6400 6400 ALC255_FIXUP_XIAOMI_HEADSET_MIC, 6401 6401 ALC274_FIXUP_HP_MIC, 6402 6402 ALC274_FIXUP_HP_HEADSET_MIC, ··· 6408 6406 ALC236_FIXUP_DELL_AIO_HEADSET_MIC, 6409 6407 ALC282_FIXUP_ACER_DISABLE_LINEOUT, 6410 6408 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST, 6409 + ALC256_FIXUP_ACER_HEADSET_MIC, 6411 6410 }; 6412 6411 6413 6412 static const struct hda_fixup alc269_fixups[] = { ··· 7785 7782 .chained = true, 7786 7783 .chain_id = ALC269_FIXUP_HEADSET_MODE 7787 7784 }, 7785 + [ALC256_FIXUP_INTEL_NUC10] = { 7786 + .type = HDA_FIXUP_PINS, 7787 + .v.pins = (const struct hda_pintbl[]) { 7788 + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 7789 + { } 7790 + }, 7791 + .chained = true, 7792 + .chain_id = ALC269_FIXUP_HEADSET_MODE 7793 + }, 7788 7794 [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = { 7789 7795 .type = HDA_FIXUP_VERBS, 7790 7796 .v.verbs = (const struct hda_verb[]) { ··· 7865 7853 .chained = true, 7866 7854 .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, 7867 7855 }, 7856 + [ALC256_FIXUP_ACER_HEADSET_MIC] = { 7857 + .type = HDA_FIXUP_PINS, 7858 + .v.pins = (const struct hda_pintbl[]) { 7859 + { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */ 7860 + { 0x1a, 0x90a1092f }, /* use as internal mic */ 7861 + { } 7862 + }, 7863 + .chained = true, 7864 + .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 7865 + }, 7868 7866 }; 7869 7867 7870 7868 static const struct snd_pci_quirk alc269_fixup_tbl[] = { ··· 7901 7879 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK), 7902 7880 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), 7903 7881 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE), 7882 + SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC), 7904 7883 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 7905 7884 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 7906 7885 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 7886 + SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC), 7907 7887 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 7908 7888 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC), 7909 7889 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC), ··· 8152 8128 SND_PCI_QUIRK(0x1558, 0x8551, "System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 8153 8129 SND_PCI_QUIRK(0x1558, 0x8560, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC), 8154 8130 SND_PCI_QUIRK(0x1558, 0x8561, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC), 8131 + SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[5|7][0-9]RZ[Q]", ALC269_FIXUP_DMIC), 8155 8132 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 8156 8133 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 8157 8134 SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ··· 8247 8222 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802), 8248 8223 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X), 8249 8224 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), 8225 + SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), 8250 8226 8251 8227 #if 0 8252 8228 /* Below is a quirk table taken from the old code.
+10 -5
sound/soc/sof/Kconfig
··· 9 9 10 10 if SND_SOC_SOF_TOPLEVEL 11 11 12 + config SND_SOC_SOF_PCI_DEV 13 + tristate 14 + 12 15 config SND_SOC_SOF_PCI 13 16 tristate "SOF PCI enumeration support" 14 17 depends on PCI 15 - select SND_SOC_SOF 16 - select SND_SOC_ACPI if ACPI 17 18 help 18 19 This adds support for PCI enumeration. This option is 19 20 required to enable Intel Skylake+ devices. 21 + For backwards-compatibility with previous configurations the selection will 22 + be used as default for platform-specific drivers. 20 23 Say Y if you need this option. 21 24 If unsure select "N". 22 25 23 26 config SND_SOC_SOF_ACPI 24 27 tristate "SOF ACPI enumeration support" 25 28 depends on ACPI || COMPILE_TEST 26 - select SND_SOC_SOF 27 - select SND_SOC_ACPI if ACPI 28 - select IOSF_MBI if X86 && PCI 29 29 help 30 30 This adds support for ACPI enumeration. This option is required 31 31 to enable Intel Broadwell/Baytrail/Cherrytrail devices. 32 + For backwards-compatibility with previous configurations the selection will 33 + be used as default for platform-specific drivers. 32 34 Say Y if you need this option. 33 35 If unsure select "N". 36 + 37 + config SND_SOC_SOF_ACPI_DEV 38 + tristate 34 39 35 40 config SND_SOC_SOF_OF 36 41 tristate "SOF OF enumeration support"
+2 -2
sound/soc/sof/Makefile
··· 14 14 obj-$(CONFIG_SND_SOC_SOF_NOCODEC) += snd-sof-nocodec.o 15 15 16 16 17 - obj-$(CONFIG_SND_SOC_SOF_ACPI) += snd-sof-acpi.o 17 + obj-$(CONFIG_SND_SOC_SOF_ACPI_DEV) += snd-sof-acpi.o 18 18 obj-$(CONFIG_SND_SOC_SOF_OF) += snd-sof-of.o 19 - obj-$(CONFIG_SND_SOC_SOF_PCI) += snd-sof-pci.o 19 + obj-$(CONFIG_SND_SOC_SOF_PCI_DEV) += snd-sof-pci.o 20 20 21 21 obj-$(CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL) += intel/ 22 22 obj-$(CONFIG_SND_SOC_SOF_IMX_TOPLEVEL) += imx/
+99 -183
sound/soc/sof/intel/Kconfig
··· 9 9 10 10 if SND_SOC_SOF_INTEL_TOPLEVEL 11 11 12 - config SND_SOC_SOF_INTEL_ACPI 13 - def_tristate SND_SOC_SOF_ACPI 14 - select SND_SOC_SOF_BAYTRAIL if SND_SOC_SOF_BAYTRAIL_SUPPORT 15 - select SND_SOC_SOF_BROADWELL if SND_SOC_SOF_BROADWELL_SUPPORT 16 - help 17 - This option is not user-selectable but automagically handled by 18 - 'select' statements at a higher level. 19 - 20 - config SND_SOC_SOF_INTEL_PCI 21 - def_tristate SND_SOC_SOF_PCI 22 - select SND_SOC_SOF_MERRIFIELD if SND_SOC_SOF_MERRIFIELD_SUPPORT 23 - select SND_SOC_SOF_APOLLOLAKE if SND_SOC_SOF_APOLLOLAKE_SUPPORT 24 - select SND_SOC_SOF_GEMINILAKE if SND_SOC_SOF_GEMINILAKE_SUPPORT 25 - select SND_SOC_SOF_CANNONLAKE if SND_SOC_SOF_CANNONLAKE_SUPPORT 26 - select SND_SOC_SOF_COFFEELAKE if SND_SOC_SOF_COFFEELAKE_SUPPORT 27 - select SND_SOC_SOF_ICELAKE if SND_SOC_SOF_ICELAKE_SUPPORT 28 - select SND_SOC_SOF_COMETLAKE if SND_SOC_SOF_COMETLAKE_SUPPORT 29 - select SND_SOC_SOF_TIGERLAKE if SND_SOC_SOF_TIGERLAKE_SUPPORT 30 - select SND_SOC_SOF_ELKHARTLAKE if SND_SOC_SOF_ELKHARTLAKE_SUPPORT 31 - select SND_SOC_SOF_JASPERLAKE if SND_SOC_SOF_JASPERLAKE_SUPPORT 32 - select SND_SOC_SOF_ALDERLAKE if SND_SOC_SOF_ALDERLAKE_SUPPORT 33 - help 34 - This option is not user-selectable but automagically handled by 35 - 'select' statements at a higher level. 36 - 37 12 config SND_SOC_SOF_INTEL_HIFI_EP_IPC 38 13 tristate 39 14 help ··· 25 50 26 51 config SND_SOC_SOF_INTEL_COMMON 27 52 tristate 53 + select SND_SOC_SOF 28 54 select SND_SOC_ACPI_INTEL_MATCH 29 55 select SND_SOC_SOF_XTENSA 30 56 select SND_SOC_INTEL_MACH 31 57 select SND_SOC_ACPI if ACPI 58 + select SND_INTEL_DSP_CONFIG 32 59 help 33 60 This option is not user-selectable but automagically handled by 34 61 'select' statements at a higher level. 35 62 36 - if SND_SOC_SOF_INTEL_ACPI 63 + if SND_SOC_SOF_ACPI 37 64 38 - config SND_SOC_SOF_BAYTRAIL_SUPPORT 39 - bool "SOF support for Baytrail, Braswell and Cherrytrail" 65 + config SND_SOC_SOF_BAYTRAIL 66 + tristate "SOF support for Baytrail, Braswell and Cherrytrail" 67 + default SND_SOC_SOF_ACPI 68 + select SND_SOC_SOF_INTEL_COMMON 69 + select SND_SOC_SOF_INTEL_ATOM_HIFI_EP 70 + select SND_SOC_SOF_ACPI_DEV 71 + select IOSF_MBI if X86 && PCI 40 72 help 41 73 This adds support for Sound Open Firmware for Intel(R) platforms 42 74 using the Baytrail, Braswell or Cherrytrail processors. ··· 57 75 Say Y if you want to enable SOF on Baytrail/Cherrytrail. 58 76 If unsure select "N". 59 77 60 - config SND_SOC_SOF_BAYTRAIL 61 - tristate 62 - select SND_SOC_SOF_INTEL_ATOM_HIFI_EP 63 - select SND_INTEL_DSP_CONFIG 64 - help 65 - This option is not user-selectable but automagically handled by 66 - 'select' statements at a higher level. 67 - 68 - config SND_SOC_SOF_BROADWELL_SUPPORT 69 - bool "SOF support for Broadwell" 70 - select SND_INTEL_DSP_CONFIG 78 + config SND_SOC_SOF_BROADWELL 79 + tristate "SOF support for Broadwell" 80 + default SND_SOC_SOF_ACPI 81 + select SND_SOC_SOF_INTEL_COMMON 82 + select SND_SOC_SOF_INTEL_HIFI_EP_IPC 83 + select SND_SOC_SOF_ACPI_DEV 71 84 help 72 85 This adds support for Sound Open Firmware for Intel(R) platforms 73 86 using the Broadwell processors. ··· 77 100 Say Y if you want to enable SOF on Broadwell. 78 101 If unsure select "N". 79 102 80 - config SND_SOC_SOF_BROADWELL 81 - tristate 82 - select SND_SOC_SOF_INTEL_COMMON 83 - select SND_SOC_SOF_INTEL_HIFI_EP_IPC 84 - help 85 - This option is not user-selectable but automagically handled by 86 - 'select' statements at a higher level. 103 + endif ## SND_SOC_SOF_ACPI 87 104 88 - endif ## SND_SOC_SOF_INTEL_ACPI 105 + if SND_SOC_SOF_PCI 89 106 90 - if SND_SOC_SOF_INTEL_PCI 91 - 92 - config SND_SOC_SOF_MERRIFIELD_SUPPORT 93 - bool "SOF support for Tangier/Merrifield" 107 + config SND_SOC_SOF_MERRIFIELD 108 + tristate "SOF support for Tangier/Merrifield" 109 + default SND_SOC_SOF_PCI 110 + select SND_SOC_SOF_INTEL_ATOM_HIFI_EP 94 111 help 95 112 This adds support for Sound Open Firmware for Intel(R) platforms 96 113 using the Tangier/Merrifield processors. 97 114 Say Y if you have such a device. 98 115 If unsure select "N". 99 116 100 - config SND_SOC_SOF_MERRIFIELD 117 + config SND_SOC_SOF_INTEL_APL 101 118 tristate 102 - select SND_SOC_SOF_INTEL_ATOM_HIFI_EP 103 - help 104 - This option is not user-selectable but automagically handled by 105 - 'select' statements at a higher level. 119 + select SND_SOC_SOF_HDA_COMMON 106 120 107 - config SND_SOC_SOF_APOLLOLAKE_SUPPORT 108 - bool "SOF support for Apollolake" 121 + config SND_SOC_SOF_APOLLOLAKE 122 + tristate "SOF support for Apollolake" 123 + default SND_SOC_SOF_PCI 124 + select SND_SOC_SOF_INTEL_APL 109 125 help 110 126 This adds support for Sound Open Firmware for Intel(R) platforms 111 127 using the Apollolake processors. 112 128 Say Y if you have such a device. 113 129 If unsure select "N". 114 130 115 - config SND_SOC_SOF_APOLLOLAKE 116 - tristate 117 - select SND_SOC_SOF_HDA_COMMON 118 - help 119 - This option is not user-selectable but automagically handled by 120 - 'select' statements at a higher level. 121 - 122 - config SND_SOC_SOF_GEMINILAKE_SUPPORT 123 - bool "SOF support for GeminiLake" 131 + config SND_SOC_SOF_GEMINILAKE 132 + tristate "SOF support for GeminiLake" 133 + default SND_SOC_SOF_PCI 134 + select SND_SOC_SOF_INTEL_APL 124 135 help 125 136 This adds support for Sound Open Firmware for Intel(R) platforms 126 137 using the Geminilake processors. 127 138 Say Y if you have such a device. 128 139 If unsure select "N". 129 140 130 - config SND_SOC_SOF_GEMINILAKE 141 + config SND_SOC_SOF_INTEL_CNL 131 142 tristate 132 143 select SND_SOC_SOF_HDA_COMMON 133 - help 134 - This option is not user-selectable but automagically handled by 135 - 'select' statements at a higher level. 144 + select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 136 145 137 - config SND_SOC_SOF_CANNONLAKE_SUPPORT 138 - bool "SOF support for Cannonlake" 146 + config SND_SOC_SOF_CANNONLAKE 147 + tristate "SOF support for Cannonlake" 148 + default SND_SOC_SOF_PCI 149 + select SND_SOC_SOF_INTEL_CNL 139 150 help 140 151 This adds support for Sound Open Firmware for Intel(R) platforms 141 152 using the Cannonlake processors. 142 153 Say Y if you have such a device. 143 154 If unsure select "N". 144 155 145 - config SND_SOC_SOF_CANNONLAKE 146 - tristate 147 - select SND_SOC_SOF_HDA_COMMON 148 - select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 149 - help 150 - This option is not user-selectable but automagically handled by 151 - 'select' statements at a higher level. 152 - 153 - config SND_SOC_SOF_COFFEELAKE_SUPPORT 154 - bool "SOF support for CoffeeLake" 156 + config SND_SOC_SOF_COFFEELAKE 157 + tristate "SOF support for CoffeeLake" 158 + default SND_SOC_SOF_PCI 159 + select SND_SOC_SOF_INTEL_CNL 155 160 help 156 161 This adds support for Sound Open Firmware for Intel(R) platforms 157 162 using the Coffeelake processors. 158 163 Say Y if you have such a device. 159 164 If unsure select "N". 160 165 161 - config SND_SOC_SOF_COFFEELAKE 166 + config SND_SOC_SOF_COMETLAKE 167 + tristate "SOF support for CometLake" 168 + default SND_SOC_SOF_PCI 169 + select SND_SOC_SOF_INTEL_CNL 170 + help 171 + This adds support for Sound Open Firmware for Intel(R) platforms 172 + using the Cometlake processors. 173 + If unsure select "N". 174 + 175 + config SND_SOC_SOF_INTEL_ICL 162 176 tristate 163 177 select SND_SOC_SOF_HDA_COMMON 164 178 select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 165 - help 166 - This option is not user-selectable but automagically handled by 167 - 'select' statements at a higher level. 168 179 169 - config SND_SOC_SOF_ICELAKE_SUPPORT 170 - bool "SOF support for Icelake" 180 + config SND_SOC_SOF_ICELAKE 181 + tristate "SOF support for Icelake" 182 + default SND_SOC_SOF_PCI 183 + select SND_SOC_SOF_INTEL_ICL 171 184 help 172 185 This adds support for Sound Open Firmware for Intel(R) platforms 173 186 using the Icelake processors. 174 187 Say Y if you have such a device. 175 188 If unsure select "N". 176 189 177 - config SND_SOC_SOF_ICELAKE 178 - tristate 179 - select SND_SOC_SOF_HDA_COMMON 180 - select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 181 - help 182 - This option is not user-selectable but automagically handled by 183 - 'select' statements at a higher level. 184 - 185 - config SND_SOC_SOF_COMETLAKE 186 - tristate 187 - select SND_SOC_SOF_HDA_COMMON 188 - select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 189 - help 190 - This option is not user-selectable but automagically handled by 191 - 'select' statements at a higher level. 192 - 193 - config SND_SOC_SOF_COMETLAKE_SUPPORT 194 - bool 195 - 196 - config SND_SOC_SOF_COMETLAKE_LP_SUPPORT 197 - bool "SOF support for CometLake" 198 - select SND_SOC_SOF_COMETLAKE_SUPPORT 199 - help 200 - This adds support for Sound Open Firmware for Intel(R) platforms 201 - using the Cometlake processors. 202 - If unsure select "N". 203 - 204 - config SND_SOC_SOF_TIGERLAKE_SUPPORT 205 - bool "SOF support for Tigerlake" 206 - help 207 - This adds support for Sound Open Firmware for Intel(R) platforms 208 - using the Tigerlake processors. 209 - Say Y if you have such a device. 210 - If unsure select "N". 211 - 212 - config SND_SOC_SOF_TIGERLAKE 213 - tristate 214 - select SND_SOC_SOF_HDA_COMMON 215 - select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 216 - help 217 - This option is not user-selectable but automagically handled by 218 - 'select' statements at a higher level. 219 - 220 - config SND_SOC_SOF_ELKHARTLAKE_SUPPORT 221 - bool "SOF support for ElkhartLake" 222 - help 223 - This adds support for Sound Open Firmware for Intel(R) platforms 224 - using the ElkhartLake processors. 225 - Say Y if you have such a device. 226 - If unsure select "N". 227 - 228 - config SND_SOC_SOF_ELKHARTLAKE 229 - tristate 230 - select SND_SOC_SOF_HDA_COMMON 231 - select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 232 - help 233 - This option is not user-selectable but automagically handled by 234 - 'select' statements at a higher level. 235 - 236 - config SND_SOC_SOF_JASPERLAKE_SUPPORT 237 - bool "SOF support for JasperLake" 190 + config SND_SOC_SOF_JASPERLAKE 191 + tristate "SOF support for JasperLake" 192 + default SND_SOC_SOF_PCI 193 + select SND_SOC_SOF_INTEL_ICL 238 194 help 239 195 This adds support for Sound Open Firmware for Intel(R) platforms 240 196 using the JasperLake processors. 241 197 Say Y if you have such a device. 242 198 If unsure select "N". 243 199 244 - config SND_SOC_SOF_JASPERLAKE 200 + config SND_SOC_SOF_INTEL_TGL 245 201 tristate 246 202 select SND_SOC_SOF_HDA_COMMON 247 - help 248 - This option is not user-selectable but automagically handled by 249 - 'select' statements at a higher level. 203 + select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 250 204 251 - config SND_SOC_SOF_ALDERLAKE_SUPPORT 252 - bool "SOF support for Alderlake" 205 + config SND_SOC_SOF_TIGERLAKE 206 + tristate "SOF support for Tigerlake" 207 + default SND_SOC_SOF_PCI 208 + select SND_SOC_SOF_INTEL_TGL 209 + help 210 + This adds support for Sound Open Firmware for Intel(R) platforms 211 + using the Tigerlake processors. 212 + Say Y if you have such a device. 213 + If unsure select "N". 214 + 215 + config SND_SOC_SOF_ELKHARTLAKE 216 + tristate "SOF support for ElkhartLake" 217 + default SND_SOC_SOF_PCI 218 + select SND_SOC_SOF_INTEL_TGL 219 + help 220 + This adds support for Sound Open Firmware for Intel(R) platforms 221 + using the ElkhartLake processors. 222 + Say Y if you have such a device. 223 + If unsure select "N". 224 + 225 + config SND_SOC_SOF_ALDERLAKE 226 + tristate "SOF support for Alderlake" 227 + default SND_SOC_SOF_PCI 228 + select SND_SOC_SOF_INTEL_TGL 253 229 help 254 230 This adds support for Sound Open Firmware for Intel(R) platforms 255 231 using the Alderlake processors. 256 232 Say Y if you have such a device. 257 233 If unsure select "N". 258 234 259 - config SND_SOC_SOF_ALDERLAKE 260 - tristate 261 - select SND_SOC_SOF_HDA_COMMON 262 - select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 263 - help 264 - This option is not user-selectable but automagically handled by 265 - 'select' statements at a higher level 266 - 267 235 config SND_SOC_SOF_HDA_COMMON 268 236 tristate 269 - select SND_INTEL_DSP_CONFIG 270 237 select SND_SOC_SOF_INTEL_COMMON 238 + select SND_SOC_SOF_PCI_DEV 239 + select SND_INTEL_DSP_CONFIG 271 240 select SND_SOC_SOF_HDA_LINK_BASELINE 272 241 help 273 242 This option is not user-selectable but automagically handled by ··· 276 353 This option is not user-selectable but automagically handled by 277 354 'select' statements at a higher level. 278 355 279 - config SND_SOC_SOF_INTEL_SOUNDWIRE_LINK 280 - bool "SOF support for SoundWire" 281 - depends on ACPI 356 + config SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 357 + tristate 358 + 359 + config SND_SOC_SOF_INTEL_SOUNDWIRE 360 + tristate "SOF support for SoundWire" 361 + default SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 362 + depends on SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 363 + depends on ACPI && SOUNDWIRE 364 + depends on !(SOUNDWIRE=m && SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=y) 365 + select SOUNDWIRE_INTEL 366 + select SND_INTEL_SOUNDWIRE_ACPI 282 367 help 283 368 This adds support for SoundWire with Sound Open Firmware 284 369 for Intel(R) platforms. 285 370 Say Y if you want to enable SoundWire links with SOF. 286 371 If unsure select "N". 287 - 288 - config SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE 289 - tristate 290 - select SND_SOC_SOF_INTEL_SOUNDWIRE if SND_SOC_SOF_INTEL_SOUNDWIRE_LINK 291 - help 292 - This option is not user-selectable but automagically handled by 293 - 'select' statements at a higher level. 294 - 295 - config SND_SOC_SOF_INTEL_SOUNDWIRE 296 - tristate 297 - select SOUNDWIRE 298 - select SOUNDWIRE_INTEL 299 - help 300 - This option is not user-selectable but automagically handled by 301 - 'select' statements at a higher level. 302 372 303 373 endif ## SND_SOC_SOF_INTEL_PCI 304 374
+16 -4
sound/soc/sof/intel/Makefile
··· 1 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 2 3 - snd-sof-intel-byt-objs := byt.o 4 - snd-sof-intel-bdw-objs := bdw.o 3 + snd-sof-acpi-intel-byt-objs := byt.o 4 + snd-sof-acpi-intel-bdw-objs := bdw.o 5 5 6 6 snd-sof-intel-ipc-objs := intel-ipc.o 7 7 ··· 13 13 14 14 snd-sof-intel-hda-objs := hda-codec.o 15 15 16 - obj-$(CONFIG_SND_SOC_SOF_INTEL_ATOM_HIFI_EP) += snd-sof-intel-byt.o 17 - obj-$(CONFIG_SND_SOC_SOF_BROADWELL) += snd-sof-intel-bdw.o 16 + obj-$(CONFIG_SND_SOC_SOF_INTEL_ATOM_HIFI_EP) += snd-sof-acpi-intel-byt.o 17 + obj-$(CONFIG_SND_SOC_SOF_BROADWELL) += snd-sof-acpi-intel-bdw.o 18 18 obj-$(CONFIG_SND_SOC_SOF_INTEL_HIFI_EP_IPC) += snd-sof-intel-ipc.o 19 19 obj-$(CONFIG_SND_SOC_SOF_HDA_COMMON) += snd-sof-intel-hda-common.o 20 20 obj-$(CONFIG_SND_SOC_SOF_HDA) += snd-sof-intel-hda.o 21 + 22 + snd-sof-pci-intel-tng-objs := pci-tng.o 23 + snd-sof-pci-intel-apl-objs := pci-apl.o 24 + snd-sof-pci-intel-cnl-objs := pci-cnl.o 25 + snd-sof-pci-intel-icl-objs := pci-icl.o 26 + snd-sof-pci-intel-tgl-objs := pci-tgl.o 27 + 28 + obj-$(CONFIG_SND_SOC_SOF_MERRIFIELD) += snd-sof-pci-intel-tng.o 29 + obj-$(CONFIG_SND_SOC_SOF_INTEL_APL) += snd-sof-pci-intel-apl.o 30 + obj-$(CONFIG_SND_SOC_SOF_INTEL_CNL) += snd-sof-pci-intel-cnl.o 31 + obj-$(CONFIG_SND_SOC_SOF_INTEL_ICL) += snd-sof-pci-intel-icl.o 32 + obj-$(CONFIG_SND_SOC_SOF_INTEL_TGL) += snd-sof-pci-intel-tgl.o
+63 -4
sound/soc/sof/intel/bdw.c
··· 15 15 #include <linux/module.h> 16 16 #include <sound/sof.h> 17 17 #include <sound/sof/xtensa.h> 18 + #include <sound/soc-acpi.h> 19 + #include <sound/soc-acpi-intel-match.h> 20 + #include <sound/intel-dsp-config.h> 18 21 #include "../ops.h" 19 22 #include "shim.h" 23 + #include "../sof-acpi-dev.h" 20 24 #include "../sof-audio.h" 21 25 22 26 /* BARs */ ··· 594 590 }; 595 591 596 592 /* broadwell ops */ 597 - const struct snd_sof_dsp_ops sof_bdw_ops = { 593 + static const struct snd_sof_dsp_ops sof_bdw_ops = { 598 594 /*Device init */ 599 595 .probe = bdw_probe, 600 596 ··· 655 651 656 652 .arch_ops = &sof_xtensa_arch_ops, 657 653 }; 658 - EXPORT_SYMBOL_NS(sof_bdw_ops, SND_SOC_SOF_BROADWELL); 659 654 660 - const struct sof_intel_dsp_desc bdw_chip_info = { 655 + static const struct sof_intel_dsp_desc bdw_chip_info = { 661 656 .cores_num = 1, 662 657 .host_managed_cores_mask = 1, 663 658 }; 664 - EXPORT_SYMBOL_NS(bdw_chip_info, SND_SOC_SOF_BROADWELL); 659 + 660 + static const struct sof_dev_desc sof_acpi_broadwell_desc = { 661 + .machines = snd_soc_acpi_intel_broadwell_machines, 662 + .resindex_lpe_base = 0, 663 + .resindex_pcicfg_base = 1, 664 + .resindex_imr_base = -1, 665 + .irqindex_host_ipc = 0, 666 + .chip_info = &bdw_chip_info, 667 + .default_fw_path = "intel/sof", 668 + .default_tplg_path = "intel/sof-tplg", 669 + .default_fw_filename = "sof-bdw.ri", 670 + .nocodec_tplg_filename = "sof-bdw-nocodec.tplg", 671 + .ops = &sof_bdw_ops, 672 + }; 673 + 674 + static const struct acpi_device_id sof_broadwell_match[] = { 675 + { "INT3438", (unsigned long)&sof_acpi_broadwell_desc }, 676 + { } 677 + }; 678 + MODULE_DEVICE_TABLE(acpi, sof_broadwell_match); 679 + 680 + static int sof_broadwell_probe(struct platform_device *pdev) 681 + { 682 + struct device *dev = &pdev->dev; 683 + const struct acpi_device_id *id; 684 + const struct sof_dev_desc *desc; 685 + int ret; 686 + 687 + id = acpi_match_device(dev->driver->acpi_match_table, dev); 688 + if (!id) 689 + return -ENODEV; 690 + 691 + ret = snd_intel_acpi_dsp_driver_probe(dev, id->id); 692 + if (ret != SND_INTEL_DSP_DRIVER_ANY && ret != SND_INTEL_DSP_DRIVER_SOF) { 693 + dev_dbg(dev, "SOF ACPI driver not selected, aborting probe\n"); 694 + return -ENODEV; 695 + } 696 + 697 + desc = device_get_match_data(dev); 698 + if (!desc) 699 + return -ENODEV; 700 + 701 + return sof_acpi_probe(pdev, device_get_match_data(dev)); 702 + } 703 + 704 + /* acpi_driver definition */ 705 + static struct platform_driver snd_sof_acpi_intel_bdw_driver = { 706 + .probe = sof_broadwell_probe, 707 + .remove = sof_acpi_remove, 708 + .driver = { 709 + .name = "sof-audio-acpi-intel-bdw", 710 + .pm = &sof_acpi_pm, 711 + .acpi_match_table = sof_broadwell_match, 712 + }, 713 + }; 714 + module_platform_driver(snd_sof_acpi_intel_bdw_driver); 665 715 666 716 MODULE_LICENSE("Dual BSD/GPL"); 667 717 MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HIFI_EP_IPC); 668 718 MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA); 719 + MODULE_IMPORT_NS(SND_SOC_SOF_ACPI_DEV);
+98 -8
sound/soc/sof/intel/byt.c
··· 15 15 #include <linux/module.h> 16 16 #include <sound/sof.h> 17 17 #include <sound/sof/xtensa.h> 18 + #include <sound/soc-acpi.h> 19 + #include <sound/soc-acpi-intel-match.h> 20 + #include <sound/intel-dsp-config.h> 18 21 #include "../ops.h" 19 22 #include "shim.h" 23 + #include "../sof-acpi-dev.h" 20 24 #include "../sof-audio.h" 21 25 #include "../../intel/common/soc-intel-quirks.h" 22 26 ··· 826 822 } 827 823 828 824 /* baytrail ops */ 829 - const struct snd_sof_dsp_ops sof_byt_ops = { 825 + static const struct snd_sof_dsp_ops sof_byt_ops = { 830 826 /* device init */ 831 827 .probe = byt_acpi_probe, 832 828 .remove = byt_remove, ··· 896 892 897 893 .arch_ops = &sof_xtensa_arch_ops, 898 894 }; 899 - EXPORT_SYMBOL_NS(sof_byt_ops, SND_SOC_SOF_BAYTRAIL); 900 895 901 - const struct sof_intel_dsp_desc byt_chip_info = { 896 + static const struct sof_intel_dsp_desc byt_chip_info = { 902 897 .cores_num = 1, 903 898 .host_managed_cores_mask = 1, 904 899 }; 905 - EXPORT_SYMBOL_NS(byt_chip_info, SND_SOC_SOF_BAYTRAIL); 906 900 907 901 /* cherrytrail and braswell ops */ 908 - const struct snd_sof_dsp_ops sof_cht_ops = { 902 + static const struct snd_sof_dsp_ops sof_cht_ops = { 909 903 /* device init */ 910 904 .probe = byt_acpi_probe, 911 905 .remove = byt_remove, ··· 974 972 975 973 .arch_ops = &sof_xtensa_arch_ops, 976 974 }; 977 - EXPORT_SYMBOL_NS(sof_cht_ops, SND_SOC_SOF_BAYTRAIL); 978 975 979 - const struct sof_intel_dsp_desc cht_chip_info = { 976 + static const struct sof_intel_dsp_desc cht_chip_info = { 980 977 .cores_num = 1, 981 978 .host_managed_cores_mask = 1, 982 979 }; 983 - EXPORT_SYMBOL_NS(cht_chip_info, SND_SOC_SOF_BAYTRAIL); 980 + 981 + /* BYTCR uses different IRQ index */ 982 + static const struct sof_dev_desc sof_acpi_baytrailcr_desc = { 983 + .machines = snd_soc_acpi_intel_baytrail_machines, 984 + .resindex_lpe_base = 0, 985 + .resindex_pcicfg_base = 1, 986 + .resindex_imr_base = 2, 987 + .irqindex_host_ipc = 0, 988 + .chip_info = &byt_chip_info, 989 + .default_fw_path = "intel/sof", 990 + .default_tplg_path = "intel/sof-tplg", 991 + .default_fw_filename = "sof-byt.ri", 992 + .nocodec_tplg_filename = "sof-byt-nocodec.tplg", 993 + .ops = &sof_byt_ops, 994 + }; 995 + 996 + static const struct sof_dev_desc sof_acpi_baytrail_desc = { 997 + .machines = snd_soc_acpi_intel_baytrail_machines, 998 + .resindex_lpe_base = 0, 999 + .resindex_pcicfg_base = 1, 1000 + .resindex_imr_base = 2, 1001 + .irqindex_host_ipc = 5, 1002 + .chip_info = &byt_chip_info, 1003 + .default_fw_path = "intel/sof", 1004 + .default_tplg_path = "intel/sof-tplg", 1005 + .default_fw_filename = "sof-byt.ri", 1006 + .nocodec_tplg_filename = "sof-byt-nocodec.tplg", 1007 + .ops = &sof_byt_ops, 1008 + }; 1009 + 1010 + static const struct sof_dev_desc sof_acpi_cherrytrail_desc = { 1011 + .machines = snd_soc_acpi_intel_cherrytrail_machines, 1012 + .resindex_lpe_base = 0, 1013 + .resindex_pcicfg_base = 1, 1014 + .resindex_imr_base = 2, 1015 + .irqindex_host_ipc = 5, 1016 + .chip_info = &cht_chip_info, 1017 + .default_fw_path = "intel/sof", 1018 + .default_tplg_path = "intel/sof-tplg", 1019 + .default_fw_filename = "sof-cht.ri", 1020 + .nocodec_tplg_filename = "sof-cht-nocodec.tplg", 1021 + .ops = &sof_cht_ops, 1022 + }; 1023 + 1024 + static const struct acpi_device_id sof_baytrail_match[] = { 1025 + { "80860F28", (unsigned long)&sof_acpi_baytrail_desc }, 1026 + { "808622A8", (unsigned long)&sof_acpi_cherrytrail_desc }, 1027 + { } 1028 + }; 1029 + MODULE_DEVICE_TABLE(acpi, sof_baytrail_match); 1030 + 1031 + static int sof_baytrail_probe(struct platform_device *pdev) 1032 + { 1033 + struct device *dev = &pdev->dev; 1034 + const struct sof_dev_desc *desc; 1035 + const struct acpi_device_id *id; 1036 + int ret; 1037 + 1038 + id = acpi_match_device(dev->driver->acpi_match_table, dev); 1039 + if (!id) 1040 + return -ENODEV; 1041 + 1042 + ret = snd_intel_acpi_dsp_driver_probe(dev, id->id); 1043 + if (ret != SND_INTEL_DSP_DRIVER_ANY && ret != SND_INTEL_DSP_DRIVER_SOF) { 1044 + dev_dbg(dev, "SOF ACPI driver not selected, aborting probe\n"); 1045 + return -ENODEV; 1046 + } 1047 + 1048 + desc = device_get_match_data(&pdev->dev); 1049 + if (!desc) 1050 + return -ENODEV; 1051 + 1052 + if (desc == &sof_acpi_baytrail_desc && soc_intel_is_byt_cr(pdev)) 1053 + desc = &sof_acpi_baytrailcr_desc; 1054 + 1055 + return sof_acpi_probe(pdev, desc); 1056 + } 1057 + 1058 + /* acpi_driver definition */ 1059 + static struct platform_driver snd_sof_acpi_intel_byt_driver = { 1060 + .probe = sof_baytrail_probe, 1061 + .remove = sof_acpi_remove, 1062 + .driver = { 1063 + .name = "sof-audio-acpi-intel-byt", 1064 + .pm = &sof_acpi_pm, 1065 + .acpi_match_table = sof_baytrail_match, 1066 + }, 1067 + }; 1068 + module_platform_driver(snd_sof_acpi_intel_byt_driver); 984 1069 985 1070 #endif /* CONFIG_SND_SOC_SOF_BAYTRAIL */ 986 1071 987 1072 MODULE_LICENSE("Dual BSD/GPL"); 988 1073 MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HIFI_EP_IPC); 989 1074 MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA); 1075 + MODULE_IMPORT_NS(SND_SOC_SOF_ACPI_DEV);
+18
sound/soc/sof/intel/hda.c
··· 22 22 #include <linux/module.h> 23 23 #include <linux/soundwire/sdw.h> 24 24 #include <linux/soundwire/sdw_intel.h> 25 + #include <sound/intel-dsp-config.h> 25 26 #include <sound/intel-nhlt.h> 26 27 #include <sound/sof.h> 27 28 #include <sound/sof/xtensa.h> 28 29 #include "../sof-audio.h" 30 + #include "../sof-pci-dev.h" 29 31 #include "../ops.h" 30 32 #include "hda.h" 31 33 ··· 1260 1258 dev_warn(sdev->dev, "warning: No matching ASoC machine driver found\n"); 1261 1259 } 1262 1260 1261 + int hda_pci_intel_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) 1262 + { 1263 + int ret; 1264 + 1265 + ret = snd_intel_dsp_driver_probe(pci); 1266 + if (ret != SND_INTEL_DSP_DRIVER_ANY && ret != SND_INTEL_DSP_DRIVER_SOF) { 1267 + dev_dbg(&pci->dev, "SOF PCI driver not selected, aborting probe\n"); 1268 + return -ENODEV; 1269 + } 1270 + 1271 + return sof_pci_probe(pci, pci_id); 1272 + } 1273 + EXPORT_SYMBOL_NS(hda_pci_intel_probe, SND_SOC_SOF_INTEL_HDA_COMMON); 1274 + 1263 1275 MODULE_LICENSE("Dual BSD/GPL"); 1276 + MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV); 1264 1277 MODULE_IMPORT_NS(SND_SOC_SOF_HDA_AUDIO_CODEC); 1265 1278 MODULE_IMPORT_NS(SND_SOC_SOF_HDA_AUDIO_CODEC_I915); 1266 1279 MODULE_IMPORT_NS(SND_SOC_SOF_XTENSA); 1280 + MODULE_IMPORT_NS(SND_INTEL_SOUNDWIRE_ACPI); 1267 1281 MODULE_IMPORT_NS(SOUNDWIRE_INTEL_INIT);
+3
sound/soc/sof/intel/hda.h
··· 764 764 void hda_set_mach_params(const struct snd_soc_acpi_mach *mach, 765 765 struct device *dev); 766 766 767 + /* PCI driver selection and probe */ 768 + int hda_pci_intel_probe(struct pci_dev *pci, const struct pci_device_id *pci_id); 769 + 767 770 #endif
+81
sound/soc/sof/intel/pci-apl.c
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 + // 3 + // This file is provided under a dual BSD/GPLv2 license. When using or 4 + // redistributing this file, you may do so under either license. 5 + // 6 + // Copyright(c) 2018-2021 Intel Corporation. All rights reserved. 7 + // 8 + // Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> 9 + // 10 + 11 + #include <linux/module.h> 12 + #include <linux/pci.h> 13 + #include <sound/soc-acpi.h> 14 + #include <sound/soc-acpi-intel-match.h> 15 + #include <sound/sof.h> 16 + #include "../ops.h" 17 + #include "../sof-pci-dev.h" 18 + 19 + /* platform specific devices */ 20 + #include "hda.h" 21 + 22 + static const struct sof_dev_desc bxt_desc = { 23 + .machines = snd_soc_acpi_intel_bxt_machines, 24 + .use_acpi_target_states = true, 25 + .resindex_lpe_base = 0, 26 + .resindex_pcicfg_base = -1, 27 + .resindex_imr_base = -1, 28 + .irqindex_host_ipc = -1, 29 + .resindex_dma_base = -1, 30 + .chip_info = &apl_chip_info, 31 + .default_fw_path = "intel/sof", 32 + .default_tplg_path = "intel/sof-tplg", 33 + .default_fw_filename = "sof-apl.ri", 34 + .nocodec_tplg_filename = "sof-apl-nocodec.tplg", 35 + .ops = &sof_apl_ops, 36 + }; 37 + 38 + static const struct sof_dev_desc glk_desc = { 39 + .machines = snd_soc_acpi_intel_glk_machines, 40 + .use_acpi_target_states = true, 41 + .resindex_lpe_base = 0, 42 + .resindex_pcicfg_base = -1, 43 + .resindex_imr_base = -1, 44 + .irqindex_host_ipc = -1, 45 + .resindex_dma_base = -1, 46 + .chip_info = &apl_chip_info, 47 + .default_fw_path = "intel/sof", 48 + .default_tplg_path = "intel/sof-tplg", 49 + .default_fw_filename = "sof-glk.ri", 50 + .nocodec_tplg_filename = "sof-glk-nocodec.tplg", 51 + .ops = &sof_apl_ops, 52 + }; 53 + 54 + /* PCI IDs */ 55 + static const struct pci_device_id sof_pci_ids[] = { 56 + { PCI_DEVICE(0x8086, 0x5a98), /* BXT-P (ApolloLake) */ 57 + .driver_data = (unsigned long)&bxt_desc}, 58 + { PCI_DEVICE(0x8086, 0x1a98),/* BXT-T */ 59 + .driver_data = (unsigned long)&bxt_desc}, 60 + { PCI_DEVICE(0x8086, 0x3198), /* GeminiLake */ 61 + .driver_data = (unsigned long)&glk_desc}, 62 + { 0, } 63 + }; 64 + MODULE_DEVICE_TABLE(pci, sof_pci_ids); 65 + 66 + /* pci_driver definition */ 67 + static struct pci_driver snd_sof_pci_intel_apl_driver = { 68 + .name = "sof-audio-pci-intel-apl", 69 + .id_table = sof_pci_ids, 70 + .probe = hda_pci_intel_probe, 71 + .remove = sof_pci_remove, 72 + .shutdown = sof_pci_shutdown, 73 + .driver = { 74 + .pm = &sof_pci_pm, 75 + }, 76 + }; 77 + module_pci_driver(snd_sof_pci_intel_apl_driver); 78 + 79 + MODULE_LICENSE("Dual BSD/GPL"); 80 + MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON); 81 + MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+104
sound/soc/sof/intel/pci-cnl.c
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 + // 3 + // This file is provided under a dual BSD/GPLv2 license. When using or 4 + // redistributing this file, you may do so under either license. 5 + // 6 + // Copyright(c) 2018 Intel Corporation. All rights reserved. 7 + // 8 + // Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> 9 + // 10 + 11 + #include <linux/module.h> 12 + #include <linux/pci.h> 13 + #include <sound/soc-acpi.h> 14 + #include <sound/soc-acpi-intel-match.h> 15 + #include <sound/sof.h> 16 + #include "../ops.h" 17 + #include "../sof-pci-dev.h" 18 + 19 + /* platform specific devices */ 20 + #include "hda.h" 21 + 22 + static const struct sof_dev_desc cnl_desc = { 23 + .machines = snd_soc_acpi_intel_cnl_machines, 24 + .alt_machines = snd_soc_acpi_intel_cnl_sdw_machines, 25 + .use_acpi_target_states = true, 26 + .resindex_lpe_base = 0, 27 + .resindex_pcicfg_base = -1, 28 + .resindex_imr_base = -1, 29 + .irqindex_host_ipc = -1, 30 + .resindex_dma_base = -1, 31 + .chip_info = &cnl_chip_info, 32 + .default_fw_path = "intel/sof", 33 + .default_tplg_path = "intel/sof-tplg", 34 + .default_fw_filename = "sof-cnl.ri", 35 + .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", 36 + .ops = &sof_cnl_ops, 37 + }; 38 + 39 + static const struct sof_dev_desc cfl_desc = { 40 + .machines = snd_soc_acpi_intel_cfl_machines, 41 + .alt_machines = snd_soc_acpi_intel_cfl_sdw_machines, 42 + .use_acpi_target_states = true, 43 + .resindex_lpe_base = 0, 44 + .resindex_pcicfg_base = -1, 45 + .resindex_imr_base = -1, 46 + .irqindex_host_ipc = -1, 47 + .resindex_dma_base = -1, 48 + .chip_info = &cnl_chip_info, 49 + .default_fw_path = "intel/sof", 50 + .default_tplg_path = "intel/sof-tplg", 51 + .default_fw_filename = "sof-cfl.ri", 52 + .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", 53 + .ops = &sof_cnl_ops, 54 + }; 55 + 56 + static const struct sof_dev_desc cml_desc = { 57 + .machines = snd_soc_acpi_intel_cml_machines, 58 + .alt_machines = snd_soc_acpi_intel_cml_sdw_machines, 59 + .use_acpi_target_states = true, 60 + .resindex_lpe_base = 0, 61 + .resindex_pcicfg_base = -1, 62 + .resindex_imr_base = -1, 63 + .irqindex_host_ipc = -1, 64 + .resindex_dma_base = -1, 65 + .chip_info = &cnl_chip_info, 66 + .default_fw_path = "intel/sof", 67 + .default_tplg_path = "intel/sof-tplg", 68 + .default_fw_filename = "sof-cml.ri", 69 + .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", 70 + .ops = &sof_cnl_ops, 71 + }; 72 + 73 + /* PCI IDs */ 74 + static const struct pci_device_id sof_pci_ids[] = { 75 + { PCI_DEVICE(0x8086, 0x9dc8), /* CNL-LP */ 76 + .driver_data = (unsigned long)&cnl_desc}, 77 + { PCI_DEVICE(0x8086, 0xa348), /* CNL-H */ 78 + .driver_data = (unsigned long)&cfl_desc}, 79 + { PCI_DEVICE(0x8086, 0x02c8), /* CML-LP */ 80 + .driver_data = (unsigned long)&cml_desc}, 81 + { PCI_DEVICE(0x8086, 0x06c8), /* CML-H */ 82 + .driver_data = (unsigned long)&cml_desc}, 83 + { PCI_DEVICE(0x8086, 0xa3f0), /* CML-S */ 84 + .driver_data = (unsigned long)&cml_desc}, 85 + { 0, } 86 + }; 87 + MODULE_DEVICE_TABLE(pci, sof_pci_ids); 88 + 89 + /* pci_driver definition */ 90 + static struct pci_driver snd_sof_pci_intel_cnl_driver = { 91 + .name = "sof-audio-pci-intel-cnl", 92 + .id_table = sof_pci_ids, 93 + .probe = hda_pci_intel_probe, 94 + .remove = sof_pci_remove, 95 + .shutdown = sof_pci_shutdown, 96 + .driver = { 97 + .pm = &sof_pci_pm, 98 + }, 99 + }; 100 + module_pci_driver(snd_sof_pci_intel_cnl_driver); 101 + 102 + MODULE_LICENSE("Dual BSD/GPL"); 103 + MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON); 104 + MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+84
sound/soc/sof/intel/pci-icl.c
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 + // 3 + // This file is provided under a dual BSD/GPLv2 license. When using or 4 + // redistributing this file, you may do so under either license. 5 + // 6 + // Copyright(c) 2018-2021 Intel Corporation. All rights reserved. 7 + // 8 + // Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> 9 + // 10 + 11 + #include <linux/module.h> 12 + #include <linux/pci.h> 13 + #include <sound/soc-acpi.h> 14 + #include <sound/soc-acpi-intel-match.h> 15 + #include <sound/sof.h> 16 + #include "../ops.h" 17 + #include "../sof-pci-dev.h" 18 + 19 + /* platform specific devices */ 20 + #include "hda.h" 21 + 22 + static const struct sof_dev_desc icl_desc = { 23 + .machines = snd_soc_acpi_intel_icl_machines, 24 + .alt_machines = snd_soc_acpi_intel_icl_sdw_machines, 25 + .use_acpi_target_states = true, 26 + .resindex_lpe_base = 0, 27 + .resindex_pcicfg_base = -1, 28 + .resindex_imr_base = -1, 29 + .irqindex_host_ipc = -1, 30 + .resindex_dma_base = -1, 31 + .chip_info = &icl_chip_info, 32 + .default_fw_path = "intel/sof", 33 + .default_tplg_path = "intel/sof-tplg", 34 + .default_fw_filename = "sof-icl.ri", 35 + .nocodec_tplg_filename = "sof-icl-nocodec.tplg", 36 + .ops = &sof_icl_ops, 37 + }; 38 + 39 + static const struct sof_dev_desc jsl_desc = { 40 + .machines = snd_soc_acpi_intel_jsl_machines, 41 + .use_acpi_target_states = true, 42 + .resindex_lpe_base = 0, 43 + .resindex_pcicfg_base = -1, 44 + .resindex_imr_base = -1, 45 + .irqindex_host_ipc = -1, 46 + .resindex_dma_base = -1, 47 + .chip_info = &jsl_chip_info, 48 + .default_fw_path = "intel/sof", 49 + .default_tplg_path = "intel/sof-tplg", 50 + .default_fw_filename = "sof-jsl.ri", 51 + .nocodec_tplg_filename = "sof-jsl-nocodec.tplg", 52 + .ops = &sof_cnl_ops, 53 + }; 54 + 55 + /* PCI IDs */ 56 + static const struct pci_device_id sof_pci_ids[] = { 57 + { PCI_DEVICE(0x8086, 0x34C8), /* ICL-LP */ 58 + .driver_data = (unsigned long)&icl_desc}, 59 + { PCI_DEVICE(0x8086, 0x3dc8), /* ICL-H */ 60 + .driver_data = (unsigned long)&icl_desc}, 61 + { PCI_DEVICE(0x8086, 0x38c8), /* ICL-N */ 62 + .driver_data = (unsigned long)&jsl_desc}, 63 + { PCI_DEVICE(0x8086, 0x4dc8), /* JSL-N */ 64 + .driver_data = (unsigned long)&jsl_desc}, 65 + { 0, } 66 + }; 67 + MODULE_DEVICE_TABLE(pci, sof_pci_ids); 68 + 69 + /* pci_driver definition */ 70 + static struct pci_driver snd_sof_pci_intel_icl_driver = { 71 + .name = "sof-audio-pci-intel-icl", 72 + .id_table = sof_pci_ids, 73 + .probe = hda_pci_intel_probe, 74 + .remove = sof_pci_remove, 75 + .shutdown = sof_pci_shutdown, 76 + .driver = { 77 + .pm = &sof_pci_pm, 78 + }, 79 + }; 80 + module_pci_driver(snd_sof_pci_intel_icl_driver); 81 + 82 + MODULE_LICENSE("Dual BSD/GPL"); 83 + MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON); 84 + MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
+121
sound/soc/sof/intel/pci-tgl.c
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 + // 3 + // This file is provided under a dual BSD/GPLv2 license. When using or 4 + // redistributing this file, you may do so under either license. 5 + // 6 + // Copyright(c) 2018-2021 Intel Corporation. All rights reserved. 7 + // 8 + // Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> 9 + // 10 + 11 + #include <linux/module.h> 12 + #include <linux/pci.h> 13 + #include <sound/soc-acpi.h> 14 + #include <sound/soc-acpi-intel-match.h> 15 + #include <sound/sof.h> 16 + #include "../ops.h" 17 + #include "../sof-pci-dev.h" 18 + 19 + /* platform specific devices */ 20 + #include "hda.h" 21 + 22 + static const struct sof_dev_desc tgl_desc = { 23 + .machines = snd_soc_acpi_intel_tgl_machines, 24 + .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines, 25 + .use_acpi_target_states = true, 26 + .resindex_lpe_base = 0, 27 + .resindex_pcicfg_base = -1, 28 + .resindex_imr_base = -1, 29 + .irqindex_host_ipc = -1, 30 + .resindex_dma_base = -1, 31 + .chip_info = &tgl_chip_info, 32 + .default_fw_path = "intel/sof", 33 + .default_tplg_path = "intel/sof-tplg", 34 + .default_fw_filename = "sof-tgl.ri", 35 + .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", 36 + .ops = &sof_tgl_ops, 37 + }; 38 + 39 + static const struct sof_dev_desc tglh_desc = { 40 + .machines = snd_soc_acpi_intel_tgl_machines, 41 + .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines, 42 + .resindex_lpe_base = 0, 43 + .resindex_pcicfg_base = -1, 44 + .resindex_imr_base = -1, 45 + .irqindex_host_ipc = -1, 46 + .resindex_dma_base = -1, 47 + .chip_info = &tglh_chip_info, 48 + .default_fw_path = "intel/sof", 49 + .default_tplg_path = "intel/sof-tplg", 50 + .default_fw_filename = "sof-tgl-h.ri", 51 + .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", 52 + .ops = &sof_tgl_ops, 53 + }; 54 + 55 + static const struct sof_dev_desc ehl_desc = { 56 + .machines = snd_soc_acpi_intel_ehl_machines, 57 + .use_acpi_target_states = true, 58 + .resindex_lpe_base = 0, 59 + .resindex_pcicfg_base = -1, 60 + .resindex_imr_base = -1, 61 + .irqindex_host_ipc = -1, 62 + .resindex_dma_base = -1, 63 + .chip_info = &ehl_chip_info, 64 + .default_fw_path = "intel/sof", 65 + .default_tplg_path = "intel/sof-tplg", 66 + .default_fw_filename = "sof-ehl.ri", 67 + .nocodec_tplg_filename = "sof-ehl-nocodec.tplg", 68 + .ops = &sof_cnl_ops, 69 + }; 70 + 71 + static const struct sof_dev_desc adls_desc = { 72 + .machines = snd_soc_acpi_intel_adl_machines, 73 + .alt_machines = snd_soc_acpi_intel_adl_sdw_machines, 74 + .resindex_lpe_base = 0, 75 + .resindex_pcicfg_base = -1, 76 + .resindex_imr_base = -1, 77 + .irqindex_host_ipc = -1, 78 + .resindex_dma_base = -1, 79 + .chip_info = &adls_chip_info, 80 + .default_fw_path = "intel/sof", 81 + .default_tplg_path = "intel/sof-tplg", 82 + .default_fw_filename = "sof-adl-s.ri", 83 + .nocodec_tplg_filename = "sof-adl-nocodec.tplg", 84 + .ops = &sof_tgl_ops, 85 + }; 86 + 87 + /* PCI IDs */ 88 + static const struct pci_device_id sof_pci_ids[] = { 89 + { PCI_DEVICE(0x8086, 0xa0c8), /* TGL-LP */ 90 + .driver_data = (unsigned long)&tgl_desc}, 91 + { PCI_DEVICE(0x8086, 0x43c8), /* TGL-H */ 92 + .driver_data = (unsigned long)&tglh_desc}, 93 + { PCI_DEVICE(0x8086, 0x4b55), /* EHL */ 94 + .driver_data = (unsigned long)&ehl_desc}, 95 + { PCI_DEVICE(0x8086, 0x4b58), /* EHL */ 96 + .driver_data = (unsigned long)&ehl_desc}, 97 + { PCI_DEVICE(0x8086, 0x7ad0), /* ADL-S */ 98 + .driver_data = (unsigned long)&adls_desc}, 99 + { PCI_DEVICE(0x8086, 0x51c8), /* ADL-P */ 100 + .driver_data = (unsigned long)&tgl_desc}, 101 + { 0, } 102 + }; 103 + MODULE_DEVICE_TABLE(pci, sof_pci_ids); 104 + 105 + /* pci_driver definition */ 106 + static struct pci_driver snd_sof_pci_intel_tgl_driver = { 107 + .name = "sof-audio-pci-intel-tgl", 108 + .id_table = sof_pci_ids, 109 + .probe = hda_pci_intel_probe, 110 + .remove = sof_pci_remove, 111 + .shutdown = sof_pci_shutdown, 112 + .driver = { 113 + .pm = &sof_pci_pm, 114 + }, 115 + }; 116 + module_pci_driver(snd_sof_pci_intel_tgl_driver); 117 + 118 + MODULE_LICENSE("Dual BSD/GPL"); 119 + MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON); 120 + MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV); 121 +
+70
sound/soc/sof/intel/pci-tng.c
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 + // 3 + // This file is provided under a dual BSD/GPLv2 license. When using or 4 + // redistributing this file, you may do so under either license. 5 + // 6 + // Copyright(c) 2018-2021 Intel Corporation. All rights reserved. 7 + // 8 + // Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> 9 + // 10 + 11 + #include <linux/module.h> 12 + #include <linux/pci.h> 13 + #include <sound/soc-acpi.h> 14 + #include <sound/soc-acpi-intel-match.h> 15 + #include <sound/sof.h> 16 + #include "../ops.h" 17 + #include "../sof-pci-dev.h" 18 + 19 + /* platform specific devices */ 20 + #include "shim.h" 21 + 22 + static struct snd_soc_acpi_mach sof_tng_machines[] = { 23 + { 24 + .id = "INT343A", 25 + .drv_name = "edison", 26 + .sof_fw_filename = "sof-byt.ri", 27 + .sof_tplg_filename = "sof-byt.tplg", 28 + }, 29 + {} 30 + }; 31 + 32 + static const struct sof_dev_desc tng_desc = { 33 + .machines = sof_tng_machines, 34 + .resindex_lpe_base = 3, /* IRAM, but subtract IRAM offset */ 35 + .resindex_pcicfg_base = -1, 36 + .resindex_imr_base = 0, 37 + .irqindex_host_ipc = -1, 38 + .resindex_dma_base = -1, 39 + .chip_info = &tng_chip_info, 40 + .default_fw_path = "intel/sof", 41 + .default_tplg_path = "intel/sof-tplg", 42 + .default_fw_filename = "sof-byt.ri", 43 + .nocodec_tplg_filename = "sof-byt.tplg", 44 + .ops = &sof_tng_ops, 45 + }; 46 + 47 + /* PCI IDs */ 48 + static const struct pci_device_id sof_pci_ids[] = { 49 + { PCI_DEVICE(0x8086, 0x119a), 50 + .driver_data = (unsigned long)&tng_desc}, 51 + { 0, } 52 + }; 53 + MODULE_DEVICE_TABLE(pci, sof_pci_ids); 54 + 55 + /* pci_driver definition */ 56 + static struct pci_driver snd_sof_pci_intel_tng_driver = { 57 + .name = "sof-audio-pci-intel-tng", 58 + .id_table = sof_pci_ids, 59 + .probe = sof_pci_probe, 60 + .remove = sof_pci_remove, 61 + .shutdown = sof_pci_shutdown, 62 + .driver = { 63 + .pm = &sof_pci_pm, 64 + }, 65 + }; 66 + module_pci_driver(snd_sof_pci_intel_tng_driver); 67 + 68 + MODULE_LICENSE("Dual BSD/GPL"); 69 + MODULE_IMPORT_NS(SND_SOC_SOF_MERRIFIELD); 70 + MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
-6
sound/soc/sof/intel/shim.h
··· 167 167 }; 168 168 169 169 extern const struct snd_sof_dsp_ops sof_tng_ops; 170 - extern const struct snd_sof_dsp_ops sof_byt_ops; 171 - extern const struct snd_sof_dsp_ops sof_cht_ops; 172 - extern const struct snd_sof_dsp_ops sof_bdw_ops; 173 170 174 - extern const struct sof_intel_dsp_desc byt_chip_info; 175 - extern const struct sof_intel_dsp_desc cht_chip_info; 176 - extern const struct sof_intel_dsp_desc bdw_chip_info; 177 171 extern const struct sof_intel_dsp_desc tng_chip_info; 178 172 179 173 struct sof_intel_stream {
+11 -119
sound/soc/sof/sof-acpi-dev.c
··· 12 12 #include <linux/firmware.h> 13 13 #include <linux/module.h> 14 14 #include <linux/pm_runtime.h> 15 - #include <sound/intel-dsp-config.h> 16 15 #include <sound/soc-acpi.h> 17 16 #include <sound/soc-acpi-intel-match.h> 18 17 #include <sound/sof.h> 19 18 #include "../intel/common/soc-intel-quirks.h" 20 19 #include "ops.h" 20 + #include "sof-acpi-dev.h" 21 21 22 22 /* platform specific devices */ 23 23 #include "intel/shim.h" ··· 36 36 37 37 #define SOF_ACPI_DISABLE_PM_RUNTIME BIT(0) 38 38 39 - #if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL) 40 - static const struct sof_dev_desc sof_acpi_broadwell_desc = { 41 - .machines = snd_soc_acpi_intel_broadwell_machines, 42 - .resindex_lpe_base = 0, 43 - .resindex_pcicfg_base = 1, 44 - .resindex_imr_base = -1, 45 - .irqindex_host_ipc = 0, 46 - .chip_info = &bdw_chip_info, 47 - .default_fw_path = "intel/sof", 48 - .default_tplg_path = "intel/sof-tplg", 49 - .default_fw_filename = "sof-bdw.ri", 50 - .nocodec_tplg_filename = "sof-bdw-nocodec.tplg", 51 - .ops = &sof_bdw_ops, 52 - }; 53 - #endif 54 - 55 - #if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) 56 - 57 - /* BYTCR uses different IRQ index */ 58 - static const struct sof_dev_desc sof_acpi_baytrailcr_desc = { 59 - .machines = snd_soc_acpi_intel_baytrail_machines, 60 - .resindex_lpe_base = 0, 61 - .resindex_pcicfg_base = 1, 62 - .resindex_imr_base = 2, 63 - .irqindex_host_ipc = 0, 64 - .chip_info = &byt_chip_info, 65 - .default_fw_path = "intel/sof", 66 - .default_tplg_path = "intel/sof-tplg", 67 - .default_fw_filename = "sof-byt.ri", 68 - .nocodec_tplg_filename = "sof-byt-nocodec.tplg", 69 - .ops = &sof_byt_ops, 70 - }; 71 - 72 - static const struct sof_dev_desc sof_acpi_baytrail_desc = { 73 - .machines = snd_soc_acpi_intel_baytrail_machines, 74 - .resindex_lpe_base = 0, 75 - .resindex_pcicfg_base = 1, 76 - .resindex_imr_base = 2, 77 - .irqindex_host_ipc = 5, 78 - .chip_info = &byt_chip_info, 79 - .default_fw_path = "intel/sof", 80 - .default_tplg_path = "intel/sof-tplg", 81 - .default_fw_filename = "sof-byt.ri", 82 - .nocodec_tplg_filename = "sof-byt-nocodec.tplg", 83 - .ops = &sof_byt_ops, 84 - }; 85 - 86 - static const struct sof_dev_desc sof_acpi_cherrytrail_desc = { 87 - .machines = snd_soc_acpi_intel_cherrytrail_machines, 88 - .resindex_lpe_base = 0, 89 - .resindex_pcicfg_base = 1, 90 - .resindex_imr_base = 2, 91 - .irqindex_host_ipc = 5, 92 - .chip_info = &cht_chip_info, 93 - .default_fw_path = "intel/sof", 94 - .default_tplg_path = "intel/sof-tplg", 95 - .default_fw_filename = "sof-cht.ri", 96 - .nocodec_tplg_filename = "sof-cht-nocodec.tplg", 97 - .ops = &sof_cht_ops, 98 - }; 99 - 100 - #endif 101 - 102 - static const struct dev_pm_ops sof_acpi_pm = { 39 + const struct dev_pm_ops sof_acpi_pm = { 103 40 SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 104 41 SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 105 42 snd_sof_runtime_idle) 106 43 }; 44 + EXPORT_SYMBOL_NS(sof_acpi_pm, SND_SOC_SOF_ACPI_DEV); 107 45 108 46 static void sof_acpi_probe_complete(struct device *dev) 109 47 { ··· 56 118 pm_runtime_enable(dev); 57 119 } 58 120 59 - static int sof_acpi_probe(struct platform_device *pdev) 121 + int sof_acpi_probe(struct platform_device *pdev, const struct sof_dev_desc *desc) 60 122 { 61 123 struct device *dev = &pdev->dev; 62 - const struct acpi_device_id *id; 63 - const struct sof_dev_desc *desc; 64 124 struct snd_sof_pdata *sof_pdata; 65 125 const struct snd_sof_dsp_ops *ops; 66 126 int ret; 67 127 68 - id = acpi_match_device(dev->driver->acpi_match_table, dev); 69 - if (!id) 70 - return -ENODEV; 71 - 72 - if (IS_REACHABLE(CONFIG_SND_INTEL_DSP_CONFIG)) { 73 - ret = snd_intel_acpi_dsp_driver_probe(dev, id->id); 74 - if (ret != SND_INTEL_DSP_DRIVER_ANY && ret != SND_INTEL_DSP_DRIVER_SOF) { 75 - dev_dbg(dev, "SOF ACPI driver not selected, aborting probe\n"); 76 - return -ENODEV; 77 - } 78 - } 79 128 dev_dbg(dev, "ACPI DSP detected"); 80 129 81 130 sof_pdata = devm_kzalloc(dev, sizeof(*sof_pdata), GFP_KERNEL); 82 131 if (!sof_pdata) 83 132 return -ENOMEM; 84 - 85 - desc = device_get_match_data(dev); 86 - if (!desc) 87 - return -ENODEV; 88 - 89 - #if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) 90 - if (desc == &sof_acpi_baytrail_desc && soc_intel_is_byt_cr(pdev)) 91 - desc = &sof_acpi_baytrailcr_desc; 92 - #endif 93 133 94 134 /* get ops for platform */ 95 135 ops = desc->ops; ··· 110 194 111 195 return ret; 112 196 } 197 + EXPORT_SYMBOL_NS(sof_acpi_probe, SND_SOC_SOF_ACPI_DEV); 113 198 114 - static int sof_acpi_remove(struct platform_device *pdev) 199 + int sof_acpi_remove(struct platform_device *pdev) 115 200 { 201 + struct device *dev = &pdev->dev; 202 + 116 203 if (!(sof_acpi_debug & SOF_ACPI_DISABLE_PM_RUNTIME)) 117 - pm_runtime_disable(&pdev->dev); 204 + pm_runtime_disable(dev); 118 205 119 206 /* call sof helper for DSP hardware remove */ 120 - snd_sof_device_remove(&pdev->dev); 207 + snd_sof_device_remove(dev); 121 208 122 209 return 0; 123 210 } 124 - 125 - #ifdef CONFIG_ACPI 126 - static const struct acpi_device_id sof_acpi_match[] = { 127 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL) 128 - { "INT3438", (unsigned long)&sof_acpi_broadwell_desc }, 129 - #endif 130 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) 131 - { "80860F28", (unsigned long)&sof_acpi_baytrail_desc }, 132 - { "808622A8", (unsigned long)&sof_acpi_cherrytrail_desc }, 133 - #endif 134 - { } 135 - }; 136 - MODULE_DEVICE_TABLE(acpi, sof_acpi_match); 137 - #endif 138 - 139 - /* acpi_driver definition */ 140 - static struct platform_driver snd_sof_acpi_driver = { 141 - .probe = sof_acpi_probe, 142 - .remove = sof_acpi_remove, 143 - .driver = { 144 - .name = "sof-audio-acpi", 145 - .pm = &sof_acpi_pm, 146 - .acpi_match_table = ACPI_PTR(sof_acpi_match), 147 - }, 148 - }; 149 - module_platform_driver(snd_sof_acpi_driver); 211 + EXPORT_SYMBOL_NS(sof_acpi_remove, SND_SOC_SOF_ACPI_DEV); 150 212 151 213 MODULE_LICENSE("Dual BSD/GPL"); 152 - MODULE_IMPORT_NS(SND_SOC_SOF_BAYTRAIL); 153 - MODULE_IMPORT_NS(SND_SOC_SOF_BROADWELL);
+16
sound/soc/sof/sof-acpi-dev.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 2 + /* 3 + * This file is provided under a dual BSD/GPLv2 license. When using or 4 + * redistributing this file, you may do so under either license. 5 + * 6 + * Copyright(c) 2021 Intel Corporation. All rights reserved. 7 + */ 8 + 9 + #ifndef __SOUND_SOC_SOF_ACPI_H 10 + #define __SOUND_SOC_SOF_ACPI_H 11 + 12 + extern const struct dev_pm_ops sof_acpi_pm; 13 + int sof_acpi_probe(struct platform_device *pdev, const struct sof_dev_desc *desc); 14 + int sof_acpi_remove(struct platform_device *pdev); 15 + 16 + #endif
+9 -331
sound/soc/sof/sof-pci-dev.c
··· 13 13 #include <linux/module.h> 14 14 #include <linux/pci.h> 15 15 #include <linux/pm_runtime.h> 16 - #include <sound/intel-dsp-config.h> 17 16 #include <sound/soc-acpi.h> 18 17 #include <sound/soc-acpi-intel-match.h> 19 18 #include <sound/sof.h> 20 19 #include "ops.h" 21 - 22 - /* platform specific devices */ 23 - #include "intel/shim.h" 24 - #include "intel/hda.h" 20 + #include "sof-pci-dev.h" 25 21 26 22 static char *fw_path; 27 23 module_param(fw_path, charp, 0444); ··· 77 81 {}, 78 82 }; 79 83 80 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE) 81 - static const struct sof_dev_desc bxt_desc = { 82 - .machines = snd_soc_acpi_intel_bxt_machines, 83 - .use_acpi_target_states = true, 84 - .resindex_lpe_base = 0, 85 - .resindex_pcicfg_base = -1, 86 - .resindex_imr_base = -1, 87 - .irqindex_host_ipc = -1, 88 - .resindex_dma_base = -1, 89 - .chip_info = &apl_chip_info, 90 - .default_fw_path = "intel/sof", 91 - .default_tplg_path = "intel/sof-tplg", 92 - .default_fw_filename = "sof-apl.ri", 93 - .nocodec_tplg_filename = "sof-apl-nocodec.tplg", 94 - .ops = &sof_apl_ops, 95 - }; 96 - #endif 97 - 98 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_GEMINILAKE) 99 - static const struct sof_dev_desc glk_desc = { 100 - .machines = snd_soc_acpi_intel_glk_machines, 101 - .use_acpi_target_states = true, 102 - .resindex_lpe_base = 0, 103 - .resindex_pcicfg_base = -1, 104 - .resindex_imr_base = -1, 105 - .irqindex_host_ipc = -1, 106 - .resindex_dma_base = -1, 107 - .chip_info = &apl_chip_info, 108 - .default_fw_path = "intel/sof", 109 - .default_tplg_path = "intel/sof-tplg", 110 - .default_fw_filename = "sof-glk.ri", 111 - .nocodec_tplg_filename = "sof-glk-nocodec.tplg", 112 - .ops = &sof_apl_ops, 113 - }; 114 - #endif 115 - 116 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_MERRIFIELD) 117 - static struct snd_soc_acpi_mach sof_tng_machines[] = { 118 - { 119 - .id = "INT343A", 120 - .drv_name = "edison", 121 - .sof_fw_filename = "sof-byt.ri", 122 - .sof_tplg_filename = "sof-byt.tplg", 123 - }, 124 - {} 125 - }; 126 - 127 - static const struct sof_dev_desc tng_desc = { 128 - .machines = sof_tng_machines, 129 - .resindex_lpe_base = 3, /* IRAM, but subtract IRAM offset */ 130 - .resindex_pcicfg_base = -1, 131 - .resindex_imr_base = 0, 132 - .irqindex_host_ipc = -1, 133 - .resindex_dma_base = -1, 134 - .chip_info = &tng_chip_info, 135 - .default_fw_path = "intel/sof", 136 - .default_tplg_path = "intel/sof-tplg", 137 - .default_fw_filename = "sof-byt.ri", 138 - .nocodec_tplg_filename = "sof-byt.tplg", 139 - .ops = &sof_tng_ops, 140 - }; 141 - #endif 142 - 143 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE) 144 - static const struct sof_dev_desc cnl_desc = { 145 - .machines = snd_soc_acpi_intel_cnl_machines, 146 - .alt_machines = snd_soc_acpi_intel_cnl_sdw_machines, 147 - .use_acpi_target_states = true, 148 - .resindex_lpe_base = 0, 149 - .resindex_pcicfg_base = -1, 150 - .resindex_imr_base = -1, 151 - .irqindex_host_ipc = -1, 152 - .resindex_dma_base = -1, 153 - .chip_info = &cnl_chip_info, 154 - .default_fw_path = "intel/sof", 155 - .default_tplg_path = "intel/sof-tplg", 156 - .default_fw_filename = "sof-cnl.ri", 157 - .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", 158 - .ops = &sof_cnl_ops, 159 - }; 160 - #endif 161 - 162 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE) 163 - static const struct sof_dev_desc cfl_desc = { 164 - .machines = snd_soc_acpi_intel_cfl_machines, 165 - .alt_machines = snd_soc_acpi_intel_cfl_sdw_machines, 166 - .use_acpi_target_states = true, 167 - .resindex_lpe_base = 0, 168 - .resindex_pcicfg_base = -1, 169 - .resindex_imr_base = -1, 170 - .irqindex_host_ipc = -1, 171 - .resindex_dma_base = -1, 172 - .chip_info = &cnl_chip_info, 173 - .default_fw_path = "intel/sof", 174 - .default_tplg_path = "intel/sof-tplg", 175 - .default_fw_filename = "sof-cfl.ri", 176 - .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", 177 - .ops = &sof_cnl_ops, 178 - }; 179 - #endif 180 - 181 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE) 182 - static const struct sof_dev_desc cml_desc = { 183 - .machines = snd_soc_acpi_intel_cml_machines, 184 - .alt_machines = snd_soc_acpi_intel_cml_sdw_machines, 185 - .use_acpi_target_states = true, 186 - .resindex_lpe_base = 0, 187 - .resindex_pcicfg_base = -1, 188 - .resindex_imr_base = -1, 189 - .irqindex_host_ipc = -1, 190 - .resindex_dma_base = -1, 191 - .chip_info = &cnl_chip_info, 192 - .default_fw_path = "intel/sof", 193 - .default_tplg_path = "intel/sof-tplg", 194 - .default_fw_filename = "sof-cml.ri", 195 - .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", 196 - .ops = &sof_cnl_ops, 197 - }; 198 - #endif 199 - 200 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE) 201 - static const struct sof_dev_desc icl_desc = { 202 - .machines = snd_soc_acpi_intel_icl_machines, 203 - .alt_machines = snd_soc_acpi_intel_icl_sdw_machines, 204 - .use_acpi_target_states = true, 205 - .resindex_lpe_base = 0, 206 - .resindex_pcicfg_base = -1, 207 - .resindex_imr_base = -1, 208 - .irqindex_host_ipc = -1, 209 - .resindex_dma_base = -1, 210 - .chip_info = &icl_chip_info, 211 - .default_fw_path = "intel/sof", 212 - .default_tplg_path = "intel/sof-tplg", 213 - .default_fw_filename = "sof-icl.ri", 214 - .nocodec_tplg_filename = "sof-icl-nocodec.tplg", 215 - .ops = &sof_icl_ops, 216 - }; 217 - #endif 218 - 219 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) || IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) 220 - static const struct sof_dev_desc tgl_desc = { 221 - .machines = snd_soc_acpi_intel_tgl_machines, 222 - .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines, 223 - .use_acpi_target_states = true, 224 - .resindex_lpe_base = 0, 225 - .resindex_pcicfg_base = -1, 226 - .resindex_imr_base = -1, 227 - .irqindex_host_ipc = -1, 228 - .resindex_dma_base = -1, 229 - .chip_info = &tgl_chip_info, 230 - .default_fw_path = "intel/sof", 231 - .default_tplg_path = "intel/sof-tplg", 232 - .default_fw_filename = "sof-tgl.ri", 233 - .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", 234 - .ops = &sof_tgl_ops, 235 - }; 236 - #endif 237 - 238 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) 239 - static const struct sof_dev_desc tglh_desc = { 240 - .machines = snd_soc_acpi_intel_tgl_machines, 241 - .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines, 242 - .resindex_lpe_base = 0, 243 - .resindex_pcicfg_base = -1, 244 - .resindex_imr_base = -1, 245 - .irqindex_host_ipc = -1, 246 - .resindex_dma_base = -1, 247 - .chip_info = &tglh_chip_info, 248 - .default_fw_path = "intel/sof", 249 - .default_tplg_path = "intel/sof-tplg", 250 - .default_fw_filename = "sof-tgl-h.ri", 251 - .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", 252 - .ops = &sof_tgl_ops, 253 - }; 254 - #endif 255 - 256 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_ELKHARTLAKE) 257 - static const struct sof_dev_desc ehl_desc = { 258 - .machines = snd_soc_acpi_intel_ehl_machines, 259 - .use_acpi_target_states = true, 260 - .resindex_lpe_base = 0, 261 - .resindex_pcicfg_base = -1, 262 - .resindex_imr_base = -1, 263 - .irqindex_host_ipc = -1, 264 - .resindex_dma_base = -1, 265 - .chip_info = &ehl_chip_info, 266 - .default_fw_path = "intel/sof", 267 - .default_tplg_path = "intel/sof-tplg", 268 - .default_fw_filename = "sof-ehl.ri", 269 - .nocodec_tplg_filename = "sof-ehl-nocodec.tplg", 270 - .ops = &sof_cnl_ops, 271 - }; 272 - #endif 273 - 274 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_JASPERLAKE) 275 - static const struct sof_dev_desc jsl_desc = { 276 - .machines = snd_soc_acpi_intel_jsl_machines, 277 - .use_acpi_target_states = true, 278 - .resindex_lpe_base = 0, 279 - .resindex_pcicfg_base = -1, 280 - .resindex_imr_base = -1, 281 - .irqindex_host_ipc = -1, 282 - .resindex_dma_base = -1, 283 - .chip_info = &jsl_chip_info, 284 - .default_fw_path = "intel/sof", 285 - .default_tplg_path = "intel/sof-tplg", 286 - .default_fw_filename = "sof-jsl.ri", 287 - .nocodec_tplg_filename = "sof-jsl-nocodec.tplg", 288 - .ops = &sof_cnl_ops, 289 - }; 290 - #endif 291 - 292 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) 293 - static const struct sof_dev_desc adls_desc = { 294 - .machines = snd_soc_acpi_intel_adl_machines, 295 - .alt_machines = snd_soc_acpi_intel_adl_sdw_machines, 296 - .resindex_lpe_base = 0, 297 - .resindex_pcicfg_base = -1, 298 - .resindex_imr_base = -1, 299 - .irqindex_host_ipc = -1, 300 - .resindex_dma_base = -1, 301 - .chip_info = &adls_chip_info, 302 - .default_fw_path = "intel/sof", 303 - .default_tplg_path = "intel/sof-tplg", 304 - .default_fw_filename = "sof-adl-s.ri", 305 - .nocodec_tplg_filename = "sof-adl-nocodec.tplg", 306 - .ops = &sof_tgl_ops, 307 - }; 308 - #endif 309 - 310 - static const struct dev_pm_ops sof_pci_pm = { 84 + const struct dev_pm_ops sof_pci_pm = { 311 85 .prepare = snd_sof_prepare, 312 86 .complete = snd_sof_complete, 313 87 SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 314 88 SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 315 89 snd_sof_runtime_idle) 316 90 }; 91 + EXPORT_SYMBOL_NS(sof_pci_pm, SND_SOC_SOF_PCI_DEV); 317 92 318 93 static void sof_pci_probe_complete(struct device *dev) 319 94 { ··· 110 343 pm_runtime_put_noidle(dev); 111 344 } 112 345 113 - static int sof_pci_probe(struct pci_dev *pci, 114 - const struct pci_device_id *pci_id) 346 + int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) 115 347 { 116 348 struct device *dev = &pci->dev; 117 349 const struct sof_dev_desc *desc = ··· 119 353 const struct snd_sof_dsp_ops *ops; 120 354 int ret; 121 355 122 - if (IS_REACHABLE(CONFIG_SND_INTEL_DSP_CONFIG)) { 123 - ret = snd_intel_dsp_driver_probe(pci); 124 - if (ret != SND_INTEL_DSP_DRIVER_ANY && ret != SND_INTEL_DSP_DRIVER_SOF) { 125 - dev_dbg(&pci->dev, "SOF PCI driver not selected, aborting probe\n"); 126 - return -ENODEV; 127 - } 128 - } 129 356 dev_dbg(&pci->dev, "PCI DSP detected"); 130 357 131 358 /* get ops for platform */ ··· 206 447 207 448 return ret; 208 449 } 450 + EXPORT_SYMBOL_NS(sof_pci_probe, SND_SOC_SOF_PCI_DEV); 209 451 210 - static void sof_pci_remove(struct pci_dev *pci) 452 + void sof_pci_remove(struct pci_dev *pci) 211 453 { 212 454 /* call sof helper for DSP hardware remove */ 213 455 snd_sof_device_remove(&pci->dev); ··· 221 461 /* release pci regions and disable device */ 222 462 pci_release_regions(pci); 223 463 } 464 + EXPORT_SYMBOL_NS(sof_pci_remove, SND_SOC_SOF_PCI_DEV); 224 465 225 - static void sof_pci_shutdown(struct pci_dev *pci) 466 + void sof_pci_shutdown(struct pci_dev *pci) 226 467 { 227 468 snd_sof_device_shutdown(&pci->dev); 228 469 } 229 - 230 - /* PCI IDs */ 231 - static const struct pci_device_id sof_pci_ids[] = { 232 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_MERRIFIELD) 233 - { PCI_DEVICE(0x8086, 0x119a), 234 - .driver_data = (unsigned long)&tng_desc}, 235 - #endif 236 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE) 237 - /* BXT-P & Apollolake */ 238 - { PCI_DEVICE(0x8086, 0x5a98), 239 - .driver_data = (unsigned long)&bxt_desc}, 240 - { PCI_DEVICE(0x8086, 0x1a98), 241 - .driver_data = (unsigned long)&bxt_desc}, 242 - #endif 243 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_GEMINILAKE) 244 - { PCI_DEVICE(0x8086, 0x3198), 245 - .driver_data = (unsigned long)&glk_desc}, 246 - #endif 247 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE) 248 - { PCI_DEVICE(0x8086, 0x9dc8), 249 - .driver_data = (unsigned long)&cnl_desc}, 250 - #endif 251 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE) 252 - { PCI_DEVICE(0x8086, 0xa348), 253 - .driver_data = (unsigned long)&cfl_desc}, 254 - #endif 255 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE) 256 - { PCI_DEVICE(0x8086, 0x34C8), /* ICL-LP */ 257 - .driver_data = (unsigned long)&icl_desc}, 258 - { PCI_DEVICE(0x8086, 0x3dc8), /* ICL-H */ 259 - .driver_data = (unsigned long)&icl_desc}, 260 - 261 - #endif 262 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_JASPERLAKE) 263 - { PCI_DEVICE(0x8086, 0x38c8), 264 - .driver_data = (unsigned long)&jsl_desc}, 265 - { PCI_DEVICE(0x8086, 0x4dc8), 266 - .driver_data = (unsigned long)&jsl_desc}, 267 - #endif 268 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE) 269 - { PCI_DEVICE(0x8086, 0x02c8), /* CML-LP */ 270 - .driver_data = (unsigned long)&cml_desc}, 271 - { PCI_DEVICE(0x8086, 0x06c8), /* CML-H */ 272 - .driver_data = (unsigned long)&cml_desc}, 273 - { PCI_DEVICE(0x8086, 0xa3f0), /* CML-S */ 274 - .driver_data = (unsigned long)&cml_desc}, 275 - #endif 276 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) 277 - { PCI_DEVICE(0x8086, 0xa0c8), /* TGL-LP */ 278 - .driver_data = (unsigned long)&tgl_desc}, 279 - { PCI_DEVICE(0x8086, 0x43c8), /* TGL-H */ 280 - .driver_data = (unsigned long)&tglh_desc}, 281 - 282 - #endif 283 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_ELKHARTLAKE) 284 - { PCI_DEVICE(0x8086, 0x4b55), 285 - .driver_data = (unsigned long)&ehl_desc}, 286 - { PCI_DEVICE(0x8086, 0x4b58), 287 - .driver_data = (unsigned long)&ehl_desc}, 288 - #endif 289 - #if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) 290 - { PCI_DEVICE(0x8086, 0x7ad0), 291 - .driver_data = (unsigned long)&adls_desc}, 292 - { PCI_DEVICE(0x8086, 0x51c8), 293 - .driver_data = (unsigned long)&tgl_desc}, 294 - #endif 295 - { 0, } 296 - }; 297 - MODULE_DEVICE_TABLE(pci, sof_pci_ids); 298 - 299 - /* pci_driver definition */ 300 - static struct pci_driver snd_sof_pci_driver = { 301 - .name = "sof-audio-pci", 302 - .id_table = sof_pci_ids, 303 - .probe = sof_pci_probe, 304 - .remove = sof_pci_remove, 305 - .shutdown = sof_pci_shutdown, 306 - .driver = { 307 - .pm = &sof_pci_pm, 308 - }, 309 - }; 310 - module_pci_driver(snd_sof_pci_driver); 470 + EXPORT_SYMBOL_NS(sof_pci_shutdown, SND_SOC_SOF_PCI_DEV); 311 471 312 472 MODULE_LICENSE("Dual BSD/GPL"); 313 - MODULE_IMPORT_NS(SND_SOC_SOF_MERRIFIELD); 314 - MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
+17
sound/soc/sof/sof-pci-dev.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 2 + /* 3 + * This file is provided under a dual BSD/GPLv2 license. When using or 4 + * redistributing this file, you may do so under either license. 5 + * 6 + * Copyright(c) 2021 Intel Corporation. All rights reserved. 7 + */ 8 + 9 + #ifndef __SOUND_SOC_SOF_PCI_H 10 + #define __SOUND_SOC_SOF_PCI_H 11 + 12 + extern const struct dev_pm_ops sof_pci_pm; 13 + int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id); 14 + void sof_pci_remove(struct pci_dev *pci); 15 + void sof_pci_shutdown(struct pci_dev *pci); 16 + 17 + #endif
+4 -4
sound/usb/clock.c
··· 652 652 cur_rate = prev_rate; 653 653 654 654 if (cur_rate != rate) { 655 - usb_audio_warn(chip, 656 - "%d:%d: freq mismatch (RO clock): req %d, clock runs @%d\n", 657 - fmt->iface, fmt->altsetting, rate, cur_rate); 658 - return -ENXIO; 655 + usb_audio_dbg(chip, 656 + "%d:%d: freq mismatch: req %d, clock runs @%d\n", 657 + fmt->iface, fmt->altsetting, rate, cur_rate); 658 + /* continue processing */ 659 659 } 660 660 661 661 validation:
+11
sound/usb/mixer.c
··· 1307 1307 /* totally crap, return an error */ 1308 1308 return -EINVAL; 1309 1309 } 1310 + } else { 1311 + /* if the max volume is too low, it's likely a bogus range; 1312 + * here we use -96dB as the threshold 1313 + */ 1314 + if (cval->dBmax <= -9600) { 1315 + usb_audio_info(cval->head.mixer->chip, 1316 + "%d:%d: bogus dB values (%d/%d), disabling dB reporting\n", 1317 + cval->head.id, mixer_ctrl_intf(cval->head.mixer), 1318 + cval->dBmin, cval->dBmax); 1319 + cval->dBmin = cval->dBmax = 0; 1320 + } 1310 1321 } 1311 1322 1312 1323 return 0;
+10
sound/usb/mixer_maps.c
··· 537 537 .map = bose_companion5_map, 538 538 }, 539 539 { 540 + /* Corsair Virtuoso SE (wired mode) */ 541 + .id = USB_ID(0x1b1c, 0x0a3d), 542 + .map = corsair_virtuoso_map, 543 + }, 544 + { 545 + /* Corsair Virtuoso SE (wireless mode) */ 546 + .id = USB_ID(0x1b1c, 0x0a3e), 547 + .map = corsair_virtuoso_map, 548 + }, 549 + { 540 550 /* Corsair Virtuoso (wired mode) */ 541 551 .id = USB_ID(0x1b1c, 0x0a41), 542 552 .map = corsair_virtuoso_map,
+9 -3
sound/usb/pcm.c
··· 845 845 846 846 list_for_each_entry(fp, &subs->fmt_list, list) { 847 847 ep = snd_usb_get_endpoint(chip, fp->endpoint); 848 - if (ep && ep->cur_rate) 849 - return ep; 848 + if (ep && ep->cur_audiofmt) { 849 + /* if EP is already opened solely for this substream, 850 + * we still allow us to change the parameter; otherwise 851 + * this substream has to follow the existing parameter 852 + */ 853 + if (ep->cur_audiofmt != subs->cur_audiofmt || ep->opened > 1) 854 + return ep; 855 + } 850 856 if (!fp->implicit_fb) 851 857 continue; 852 858 /* for the implicit fb, check the sync ep as well */ 853 859 ep = snd_usb_get_endpoint(chip, fp->sync_ep); 854 - if (ep && ep->cur_rate) 860 + if (ep && ep->cur_audiofmt) 855 861 return ep; 856 862 } 857 863 return NULL;
+1 -1
sound/usb/quirks.c
··· 1482 1482 usb_set_interface(subs->dev, 0, 1); 1483 1483 // we should derive windex from fmt-sync_ep but it's not set 1484 1484 snd_usb_ctl_msg(subs->stream->chip->dev, 1485 - usb_rcvctrlpipe(subs->stream->chip->dev, 0), 1485 + usb_sndctrlpipe(subs->stream->chip->dev, 0), 1486 1486 0x01, 0x22, 0x0100, windex, &sr, 0x0003); 1487 1487 return 0; 1488 1488 }