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