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

ASoC: SOF: Add Build support for SOF core and Intel drivers

Build SOF core and Intel-specific drivers.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Liam Girdwood and committed by
Mark Brown
7e978fa3 e6b140e9

+410
+1
sound/soc/Kconfig
··· 63 63 source "sound/soc/samsung/Kconfig" 64 64 source "sound/soc/sh/Kconfig" 65 65 source "sound/soc/sirf/Kconfig" 66 + source "sound/soc/sof/Kconfig" 66 67 source "sound/soc/spear/Kconfig" 67 68 source "sound/soc/sprd/Kconfig" 68 69 source "sound/soc/sti/Kconfig"
+1
sound/soc/Makefile
··· 47 47 obj-$(CONFIG_SND_SOC) += samsung/ 48 48 obj-$(CONFIG_SND_SOC) += sh/ 49 49 obj-$(CONFIG_SND_SOC) += sirf/ 50 + obj-$(CONFIG_SND_SOC) += sof/ 50 51 obj-$(CONFIG_SND_SOC) += spear/ 51 52 obj-$(CONFIG_SND_SOC) += sprd/ 52 53 obj-$(CONFIG_SND_SOC) += sti/
+141
sound/soc/sof/Kconfig
··· 1 + config SND_SOC_SOF_TOPLEVEL 2 + bool "Sound Open Firmware Support" 3 + help 4 + This adds support for Sound Open Firmware (SOF). SOF is a free and 5 + generic open source audio DSP firmware for multiple devices. 6 + Say Y if you have such a device that is supported by SOF. 7 + If unsure select "N". 8 + 9 + if SND_SOC_SOF_TOPLEVEL 10 + 11 + config SND_SOC_SOF_PCI 12 + tristate "SOF PCI enumeration support" 13 + depends on PCI 14 + select SND_SOC_SOF 15 + select SND_SOC_ACPI if ACPI 16 + select SND_SOC_SOF_OPTIONS 17 + select SND_SOC_SOF_INTEL_PCI if SND_SOC_SOF_INTEL_TOPLEVEL 18 + help 19 + This adds support for PCI enumeration. This option is 20 + required to enable Intel Skylake+ devices 21 + Say Y if you need this option 22 + If unsure select "N". 23 + 24 + config SND_SOC_SOF_ACPI 25 + tristate "SOF ACPI enumeration support" 26 + depends on ACPI || COMPILE_TEST 27 + select SND_SOC_SOF 28 + select SND_SOC_ACPI if ACPI 29 + select SND_SOC_SOF_OPTIONS 30 + select SND_SOC_SOF_INTEL_ACPI if SND_SOC_SOF_INTEL_TOPLEVEL 31 + select IOSF_MBI if X86 32 + help 33 + This adds support for ACPI enumeration. This option is required 34 + to enable Intel Haswell/Broadwell/Baytrail/Cherrytrail devices 35 + Say Y if you need this option 36 + If unsure select "N". 37 + 38 + config SND_SOC_SOF_OPTIONS 39 + tristate 40 + help 41 + This option is not user-selectable but automagically handled by 42 + 'select' statements at a higher level 43 + 44 + if SND_SOC_SOF_OPTIONS 45 + 46 + config SND_SOC_SOF_NOCODEC 47 + tristate "SOF nocodec mode Support" 48 + help 49 + This adds support for a dummy/nocodec machine driver fallback 50 + option if no known codec is detected. This is typically only 51 + enabled for developers or devices where the sound card is 52 + controlled externally 53 + Say Y if you need this nocodec fallback option 54 + If unsure select "N". 55 + 56 + config SND_SOC_SOF_DEBUG 57 + bool "SOF debugging features" 58 + help 59 + This option can be used to enable or disable individual SOF firmware 60 + and driver debugging options. 61 + Say Y if you are debugging SOF FW or drivers. 62 + If unsure select "N". 63 + 64 + if SND_SOC_SOF_DEBUG 65 + 66 + config SND_SOC_SOF_FORCE_NOCODEC_MODE 67 + bool "SOF force nocodec Mode" 68 + depends on SND_SOC_SOF_NOCODEC 69 + help 70 + This forces SOF to use dummy/nocodec as machine driver, even 71 + though there is a codec detected on the real platform. This is 72 + typically only enabled for developers for debug purposes, before 73 + codec/machine driver is ready, or to exclude the impact of those 74 + drivers 75 + Say Y if you need this force nocodec mode option 76 + If unsure select "N". 77 + 78 + config SND_SOC_SOF_DEBUG_XRUN_STOP 79 + bool "SOF stop on XRUN" 80 + help 81 + This option forces PCMs to stop on any XRUN event. This is useful to 82 + preserve any trace data ond pipeline status prior to the XRUN. 83 + Say Y if you are debugging SOF FW pipeline XRUNs. 84 + If unsure select "N". 85 + 86 + config SND_SOC_SOF_DEBUG_VERBOSE_IPC 87 + bool "SOF verbose IPC logs" 88 + help 89 + This option enables more verbose IPC logs, with command types in 90 + human-readable form instead of just 32-bit hex dumps. This is useful 91 + if you are trying to debug IPC with the DSP firmware. 92 + If unsure select "N". 93 + 94 + config SND_SOC_SOF_DEBUG_FORCE_IPC_POSITION 95 + bool "SOF force to use IPC for position update on SKL+" 96 + help 97 + This option force to handle stream position update IPCs and run pcm 98 + elapse to inform ALSA about that, on platforms (e.g. Intel SKL+) that 99 + with other approach (e.g. HDAC DPIB/posbuf) to elapse PCM. 100 + On platforms (e.g. Intel SKL-) where position update IPC is the only 101 + one choice, this setting won't impact anything. 102 + if you are trying to debug pointer update with position IPCs or where 103 + DPIB/posbuf is not ready, select "Y". 104 + If unsure select "N". 105 + 106 + config SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE 107 + bool "SOF enable debugfs caching" 108 + help 109 + This option enables caching of debugfs 110 + memory -> DSP resource (memory, register, etc) 111 + before the audio DSP is suspended. This will increase the suspend 112 + latency and therefore should be used for debug purposes only. 113 + Say Y if you want to enable caching the memory windows. 114 + If unsure, select "N". 115 + 116 + endif ## SND_SOC_SOF_DEBUG 117 + 118 + endif ## SND_SOC_SOF_OPTIONS 119 + 120 + config SND_SOC_SOF 121 + tristate 122 + select SND_SOC_TOPOLOGY 123 + help 124 + This option is not user-selectable but automagically handled by 125 + 'select' statements at a higher level 126 + The selection is made at the top level and does not exactly follow 127 + module dependencies but since the module or built-in type is decided 128 + at the top level it doesn't matter. 129 + 130 + config SND_SOC_SOF_PROBE_WORK_QUEUE 131 + bool 132 + help 133 + This option is not user-selectable but automagically handled by 134 + 'select' statements at a higher level 135 + When selected, the probe is handled in two steps, for example to 136 + avoid lockdeps if request_module is used in the probe. 137 + 138 + source "sound/soc/sof/intel/Kconfig" 139 + source "sound/soc/sof/xtensa/Kconfig" 140 + 141 + endif
+18
sound/soc/sof/Makefile
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 + 3 + snd-sof-objs := core.o ops.o loader.o ipc.o pcm.o pm.o debug.o topology.o\ 4 + control.o trace.o utils.o 5 + 6 + snd-sof-pci-objs := sof-pci-dev.o 7 + snd-sof-acpi-objs := sof-acpi-dev.o 8 + snd-sof-nocodec-objs := nocodec.o 9 + 10 + obj-$(CONFIG_SND_SOC_SOF) += snd-sof.o 11 + obj-$(CONFIG_SND_SOC_SOF_NOCODEC) += snd-sof-nocodec.o 12 + 13 + 14 + obj-$(CONFIG_SND_SOC_SOF_ACPI) += sof-acpi-dev.o 15 + obj-$(CONFIG_SND_SOC_SOF_PCI) += sof-pci-dev.o 16 + 17 + obj-$(CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL) += intel/ 18 + obj-$(CONFIG_SND_SOC_SOF_XTENSA) += xtensa/
+230
sound/soc/sof/intel/Kconfig
··· 1 + config SND_SOC_SOF_INTEL_TOPLEVEL 2 + bool "SOF support for Intel audio DSPs" 3 + depends on X86 || COMPILE_TEST 4 + help 5 + This adds support for Sound Open Firmware for Intel(R) platforms. 6 + Say Y if you have such a device. 7 + If unsure select "N". 8 + 9 + if SND_SOC_SOF_INTEL_TOPLEVEL 10 + 11 + config SND_SOC_SOF_INTEL_ACPI 12 + tristate 13 + select SND_SOC_SOF_BAYTRAIL if SND_SOC_SOF_BAYTRAIL_SUPPORT 14 + select SND_SOC_SOF_BROADWELL if SND_SOC_SOF_BROADWELL_SUPPORT 15 + help 16 + This option is not user-selectable but automagically handled by 17 + 'select' statements at a higher level 18 + 19 + config SND_SOC_SOF_INTEL_PCI 20 + tristate 21 + select SND_SOC_SOF_MERRIFIELD if SND_SOC_SOF_MERRIFIELD_SUPPORT 22 + select SND_SOC_SOF_APOLLOLAKE if SND_SOC_SOF_APOLLOLAKE_SUPPORT 23 + select SND_SOC_SOF_GEMINILAKE if SND_SOC_SOF_GEMINILAKE_SUPPORT 24 + select SND_SOC_SOF_CANNONLAKE if SND_SOC_SOF_CANNONLAKE_SUPPORT 25 + select SND_SOC_SOF_COFFEELAKE if SND_SOC_SOF_COFFEELAKE_SUPPORT 26 + select SND_SOC_SOF_ICELAKE if SND_SOC_SOF_ICELAKE_SUPPORT 27 + help 28 + This option is not user-selectable but automagically handled by 29 + 'select' statements at a higher level 30 + 31 + config SND_SOC_SOF_INTEL_HIFI_EP_IPC 32 + tristate 33 + help 34 + This option is not user-selectable but automagically handled by 35 + 'select' statements at a higher level 36 + 37 + config SND_SOC_SOF_INTEL_ATOM_HIFI_EP 38 + tristate 39 + select SND_SOC_INTEL_COMMON 40 + select SND_SOC_SOF_INTEL_HIFI_EP_IPC 41 + help 42 + This option is not user-selectable but automagically handled by 43 + 'select' statements at a higher level 44 + 45 + config SND_SOC_SOF_INTEL_COMMON 46 + tristate 47 + select SND_SOC_ACPI_INTEL_MATCH 48 + select SND_SOC_SOF_XTENSA 49 + select SND_SOC_INTEL_MACH 50 + select SND_SOC_ACPI if ACPI 51 + help 52 + This option is not user-selectable but automagically handled by 53 + 'select' statements at a higher level 54 + 55 + if SND_SOC_SOF_INTEL_ACPI 56 + 57 + config SND_SOC_SOF_BAYTRAIL_SUPPORT 58 + bool "SOF support for Baytrail, Braswell and Cherrytrail" 59 + help 60 + This adds support for Sound Open Firmware for Intel(R) platforms 61 + using the Baytrail, Braswell or Cherrytrail processors. 62 + Say Y if you have such a device. 63 + If unsure select "N". 64 + 65 + config SND_SOC_SOF_BAYTRAIL 66 + tristate 67 + select SND_SOC_SOF_INTEL_ATOM_HIFI_EP 68 + help 69 + This option is not user-selectable but automagically handled by 70 + 'select' statements at a higher level 71 + 72 + config SND_SOC_SOF_BROADWELL_SUPPORT 73 + bool "SOF support for Broadwell" 74 + help 75 + This adds support for Sound Open Firmware for Intel(R) platforms 76 + using the Broadwell processors. 77 + Say Y if you have such a device. 78 + If unsure select "N". 79 + 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 87 + 88 + endif ## SND_SOC_SOF_INTEL_ACPI 89 + 90 + if SND_SOC_SOF_INTEL_PCI 91 + 92 + config SND_SOC_SOF_MERRIFIELD_SUPPORT 93 + bool "SOF support for Tangier/Merrifield" 94 + help 95 + This adds support for Sound Open Firmware for Intel(R) platforms 96 + using the Tangier/Merrifield processors. 97 + Say Y if you have such a device. 98 + If unsure select "N". 99 + 100 + config SND_SOC_SOF_MERRIFIELD 101 + 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 106 + 107 + config SND_SOC_SOF_APOLLOLAKE_SUPPORT 108 + bool "SOF support for Apollolake" 109 + help 110 + This adds support for Sound Open Firmware for Intel(R) platforms 111 + using the Apollolake processors. 112 + Say Y if you have such a device. 113 + If unsure select "N". 114 + 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" 124 + help 125 + This adds support for Sound Open Firmware for Intel(R) platforms 126 + using the Geminilake processors. 127 + Say Y if you have such a device. 128 + If unsure select "N". 129 + 130 + config SND_SOC_SOF_GEMINILAKE 131 + tristate 132 + 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 136 + 137 + config SND_SOC_SOF_CANNONLAKE_SUPPORT 138 + bool "SOF support for Cannonlake" 139 + help 140 + This adds support for Sound Open Firmware for Intel(R) platforms 141 + using the Cannonlake processors. 142 + Say Y if you have such a device. 143 + If unsure select "N". 144 + 145 + config SND_SOC_SOF_CANNONLAKE 146 + tristate 147 + select SND_SOC_SOF_HDA_COMMON 148 + help 149 + This option is not user-selectable but automagically handled by 150 + 'select' statements at a higher level 151 + 152 + config SND_SOC_SOF_COFFEELAKE_SUPPORT 153 + bool "SOF support for CoffeeLake" 154 + help 155 + This adds support for Sound Open Firmware for Intel(R) platforms 156 + using the Coffeelake processors. 157 + Say Y if you have such a device. 158 + If unsure select "N". 159 + 160 + config SND_SOC_SOF_COFFEELAKE 161 + tristate 162 + select SND_SOC_SOF_HDA_COMMON 163 + help 164 + This option is not user-selectable but automagically handled by 165 + 'select' statements at a higher level 166 + 167 + config SND_SOC_SOF_ICELAKE_SUPPORT 168 + bool "SOF support for Icelake" 169 + help 170 + This adds support for Sound Open Firmware for Intel(R) platforms 171 + using the Icelake processors. 172 + Say Y if you have such a device. 173 + If unsure select "N". 174 + 175 + config SND_SOC_SOF_ICELAKE 176 + tristate 177 + select SND_SOC_SOF_HDA_COMMON 178 + help 179 + This option is not user-selectable but automagically handled by 180 + 'select' statements at a higher level 181 + 182 + config SND_SOC_SOF_HDA_COMMON 183 + tristate 184 + select SND_SOC_SOF_INTEL_COMMON 185 + select SND_SOC_SOF_HDA_LINK_BASELINE 186 + help 187 + This option is not user-selectable but automagically handled by 188 + 'select' statements at a higher level 189 + 190 + if SND_SOC_SOF_HDA_COMMON 191 + 192 + config SND_SOC_SOF_HDA_LINK 193 + bool "SOF support for HDA Links(HDA/HDMI)" 194 + depends on SND_SOC_SOF_NOCODEC=n 195 + select SND_SOC_SOF_PROBE_WORK_QUEUE 196 + help 197 + This adds support for HDA links(HDA/HDMI) with Sound Open Firmware 198 + for Intel(R) platforms. 199 + Say Y if you want to enable HDA links with SOF. 200 + If unsure select "N". 201 + 202 + config SND_SOC_SOF_HDA_AUDIO_CODEC 203 + bool "SOF support for HDAudio codecs" 204 + depends on SND_SOC_SOF_HDA_LINK 205 + help 206 + This adds support for HDAudio codecs with Sound Open Firmware 207 + for Intel(R) platforms. 208 + Say Y if you want to enable HDAudio codecs with SOF. 209 + If unsure select "N". 210 + 211 + endif ## SND_SOC_SOF_HDA_COMMON 212 + 213 + config SND_SOC_SOF_HDA_LINK_BASELINE 214 + tristate 215 + select SND_SOC_SOF_HDA if SND_SOC_SOF_HDA_LINK 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_HDA 221 + tristate 222 + select SND_HDA_EXT_CORE if SND_SOC_SOF_HDA_LINK 223 + select SND_SOC_HDAC_HDA if SND_SOC_SOF_HDA_AUDIO_CODEC 224 + help 225 + This option is not user-selectable but automagically handled by 226 + 'select' statements at a higher level 227 + 228 + endif ## SND_SOC_SOF_INTEL_PCI 229 + 230 + endif ## SND_SOC_SOF_INTEL_TOPLEVEL
+19
sound/soc/sof/intel/Makefile
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 + 3 + snd-sof-intel-byt-objs := byt.o 4 + snd-sof-intel-bdw-objs := bdw.o 5 + 6 + snd-sof-intel-ipc-objs := intel-ipc.o 7 + 8 + snd-sof-intel-hda-common-objs := hda.o hda-loader.o hda-stream.o hda-trace.o \ 9 + hda-dsp.o hda-ipc.o hda-ctrl.o hda-pcm.o \ 10 + hda-dai.o hda-bus.o \ 11 + apl.o cnl.o 12 + 13 + snd-sof-intel-hda-objs := hda-codec.o 14 + 15 + obj-$(CONFIG_SND_SOC_SOF_INTEL_ATOM_HIFI_EP) += snd-sof-intel-byt.o 16 + obj-$(CONFIG_SND_SOC_SOF_BROADWELL) += snd-sof-intel-bdw.o 17 + obj-$(CONFIG_SND_SOC_SOF_INTEL_HIFI_EP_IPC) += snd-sof-intel-ipc.o 18 + obj-$(CONFIG_SND_SOC_SOF_HDA_COMMON) += snd-sof-intel-hda-common.o 19 + obj-$(CONFIG_SND_SOC_SOF_HDA) += snd-sof-intel-hda.o