1 # SPDX-License-Identifier: GPL-2.0-only
2 menuconfig SND_SOC_SOF_TOPLEVEL
3 bool "Sound Open Firmware Support"
5 This adds support for Sound Open Firmware (SOF). SOF is free and
6 generic open source audio DSP firmware for multiple devices.
7 Say Y if you have such a device that is supported by SOF.
10 if SND_SOC_SOF_TOPLEVEL
12 config SND_SOC_SOF_PCI_DEV
15 config SND_SOC_SOF_PCI
16 tristate "SOF PCI enumeration support"
19 This adds support for PCI enumeration. This option is
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.
23 Say Y if you need this option.
26 config SND_SOC_SOF_ACPI
27 tristate "SOF ACPI enumeration support"
28 depends on ACPI || COMPILE_TEST
30 This adds support for ACPI enumeration. This option is required
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.
34 Say Y if you need this option.
37 config SND_SOC_SOF_ACPI_DEV
41 tristate "SOF OF enumeration support"
44 This adds support for Device Tree enumeration. This option is
45 required to enable i.MX8 or Mediatek devices.
46 Say Y if you need this option. If unsure select "N".
48 config SND_SOC_SOF_OF_DEV
51 config SND_SOC_SOF_COMPRESS
53 select SND_SOC_COMPRESS
55 config SND_SOC_SOF_DEBUG_PROBES
57 select SND_SOC_SOF_CLIENT
58 select SND_SOC_COMPRESS
60 This option enables the data probing feature that can be used to
61 gather data directly from specific points of the audio pipeline.
62 This option is not user-selectable but automagically handled by
63 'select' statements at a higher level.
65 config SND_SOC_SOF_CLIENT
69 This option is not user-selectable but automagically handled by
70 'select' statements at a higher level.
72 config SND_SOC_SOF_DEVELOPER_SUPPORT
73 bool "SOF developer options support"
74 depends on EXPERT && SND_SOC_SOF
76 This option unlocks SOF developer options for debug/performance/
78 Distributions should not select this option, only SOF development
79 teams should select it.
80 Say Y if you are involved in SOF development and need this option.
83 if SND_SOC_SOF_DEVELOPER_SUPPORT
85 config SND_SOC_SOF_FORCE_PROBE_WORKQUEUE
86 bool "SOF force probe workqueue"
87 select SND_SOC_SOF_PROBE_WORK_QUEUE
89 This option forces the use of a probe workqueue, which is only used
90 when HDaudio is enabled due to module dependencies. Forcing this
91 option is intended for debug only, but this should not add any
92 functional issues in nominal cases.
93 Say Y if you are involved in SOF development and need this option.
96 config SND_SOC_SOF_NOCODEC
99 config SND_SOC_SOF_NOCODEC_SUPPORT
100 bool "SOF nocodec static mode support"
102 This adds support for a dummy/nocodec machine driver fallback
103 option if no known codec is detected. This is typically only
104 enabled for developers or devices where the sound card is
105 controlled externally.
106 This option is mutually exclusive at build time with the Intel HDAudio support.
107 Selecting it may have negative impacts and prevent e.g. microphone
108 functionality from being enabled on Intel CoffeeLake and later
110 Distributions should not select this option!
111 Say Y if you need this nocodec fallback option.
112 If unsure select "N".
114 config SND_SOC_SOF_STRICT_ABI_CHECKS
115 bool "SOF strict ABI checks"
117 This option enables strict ABI checks for firmware and topology
119 When these files are more recent than the kernel, the kernel
120 will handle the functionality it supports and may report errors
121 during topology creation or run-time usage if new functionality
123 This option will stop topology creation and firmware load upfront.
124 It is intended for SOF CI/releases and not for users or distros.
125 Say Y if you want strict ABI checks for an SOF release.
126 If you are not involved in SOF releases and CI development,
129 config SND_SOC_SOF_DEBUG
130 bool "SOF debugging features"
132 This option can be used to enable or disable individual SOF firmware
133 and driver debugging options.
134 Say Y if you are debugging SOF FW or drivers.
135 If unsure select "N".
139 config SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT
140 bool "SOF nocodec debug mode support"
141 depends on !SND_SOC_SOF_NOCODEC_SUPPORT
143 This adds support for a dummy/nocodec machine driver fallback
145 Unlike the SND_SOC_SOF_NOCODEC_SUPPORT, this option is NOT
146 mutually exclusive at build with the Intel HDAudio support. The
147 selection will be done depending on command line or modprobe.d settings
148 Distributions should not select this option!
149 Say Y if you need this nocodec debug fallback option.
150 If unsure select "N".
152 config SND_SOC_SOF_FORCE_NOCODEC_MODE
153 bool "SOF force nocodec Mode"
154 depends on SND_SOC_SOF_NOCODEC_SUPPORT
156 This forces SOF to use dummy/nocodec as machine driver, even
157 though there is a codec detected on the real platform. This is
158 typically only enabled for developers for debug purposes, before
159 codec/machine driver is ready, or to exclude the impact of those
161 Say Y if you need this force nocodec mode option.
162 If unsure select "N".
164 config SND_SOC_SOF_DEBUG_XRUN_STOP
165 bool "SOF stop on XRUN"
167 This option forces PCMs to stop on any XRUN event. This is useful to
168 preserve any trace data and pipeline status prior to the XRUN.
169 Say Y if you are debugging SOF FW pipeline XRUNs.
170 If unsure select "N".
172 config SND_SOC_SOF_DEBUG_VERBOSE_IPC
173 bool "SOF verbose IPC logs"
175 This option enables more verbose IPC logs, with command types in
176 human-readable form instead of just 32-bit hex dumps. This is useful
177 if you are trying to debug IPC with the DSP firmware.
178 If unsure select "N".
180 config SND_SOC_SOF_DEBUG_FORCE_IPC_POSITION
181 bool "SOF force to use IPC for position update on SKL+"
183 This option forces to handle stream position update IPCs and run PCM
184 elapse to inform ALSA about that, on platforms (e.g. Intel SKL+) that
185 with other approach (e.g. HDAC DPIB/posbuf) to elapse PCM.
186 On platforms (e.g. Intel SKL-) where position update IPC is the only
187 one choice, this setting won't impact anything.
188 If you are trying to debug pointer update with position IPCs or where
189 DPIB/posbuf is not ready, select "Y".
190 If unsure select "N".
192 config SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE
193 bool "SOF enable debugfs caching"
195 This option enables caching of debugfs
196 memory -> DSP resource (memory, register, etc)
197 before the audio DSP is suspended. This will increase the suspend
198 latency and therefore should be used for debug purposes only.
199 Say Y if you want to enable caching the memory windows.
200 If unsure, select "N".
202 config SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE
203 bool "SOF enable firmware trace"
205 The firmware trace can be enabled either at build-time with
206 this option, or dynamically by setting flags in the SOF core
207 module parameter (similar to dynamic debug).
208 If unsure, select "N".
210 config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST
211 tristate "SOF enable IPC flood test"
212 depends on SND_SOC_SOF
213 select SND_SOC_SOF_CLIENT
215 This option enables a separate client device for IPC flood test
216 which can be used to flood the DSP with test IPCs and gather stats
217 about response times.
218 Say Y if you want to enable IPC flood test.
219 If unsure, select "N".
221 config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST_NUM
222 int "Number of IPC flood test clients"
225 depends on SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST
227 Select the number of IPC flood test clients to be created.
229 config SND_SOC_SOF_DEBUG_IPC_MSG_INJECTOR
230 tristate "SOF enable IPC message injector"
231 depends on SND_SOC_SOF
232 select SND_SOC_SOF_CLIENT
234 This option enables the IPC message injector which can be used to send
235 crafted IPC messages to the DSP to test its robustness.
236 Say Y if you want to enable the IPC message injector.
237 If unsure, select "N".
239 config SND_SOC_SOF_DEBUG_IPC_KERNEL_INJECTOR
240 tristate "SOF enable IPC kernel injector"
241 depends on SND_SOC_SOF
242 select SND_SOC_SOF_CLIENT
244 This option enables the IPC kernel injector which can be used to send
245 crafted IPC messages to the kernel to test its robustness against
247 Say Y if you want to enable the IPC kernel injector.
248 If unsure, select "N".
250 config SND_SOC_SOF_DEBUG_RETAIN_DSP_CONTEXT
251 bool "SOF retain DSP context on any FW exceptions"
253 This option keeps the DSP in D0 state so that firmware debug
254 information can be retained and dumped to userspace.
255 Say Y if you want to retain DSP context for FW exceptions.
256 If unsure, select "N".
258 endif ## SND_SOC_SOF_DEBUG
260 endif ## SND_SOC_SOF_DEVELOPER_SUPPORT
264 select SND_SOC_TOPOLOGY
265 select SND_SOC_SOF_NOCODEC if SND_SOC_SOF_NOCODEC_SUPPORT
266 select SND_SOC_SOF_NOCODEC if SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT
268 This option is not user-selectable but automagically handled by
269 'select' statements at a higher level.
270 The selection is made at the top level and does not exactly follow
271 module dependencies but since the module or built-in type is decided
272 at the top level it doesn't matter.
274 config SND_SOC_SOF_PROBE_WORK_QUEUE
277 This option is not user-selectable but automagically handled by
278 'select' statements at a higher level.
279 When selected, the probe is handled in two steps, for example to
280 avoid lockdeps if request_module is used in the probe.
282 # Supported IPC versions
283 config SND_SOC_SOF_IPC3
286 config SND_SOC_SOF_INTEL_IPC4
289 source "sound/soc/sof/amd/Kconfig"
290 source "sound/soc/sof/imx/Kconfig"
291 source "sound/soc/sof/intel/Kconfig"
292 source "sound/soc/sof/mediatek/Kconfig"
293 source "sound/soc/sof/xtensa/Kconfig"