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