xref: /linux/sound/core/Kconfig (revision 3fd6c59042dbba50391e30862beac979491145fe)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
21da177e4SLinus Torvalds# ALSA soundcard-configuration
31da177e4SLinus Torvaldsconfig SND_TIMER
41da177e4SLinus Torvalds	tristate
51da177e4SLinus Torvalds
61da177e4SLinus Torvaldsconfig SND_PCM
71da177e4SLinus Torvalds	tristate
890bbaf66SJie Yang	select SND_TIMER if SND_PCM_TIMER
91da177e4SLinus Torvalds
10838d1631SRussell Kingconfig SND_PCM_ELD
11838d1631SRussell King	bool
12838d1631SRussell King
139203dd01SRussell Kingconfig SND_PCM_IEC958
149203dd01SRussell King	bool
159203dd01SRussell King
16b7ae6f31SDaniel Mackconfig SND_DMAENGINE_PCM
17903eb318SDaniel Mack	tristate
18b7ae6f31SDaniel Mack
191da177e4SLinus Torvaldsconfig SND_HWDEP
201da177e4SLinus Torvalds	tristate
211da177e4SLinus Torvalds
22111b0cdbSTakashi Iwaiconfig SND_SEQ_DEVICE
23111b0cdbSTakashi Iwai	tristate
24111b0cdbSTakashi Iwai
251da177e4SLinus Torvaldsconfig SND_RAWMIDI
261da177e4SLinus Torvalds	tristate
27111b0cdbSTakashi Iwai	select SND_SEQ_DEVICE if SND_SEQUENCER != n
281da177e4SLinus Torvalds
29e3a8a5b7STakashi Iwaiconfig SND_UMP
30e3a8a5b7STakashi Iwai	tristate
31e3a8a5b7STakashi Iwai	select SND_RAWMIDI
32e3a8a5b7STakashi Iwai
330b5288f5STakashi Iwaiconfig SND_UMP_LEGACY_RAWMIDI
340b5288f5STakashi Iwai	bool "Legacy raw MIDI support for UMP streams"
350b5288f5STakashi Iwai	depends on SND_UMP
360b5288f5STakashi Iwai	help
370b5288f5STakashi Iwai	  This option enables the legacy raw MIDI support for UMP streams.
380b5288f5STakashi Iwai	  When this option is set, an additional rawmidi device for the
390b5288f5STakashi Iwai	  legacy MIDI 1.0 byte streams is created for each UMP Endpoint.
400b5288f5STakashi Iwai	  The device contains 16 substreams corresponding to UMP groups.
410b5288f5STakashi Iwai
423e39acf5SIvan Orlovconfig SND_CORE_TEST
433e39acf5SIvan Orlov	tristate "Sound core KUnit test"
443e39acf5SIvan Orlov	depends on KUNIT
456da404e7SIvan Orlov	select SND_PCM
463e39acf5SIvan Orlov	default KUNIT_ALL_TESTS
473e39acf5SIvan Orlov	help
483e39acf5SIvan Orlov	  This options enables the sound core functions KUnit test.
493e39acf5SIvan Orlov
503e39acf5SIvan Orlov	  KUnit tests run during boot and output the results to the debug
513e39acf5SIvan Orlov	  log in TAP format (https://testanything.org/). Only useful for
523e39acf5SIvan Orlov	  kernel devs running KUnit test harness and are not for inclusion
533e39acf5SIvan Orlov	  into a production build.
543e39acf5SIvan Orlov
553e39acf5SIvan Orlov	  For more information on KUnit and unit tests in general, refer
563e39acf5SIvan Orlov	  to the KUnit documentation in Documentation/dev-tools/kunit/.
573e39acf5SIvan Orlov
583e39acf5SIvan Orlov
595c845bebSTakashi Iwaiconfig SND_COMPRESS_OFFLOAD
605c845bebSTakashi Iwai	tristate
615c845bebSTakashi Iwai
620d94e41aSMark Brownconfig SND_COMPRESS_ACCEL
630d94e41aSMark Brown	bool
640d94e41aSMark Brown
65fe0d128cSTakashi Iwaiconfig SND_JACK
66fe0d128cSTakashi Iwai	bool
67fe0d128cSTakashi Iwai
68fe0d128cSTakashi Iwai# enable input device support in jack layer
69fe0d128cSTakashi Iwaiconfig SND_JACK_INPUT_DEV
70fe0d128cSTakashi Iwai	bool
711da177e4SLinus Torvalds	depends on SND_JACK
72eb3b705aSTakashi Iwai	default y if INPUT=y || INPUT=SND
73d886e87cSTejun Heo
74eb3b705aSTakashi Iwaiconfig SND_OSSEMUL
75eb3b705aSTakashi Iwai	bool "Enable OSS Emulation"
761da177e4SLinus Torvalds	select SOUND_OSS_CORE
771da177e4SLinus Torvalds	help
781da177e4SLinus Torvalds	  This option enables the build of OSS emulation layer.
79eb3b705aSTakashi Iwai
801da177e4SLinus Torvaldsconfig SND_MIXER_OSS
811da177e4SLinus Torvalds	tristate "OSS Mixer API"
825fb94e9cSMauro Carvalho Chehab	depends on SND_OSSEMUL
831da177e4SLinus Torvalds	help
841da177e4SLinus Torvalds	  To enable OSS mixer API emulation (/dev/mixer*), say Y here
851da177e4SLinus Torvalds	  and read <file:Documentation/sound/designs/oss-emulation.rst>.
861da177e4SLinus Torvalds
871da177e4SLinus Torvalds	  Many programs still use the OSS API, so say Y.
881da177e4SLinus Torvalds
891da177e4SLinus Torvalds	  To compile this driver as a module, choose M here: the module
901da177e4SLinus Torvalds	  will be called snd-mixer-oss.
91eb3b705aSTakashi Iwai
921da177e4SLinus Torvaldsconfig SND_PCM_OSS
931da177e4SLinus Torvalds	tristate "OSS PCM (digital audio) API"
941da177e4SLinus Torvalds	depends on SND_OSSEMUL
955fb94e9cSMauro Carvalho Chehab	select SND_PCM
961da177e4SLinus Torvalds	help
971da177e4SLinus Torvalds	  To enable OSS digital audio (PCM) emulation (/dev/dsp*), say Y
981da177e4SLinus Torvalds	  here and read <file:Documentation/sound/designs/oss-emulation.rst>.
991da177e4SLinus Torvalds
1001da177e4SLinus Torvalds	  Many programs still use the OSS API, so say Y.
1011da177e4SLinus Torvalds
10221a3479aSJaroslav Kysela	  To compile this driver as a module, choose M here: the module
10321a3479aSJaroslav Kysela	  will be called snd-pcm-oss.
10421a3479aSJaroslav Kysela
10521a3479aSJaroslav Kyselaconfig SND_PCM_OSS_PLUGINS
10621a3479aSJaroslav Kysela	bool "OSS PCM (digital audio) API - Include plugin system"
10721a3479aSJaroslav Kysela	depends on SND_PCM_OSS
10821a3479aSJaroslav Kysela	default y
10921a3479aSJaroslav Kysela	help
11021a3479aSJaroslav Kysela	  If you disable this option, the ALSA's OSS PCM API will not
11190bbaf66SJie Yang	  support conversion of channels, formats and rates. It will
11290bbaf66SJie Yang	  behave like most of new OSS/Free drivers in 2.4/2.6 kernels.
11390bbaf66SJie Yang
11490bbaf66SJie Yangconfig SND_PCM_TIMER
115ac1efcfbSRandy Dunlap	bool "PCM timer interface" if EXPERT
116ac1efcfbSRandy Dunlap	default y
117a893b7fcSElijah Harding	help
11890bbaf66SJie Yang	  If you disable this option, pcm timer will be unavailable, so
119ac1efcfbSRandy Dunlap	  those stubs that use pcm timer (e.g. dmix, dsnoop & co) may work
12090bbaf66SJie Yang	  incorrectly.
12190bbaf66SJie Yang
122bbaf5e97STakashi Iwai	  For some embedded devices, we may disable it to reduce memory
123bbaf5e97STakashi Iwai	  footprint, about 20KB on x86_64 platform.
124bbaf5e97STakashi Iwai
125bbaf5e97STakashi Iwaiconfig SND_HRTIMER
126bbaf5e97STakashi Iwai	tristate "HR-timer backend support"
127bbaf5e97STakashi Iwai	depends on HIGH_RES_TIMERS
128bbaf5e97STakashi Iwai	select SND_TIMER
129bbaf5e97STakashi Iwai	help
130bbaf5e97STakashi Iwai	  Say Y here to enable HR-timer backend for ALSA timer.  ALSA uses
131bbaf5e97STakashi Iwai	  the hrtimer as a precise timing source. The ALSA sequencer code
132bbaf5e97STakashi Iwai	  also can use this timing source.
133bbaf5e97STakashi Iwai
134332682b1SClemens Ladisch	  To compile this driver as a module, choose M here: the module
135b10e5391SClemens Ladisch	  will be called snd-hrtimer.
136332682b1SClemens Ladisch
137332682b1SClemens Ladischconfig SND_DYNAMIC_MINORS
138332682b1SClemens Ladisch	bool "Dynamic device file minor numbers"
139332682b1SClemens Ladisch	help
140332682b1SClemens Ladisch	  If you say Y here, the minor numbers of ALSA device files in
141332682b1SClemens Ladisch	  /dev/snd/ are allocated dynamically.  This allows you to have
142332682b1SClemens Ladisch	  more than 8 sound cards, but requires a dynamic device file
143332682b1SClemens Ladisch	  system like udev.
1447bb2491bSTakashi Iwai
1457bb2491bSTakashi Iwai	  If you are unsure about this, say N here.
1467bb2491bSTakashi Iwai
1477bb2491bSTakashi Iwaiconfig SND_MAX_CARDS
1487bb2491bSTakashi Iwai	int "Max number of sound cards"
1497bb2491bSTakashi Iwai	range 4 256
1507bb2491bSTakashi Iwai	default 32
1517bb2491bSTakashi Iwai	depends on SND_DYNAMIC_MINORS
1527bb2491bSTakashi Iwai	help
15359d48582STakashi Iwai	  Specify the max number of sound cards that can be assigned
15459d48582STakashi Iwai	  on a single machine.
15559d48582STakashi Iwai
15659d48582STakashi Iwaiconfig SND_SUPPORT_OLD_API
15759d48582STakashi Iwai	bool "Support old ALSA API"
15859d48582STakashi Iwai	default y
15959d48582STakashi Iwai	help
160e0ecb05aSJie Yang	  Say Y here to support the obsolete ALSA PCM API (ver.0.9.0 rc3
161e0ecb05aSJie Yang	  or older).
162e0ecb05aSJie Yang
163e0ecb05aSJie Yangconfig SND_PROC_FS
164e0ecb05aSJie Yang	bool "Sound Proc FS Support" if EXPERT
165e0ecb05aSJie Yang	depends on PROC_FS
166e0ecb05aSJie Yang	default y
167e0ecb05aSJie Yang	help
168e0ecb05aSJie Yang	  Say 'N' to disable Sound proc FS, which may reduce code size about
16921a3479aSJaroslav Kysela	  9KB on x86_64 platform.
17021a3479aSJaroslav Kysela	  If unsure say Y.
171e0ecb05aSJie Yang
17221a3479aSJaroslav Kyselaconfig SND_VERBOSE_PROCFS
17321a3479aSJaroslav Kysela	bool "Verbose procfs contents"
17421a3479aSJaroslav Kysela	depends on SND_PROC_FS
175a982ac06SMatt LaPlante	default y
17621a3479aSJaroslav Kysela	help
17721a3479aSJaroslav Kysela	  Say Y here to include code for verbose procfs contents (provides
178c27e1efbSTakashi Iwai	  useful information to developers when a problem occurs).  On the
179c27e1efbSTakashi Iwai	  other side, it makes the ALSA subsystem larger.
180c27e1efbSTakashi Iwai
181c27e1efbSTakashi Iwaiconfig SND_CTL_FAST_LOOKUP
182c27e1efbSTakashi Iwai	bool "Fast lookup of control elements" if EXPERT
183c27e1efbSTakashi Iwai	default y
184c27e1efbSTakashi Iwai	select XARRAY_MULTI
185c27e1efbSTakashi Iwai	help
186c27e1efbSTakashi Iwai	  This option enables the faster lookup of control elements.
187c27e1efbSTakashi Iwai	  It will consume more memory because of the additional Xarray.
1881da177e4SLinus Torvalds	  If you want to choose the memory footprint over the performance
1891da177e4SLinus Torvalds	  inevitably, turn this off.
1901da177e4SLinus Torvalds
1911da177e4SLinus Torvaldsconfig SND_DEBUG
1921da177e4SLinus Torvalds	bool "Debug"
19362cf872aSTakashi Iwai	help
19462cf872aSTakashi Iwai	  Say Y here to enable ALSA debug code.
1951da177e4SLinus Torvalds
1961da177e4SLinus Torvaldsconfig SND_DEBUG_VERBOSE
19762cf872aSTakashi Iwai	bool "More verbose debug"
19862cf872aSTakashi Iwai	depends on SND_DEBUG
19962cf872aSTakashi Iwai	help
20062cf872aSTakashi Iwai	  Say Y here to enable extra-verbose debugging messages.
20161fb63c0SJaroslav Kysela
20261fb63c0SJaroslav Kysela	  Let me repeat: it enables EXTRA-VERBOSE DEBUGGING messages.
20361fb63c0SJaroslav Kysela	  So, say Y only if you are ready to be annoyed.
20461fb63c0SJaroslav Kysela
205b7d90a35STakashi Iwaiconfig SND_PCM_XRUN_DEBUG
20661fb63c0SJaroslav Kysela	bool "Enable PCM ring buffer overrun/underrun debugging"
20761fb63c0SJaroslav Kysela	default n
20861fb63c0SJaroslav Kysela	depends on SND_DEBUG && SND_VERBOSE_PROCFS
20961fb63c0SJaroslav Kysela	help
21061fb63c0SJaroslav Kysela	  Say Y to enable the PCM ring buffer overrun/underrun debugging.
211e922b002STakashi Iwai	  It is usually not required, but if you have trouble with
212f5e829f9STakashi Iwai	  sound clicking when system is loaded, it may help to determine
213f5e829f9STakashi Iwai	  the process or driver which causes the scheduling gaps.
214f5e829f9STakashi Iwai
215f5e829f9STakashi Iwaiconfig SND_CTL_INPUT_VALIDATION
216f5e829f9STakashi Iwai	bool "Validate input data to control API"
217f5e829f9STakashi Iwai	help
218f5e829f9STakashi Iwai	  Say Y to enable the additional validation for the input data to
219f5e829f9STakashi Iwai	  each control element, including the value range checks.
220f5e829f9STakashi Iwai	  An error is returned from ALSA core for invalid inputs without
221f5e829f9STakashi Iwai	  passing to the driver.  This is a kind of hardening for drivers
2221b7ec514STakashi Iwai	  that have no proper error checks, at the cost of a slight
2231b7ec514STakashi Iwai	  performance overhead.
224fbd3eb7fSTakashi Iwai
225fbd3eb7fSTakashi Iwaiconfig SND_CTL_DEBUG
2261b7ec514STakashi Iwai	bool "Enable debugging feature for control API"
2271b7ec514STakashi Iwai	depends on SND_DEBUG
2281b7ec514STakashi Iwai	help
2291b7ec514STakashi Iwai	  Say Y to enable the debugging feature for ALSA control API.
2301b7ec514STakashi Iwai	  It performs the additional sanity-checks for each control element
2311b7ec514STakashi Iwai	  read access, such as whether the values returned from the driver
2321b7ec514STakashi Iwai	  are in the proper ranges or the check of the invalid access at
2331b7ec514STakashi Iwai	  out-of-array areas.  The error is printed when the driver gives
2341b7ec514STakashi Iwai	  such unexpected values.
235fbd3eb7fSTakashi Iwai	  When you develop a driver that deals with control elements, it's
2362d670ea2SHui Wang	  strongly recommended to try this one once and verify whether you see
2372d670ea2SHui Wang	  any relevant errors or not.
2382d670ea2SHui Wang
2392d670ea2SHui Wangconfig SND_JACK_INJECTION_DEBUG
2402d670ea2SHui Wang	bool "Sound jack injection interface via debugfs"
2412d670ea2SHui Wang	depends on SND_JACK && SND_DEBUG && DEBUG_FS
2422d670ea2SHui Wang	help
2432d670ea2SHui Wang	  This option can be used to enable or disable sound jack
2442d670ea2SHui Wang	  software injection.
245*37745918SIvan Orlov	  Say Y if you are debugging via jack injection interface.
246*37745918SIvan Orlov	  If unsure select "N".
247*37745918SIvan Orlov
248*37745918SIvan Orlovconfig SND_UTIMER
249*37745918SIvan Orlov	bool "Enable support for userspace-controlled virtual timers"
250*37745918SIvan Orlov	depends on SND_TIMER
251*37745918SIvan Orlov	help
252*37745918SIvan Orlov	  Say Y to enable the support of userspace-controlled timers. These
253*37745918SIvan Orlov	  timers are purely virtual, and they are supposed to be triggered
254*37745918SIvan Orlov	  from userspace. They could be quite useful when synchronizing the
255e922b002STakashi Iwai	  sound timing with userspace applications (for instance, when sending
256e922b002STakashi Iwai	  data through snd-aloop).
2570528c749SMichal Marek
258cc6a8acdSTakashi Iwaiconfig SND_VMASTER
259cc6a8acdSTakashi Iwai	bool
260cc6a8acdSTakashi Iwai
261cc6a8acdSTakashi Iwaiconfig SND_DMA_SGBUF
26222d8de62SJaroslav Kysela	def_bool y
26322d8de62SJaroslav Kysela	depends on X86
26422d8de62SJaroslav Kysela
26522d8de62SJaroslav Kyselaconfig SND_CTL_LED
26622d8de62SJaroslav Kysela	tristate
2670528c749SMichal Marek	select NEW_LEDS if SND_CTL_LED
268	select LEDS_TRIGGERS if SND_CTL_LED
269
270source "sound/core/seq/Kconfig"
271