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