8#ifndef __SOF_DRIVERS_DMIC_H__
9#define __SOF_DRIVERS_DMIC_H__
14#define DMIC_MAX_MODES 50
17#define DMIC_MIN_OSR 50
22#define DMIC_HIGH_RATE_MIN_FS 64000
23#define DMIC_HIGH_RATE_OSR_MIN 40
28#define DMIC_FIR_PIPELINE_OVERHEAD 5
34#define DMIC_UNMUTE_RAMP_US 1000
35#define DMIC_UNMUTE_CIC 1
36#define DMIC_UNMUTE_FIR 2
39#define DMIC_HW_VERSION 1
40#define DMIC_HW_CONTROLLERS 2
41#define DMIC_HW_FIFOS 2
45#define DMIC_HW_CONTROLLERS_MAX 4
46#define DMIC_HW_FIFOS_MAX 2
60#define DMIC_HW_BITS_CIC 26
61#define DMIC_HW_BITS_FIR_COEF 20
62#define DMIC_HW_BITS_FIR_GAIN 20
63#define DMIC_HW_BITS_FIR_INPUT 22
64#define DMIC_HW_BITS_FIR_OUTPUT 24
65#define DMIC_HW_BITS_FIR_INTERNAL 26
66#define DMIC_HW_BITS_GAIN_OUTPUT 22
67#define DMIC_HW_FIR_LENGTH_MAX 250
68#define DMIC_HW_CIC_SHIFT_MIN -8
69#define DMIC_HW_CIC_SHIFT_MAX 4
70#define DMIC_HW_FIR_SHIFT_MIN 0
71#define DMIC_HW_FIR_SHIFT_MAX 8
72#define DMIC_HW_CIC_DECIM_MIN 5
73#define DMIC_HW_CIC_DECIM_MAX 31
74#define DMIC_HW_FIR_DECIM_MIN 2
75#define DMIC_HW_FIR_DECIM_MAX 20
76#define DMIC_HW_SENS_Q28 Q_CONVERT_FLOAT(1.0, 28)
77#define DMIC_HW_PDM_CLK_MIN 100000
78#define DMIC_HW_DUTY_MIN 20
79#define DMIC_HW_DUTY_MAX 80
84#define OUTCONTROL0 0x0000
85#define OUTSTAT0 0x0004
86#define OUTDATA0 0x0008
87#define OUTCONTROL1 0x0100
88#define OUTSTAT1 0x0104
89#define OUTDATA1 0x0108
91#define PDM0_COEFFICIENT_A 0x1400
92#define PDM0_COEFFICIENT_B 0x1800
94#define PDM1_COEFFICIENT_A 0x2400
95#define PDM1_COEFFICIENT_B 0x2800
97#define PDM2_COEFFICIENT_A 0x3400
98#define PDM2_COEFFICIENT_B 0x3800
100#define PDM3_COEFFICIENT_A 0x4400
101#define PDM3_COEFFICIENT_B 0x4800
102#define PDM_COEF_RAM_A_LENGTH 0x0400
103#define PDM_COEF_RAM_B_LENGTH 0x0400
106#define CIC_CONTROL 0x000
107#define CIC_CONFIG 0x004
108#define MIC_CONTROL 0x00c
109#define FIR_CONTROL_A 0x020
110#define FIR_CONFIG_A 0x024
111#define DC_OFFSET_LEFT_A 0x028
112#define DC_OFFSET_RIGHT_A 0x02c
113#define OUT_GAIN_LEFT_A 0x030
114#define OUT_GAIN_RIGHT_A 0x034
115#define FIR_CONTROL_B 0x040
116#define FIR_CONFIG_B 0x044
117#define DC_OFFSET_LEFT_B 0x048
118#define DC_OFFSET_RIGHT_B 0x04c
119#define OUT_GAIN_LEFT_B 0x050
120#define OUT_GAIN_RIGHT_B 0x054
125#if DMIC_HW_VERSION == 1 || (DMIC_HW_VERSION == 2 && DMIC_HW_CONTROLLERS <= 2)
127#elif DMIC_HW_VERSION == 2 && DMIC_HW_CONTROLLERS > 2
130#error Not supported HW version
133#define OUTCONTROL0_BFTH_MAX 4
135#if defined DMIC_IPM_VER1
137#define OUTCONTROL0_TIE_BIT BIT(27)
138#define OUTCONTROL0_SIP_BIT BIT(26)
139#define OUTCONTROL0_FINIT_BIT BIT(25)
140#define OUTCONTROL0_FCI_BIT BIT(24)
141#define OUTCONTROL0_TIE(x) SET_BIT(27, x)
142#define OUTCONTROL0_SIP(x) SET_BIT(26, x)
143#define OUTCONTROL0_FINIT(x) SET_BIT(25, x)
144#define OUTCONTROL0_FCI(x) SET_BIT(24, x)
145#define OUTCONTROL0_BFTH(x) SET_BITS(23, 20, x)
146#define OUTCONTROL0_OF(x) SET_BITS(19, 18, x)
147#define OUTCONTROL0_IPM(x) SET_BITS(17, 16, x)
148#define OUTCONTROL0_TH(x) SET_BITS(5, 0, x)
150#define OUTCONTROL0_TIE_GET(x) GET_BIT(27, x)
151#define OUTCONTROL0_SIP_GET(x) GET_BIT(26, x)
152#define OUTCONTROL0_FINIT_GET(x) GET_BIT(25, x)
153#define OUTCONTROL0_FCI_GET(x) GET_BIT(24, x)
154#define OUTCONTROL0_BFTH_GET(x) GET_BITS(23, 20, x)
155#define OUTCONTROL0_OF_GET(x) GET_BITS(19, 18, x)
156#define OUTCONTROL0_IPM_GET(x) GET_BITS(17, 16, x)
157#define OUTCONTROL0_TH_GET(x) GET_BITS(5, 0, x)
160#define OUTCONTROL1_TIE_BIT BIT(27)
161#define OUTCONTROL1_SIP_BIT BIT(26)
162#define OUTCONTROL1_FINIT_BIT BIT(25)
163#define OUTCONTROL1_FCI_BIT BIT(24)
164#define OUTCONTROL1_TIE(x) SET_BIT(27, x)
165#define OUTCONTROL1_SIP(x) SET_BIT(26, x)
166#define OUTCONTROL1_FINIT(x) SET_BIT(25, x)
167#define OUTCONTROL1_FCI(x) SET_BIT(24, x)
168#define OUTCONTROL1_BFTH(x) SET_BITS(23, 20, x)
169#define OUTCONTROL1_OF(x) SET_BITS(19, 18, x)
170#define OUTCONTROL1_IPM(x) SET_BITS(17, 16, x)
171#define OUTCONTROL1_TH(x) SET_BITS(5, 0, x)
173#define OUTCONTROL1_TIE_GET(x) GET_BIT(27, x)
174#define OUTCONTROL1_SIP_GET(x) GET_BIT(26, x)
175#define OUTCONTROL1_FINIT_GET(x) GET_BIT(25, x)
176#define OUTCONTROL1_FCI_GET(x) GET_BIT(24, x)
177#define OUTCONTROL1_BFTH_GET(x) GET_BITS(23, 20, x)
178#define OUTCONTROL1_OF_GET(x) GET_BITS(19, 18, x)
179#define OUTCONTROL1_IPM_GET(x) GET_BITS(17, 16, x)
180#define OUTCONTROL1_TH_GET(x) GET_BITS(5, 0, x)
183#if defined DMIC_IPM_VER2
185#define OUTCONTROL0_TIE_BIT BIT(27)
186#define OUTCONTROL0_SIP_BIT BIT(26)
187#define OUTCONTROL0_FINIT_BIT BIT(25)
188#define OUTCONTROL0_FCI_BIT BIT(24)
189#define OUTCONTROL0_TIE(x) SET_BIT(27, x)
190#define OUTCONTROL0_SIP(x) SET_BIT(26, x)
191#define OUTCONTROL0_FINIT(x) SET_BIT(25, x)
192#define OUTCONTROL0_FCI(x) SET_BIT(24, x)
193#define OUTCONTROL0_BFTH(x) SET_BITS(23, 20, x)
194#define OUTCONTROL0_OF(x) SET_BITS(19, 18, x)
195#define OUTCONTROL0_IPM(x) SET_BITS(17, 15, x)
196#define OUTCONTROL0_IPM_SOURCE_1(x) SET_BITS(14, 13, x)
197#define OUTCONTROL0_IPM_SOURCE_2(x) SET_BITS(12, 11, x)
198#define OUTCONTROL0_IPM_SOURCE_3(x) SET_BITS(10, 9, x)
199#define OUTCONTROL0_IPM_SOURCE_4(x) SET_BITS(8, 7, x)
200#define OUTCONTROL0_IPM_SOURCE_MODE(x) SET_BIT(6, x)
201#define OUTCONTROL0_TH(x) SET_BITS(5, 0, x)
202#define OUTCONTROL0_TIE_GET(x) GET_BIT(27, x)
203#define OUTCONTROL0_SIP_GET(x) GET_BIT(26, x)
204#define OUTCONTROL0_FINIT_GET(x) GET_BIT(25, x)
205#define OUTCONTROL0_FCI_GET(x) GET_BIT(24, x)
206#define OUTCONTROL0_BFTH_GET(x) GET_BITS(23, 20, x)
207#define OUTCONTROL0_OF_GET(x) GET_BITS(19, 18, x)
208#define OUTCONTROL0_IPM_GET(x) GET_BITS(17, 15, x)
209#define OUTCONTROL0_IPM_SOURCE_1_GET(x) GET_BITS(14, 13, x)
210#define OUTCONTROL0_IPM_SOURCE_2_GET(x) GET_BITS(12, 11, x)
211#define OUTCONTROL0_IPM_SOURCE_3_GET(x) GET_BITS(10, 9, x)
212#define OUTCONTROL0_IPM_SOURCE_4_GET(x) GET_BITS(8, 7, x)
213#define OUTCONTROL0_IPM_SOURCE_MODE_GET(x) GET_BIT(6, x)
214#define OUTCONTROL0_TH_GET(x) GET_BITS(5, 0, x)
217#define OUTCONTROL1_TIE_BIT BIT(27)
218#define OUTCONTROL1_SIP_BIT BIT(26)
219#define OUTCONTROL1_FINIT_BIT BIT(25)
220#define OUTCONTROL1_FCI_BIT BIT(24)
221#define OUTCONTROL1_TIE(x) SET_BIT(27, x)
222#define OUTCONTROL1_SIP(x) SET_BIT(26, x)
223#define OUTCONTROL1_FINIT(x) SET_BIT(25, x)
224#define OUTCONTROL1_FCI(x) SET_BIT(24, x)
225#define OUTCONTROL1_BFTH(x) SET_BITS(23, 20, x)
226#define OUTCONTROL1_OF(x) SET_BITS(19, 18, x)
227#define OUTCONTROL1_IPM(x) SET_BITS(17, 15, x)
228#define OUTCONTROL1_IPM_SOURCE_1(x) SET_BITS(14, 13, x)
229#define OUTCONTROL1_IPM_SOURCE_2(x) SET_BITS(12, 11, x)
230#define OUTCONTROL1_IPM_SOURCE_3(x) SET_BITS(10, 9, x)
231#define OUTCONTROL1_IPM_SOURCE_4(x) SET_BITS(8, 7, x)
232#define OUTCONTROL1_IPM_SOURCE_MODE(x) SET_BIT(6, x)
233#define OUTCONTROL1_TH(x) SET_BITS(5, 0, x)
234#define OUTCONTROL1_TIE_GET(x) GET_BIT(27, x)
235#define OUTCONTROL1_SIP_GET(x) GET_BIT(26, x)
236#define OUTCONTROL1_FINIT_GET(x) GET_BIT(25, x)
237#define OUTCONTROL1_FCI_GET(x) GET_BIT(24, x)
238#define OUTCONTROL1_BFTH_GET(x) GET_BITS(23, 20, x)
239#define OUTCONTROL1_OF_GET(x) GET_BITS(19, 18, x)
240#define OUTCONTROL1_IPM_GET(x) GET_BITS(17, 15, x)
241#define OUTCONTROL1_IPM_SOURCE_1_GET(x) GET_BITS(14, 13, x)
242#define OUTCONTROL1_IPM_SOURCE_2_GET(x) GET_BITS(12, 11, x)
243#define OUTCONTROL1_IPM_SOURCE_3_GET(x) GET_BITS(10, 9, x)
244#define OUTCONTROL1_IPM_SOURCE_4_GET(x) GET_BITS(8, 7, x)
245#define OUTCONTROL1_IPM_SOURCE_MODE_GET(x) GET_BIT(6, x)
246#define OUTCONTROL1_TH_GET(x) GET_BITS(5, 0, x)
248#define OUTCONTROLX_IPM_NUMSOURCES 4
253#define OUTSTAT0_AFE_BIT BIT(31)
254#define OUTSTAT0_ASNE_BIT BIT(29)
255#define OUTSTAT0_RFS_BIT BIT(28)
256#define OUTSTAT0_ROR_BIT BIT(27)
257#define OUTSTAT0_FL_MASK MASK(6, 0)
260#define OUTSTAT1_AFE_BIT BIT(31)
261#define OUTSTAT1_ASNE_BIT BIT(29)
262#define OUTSTAT1_RFS_BIT BIT(28)
263#define OUTSTAT1_ROR_BIT BIT(27)
264#define OUTSTAT1_FL_MASK MASK(6, 0)
267#define CIC_CONTROL_SOFT_RESET_BIT BIT(16)
268#define CIC_CONTROL_CIC_START_B_BIT BIT(15)
269#define CIC_CONTROL_CIC_START_A_BIT BIT(14)
270#define CIC_CONTROL_MIC_B_POLARITY_BIT BIT(3)
271#define CIC_CONTROL_MIC_A_POLARITY_BIT BIT(2)
272#define CIC_CONTROL_MIC_MUTE_BIT BIT(1)
273#define CIC_CONTROL_STEREO_MODE_BIT BIT(0)
275#define CIC_CONTROL_SOFT_RESET(x) SET_BIT(16, x)
276#define CIC_CONTROL_CIC_START_B(x) SET_BIT(15, x)
277#define CIC_CONTROL_CIC_START_A(x) SET_BIT(14, x)
278#define CIC_CONTROL_MIC_B_POLARITY(x) SET_BIT(3, x)
279#define CIC_CONTROL_MIC_A_POLARITY(x) SET_BIT(2, x)
280#define CIC_CONTROL_MIC_MUTE(x) SET_BIT(1, x)
281#define CIC_CONTROL_STEREO_MODE(x) SET_BIT(0, x)
283#define CIC_CONTROL_SOFT_RESET_GET(x) GET_BIT(16, x)
284#define CIC_CONTROL_CIC_START_B_GET(x) GET_BIT(15, x)
285#define CIC_CONTROL_CIC_START_A_GET(x) GET_BIT(14, x)
286#define CIC_CONTROL_MIC_B_POLARITY_GET(x) GET_BIT(3, x)
287#define CIC_CONTROL_MIC_A_POLARITY_GET(x) GET_BIT(2, x)
288#define CIC_CONTROL_MIC_MUTE_GET(x) GET_BIT(1, x)
289#define CIC_CONTROL_STEREO_MODE_GET(x) GET_BIT(0, x)
292#define CIC_CONFIG_CIC_SHIFT(x) SET_BITS(27, 24, x)
293#define CIC_CONFIG_COMB_COUNT(x) SET_BITS(15, 8, x)
296#define CIC_CONFIG_CIC_SHIFT_MASK MASK(27, 24)
297#define CIC_CONFIG_COMB_COUNT_MASK MASK(15, 8)
299#define CIC_CONFIG_CIC_SHIFT_GET(x) GET_BITS(27, 24, x)
300#define CIC_CONFIG_COMB_COUNT_GET(x) GET_BITS(15, 8, x)
303#define MIC_CONTROL_PDM_EN_B_BIT BIT(1)
304#define MIC_CONTROL_PDM_EN_A_BIT BIT(0)
305#define MIC_CONTROL_PDM_CLKDIV(x) SET_BITS(15, 8, x)
306#define MIC_CONTROL_PDM_SKEW(x) SET_BITS(7, 4, x)
307#define MIC_CONTROL_CLK_EDGE(x) SET_BIT(3, x)
308#define MIC_CONTROL_PDM_EN_B(x) SET_BIT(1, x)
309#define MIC_CONTROL_PDM_EN_A(x) SET_BIT(0, x)
312#define MIC_CONTROL_PDM_CLKDIV_MASK MASK(15, 8)
314#define MIC_CONTROL_PDM_CLKDIV_GET(x) GET_BITS(15, 8, x)
315#define MIC_CONTROL_PDM_SKEW_GET(x) GET_BITS(7, 4, x)
316#define MIC_CONTROL_PDM_CLK_EDGE_GET(x) GET_BIT(3, x)
317#define MIC_CONTROL_PDM_EN_B_GET(x) GET_BIT(1, x)
318#define MIC_CONTROL_PDM_EN_A_GET(x) GET_BIT(0, x)
321#define FIR_CONTROL_A_START_BIT BIT(7)
322#define FIR_CONTROL_A_ARRAY_START_EN_BIT BIT(6)
323#define FIR_CONTROL_A_MUTE_BIT BIT(1)
324#define FIR_CONTROL_A_START(x) SET_BIT(7, x)
325#define FIR_CONTROL_A_ARRAY_START_EN(x) SET_BIT(6, x)
326#define FIR_CONTROL_A_DCCOMP(x) SET_BIT(4, x)
327#define FIR_CONTROL_A_MUTE(x) SET_BIT(1, x)
328#define FIR_CONTROL_A_STEREO(x) SET_BIT(0, x)
330#define FIR_CONTROL_A_START_GET(x) GET_BIT(7, x)
331#define FIR_CONTROL_A_ARRAY_START_EN_GET(x) GET_BIT(6, x)
332#define FIR_CONTROL_A_DCCOMP_GET(x) GET_BIT(4, x)
333#define FIR_CONTROL_A_MUTE_GET(x) GET_BIT(1, x)
334#define FIR_CONTROL_A_STEREO_GET(x) GET_BIT(0, x)
337#define FIR_CONFIG_A_FIR_DECIMATION(x) SET_BITS(20, 16, x)
338#define FIR_CONFIG_A_FIR_SHIFT(x) SET_BITS(11, 8, x)
339#define FIR_CONFIG_A_FIR_LENGTH(x) SET_BITS(7, 0, x)
341#define FIR_CONFIG_A_FIR_DECIMATION_GET(x) GET_BITS(20, 16, x)
342#define FIR_CONFIG_A_FIR_SHIFT_GET(x) GET_BITS(11, 8, x)
343#define FIR_CONFIG_A_FIR_LENGTH_GET(x) GET_BITS(7, 0, x)
356#define DC_OFFSET_LEFT_A_DC_OFFS(x) SET_BITS(21, 0, x)
359#define DC_OFFSET_RIGHT_A_DC_OFFS(x) SET_BITS(21, 0, x)
362#define OUT_GAIN_LEFT_A_GAIN(x) SET_BITS(19, 0, x)
365#define OUT_GAIN_RIGHT_A_GAIN(x) SET_BITS(19, 0, x)
368#define FIR_CONTROL_B_START_BIT BIT(7)
369#define FIR_CONTROL_B_ARRAY_START_EN_BIT BIT(6)
370#define FIR_CONTROL_B_MUTE_BIT BIT(1)
371#define FIR_CONTROL_B_START(x) SET_BIT(7, x)
372#define FIR_CONTROL_B_ARRAY_START_EN(x) SET_BIT(6, x)
373#define FIR_CONTROL_B_DCCOMP(x) SET_BIT(4, x)
374#define FIR_CONTROL_B_MUTE(x) SET_BIT(1, x)
375#define FIR_CONTROL_B_STEREO(x) SET_BIT(0, x)
377#define FIR_CONTROL_B_START_GET(x) GET_BIT(7, x)
378#define FIR_CONTROL_B_ARRAY_START_EN_GET(x) GET_BIT(6, x)
379#define FIR_CONTROL_B_DCCOMP_GET(x) GET_BIT(4, x)
380#define FIR_CONTROL_B_MUTE_GET(x) GET_BIT(1, x)
381#define FIR_CONTROL_B_STEREO_GET(x) GET_BIT(0, x)
384#define FIR_CONFIG_B_FIR_DECIMATION(x) SET_BITS(20, 16, x)
385#define FIR_CONFIG_B_FIR_SHIFT(x) SET_BITS(11, 8, x)
386#define FIR_CONFIG_B_FIR_LENGTH(x) SET_BITS(7, 0, x)
388#define FIR_CONFIG_B_FIR_DECIMATION_GET(x) GET_BITS(20, 16, x)
389#define FIR_CONFIG_B_FIR_SHIFT_GET(x) GET_BITS(11, 8, x)
390#define FIR_CONFIG_B_FIR_LENGTH_GET(x) GET_BITS(7, 0, x)
393#define DC_OFFSET_LEFT_B_DC_OFFS(x) SET_BITS(21, 0, x)
396#define DC_OFFSET_RIGHT_B_DC_OFFS(x) SET_BITS(21, 0, x)
399#define OUT_GAIN_LEFT_B_GAIN(x) SET_BITS(19, 0, x)
402#define OUT_GAIN_RIGHT_B_GAIN(x) SET_BITS(19, 0, x)
405#define FIR_COEF_A(x) SET_BITS(19, 0, x)
406#define FIR_COEF_B(x) SET_BITS(19, 0, x)
409#define DMIC_HW_FIR_COEF_MAX ((1 << (DMIC_HW_BITS_FIR_COEF - 1)) - 1)
410#define DMIC_HW_FIR_COEF_Q (DMIC_HW_BITS_FIR_COEF - 1)
413#define DMIC_FIR_SCALE_Q 28
416#define DMIC_HW_FIR_GAIN_MAX ((1 << (DMIC_HW_BITS_FIR_GAIN - 1)) - 1)
423#define LOGRAMP_START_DB Q_CONVERT_FLOAT(-90, DB2LIN_FIXED_INPUT_QY)
424#define LOGRAMP_TIME_COEF_Q15 -205
425#define LOGRAMP_TIME_OFFS_Q0 500
428#define LOGRAMP_TIME_MIN_MS 10
429#define LOGRAMP_TIME_MAX_MS 1000
432#define LOGRAMP_CONST_TERM ((int32_t) \
433 ((int64_t)-LOGRAMP_START_DB * DMIC_UNMUTE_RAMP_US / 1000))
436#define Q_SHIFT_GAIN_X_GAIN_COEF \
437 (Q_SHIFT_BITS_32(30, DB2LIN_FIXED_OUTPUT_QY, 30))
439#define dmic_irq(dmic) dmic->plat_data.irq
440#define dmic_irq_name(dmic) dmic->plat_data.irq_name
443struct dmic_global_shared {
444 struct sof_ipc_dai_dmic_params prm[DMIC_HW_FIFOS];
445 uint32_t active_fifos_mask;
451 struct dmic_global_shared *global;
452 uint16_t enable[DMIC_HW_CONTROLLERS];
457 int32_t unmute_ramp_time_ms;
459 enum sof_ipc_frame dai_format;
465 int16_t clkdiv[DMIC_MAX_MODES];
466 int16_t mcic[DMIC_MAX_MODES];
467 int16_t mfir[DMIC_MAX_MODES];
471struct matched_modes {
472 int16_t clkdiv[DMIC_MAX_MODES];
473 int16_t mcic[DMIC_MAX_MODES];
474 int16_t mfir_a[DMIC_MAX_MODES];
475 int16_t mfir_b[DMIC_MAX_MODES];
479struct dmic_configuration {
480 struct pdm_decim *fir_a;
481 struct pdm_decim *fir_b;
495struct nhlt_dmic_gateway_attributes {
499struct nhlt_dmic_ts_group {
500 uint32_t ts_group[4];
503struct nhlt_dmic_clock_on_delay {
504 uint32_t clock_on_delay;
507struct nhlt_dmic_channel_ctrl_mask {
508 uint32_t channel_ctrl_mask;
511struct nhlt_pdm_ctrl_mask {
512 uint32_t pdm_ctrl_mask;
515struct nhlt_pdm_ctrl_cfg {
516 uint32_t cic_control;
519 uint32_t mic_control;
520 uint32_t pdm_sdw_map;
521 uint32_t reuse_fir_from_pdm;
522 uint32_t reserved1[2];
525struct nhlt_pdm_ctrl_fir_cfg {
526 uint32_t fir_control;
528 int32_t dc_offset_left;
529 int32_t dc_offset_right;
530 int32_t out_gain_left;
531 int32_t out_gain_right;
532 uint32_t reserved[2];
535struct nhlt_pdm_fir_coeffs {
536 int32_t fir_coeffs[0];
539int dmic_set_config_computed(
struct dai *
dai);
541int dmic_set_config_nhlt(
struct dai *
dai,
const void *spec_config);
544extern const struct dai_driver dmic_driver;
546static inline int dmic_get_unmute_ramp_from_samplerate(
int rate)
551 LOGRAMP_TIME_OFFS_Q0);
552 if (time_ms > LOGRAMP_TIME_MAX_MS)
553 return LOGRAMP_TIME_MAX_MS;
555 if (time_ms < LOGRAMP_TIME_MIN_MS)
556 return LOGRAMP_TIME_MIN_MS;
Definition dai-zephyr.h:49