1# SPDX-License-Identifier: BSD-3-Clause
2
3menu "Audio components"
4
5config COMP_BASEFW_IPC4
6        bool "BASEFW component"
7        default y
8        depends on IPC_MAJOR_4
9        help
10          Select for BASEFW component
11
12config COMP_COPIER
13        bool "COPIER component"
14        default y
15        depends on IPC_MAJOR_4
16        help
17          Select for COPIER component
18
19config HOST_DMA_RELOAD_DELAY_ENABLE
20	bool "Delay reloading DMA for host interfaces"
21	default y
22	help
23	  When deep buffers are used the firmware doesn't need to have the
24	  buffer refilled every millisecond. Select this option to enable longer
25	  delays and to allow the memory controller to enter power saving modes.
26
27config HOST_DMA_RELOAD_THRESHOLD
28	int "DMA buffer threshold in milliseconds to reload DMA"
29	default 2
30	depends on HOST_DMA_RELOAD_DELAY_ENABLE
31	help
32	  The DMA buffer threshold in milliseconds to trigger host DMA
33	  reloading.
34
35config COMP_DAI
36	bool "DAI component"
37	default y
38	help
39	  Select for DAI component
40
41config COMP_DAI_STOP_TRIGGER_ORDER_REVERSE
42	bool "Reverse the ordering of DMA and DAI triggers during STOP/PAUSE"
43	help
44	  Select if the ordering of DMA and DAI triggers during stop/pause should be reversed.
45	  The normal order during stop/pause is to stop DAI before stopping DMA. This option will
46	  allow reversing the order to do DMA stop before stopping DAI.
47
48config COMP_DAI_GROUP
49	bool "DAI Grouping support"
50	default y
51	help
52	  Select for grouping physical DAIs into a logical DAI that can be
53	  triggered atomically to synchronise stream start and stop operations.
54
55config COMP_CHAIN_DMA
56	  bool "Chain DMA component"
57	  default n
58	  depends on IPC_MAJOR_4
59	  help
60	    Chain DMA support in hardware
61
62config XRUN_NOTIFICATIONS_ENABLE
63	bool "Enable xrun notification"
64	default n
65	depends on IPC_MAJOR_4
66	help
67	  Enable xrun notifications sending to host
68
69config IPC4_GATEWAY
70        bool "IPC4 Gateway"
71        default y
72        depends on IPC_MAJOR_4
73        help
74          Select for IPC4 Gateway. IPC4 Gateway is used to transfer audio between
75          host and DSP without using DMA: via memory window (audio payload) and
76          IPC4 messages (set/get/flush commands).
77
78config COMP_ARIA
79        bool "ARIA component"
80        default n
81        depends on IPC_MAJOR_4
82        help
83          Select for Automatic Regressive Input Amplifier Module component
84	  ARIA applies variable gain into incoming signal.
85	  Applied gain is in range <1, 2 power attenuation>
86	  Currently ARIA introduces gain transition and algorithmic
87	  latency equal to 1 ms.
88
89config COMP_UP_DOWN_MIXER
90	bool "UP_DOWN_MIXER component"
91	default n
92        depends on IPC_MAJOR_4
93        help
94         Select for Up Down Mixer component Conversions supported:
95         Up/Downmixing for stereo output:
96         1, 2, 2.1, 3.0, 3.1, Quatro, 4.0, 5.0, 5.1, 7.1 -> 2
97         Upmixing for multichannel output:
98         1, 2 -> 5.1
99         2 -> 7.1
100         Downmixing for mono output:
101         4.0, Quatro, 3.1, 2 -> 1
102
103config COMP_BLOB
104	bool "Large IPC data as compound message blobs"
105	default y
106	help
107	 Select to support sending large data blobs to firmware as
108	 multiple IPC messages. Not all components or modules need
109	 this. If unsure, say yes.
110
111config COMP_SRC
112	bool "SRC component"
113	default y
114	help
115	  Select for SRC component
116
117if COMP_SRC
118
119choice
120        prompt "SRC coefficient set"
121        default COMP_SRC_STD
122
123config COMP_SRC_STD
124	bool "Full conversions support and high quality"
125	help
126	  This coefficients set supports a large number of conversions
127	  with 8 - 192 kHz input and 8 - 48 kHz output. The coefficients
128	  are 32 bits for high conversion quality. The coefficients
129	  storage consume 79 kB. The runtime needs 8 kB. Use this if there
130	  is critical quality usage for SRC like music via headphones and
131	  need high sample rates.
132
133config COMP_SRC_SMALL
134	bool "Smaller conversions support and high quality"
135	help
136	  This coefficients set supports a small number of conversions
137	  with 8 - 48 kHz input and output. The coefficients are 32 bits
138	  for high conversion quality. The coefficients storage consumes
139	  30 kB RAM. Runtime needs 4 kB. Use this if there is critical
140	  quality usage for SRC like music via headphones.
141
142config COMP_SRC_TINY
143	bool "Reduced conversions support and reduced quality"
144	help
145	  This coefficients set supports a minimum number of conversions
146	  with 8 - 48 kHz input and output. The coefficients are 16 bits
147	  that restricts the possible stop-attenuation and could cause
148	  some audible aliasing. The bandwidth of the filters is restricted
149	  so the full 20 kHz band is not met even if sample rate would
150	  allow. The coefficients storage consumes 5 kB RAM. The runtime
151	  needs 6 kB. Use this to save RAM for other applications when SRC
152	  has no critical usage or when only need with lower quality
153	  endpoint like miniature speakers.
154
155config COMP_SRC_IPC4_FULL_MATRIX
156	bool "Full IPC4 conversions matrix support and high quality"
157	help
158	  This coefficients set supports a large number of conversions
159	  with 8 - 192 kHz input 8 - 192 kHz output. The 32 bits coefficients
160	  storate consumes 241 kB. The runtime needs 9 kB. Use this to
161	  make the full conversions set available for IPC4 build.
162
163endchoice
164
165endif # SRC
166
167config COMP_FIR
168	bool "FIR component"
169	select MATH_FIR
170	select COMP_BLOB
171	depends on COMP_MODULE_ADAPTER
172	default y
173	help
174	  Select for FIR component. FIR performance can differ between DSP
175	  ISA and compiler used. FIR will perform best when MAC instructions
176	  are available in ISA and are used by the compiler. i.e. xt-xcc on
177	  xtensa will generate MAC instructions but GCC on xtensa won't.
178	  Filter tap count can be severely restricted to reduce FIR cycles
179	  and FIR performance for DSP/compilers with no MAC support
180
181config COMP_IIR
182	bool "IIR component"
183	select COMP_BLOB
184	default y
185	depends on COMP_MODULE_ADAPTER
186	select MATH_IIR_DF1
187	help
188	  Select for IIR component
189
190config COMP_TONE
191	bool "Tone component"
192	default n
193	select CORDIC_FIXED
194	help
195	  Select for Tone component
196
197config COMP_MIXER
198	bool "Mixer component"
199	default y
200	help
201	  Select for Mixer component
202
203config COMP_MUX
204	bool "MUX component"
205	select COMP_BLOB
206	depends on COMP_MODULE_ADAPTER
207	default y
208	help
209	  Select for MUX component
210
211config COMP_SWITCH
212	bool "Switch component"
213	default n
214	help
215	  Select for Switch component
216
217config COMP_KPB
218	bool "KPB component"
219	default y
220	help
221	  Select for KPB component
222if COMP_KPB
223
224config KPB_FORCE_COPY_TYPE_NORMAL
225	bool "KPB force copy type normal"
226	default y
227	help
228	   Select this to force the kpb draining copy type to normal.
229	   Unselecting this will keep the kpb sink copy type unchanged.
230
231endif # COMP_KPB
232
233rsource "google/Kconfig"
234
235config COMP_SEL
236	bool "Channel selector component"
237	default y
238	help
239	  Select for SEL component
240
241config COMP_CROSSOVER
242	bool "Crossover Filter component"
243	select COMP_BLOB
244	select MATH_IIR_DF2T
245	default n
246	help
247	  Select for Crossover Filter component. A crossover can be used to
248	  split a signal into two or more frequency ranges, so that the outputs
249	  can be sent to drivers that are designed for those ranges.
250
251config COMP_DRC
252	bool "Dynamic Range Compressor component"
253	select CORDIC_FIXED
254	select NUMBERS_NORM
255	select MATH_DECIBELS
256	select COMP_BLOB
257	default n
258	help
259	  Select for Dynamic Range Compressor (DRC) component. A DRC can be used
260	  to reduce the volume of loud sounds and amplify silent sounds thus
261	  compressing an audio signal's dynamic range.
262
263config DRC_MAX_PRE_DELAY_FRAMES
264	depends on COMP_DRC
265	int "DRC max number of pre-delay frames"
266	default 512
267	help
268	  Determines the length of pre-delay frame buffers which are allocated
269	  runtime on DRC setup. It requires to be a 2^N number. 512 is
270	  suggested by inference to avoid memory waste and provide reasonable
271	  length for pre-delay frames.
272
273config COMP_MULTIBAND_DRC
274	depends on COMP_IIR && COMP_CROSSOVER && COMP_DRC
275	bool "Multiband Dynamic Range Compressor component"
276	select CORDIC_FIXED
277	select COMP_BLOB
278	default n
279	help
280	  Select for Multiband Dynamic Range Compressor (DRC) component. It
281	  consists of Emphasis Equalizer, n-way Crossover Filter, per-band DRC,
282	  and Deemphasis Equalizer.
283
284config COMP_DCBLOCK
285	bool "DC Blocking Filter component"
286	default y
287	help
288	  Select for DC Blocking Filter component. This component filters out
289	  the DC offset which often originates from a microphone's output.
290
291config MAXIM_DSM
292	depends on CAVS
293	bool "Maxim DSM component"
294	select COMP_BLOB
295	default n
296	help
297	  Select for Maxim DSM(Dynamic Speaker Management) component.
298	  This component protect the speaker from overheating and
299	  excursion violation. This consists of two parts which are
300	  feedforward processing block running on playback thread and
301	  feedback processing block running on capture thread with
302	  amp current and voltage feedback.
303
304config COMP_ASRC
305	bool "ASRC component"
306	default y
307	help
308	  Select for Asynchronous sample rate conversion (ASRC)
309	  component. The ASRC has the capabilities of (synchronous)
310	  SRC but can in addition track a slave DAI that is not in
311	  sync with firmware timer. The ASRC can be setup for
312	  synchronous operation without DAI tracking via topology
313	  though it has a bit higher computational load than SRC. The
314	  RAM footprint of ASRC is smaller than SRC because it does
315	  not have pre-computed filter coefficients for every
316	  conversion fraction that SRC does.
317
318if COMP_ASRC
319
320choice
321        prompt "ASRC down sampling conversions set"
322        default COMP_ASRC_DOWNSAMPLING_FULL
323
324config COMP_ASRC_DOWNSAMPLING_FULL
325	bool "Full downsampling conversions support"
326	select ASRC_SUPPORT_CONVERSION_24000_TO_08000
327	select ASRC_SUPPORT_CONVERSION_24000_TO_16000
328	select ASRC_SUPPORT_CONVERSION_48000_TO_08000
329	select ASRC_SUPPORT_CONVERSION_48000_TO_11025
330	select ASRC_SUPPORT_CONVERSION_48000_TO_12000
331	select ASRC_SUPPORT_CONVERSION_48000_TO_16000
332	select ASRC_SUPPORT_CONVERSION_48000_TO_22050
333	select ASRC_SUPPORT_CONVERSION_48000_TO_24000
334	select ASRC_SUPPORT_CONVERSION_48000_TO_32000
335	select ASRC_SUPPORT_CONVERSION_48000_TO_44100
336	help
337	  This option enables all supported downsampling conversions
338	  for the asynchronous sample rate conversion. All the
339	  upsampling conversions use the same filter always enabled
340	  coefficients set so there is no configuration options for
341	  them. The enabled conversions consume about 18 kB of memory.
342
343config COMP_ASRC_DOWNSAMPLING_CUSTOM
344	bool "Custom downsampling conversions support"
345	help
346	  This option used to manually select each downsampling ratio.
347	  In order to optimize the text code size of the sample rate
348	  converter, non-required conversion ratios can be
349	  deactivated.  Disregarding these settings, the sample rate
350	  converter always supports all conversion ratios with fs_in
351	  less or equal to fs_out. Therefore, it is possible to
352	  deactivate all conversion ratios listed below, if we only
353	  need an (asynchronous) 1:1 sample rate conversion, e.g, from
354	  16 kHz to 16 kHz. This option allows to trim down the coefficient
355	  memory for conversion down from default 18 kB. Each conversion
356	  needs about 2 kB.
357
358endchoice
359
360menu "Supported downsampling conversions"
361	visible if COMP_ASRC_DOWNSAMPLING_CUSTOM
362
363config ASRC_SUPPORT_CONVERSION_24000_TO_08000
364	bool "Downsample 24 kHz to 8 kHz"
365	default n
366	help
367	  This option enables downsampling from 24 kHz to 8 kHz into
368	  the build. The consumption of memory is 2.1 kB.
369
370config ASRC_SUPPORT_CONVERSION_24000_TO_16000
371	bool "Downsample 24 kHz to 16 kHz"
372	default n
373	help
374	  This option enables downsampling from 24 kHz to 16 kHz into
375	  the build. The consumption of memory is 1.9 kB.
376
377config ASRC_SUPPORT_CONVERSION_48000_TO_08000
378	bool "Downsample 48 kHz to 8 kHz"
379	default n
380	help
381	  This option enables downsampling from 48 kHz to 8 kHz into
382	  the build. The consumption of memory is 2.1 kB.
383
384config ASRC_SUPPORT_CONVERSION_48000_TO_11025
385	bool "Downsample 48 kHz to 11.025 kHz"
386	default n
387	help
388	  This option enables downsampling from 48 kHz to 11.025 kHz
389	  into the build. The consumption of memory is 1.5 kB.
390
391config ASRC_SUPPORT_CONVERSION_48000_TO_12000
392	bool "Downsample 48 kHz to 12 kHz"
393	default n
394	help
395	  This option enables downsampling from 48 kHz to 12 kHz into
396	  the build. The consumption of memory is 1.5 kB.
397
398config ASRC_SUPPORT_CONVERSION_48000_TO_16000
399	bool "Downsample 48 kHz to 16 kHz"
400	default n
401	help
402	  This option enables downsampling from 48 kHz to 16 kHz into
403	  the build. The consumption of memory is 1.9 kB.
404
405config ASRC_SUPPORT_CONVERSION_48000_TO_22050
406	bool "Downsample 48 kHz to 22.05 kHz"
407	default n
408	help
409	  This option enables downsampling from 48 kHz to 22.05 kHz into
410	  the build. The consumption of memory is 1.6 kB.
411
412config ASRC_SUPPORT_CONVERSION_48000_TO_24000
413	bool "Downsample 48 kHz to 24 kHz"
414	default n
415	help
416	  This option enables downsampling from 48 kHz to 24 kHz into
417	  the build. The consumption of memory is 1.6 kB.
418
419config ASRC_SUPPORT_CONVERSION_48000_TO_32000
420	bool "Downsample 48 kHz to 32 kHz"
421	default n
422	help
423	  This option enables downsampling from 48 kHz to 32 kHz into
424	  the build. The consumption of memory is 1.9 kB.
425
426config ASRC_SUPPORT_CONVERSION_48000_TO_44100
427	bool "Downsample 48 kHz to 44.1 kHz"
428	default n
429	help
430	  This option enables downsampling from 48 kHz to 44.1 kHz
431	  into the build. The consumption of memory is 1.8 kB.
432
433endmenu # "Downsampling ratios"
434
435endif # COMP_ASRC
436
437config COMP_TDFB
438	bool "TDFB component"
439	depends on COMP_MODULE_ADAPTER
440	select MATH_FIR
441	select MATH_IIR_DF1
442	select SQRT_FIXED
443	select CORDIC_FIXED
444	select COMP_BLOB
445	default y
446	help
447	  Select for time domain fixed beamformer (TDFB) component. The
448          beamformer component enhances microphone capture by spatial
449          suppression of noise and improvement of signal-to-noise ratio of
450          capture from beam direction. The component is essentially a generic
451          single rate FIR filter bank that performs microphone array
452          directivity enhancement when programmed with suitable configuration
453          for channels selection, channel filter coefficients, and output
454          streams mixing.
455
456config COMP_MODULE_ADAPTER
457	bool "Module adapter"
458	default y
459	help
460	  This component is an adapter between SoF components and any external third
461	  party codecs/libraries. In order to make use of it the library itself should
462	  be statically linked with the SoF FW binary image and the codec details, such as its
463	  ID or specific methods provided in generic interface object located under
464	  "src\include\sof\audio\module_adapter\interfaces.h". It is possible to link several
465	  different codecs and use them in parallel.
466
467rsource "module_adapter/Kconfig"
468
469config COMP_LEGACY_INTERFACE
470	bool "Use legacy component driver interface"
471	default n
472	help
473	  Use the legacy component driver interface for component instead of the module adapter.
474
475config COMP_IGO_NR
476	bool "IGO NR component"
477	select COMP_BLOB
478	default n
479	help
480	  This option enables Intelligo non-speech noise reduction. The feature links to a proprietary
481	  binary libigonr.a that currently is supported on different Xtensa DSP platforms. Please email
482	  info@intelli-go.com for any questions about the binary.
483
484config COMP_RTNR
485	bool "RTNR component"
486	select COMP_BLOB
487	default n
488	help
489	  Select for Realtek noise reduction/suppression(NR/NS) component.
490	  Noise Suppression technology reduces stationary and transient noises in
491	  single-channel speech signals, which increases the signal-to-noise ratio,
492	  improves speech intelligibility and reduces listening fatigue. It estimates
493	  ambient noise and signal levels and then passes or attenuates the signals
494	  according to improve signal-to-noise ratios. The feature links to a
495	  proprietary binary libSOF_RTK_MA_API.a, libSuite_rename.a, libNet.a and libPreset.a.
496	  Please contact antz0525@realtek.com for any question about the binary.
497
498config COMP_MFCC
499	bool "MFCC component"
500	depends on COMP_MODULE_ADAPTER
501	depends on !COMP_LEGACY_INTERFACE
502	select CORDIC_FIXED
503	select MATH_16BIT_MEL_FILTERBANK
504	select MATH_AUDITORY
505	select MATH_DCT
506	select MATH_DECIBELS
507	select MATH_FFT
508	select MATH_MATRIX
509	select MATH_WINDOW
510	select NATURAL_LOGARITHM_FIXED
511	select NUMBERS_NORM
512	select SQRT_FIXED
513	default y
514	help
515	  This option enables build of a Mel-frequency cepstral coefficients
516	  (MFCC) audio features extractor component. It converts the input
517	  audio stream into encoded audio data for cepstral coefficients.
518	  The characteristic of the audio features are defined in the binary
519	  control blob. Directory tools/tune/mfcc contains a tool to create
520	  the configurations.
521
522endmenu # "Audio components"
523
524menu "Data formats"
525
526config FORMAT_S16LE
527	bool "Support S16LE"
528	default y
529	help
530	  Support 16 bit processing data format with sign and in little endian format
531
532config FORMAT_S24LE
533	bool "Support S24LE"
534	default y
535	help
536	  Support 24 bit processing data format with sign and in little endian format
537
538config FORMAT_S32LE
539	bool "Support S32LE"
540	default y
541	help
542	  Support 32 bit processing data format with sign and in little endian format
543
544config FORMAT_FLOAT
545	bool "Support float"
546	default y
547	help
548	  Support floating point processing data format
549
550config FORMAT_CONVERT_HIFI3
551	bool "HIFI3 optimized conversion"
552	default y
553	help
554	  Use HIFI3 extensions for optimized format conversion (experimental).
555
556config PCM_CONVERTER_FORMAT_S16LE
557	bool "Support S16LE"
558	default y
559	help
560	  Support 16 bit processing data format with sign and in little endian format
561
562config PCM_CONVERTER_FORMAT_S24LE
563	bool "Support S24LE"
564	default y
565	help
566	  Support 24 bit processing data format with sign and in little endian format
567
568config PCM_CONVERTER_FORMAT_S24_3LE
569	bool "Support S24_3LE"
570	default n
571	help
572	  Support packed 24 bit processing data format with sign and in little endian format
573
574config PCM_CONVERTER_FORMAT_S32LE
575	bool "Support S32LE"
576	default y
577	help
578	  Support 32 bit processing data format with sign and in little endian format
579
580config PCM_CONVERTER_FORMAT_FLOAT
581	bool "Support float"
582	default y
583	help
584	  Support floating point processing data format
585
586config PCM_CONVERTER_FORMAT_S16_C16_AND_S16_C32
587	bool "Support S16C16 <-> S16C32"
588	default n
589	help
590	  Support conversion between 16 bit valid sample size in 16 bit container
591	  and 16 bit valid sample size in 32 bit container
592
593config PCM_CONVERTER_FORMAT_S16_C32_AND_S32_C32
594	bool "Support S16C32 <-> S32C32"
595	default n
596	help
597	  Support conversion between 16 bit valid sample size in 32 bit container
598	  and 32 bit valid sample size in 32 bit container
599
600config PCM_CONVERTER_FORMAT_S16_C32_AND_S24_C32
601	bool "Support S16C32 <-> S24C32"
602	default n
603	help
604	  Support conversion between 16 bit valid sample size in 32 bit container
605	  and 24 bit valid sample size in 32 bit container
606
607config PCM_CONVERTER_FORMAT_S24_C24_AND_S24_C32
608	bool "Support S24C24 <-> S24C32"
609	default n
610	help
611	  Support conversion between 24 bit valid sample size in 24 bit container
612	  and 24 bit valid sample size in 32 bit container
613
614config PCM_CONVERTER_FORMAT_S24_C32_AND_S24_C24
615	bool "Support S24C32 <-> S24C24"
616	default n
617	help
618	  Support conversion between 24 bit valid sample size in 32 bit container
619	  and 24 bit valid sample size in 24 bit container
620
621config PCM_CONVERTER_FORMAT_S16_C32_AND_S16_C32
622	bool "Support S16C32 <-> S16C32"
623	default n
624	help
625	  Support one-to-one copying conversion for 16 bit valid sample size in
626	  32 bit container
627
628config PCM_CONVERTER_FORMAT_CONVERT_HIFI3
629	bool "HIFI3 optimized conversion"
630	default y
631	help
632	  Use HIFI3 extensions for optimized format conversion (experimental).
633
634config TRACE_CHANNEL
635	int "TRACE DMA Channel configuration"
636	default 0
637	help
638	  This option is used for custom configuration of trace dma channel other
639	  than zero dma channel.Define macro DMA_TRACE_CHANNEL in platform to
640	  configure the required channel number.
641
642config WRAP_ACTUAL_POSITION
643	bool "Buffer wrapping"
644	default n
645	help
646	  This option is to update the actual position information on wrap of buffer.
647	  It is not necessary that on wrap, the buffer position would be zero.At wrap,
648	  in some cases based on the period size, the frame may not exactly be at the
649	  end of the buffer and roll over for some bytes from the beginning of the buffer.
650endmenu
651