0001 # SPDX-License-Identifier: GPL-2.0-only
0002 menuconfig SND_SOC_SOF_TOPLEVEL
0003 bool "Sound Open Firmware Support"
0004 help
0005 This adds support for Sound Open Firmware (SOF). SOF is free and
0006 generic open source audio DSP firmware for multiple devices.
0007 Say Y if you have such a device that is supported by SOF.
0008 If unsure select "N".
0009
0010 if SND_SOC_SOF_TOPLEVEL
0011
0012 config SND_SOC_SOF_PCI_DEV
0013 tristate
0014
0015 config SND_SOC_SOF_PCI
0016 tristate "SOF PCI enumeration support"
0017 depends on PCI
0018 help
0019 This adds support for PCI enumeration. This option is
0020 required to enable Intel Skylake+ devices.
0021 For backwards-compatibility with previous configurations the selection will
0022 be used as default for platform-specific drivers.
0023 Say Y if you need this option.
0024 If unsure select "N".
0025
0026 config SND_SOC_SOF_ACPI
0027 tristate "SOF ACPI enumeration support"
0028 depends on ACPI || COMPILE_TEST
0029 help
0030 This adds support for ACPI enumeration. This option is required
0031 to enable Intel Broadwell/Baytrail/Cherrytrail devices.
0032 For backwards-compatibility with previous configurations the selection will
0033 be used as default for platform-specific drivers.
0034 Say Y if you need this option.
0035 If unsure select "N".
0036
0037 config SND_SOC_SOF_ACPI_DEV
0038 tristate
0039
0040 config SND_SOC_SOF_OF
0041 tristate "SOF OF enumeration support"
0042 depends on OF || COMPILE_TEST
0043 help
0044 This adds support for Device Tree enumeration. This option is
0045 required to enable i.MX8 or Mediatek devices.
0046 Say Y if you need this option. If unsure select "N".
0047
0048 config SND_SOC_SOF_OF_DEV
0049 tristate
0050
0051 config SND_SOC_SOF_COMPRESS
0052 bool
0053 select SND_SOC_COMPRESS
0054
0055 config SND_SOC_SOF_DEBUG_PROBES
0056 tristate
0057 select SND_SOC_SOF_CLIENT
0058 select SND_SOC_COMPRESS
0059 help
0060 This option enables the data probing feature that can be used to
0061 gather data directly from specific points of the audio pipeline.
0062 This option is not user-selectable but automagically handled by
0063 'select' statements at a higher level.
0064
0065 config SND_SOC_SOF_CLIENT
0066 tristate
0067 select AUXILIARY_BUS
0068 help
0069 This option is not user-selectable but automagically handled by
0070 'select' statements at a higher level.
0071
0072 config SND_SOC_SOF_DEVELOPER_SUPPORT
0073 bool "SOF developer options support"
0074 depends on EXPERT && SND_SOC_SOF
0075 help
0076 This option unlocks SOF developer options for debug/performance/
0077 code hardening.
0078 Distributions should not select this option, only SOF development
0079 teams should select it.
0080 Say Y if you are involved in SOF development and need this option.
0081 If not, select N.
0082
0083 if SND_SOC_SOF_DEVELOPER_SUPPORT
0084
0085 config SND_SOC_SOF_FORCE_PROBE_WORKQUEUE
0086 bool "SOF force probe workqueue"
0087 select SND_SOC_SOF_PROBE_WORK_QUEUE
0088 help
0089 This option forces the use of a probe workqueue, which is only used
0090 when HDaudio is enabled due to module dependencies. Forcing this
0091 option is intended for debug only, but this should not add any
0092 functional issues in nominal cases.
0093 Say Y if you are involved in SOF development and need this option.
0094 If not, select N.
0095
0096 config SND_SOC_SOF_NOCODEC
0097 tristate
0098
0099 config SND_SOC_SOF_NOCODEC_SUPPORT
0100 bool "SOF nocodec mode support"
0101 help
0102 This adds support for a dummy/nocodec machine driver fallback
0103 option if no known codec is detected. This is typically only
0104 enabled for developers or devices where the sound card is
0105 controlled externally.
0106 This option is mutually exclusive with the Intel HDAudio support.
0107 Selecting it may have negative impacts and prevent e.g. microphone
0108 functionality from being enabled on Intel CoffeeLake and later
0109 platforms.
0110 Distributions should not select this option!
0111 Say Y if you need this nocodec fallback option.
0112 If unsure select "N".
0113
0114 config SND_SOC_SOF_STRICT_ABI_CHECKS
0115 bool "SOF strict ABI checks"
0116 help
0117 This option enables strict ABI checks for firmware and topology
0118 files.
0119 When these files are more recent than the kernel, the kernel
0120 will handle the functionality it supports and may report errors
0121 during topology creation or run-time usage if new functionality
0122 is invoked.
0123 This option will stop topology creation and firmware load upfront.
0124 It is intended for SOF CI/releases and not for users or distros.
0125 Say Y if you want strict ABI checks for an SOF release.
0126 If you are not involved in SOF releases and CI development,
0127 select "N".
0128
0129 config SND_SOC_SOF_DEBUG
0130 bool "SOF debugging features"
0131 help
0132 This option can be used to enable or disable individual SOF firmware
0133 and driver debugging options.
0134 Say Y if you are debugging SOF FW or drivers.
0135 If unsure select "N".
0136
0137 if SND_SOC_SOF_DEBUG
0138
0139 config SND_SOC_SOF_FORCE_NOCODEC_MODE
0140 bool "SOF force nocodec Mode"
0141 depends on SND_SOC_SOF_NOCODEC_SUPPORT
0142 help
0143 This forces SOF to use dummy/nocodec as machine driver, even
0144 though there is a codec detected on the real platform. This is
0145 typically only enabled for developers for debug purposes, before
0146 codec/machine driver is ready, or to exclude the impact of those
0147 drivers.
0148 Say Y if you need this force nocodec mode option.
0149 If unsure select "N".
0150
0151 config SND_SOC_SOF_DEBUG_XRUN_STOP
0152 bool "SOF stop on XRUN"
0153 help
0154 This option forces PCMs to stop on any XRUN event. This is useful to
0155 preserve any trace data and pipeline status prior to the XRUN.
0156 Say Y if you are debugging SOF FW pipeline XRUNs.
0157 If unsure select "N".
0158
0159 config SND_SOC_SOF_DEBUG_VERBOSE_IPC
0160 bool "SOF verbose IPC logs"
0161 help
0162 This option enables more verbose IPC logs, with command types in
0163 human-readable form instead of just 32-bit hex dumps. This is useful
0164 if you are trying to debug IPC with the DSP firmware.
0165 If unsure select "N".
0166
0167 config SND_SOC_SOF_DEBUG_FORCE_IPC_POSITION
0168 bool "SOF force to use IPC for position update on SKL+"
0169 help
0170 This option forces to handle stream position update IPCs and run PCM
0171 elapse to inform ALSA about that, on platforms (e.g. Intel SKL+) that
0172 with other approach (e.g. HDAC DPIB/posbuf) to elapse PCM.
0173 On platforms (e.g. Intel SKL-) where position update IPC is the only
0174 one choice, this setting won't impact anything.
0175 If you are trying to debug pointer update with position IPCs or where
0176 DPIB/posbuf is not ready, select "Y".
0177 If unsure select "N".
0178
0179 config SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE
0180 bool "SOF enable debugfs caching"
0181 help
0182 This option enables caching of debugfs
0183 memory -> DSP resource (memory, register, etc)
0184 before the audio DSP is suspended. This will increase the suspend
0185 latency and therefore should be used for debug purposes only.
0186 Say Y if you want to enable caching the memory windows.
0187 If unsure, select "N".
0188
0189 config SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE
0190 bool "SOF enable firmware trace"
0191 help
0192 The firmware trace can be enabled either at build-time with
0193 this option, or dynamically by setting flags in the SOF core
0194 module parameter (similar to dynamic debug).
0195 If unsure, select "N".
0196
0197 config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST
0198 tristate "SOF enable IPC flood test"
0199 depends on SND_SOC_SOF
0200 select SND_SOC_SOF_CLIENT
0201 help
0202 This option enables a separate client device for IPC flood test
0203 which can be used to flood the DSP with test IPCs and gather stats
0204 about response times.
0205 Say Y if you want to enable IPC flood test.
0206 If unsure, select "N".
0207
0208 config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST_NUM
0209 int "Number of IPC flood test clients"
0210 range 1 32
0211 default 2
0212 depends on SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST
0213 help
0214 Select the number of IPC flood test clients to be created.
0215
0216 config SND_SOC_SOF_DEBUG_IPC_MSG_INJECTOR
0217 tristate "SOF enable IPC message injector"
0218 depends on SND_SOC_SOF
0219 select SND_SOC_SOF_CLIENT
0220 help
0221 This option enables the IPC message injector which can be used to send
0222 crafted IPC messages to the DSP to test its robustness.
0223 Say Y if you want to enable the IPC message injector.
0224 If unsure, select "N".
0225
0226 config SND_SOC_SOF_DEBUG_RETAIN_DSP_CONTEXT
0227 bool "SOF retain DSP context on any FW exceptions"
0228 help
0229 This option keeps the DSP in D0 state so that firmware debug
0230 information can be retained and dumped to userspace.
0231 Say Y if you want to retain DSP context for FW exceptions.
0232 If unsure, select "N".
0233
0234 endif ## SND_SOC_SOF_DEBUG
0235
0236 endif ## SND_SOC_SOF_DEVELOPER_SUPPORT
0237
0238 config SND_SOC_SOF
0239 tristate
0240 select SND_SOC_TOPOLOGY
0241 select SND_SOC_SOF_NOCODEC if SND_SOC_SOF_NOCODEC_SUPPORT
0242 help
0243 This option is not user-selectable but automagically handled by
0244 'select' statements at a higher level.
0245 The selection is made at the top level and does not exactly follow
0246 module dependencies but since the module or built-in type is decided
0247 at the top level it doesn't matter.
0248
0249 config SND_SOC_SOF_PROBE_WORK_QUEUE
0250 bool
0251 help
0252 This option is not user-selectable but automagically handled by
0253 'select' statements at a higher level.
0254 When selected, the probe is handled in two steps, for example to
0255 avoid lockdeps if request_module is used in the probe.
0256
0257 # Supported IPC versions
0258 config SND_SOC_SOF_IPC3
0259 bool
0260
0261 config SND_SOC_SOF_INTEL_IPC4
0262 bool
0263
0264 source "sound/soc/sof/amd/Kconfig"
0265 source "sound/soc/sof/imx/Kconfig"
0266 source "sound/soc/sof/intel/Kconfig"
0267 source "sound/soc/sof/mediatek/Kconfig"
0268 source "sound/soc/sof/xtensa/Kconfig"
0269
0270 endif