xref: /linux-6.15/sound/soc/sof/Kconfig (revision 8a49cd11)
1# SPDX-License-Identifier: GPL-2.0-only
2config SND_SOC_SOF_TOPLEVEL
3	bool "Sound Open Firmware Support"
4	help
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.
8	  If unsure select "N".
9
10if SND_SOC_SOF_TOPLEVEL
11
12config SND_SOC_SOF_PCI
13	tristate "SOF PCI enumeration support"
14	depends on PCI
15	select SND_SOC_SOF
16	select SND_SOC_ACPI if ACPI
17	help
18	  This adds support for PCI enumeration. This option is
19	  required to enable Intel Skylake+ devices.
20	  Say Y if you need this option.
21	  If unsure select "N".
22
23config SND_SOC_SOF_ACPI
24	tristate "SOF ACPI enumeration support"
25	depends on ACPI || COMPILE_TEST
26	help
27	  This adds support for ACPI enumeration. This option is required
28	  to enable Intel Broadwell/Baytrail/Cherrytrail devices.
29	  For backwards-compatibility with previous configurations the selection will
30	  be used as default for platform-specific drivers.
31	  Say Y if you need this option.
32	  If unsure select "N".
33
34config SND_SOC_SOF_ACPI_DEV
35	tristate
36
37config SND_SOC_SOF_OF
38	tristate "SOF OF enumeration support"
39	depends on OF || COMPILE_TEST
40	select SND_SOC_SOF
41	help
42	  This adds support for Device Tree enumeration. This option is
43	  required to enable i.MX8 devices.
44	  Say Y if you need this option. If unsure select "N".
45
46config SND_SOC_SOF_DEBUG_PROBES
47	bool "SOF enable data probing"
48	select SND_SOC_COMPRESS
49	help
50	  This option enables the data probing feature that can be used to
51	  gather data directly from specific points of the audio pipeline.
52	  Say Y if you want to enable probes.
53	  If unsure, select "N".
54
55config SND_SOC_SOF_DEVELOPER_SUPPORT
56	bool "SOF developer options support"
57	depends on EXPERT
58	help
59	  This option unlocks SOF developer options for debug/performance/
60	  code hardening.
61	  Distributions should not select this option, only SOF development
62	  teams should select it.
63	  Say Y if you are involved in SOF development and need this option.
64	  If not, select N.
65
66if SND_SOC_SOF_DEVELOPER_SUPPORT
67
68config SND_SOC_SOF_NOCODEC
69	tristate
70
71config SND_SOC_SOF_NOCODEC_SUPPORT
72	bool "SOF nocodec mode support"
73	help
74	  This adds support for a dummy/nocodec machine driver fallback
75	  option if no known codec is detected. This is typically only
76	  enabled for developers or devices where the sound card is
77	  controlled externally.
78	  This option is mutually exclusive with the Intel HDAudio support.
79	  Selecting it may have negative impacts and prevent e.g. microphone
80	  functionality from being enabled on Intel CoffeeLake and later
81	  platforms.
82	  Distributions should not select this option!
83	  Say Y if you need this nocodec fallback option.
84	  If unsure select "N".
85
86config SND_SOC_SOF_STRICT_ABI_CHECKS
87	bool "SOF strict ABI checks"
88	help
89	  This option enables strict ABI checks for firmware and topology
90	  files.
91	  When these files are more recent than the kernel, the kernel
92	  will handle the functionality it supports and may report errors
93	  during topology creation or run-time usage if new functionality
94	  is invoked.
95	  This option will stop topology creation and firmware load upfront.
96	  It is intended for SOF CI/releases and not for users or distros.
97	  Say Y if you want strict ABI checks for an SOF release.
98	  If you are not involved in SOF releases and CI development,
99	  select "N".
100
101config SND_SOC_SOF_DEBUG
102	bool "SOF debugging features"
103	help
104	  This option can be used to enable or disable individual SOF firmware
105	  and driver debugging options.
106	  Say Y if you are debugging SOF FW or drivers.
107	  If unsure select "N".
108
109if SND_SOC_SOF_DEBUG
110
111config SND_SOC_SOF_FORCE_NOCODEC_MODE
112	bool "SOF force nocodec Mode"
113	depends on SND_SOC_SOF_NOCODEC_SUPPORT
114	help
115	  This forces SOF to use dummy/nocodec as machine driver, even
116	  though there is a codec detected on the real platform. This is
117	  typically only enabled for developers for debug purposes, before
118	  codec/machine driver is ready, or to exclude the impact of those
119	  drivers.
120	  Say Y if you need this force nocodec mode option.
121	  If unsure select "N".
122
123config SND_SOC_SOF_DEBUG_XRUN_STOP
124	bool "SOF stop on XRUN"
125	help
126	  This option forces PCMs to stop on any XRUN event. This is useful to
127	  preserve any trace data and pipeline status prior to the XRUN.
128	  Say Y if you are debugging SOF FW pipeline XRUNs.
129	  If unsure select "N".
130
131config SND_SOC_SOF_DEBUG_VERBOSE_IPC
132	bool "SOF verbose IPC logs"
133	help
134	  This option enables more verbose IPC logs, with command types in
135	  human-readable form instead of just 32-bit hex dumps. This is useful
136	  if you are trying to debug IPC with the DSP firmware.
137	  If unsure select "N".
138
139config SND_SOC_SOF_DEBUG_FORCE_IPC_POSITION
140	bool "SOF force to use IPC for position update on SKL+"
141	help
142	  This option forces to handle stream position update IPCs and run PCM
143	  elapse to inform ALSA about that, on platforms (e.g. Intel SKL+) that
144	  with other approach (e.g. HDAC DPIB/posbuf) to elapse PCM.
145	  On platforms (e.g. Intel SKL-) where position update IPC is the only
146	  one choice, this setting won't impact anything.
147	  If you are trying to debug pointer update with position IPCs or where
148	  DPIB/posbuf is not ready, select "Y".
149	  If unsure select "N".
150
151config SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE
152	bool "SOF enable debugfs caching"
153	help
154	  This option enables caching of debugfs
155	  memory -> DSP resource (memory, register, etc)
156	  before the audio DSP is suspended. This will increase the suspend
157	  latency and therefore should be used for debug purposes only.
158	  Say Y if you want to enable caching the memory windows.
159	  If unsure, select "N".
160
161config SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE
162	bool "SOF enable firmware trace"
163	help
164	  The firmware trace can be enabled either at build-time with
165	  this option, or dynamically by setting flags in the SOF core
166	  module parameter (similar to dynamic debug).
167	  If unsure, select "N".
168
169config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST
170	bool "SOF enable IPC flood test"
171	help
172	  This option enables the IPC flood test which can be used to flood
173	  the DSP with test IPCs and gather stats about response times.
174	  Say Y if you want to enable IPC flood test.
175	  If unsure, select "N".
176
177config SND_SOC_SOF_DEBUG_RETAIN_DSP_CONTEXT
178	bool "SOF retain DSP context on any FW exceptions"
179	help
180	  This option keeps the DSP in D0 state so that firmware debug
181	  information can be retained and dumped to userspace.
182	  Say Y if you want to retain DSP context for FW exceptions.
183	  If unsure, select "N".
184
185endif ## SND_SOC_SOF_DEBUG
186
187endif ## SND_SOC_SOF_DEVELOPER_SUPPORT
188
189config SND_SOC_SOF
190	tristate
191	select SND_SOC_TOPOLOGY
192	select SND_SOC_SOF_NOCODEC if SND_SOC_SOF_NOCODEC_SUPPORT
193	help
194	  This option is not user-selectable but automagically handled by
195	  'select' statements at a higher level.
196	  The selection is made at the top level and does not exactly follow
197	  module dependencies but since the module or built-in type is decided
198	  at the top level it doesn't matter.
199
200config SND_SOC_SOF_PROBE_WORK_QUEUE
201	bool
202	help
203	  This option is not user-selectable but automagically handled by
204	  'select' statements at a higher level.
205	  When selected, the probe is handled in two steps, for example to
206	  avoid lockdeps if request_module is used in the probe.
207
208source "sound/soc/sof/imx/Kconfig"
209source "sound/soc/sof/intel/Kconfig"
210source "sound/soc/sof/xtensa/Kconfig"
211
212endif
213