xref: /openbmc/linux/sound/soc/sof/Kconfig (revision 20e2fc42)
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	select SND_SOC_SOF_OPTIONS
18	select SND_SOC_SOF_INTEL_PCI if SND_SOC_SOF_INTEL_TOPLEVEL
19	help
20	  This adds support for PCI enumeration. This option is
21	  required to enable Intel Skylake+ devices
22	  Say Y if you need this option
23	  If unsure select "N".
24
25config SND_SOC_SOF_ACPI
26	tristate "SOF ACPI enumeration support"
27	depends on ACPI || COMPILE_TEST
28	select SND_SOC_SOF
29	select SND_SOC_ACPI if ACPI
30	select SND_SOC_SOF_OPTIONS
31	select SND_SOC_SOF_INTEL_ACPI if SND_SOC_SOF_INTEL_TOPLEVEL
32	select IOSF_MBI if X86 && PCI
33	help
34	  This adds support for ACPI enumeration. This option is required
35	  to enable Intel Haswell/Broadwell/Baytrail/Cherrytrail devices
36	  Say Y if you need this option
37	  If unsure select "N".
38
39config SND_SOC_SOF_OF
40	tristate "SOF OF enumeration support"
41	depends on OF || COMPILE_TEST
42	select SND_SOC_SOF
43	select SND_SOC_SOF_OPTIONS
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_OPTIONS
50	tristate
51	help
52	  This option is not user-selectable but automagically handled by
53	  'select' statements at a higher level
54
55if SND_SOC_SOF_OPTIONS
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	  Say Y if you need this nocodec fallback option
68	  If unsure select "N".
69
70config SND_SOC_SOF_STRICT_ABI_CHECKS
71	bool "SOF strict ABI checks"
72	help
73	  This option enables strict ABI checks for firmware and topology
74	  files.
75	  When these files are more recent than the kernel, the kernel
76	  will handle the functionality it supports and may report errors
77	  during topology creation or run-time usage if new functionality
78	  is invoked.
79	  This option will stop topology creation and firmware load upfront.
80	  It is intended for SOF CI/releases and not for users or distros.
81	  Say Y if you want strict ABI checks for an SOF release
82	  If you are not involved in SOF releases and CI development
83	  select "N".
84
85config SND_SOC_SOF_DEBUG
86	bool "SOF debugging features"
87	help
88	  This option can be used to enable or disable individual SOF firmware
89	  and driver debugging options.
90	  Say Y if you are debugging SOF FW or drivers.
91	  If unsure select "N".
92
93if SND_SOC_SOF_DEBUG
94
95config SND_SOC_SOF_FORCE_NOCODEC_MODE
96	bool "SOF force nocodec Mode"
97	depends on SND_SOC_SOF_NOCODEC_SUPPORT
98	help
99	  This forces SOF to use dummy/nocodec as machine driver, even
100	  though there is a codec detected on the real platform. This is
101	  typically only enabled for developers for debug purposes, before
102	  codec/machine driver is ready, or to exclude the impact of those
103	  drivers
104	  Say Y if you need this force nocodec mode option
105	  If unsure select "N".
106
107config SND_SOC_SOF_DEBUG_XRUN_STOP
108	bool "SOF stop on XRUN"
109	help
110	  This option forces PCMs to stop on any XRUN event. This is useful to
111	  preserve any trace data ond pipeline status prior to the XRUN.
112	  Say Y if you are debugging SOF FW pipeline XRUNs.
113	  If unsure select "N".
114
115config SND_SOC_SOF_DEBUG_VERBOSE_IPC
116	bool "SOF verbose IPC logs"
117	help
118	  This option enables more verbose IPC logs, with command types in
119	  human-readable form instead of just 32-bit hex dumps. This is useful
120	  if you are trying to debug IPC with the DSP firmware.
121	  If unsure select "N".
122
123config SND_SOC_SOF_DEBUG_FORCE_IPC_POSITION
124	bool "SOF force to use IPC for position update on SKL+"
125	help
126	  This option force to handle stream position update IPCs and run pcm
127	  elapse to inform ALSA about that, on platforms (e.g. Intel SKL+) that
128	  with other approach (e.g. HDAC DPIB/posbuf) to elapse PCM.
129	  On platforms (e.g. Intel SKL-) where position update IPC is the only
130	  one choice, this setting won't impact anything.
131	  if you are trying to debug pointer update with position IPCs or where
132	  DPIB/posbuf is not ready, select "Y".
133	  If unsure select "N".
134
135config SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE
136	bool "SOF enable debugfs caching"
137	help
138	  This option enables caching of debugfs
139	  memory -> DSP resource (memory, register, etc)
140	  before the audio DSP is suspended. This will increase the suspend
141	  latency and therefore should be used for debug purposes only.
142	  Say Y if you want to enable caching the memory windows.
143	  If unsure, select "N".
144
145config SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST
146	bool "SOF enable IPC flood test"
147	help
148	  This option enables the IPC flood test which can be used to flood
149	  the DSP with test IPCs and gather stats about response times.
150	  Say Y if you want to enable IPC flood test.
151	  If unsure, select "N".
152
153endif ## SND_SOC_SOF_DEBUG
154
155endif ## SND_SOC_SOF_OPTIONS
156
157config SND_SOC_SOF
158	tristate
159	select SND_SOC_TOPOLOGY
160	select SND_SOC_SOF_NOCODEC if SND_SOC_SOF_NOCODEC_SUPPORT
161	help
162	  This option is not user-selectable but automagically handled by
163	  'select' statements at a higher level
164	  The selection is made at the top level and does not exactly follow
165	  module dependencies but since the module or built-in type is decided
166	  at the top level it doesn't matter.
167
168config SND_SOC_SOF_PROBE_WORK_QUEUE
169	bool
170	help
171	  This option is not user-selectable but automagically handled by
172	  'select' statements at a higher level
173	  When selected, the probe is handled in two steps, for example to
174	  avoid lockdeps if request_module is used in the probe.
175
176source "sound/soc/sof/imx/Kconfig"
177source "sound/soc/sof/intel/Kconfig"
178source "sound/soc/sof/xtensa/Kconfig"
179
180endif
181