1# SPDX-License-Identifier: BSD-3-Clause
2
3menu "Audio components"
4
5config COMP_COPIER
6        bool "COPIER component"
7        default y
8        depends on IPC_MAJOR_4
9        help
10          Select for COPIER component
11config COMP_DAI
12	bool "DAI component"
13	default y
14	help
15	  Select for DAI component
16
17config COMP_VOLUME
18	bool "Volume component"
19	default y
20	help
21	  Select for Volume component
22
23config COMP_SRC
24	bool "SRC component"
25	default y
26	help
27	  Select for SRC component
28
29if COMP_SRC
30
31choice
32        prompt "SRC coefficient set"
33        default COMP_SRC_STD
34
35config COMP_SRC_STD
36	bool "Full conversions support and high quality"
37	help
38	  This coefficients set supports a large number of conversions
39	  with 8 - 192 kHz input and 8 - 48 kHz output. The coefficients
40	  are 32 bits for high conversion quality. The coefficients
41	  storage consume 79 kB. The runtime needs 8 kB. Use this if there
42	  is critical quality usage for SRC like music via headphones and
43	  need high sample rates.
44
45config COMP_SRC_SMALL
46	bool "Smaller conversions support and high quality"
47	help
48	  This coefficients set supports a small number of conversions
49	  with 8 - 48 kHz input and output. The coefficients are 32 bits
50	  for high conversion quality. The coefficients storage consumes
51	  30 kB RAM. Runtime needs 4 kB. Use this if there is critical
52	  quality usage for SRC like music via headphones.
53
54config COMP_SRC_TINY
55	bool "Reduced conversions support and reduced quality"
56	help
57	  This coefficients set supports a minimum number of conversions
58	  with 8 - 48 kHz input and output. The coefficients are 16 bits
59	  that restricts the possible stop-attenuation and could cause
60	  some audible aliasing. The bandwidth of the filters is restricted
61	  so the full 20 kHz band is not met even if sample rate would
62	  allow. The coefficients storage consumes 5 kB RAM. The runtime
63	  needs 6 kB. Use this to save RAM for other applications when SRC
64	  has no critical usage or when only need with lower quality
65	  endpoint like miniature speakers.
66
67endchoice
68
69endif # SRC
70
71config MATH_FIR
72	bool "FIR filter library"
73	default n
74	help
75	  This option builds FIR (Finite Impulse Response) filter library. It
76	  is selected by components for their digital signal processing. A FIR
77	  filter calculates a convolution of input PCM sample and a configurable
78	  impulse response.
79
80config MATH_FFT
81	bool "FFT library"
82	default n
83	help
84	  Enable Fast Fourier Transform library, this should not be selected
85	  directly, please select it from other audio components where need it.
86
87config COMP_FIR
88	bool "FIR component"
89	select MATH_FIR
90	default y
91	help
92	  Select for FIR component. FIR performance can differ between DSP
93	  ISA and compiler used. FIR will perform best when MAC instructions
94	  are available in ISA and are used by the compiler. i.e. xt-xcc on
95	  xtensa will generate MAC instructions but GCC on xtensa won't.
96	  Filter tap count can be severely restricted to reduce FIR cycles
97	  and FIR performance for DSP/compilers with no MAC support
98
99config COMP_IIR
100	bool "IIR component"
101	default y
102	help
103	  Select for IIR component
104
105config CORDIC_FIXED
106       bool "Sine Cosine library function"
107       default n
108       help
109          This option builds the 32 and 16 bit sin_fixed() library function.
110	  The input is Q4.28 format and the output is Q1.31. The cordic sine
111	  cos algorithm converges, when the angle is in the range [-pi/2, pi/2).
112	  If an angle is outside of this range, then a multiple of pi/2 is added
113	  or subtracted from the angle until it is within the range [-pi/2,pi/2).
114	  Start with the angle in the range [-2*pi, 2*pi) and output has range in
115	  [-1.0 to 1.0]
116
117config COMP_TONE
118	bool "Tone component"
119	default y
120	select CORDIC_FIXED
121	help
122	  Select for Tone component
123
124config COMP_MIXER
125	bool "Mixer component"
126	default y
127	help
128	  Select for Mixer component
129
130config COMP_MUX
131	bool "MUX component"
132	default y
133	help
134	  Select for MUX component
135
136config COMP_SWITCH
137	bool "Switch component"
138	default y
139	help
140	  Select for Switch component
141
142config COMP_KPB
143	bool "KPB component"
144	default y
145	help
146	  Select for KPB component
147if COMP_KPB
148
149config KPB_FORCE_COPY_TYPE_NORMAL
150	bool "KPB force copy type normal"
151	default y
152	help
153	   Select this to force the kpb draining copy type to normal.
154	   Unselecting this will keep the kpb sink copy type unchanged.
155
156endif # COMP_KPB
157
158config COMP_GOOGLE_HOTWORD_DETECT
159	bool "Google hotword detector component"
160	default n
161	help
162	  Select for Google hotword detector component. It uses the Google
163	  hotword library to do keyword detection. A language model needs to
164	  be set using the byte control 'Hotword Model' before running the
165	  detector.
166
167config COMP_SEL
168	bool "Channel selector component"
169	default y
170	help
171	  Select for SEL component
172
173config COMP_CROSSOVER
174	bool "Crossover Filter component"
175	default n
176	help
177	  Select for Crossover Filter component. A crossover can be used to
178	  split a signal into two or more frequency ranges, so that the outputs
179	  can be sent to drivers that are designed for those ranges.
180
181config COMP_DRC
182	bool "Dynamic Range Compressor component"
183	select CORDIC_FIXED
184	default n
185	help
186	  Select for Dynamic Range Compressor (DRC) component. A DRC can be used
187	  to reduce the volume of loud sounds and amplify silent sounds thus
188	  compressing an audio signal's dynamic range.
189
190config DRC_MAX_PRE_DELAY_FRAMES
191	depends on COMP_DRC
192	int "DRC max number of pre-delay frames"
193	default 512
194	help
195	  Determines the length of pre-delay frame buffers which are allocated
196	  runtime on DRC setup. It requires to be a 2^N number. 512 is
197	  suggested by inference to avoid memory waste and provide reasonable
198	  length for pre-delay frames.
199
200config COMP_MULTIBAND_DRC
201	depends on COMP_IIR && COMP_CROSSOVER && COMP_DRC
202	bool "Multiband Dynamic Range Compressor component"
203	select CORDIC_FIXED
204	default n
205	help
206	  Select for Multiband Dynamic Range Compressor (DRC) component. It
207	  consists of Emphasis Equalizer, n-way Crossover Filter, per-band DRC,
208	  and Deemphasis Equalizer.
209
210config COMP_DCBLOCK
211	bool "DC Blocking Filter component"
212	default y
213	help
214	  Select for DC Blocking Filter component. This component filters out
215	  the DC offset which often originates from a microphone's output.
216
217config MAXIM_DSM
218	depends on CAVS && !CAVS_VERSION_1_5
219	bool "Maxim DSM component"
220	default n
221	help
222	  Select for Maxim DSM(Dynamic Speaker Management) component.
223	  This component protect the speaker from overheating and
224	  excursion violation. This consists of two parts which are
225	  feedforward processing block running on playback thread and
226	  feedback processing block running on capture thread with
227	  amp current and voltage feedback.
228
229config COMP_ASRC
230	bool "ASRC component"
231	default y
232	help
233	  Select for Asynchronous sample rate conversion (ASRC)
234	  component. The ASRC has the capabilities of (synchronous)
235	  SRC but can in addition track a slave DAI that is not in
236	  sync with firmware timer. The ASRC can be setup for
237	  synchronous operation without DAI tracking via topology
238	  though it has a bit higher computational load than SRC. The
239	  RAM footprint of ASRC is smaller than SRC because it does
240	  not have pre-computed filter coefficients for every
241	  conversion fraction that SRC does.
242
243if COMP_ASRC
244
245choice
246        prompt "ASRC down sampling conversions set"
247        default COMP_ASRC_DOWNSAMPLING_FULL
248
249config COMP_ASRC_DOWNSAMPLING_FULL
250	bool "Full downsampling conversions support"
251	select ASRC_SUPPORT_CONVERSION_24000_TO_08000
252	select ASRC_SUPPORT_CONVERSION_24000_TO_16000
253	select ASRC_SUPPORT_CONVERSION_48000_TO_08000
254	select ASRC_SUPPORT_CONVERSION_48000_TO_11025
255	select ASRC_SUPPORT_CONVERSION_48000_TO_12000
256	select ASRC_SUPPORT_CONVERSION_48000_TO_16000
257	select ASRC_SUPPORT_CONVERSION_48000_TO_22050
258	select ASRC_SUPPORT_CONVERSION_48000_TO_24000
259	select ASRC_SUPPORT_CONVERSION_48000_TO_32000
260	select ASRC_SUPPORT_CONVERSION_48000_TO_44100
261	help
262	  This option enables all supported downsampling conversions
263	  for the asynchronous sample rate conversion. All the
264	  upsampling conversions use the same filter always enabled
265	  coefficients set so there is no configuration options for
266	  them. The enabled conversions consume about 18 kB of memory.
267
268config COMP_ASRC_DOWNSAMPLING_CUSTOM
269	bool "Custom downsampling conversions support"
270	help
271	  This option used to manually select each downsampling ratio.
272	  In order to optimize the text code size of the sample rate
273	  converter, non-required conversion ratios can be
274	  deactivated.  Disregarding these settings, the sample rate
275	  converter always supports all conversion ratios with fs_in
276	  less or equal to fs_out. Therefore, it is possible to
277	  deactivate all conversion ratios listed below, if we only
278	  need an (asynchronous) 1:1 sample rate conversion, e.g, from
279	  16 kHz to 16 kHz. This option allows to trim down the coefficient
280	  memory for conversion down from default 18 kB. Each conversion
281	  needs about 2 kB.
282
283endchoice
284
285menu "Supported downsampling conversions"
286	visible if COMP_ASRC_DOWNSAMPLING_CUSTOM
287
288config ASRC_SUPPORT_CONVERSION_24000_TO_08000
289	bool "Downsample 24 kHz to 8 kHz"
290	default n
291	help
292	  This option enables downsampling from 24 kHz to 8 kHz into
293	  the build. The consumption of memory is 2.1 kB.
294
295config ASRC_SUPPORT_CONVERSION_24000_TO_16000
296	bool "Downsample 24 kHz to 16 kHz"
297	default n
298	help
299	  This option enables downsampling from 24 kHz to 16 kHz into
300	  the build. The consumption of memory is 1.9 kB.
301
302config ASRC_SUPPORT_CONVERSION_48000_TO_08000
303	bool "Downsample 48 kHz to 8 kHz"
304	default n
305	help
306	  This option enables downsampling from 48 kHz to 8 kHz into
307	  the build. The consumption of memory is 2.1 kB.
308
309config ASRC_SUPPORT_CONVERSION_48000_TO_11025
310	bool "Downsample 48 kHz to 11.025 kHz"
311	default n
312	help
313	  This option enables downsampling from 48 kHz to 11.025 kHz
314	  into the build. The consumption of memory is 1.5 kB.
315
316config ASRC_SUPPORT_CONVERSION_48000_TO_12000
317	bool "Downsample 48 kHz to 12 kHz"
318	default n
319	help
320	  This option enables downsampling from 48 kHz to 12 kHz into
321	  the build. The consumption of memory is 1.5 kB.
322
323config ASRC_SUPPORT_CONVERSION_48000_TO_16000
324	bool "Downsample 48 kHz to 16 kHz"
325	default n
326	help
327	  This option enables downsampling from 48 kHz to 16 kHz into
328	  the build. The consumption of memory is 1.9 kB.
329
330config ASRC_SUPPORT_CONVERSION_48000_TO_22050
331	bool "Downsample 48 kHz to 22.05 kHz"
332	default n
333	help
334	  This option enables downsampling from 48 kHz to 22.05 kHz into
335	  the build. The consumption of memory is 1.6 kB.
336
337config ASRC_SUPPORT_CONVERSION_48000_TO_24000
338	bool "Downsample 48 kHz to 24 kHz"
339	default n
340	help
341	  This option enables downsampling from 48 kHz to 24 kHz into
342	  the build. The consumption of memory is 1.6 kB.
343
344config ASRC_SUPPORT_CONVERSION_48000_TO_32000
345	bool "Downsample 48 kHz to 32 kHz"
346	default n
347	help
348	  This option enables downsampling from 48 kHz to 32 kHz into
349	  the build. The consumption of memory is 1.9 kB.
350
351config ASRC_SUPPORT_CONVERSION_48000_TO_44100
352	bool "Downsample 48 kHz to 44.1 kHz"
353	default n
354	help
355	  This option enables downsampling from 48 kHz to 44.1 kHz
356	  into the build. The consumption of memory is 1.8 kB.
357
358endmenu # "Downsampling ratios"
359
360endif # COMP_ASRC
361
362config COMP_TDFB
363	bool "TDFB component"
364	select MATH_FIR
365	default y
366	help
367	  Select for time domain fixed beamformer (TDFB) component. The
368          beamformer component enhances microphone capture by spatial
369          suppression of noise and improvement of signal-to-noise ratio of
370          capture from beam direction. The component is essentially a generic
371          single rate FIR filter bank that performs microphone array
372          directivity enhancement when programmed with suitable configuration
373          for channels selection, channel filter coefficients, and output
374          streams mixing.
375
376config COMP_CODEC_ADAPTER
377	bool "Codec adapter"
378	default n
379	help
380	  This component is an adapter between SoF components and any external third
381	  party codecs/libraries. In order to make use of it the library itself should
382	  be statically linked with the SoF FW binary image and the codec details, such as its
383	  ID or specific methods provided in generic interface object located under
384	  "src\include\sof\audio\codec_adapter\interfaces.h". It is possible to link several
385	  different codecs and use them in parallel.
386
387rsource "codec_adapter/Kconfig"
388
389config COMP_IGO_NR
390	bool "IGO NR component"
391	default n
392	help
393	  This option enables Intelligo non-speech noise reduction. The feature links to a proprietary
394	  binary libigonr.a that currently is supported on different Xtensa DSP platforms. Please email
395	  info@intelli-go.com for any questions about the binary.
396
397config COMP_RTNR
398	bool "RTNR component"
399	default n
400	help
401	  Select for Realtek noise reduction/suppression(NR/NS) component.
402	  Noise Suppression technology reduces stationary and transient noises in
403	  single-channel speech signals, which increases the signal-to-noise ratio,
404	  improves speech intelligibility and reduces listening fatigue. It estimates
405	  ambient noise and signal levels and then passes or attenuates the signals
406	  according to improve signal-to-noise ratios. The feature links to a
407	  proprietary binary libSOF_RTK_MA_API.a, libSuite_rename.a, libNet.a and libPreset.a.
408	  Please contact antz0525@realtek.com for any question about the binary.
409
410endmenu # "Audio components"
411
412menu "Data formats"
413
414config FORMAT_S16LE
415	bool "Support S16LE"
416	default y
417	help
418	  Support 16 bit processing data format with sign and in little endian format
419
420config FORMAT_S24LE
421	bool "Support S24LE"
422	default y
423	help
424	  Support 24 bit processing data format with sign and in little endian format
425
426config FORMAT_S32LE
427	bool "Support S32LE"
428	default y
429	help
430	  Support 32 bit processing data format with sign and in little endian format
431
432config FORMAT_FLOAT
433	bool "Support float"
434	default y
435	help
436	  Support floating point processing data format
437
438config FORMAT_CONVERT_HIFI3
439	bool "HIFI3 optimized conversion"
440	default y
441	help
442	  Use HIFI3 extensions for optimized format conversion (experimental).
443
444config PCM_CONVERTER_FORMAT_S16LE
445	bool "Support S16LE"
446	default y
447	help
448	  Support 16 bit processing data format with sign and in little endian format
449
450config PCM_CONVERTER_FORMAT_S24LE
451	bool "Support S24LE"
452	default y
453	help
454	  Support 24 bit processing data format with sign and in little endian format
455
456config PCM_CONVERTER_FORMAT_S32LE
457	bool "Support S32LE"
458	default y
459	help
460	  Support 32 bit processing data format with sign and in little endian format
461
462config PCM_CONVERTER_FORMAT_FLOAT
463	bool "Support float"
464	default y
465	help
466	  Support floating point processing data format
467
468config PCM_CONVERTER_FORMAT_S16_C16_AND_S16_C32
469	bool "Support S16C16 <-> S16C32"
470	default n
471	help
472	  Support conversion between 16 bit valid sample size in 16 bit container
473	  and 16 bit valid sample size in 32 bit container
474
475config PCM_CONVERTER_FORMAT_S16_C32_AND_S32_C32
476	bool "Support S16C32 <-> S32C32"
477	default n
478	help
479	  Support conversion between 16 bit valid sample size in 32 bit container
480	  and 32 bit valid sample size in 32 bit container
481
482config PCM_CONVERTER_FORMAT_S16_C32_AND_S24_C32
483	bool "Support S16C32 <-> S24C32"
484	default n
485	help
486	  Support conversion between 16 bit valid sample size in 32 bit container
487	  and 24 bit valid sample size in 32 bit container
488
489config PCM_CONVERTER_FORMAT_CONVERT_HIFI3
490	bool "HIFI3 optimized conversion"
491	default y
492	help
493	  Use HIFI3 extensions for optimized format conversion (experimental).
494
495config TRACE_CHANNEL
496	int "TRACE DMA Channel configuration"
497	default 0
498	help
499	  This option is used for custom configuration of trace dma channel other
500	  than zero dma channel.Define macro DMA_TRACE_CHANNEL in platform to
501	  configure the required channel number.
502
503config WRAP_ACTUAL_POSITION
504	bool "Buffer wrapping"
505	default n
506	help
507	  This option is to update the actual position information on wrap of buffer.
508	  It is not necessary that on wrap, the buffer position would be zero.At wrap,
509	  in some cases based on the period size, the frame may not exactly be at the
510	  end of the buffer and roll over for some bytes from the beginning of the buffer.
511endmenu
512