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