1# SPDX-License-Identifier: BSD-3-Clause
2
3config INTEL_HDA
4	bool "Intel HDA driver"
5	depends on CAVS
6	default n
7	help
8	  Select this to enable Intel HDA driver. The HDA driver provides
9	  interface for host and HD-Audio data transfers.
10
11config INTEL_MN
12	bool
13	depends on CAVS
14	default n
15	help
16	  Select this if the platform supports M/N dividers.
17
18config INTEL_MCLK
19	bool
20	depends on CAVS
21	default n
22	help
23	  Select this to enable driver for Intel MCLK and M/N dividers.
24
25config INTEL_SSP
26	bool "Intel SSP driver"
27	depends on CAVS
28	select INTEL_MCLK
29	default n
30	help
31	  Select this to enable Intel Synchronous Serial Port (SSP) driver.
32
33config INTEL_ALH
34	bool "Intel ALH driver"
35	depends on CAVS
36	default n
37	help
38	  Select this to enable Intel ALH driver.
39	  The ALH is an intermediary device, which acts as a hub and provides an
40	  abstracted support for numerous sound interfaces (e.g. SoundWire).
41
42config INTEL_DMIC
43	bool "Intel DMIC driver"
44	depends on CAVS
45	select NUMBERS_NORM
46	select NUMBERS_VECTOR_FIND
47	select MATH_DECIBELS
48	default n
49	help
50	  Select this to enable Intel DMIC driver. The DMIC driver provides
51	  as DAI the SoC direct attach digital microphones interface.
52
53if INTEL_DMIC
54
55config DMIC_HW_IOCLK
56	int "Set DMIC hw IO clock"
57	default 0
58	help
59	  Hardware specific DMIC IO clock speed defined by each platform.
60	  May be overridden from hardware values for simulation purposes.
61
62choice
63	prompt "Driver operation mode"
64	default INTEL_DMIC_TPLG_PARAMS
65        help
66          The driver can support two operation modes.
67          - A HW registers dump blob that is passed via IPC
68          - DAI tokens those describe the use case PCM format
69            and PDM bus and microphone parameters
70
71config INTEL_DMIC_NHLT
72       bool "Use NHLT DMIC blob"
73       help
74         All registers configuration is retrieved from blob. The
75	 number of channels, sample rate, and PCM format are
76	 defined in the blob and there are no runtime made
77	 configuration choices.
78
79config INTEL_DMIC_TPLG_PARAMS
80       bool "Use parameters from topology"
81       help
82         All registers confifguration is computed on the fly
83	 based on use case and microphone datasheet parameters
84	 and topology defined PCM format. The parameters are
85	 easy to to customize in the topology.
86
87endchoice
88
89if INTEL_DMIC_TPLG_PARAMS
90
91choice
92	prompt "FIR decimation coefficients set"
93	default INTEL_DMIC_FIR_FULL
94
95config INTEL_DMIC_FIR_FULL
96	bool "Full set"
97	select INTEL_DMIC_FIR_DECIMATE_BY_2
98	select INTEL_DMIC_FIR_DECIMATE_BY_3
99	select INTEL_DMIC_FIR_DECIMATE_BY_4
100	select INTEL_DMIC_FIR_DECIMATE_BY_5
101	select INTEL_DMIC_FIR_DECIMATE_BY_6
102	select INTEL_DMIC_FIR_DECIMATE_BY_8
103	select INTEL_DMIC_FIR_DECIMATE_BY_10
104	select INTEL_DMIC_FIR_DECIMATE_BY_12
105	help
106	  This option adds to previous all currently defined FIR
107	  coefficients sets to support sample rates 8 - 96 kHz with
108	  several microphone clock rates. The tables increase the size
109	  of the driver so this option should not be used in minimal
110	  systems.
111
112config INTEL_DMIC_FIR_LOW_MEMORY
113	bool "Small set"
114	select INTEL_DMIC_FIR_DECIMATE_BY_2
115	select INTEL_DMIC_FIR_DECIMATE_BY_6
116	help
117	  This option is used to minimize driver footprint but
118	  preserve support for 48 kHz and 16 kHz sample rates
119	  at typical 2.4 MHz microphone clock rate. The option
120	  enables decimation factors 2 and 6.
121
122config INTEL_DMIC_FIR_CUSTOM
123	bool "Custom set"
124	help
125	  This option is used to select each supported decimation
126	  factor.
127
128endchoice
129
130menu "Decimation factors"
131	visible if INTEL_DMIC_FIR_CUSTOM
132
133config INTEL_DMIC_FIR_DECIMATE_BY_2
134	bool "FIR decimate by 2"
135	default n
136	help
137	  This includes FIR coefficients to decimate by 2 into the build. It
138	  is commonly used for 48 kHz capture with 2.4 MHz microphone clock.
139	  Decimate by 2 in FIR gives good bandwidth vs. Nyquist and narrow
140	  transition region due to lower FIR order need compared to higher
141	  decimation factors.
142
143config INTEL_DMIC_FIR_DECIMATE_BY_3
144	bool "FIR decimate by 3"
145	default n
146	help
147	  This includes FIR coefficients to decimate by 3 into the build.
148	  Decimation by 3 in FIR is useful with microphone clock and sample
149	  rate combinations where a 3 is the lowest factor of the oversampling
150	  ratio. Having this low prime decimation factor for FIR enabled is
151	  useful when decimation by 2 is not possible.
152
153config INTEL_DMIC_FIR_DECIMATE_BY_4
154	bool "FIR decimate by 4"
155	default n
156	help
157	  This includes FIR coefficients to decimate by 4 into the build.
158	  Decimation by 4 in FIR is useful in some cases with high microphone
159	  clock rates due to max. decimation factor limit of CIC. In such
160	  cases decimation by 2 may not be usable.
161
162config INTEL_DMIC_FIR_DECIMATE_BY_5
163	bool "FIR decimate by 5"
164	default n
165	help
166	  This includes FIR coefficients to decimate by 5 into the build.
167	  Decimation by 5 in FIR is useful with microphone clock and sample
168	  rate combinations where a 5 is the lowest factor of the oversampling
169	  ratio.
170
171config INTEL_DMIC_FIR_DECIMATE_BY_6
172	bool "FIR decimate by 6"
173	default n
174	help
175	  This includes FIR coefficients to decimate by 6 into the build. It
176	  is commonly used for 16 kHz capture from secondary FIFO while
177	  primary FIFO is configured for 48 kHz rate.
178
179config INTEL_DMIC_FIR_DECIMATE_BY_8
180	bool "FIR decimate by 8"
181	default n
182	help
183	  This includes FIR coefficients to decimate by 8 into the build.
184	  The high FIR decimation factors are needed for high microphone clock
185	  rates due to max. decimation factor limitation of CIC. Also dual
186	  FIFO configurations may need for one FIR decimation such high
187	  decimation factor.
188
189config INTEL_DMIC_FIR_DECIMATE_BY_10
190	bool "FIR decimate by 10"
191	default n
192	help
193	  This includes FIR coefficients to decimate by 10 into the build.
194	  The high FIR decimation factors are needed for high microphone clock
195	  rates due to max. decimation factor limitation of CIC. Also dual
196	  FIFO configurations may need for one FIR decimation such high
197	  decimation factor.
198
199config INTEL_DMIC_FIR_DECIMATE_BY_12
200	bool "FIR decimate by 12"
201	default n
202	help
203	  This includes FIR coefficients to decimate by 12 into the build. It
204	  is used for 16 kHz capture for secondary FIFO while the primary
205	  FIFO is configured for 96 kHz.
206
207endmenu # "Decimation factors"
208
209endif
210
211endif # INTEL_DMIC
212