1 // SPDX-License-Identifier: GPL-2.0-only
3 // ALSA SoC Audio driver for CS47L85 codec
5 // Copyright (C) 2015-2019 Cirrus Logic, Inc. and
6 // Cirrus Logic International Semiconductor Ltd.
9 #include <linux/module.h>
10 #include <linux/moduleparam.h>
11 #include <linux/device.h>
12 #include <linux/delay.h>
13 #include <linux/init.h>
15 #include <linux/pm_runtime.h>
16 #include <linux/regmap.h>
17 #include <sound/core.h>
18 #include <sound/pcm.h>
19 #include <sound/pcm_params.h>
20 #include <sound/soc.h>
21 #include <sound/tlv.h>
23 #include <linux/irqchip/irq-madera.h>
24 #include <linux/mfd/madera/core.h>
25 #include <linux/mfd/madera/registers.h>
30 #define DRV_NAME "cs47l85-codec"
32 #define CS47L85_NUM_ADSP 7
33 #define CS47L85_MONO_OUTPUTS 4
36 struct madera_priv core
;
37 struct madera_fll fll
[3];
40 static const struct wm_adsp_region cs47l85_dsp1_regions
[] = {
41 { .type
= WMFW_ADSP2_PM
, .base
= 0x080000 },
42 { .type
= WMFW_ADSP2_ZM
, .base
= 0x0e0000 },
43 { .type
= WMFW_ADSP2_XM
, .base
= 0x0a0000 },
44 { .type
= WMFW_ADSP2_YM
, .base
= 0x0c0000 },
47 static const struct wm_adsp_region cs47l85_dsp2_regions
[] = {
48 { .type
= WMFW_ADSP2_PM
, .base
= 0x100000 },
49 { .type
= WMFW_ADSP2_ZM
, .base
= 0x160000 },
50 { .type
= WMFW_ADSP2_XM
, .base
= 0x120000 },
51 { .type
= WMFW_ADSP2_YM
, .base
= 0x140000 },
54 static const struct wm_adsp_region cs47l85_dsp3_regions
[] = {
55 { .type
= WMFW_ADSP2_PM
, .base
= 0x180000 },
56 { .type
= WMFW_ADSP2_ZM
, .base
= 0x1e0000 },
57 { .type
= WMFW_ADSP2_XM
, .base
= 0x1a0000 },
58 { .type
= WMFW_ADSP2_YM
, .base
= 0x1c0000 },
61 static const struct wm_adsp_region cs47l85_dsp4_regions
[] = {
62 { .type
= WMFW_ADSP2_PM
, .base
= 0x200000 },
63 { .type
= WMFW_ADSP2_ZM
, .base
= 0x260000 },
64 { .type
= WMFW_ADSP2_XM
, .base
= 0x220000 },
65 { .type
= WMFW_ADSP2_YM
, .base
= 0x240000 },
68 static const struct wm_adsp_region cs47l85_dsp5_regions
[] = {
69 { .type
= WMFW_ADSP2_PM
, .base
= 0x280000 },
70 { .type
= WMFW_ADSP2_ZM
, .base
= 0x2e0000 },
71 { .type
= WMFW_ADSP2_XM
, .base
= 0x2a0000 },
72 { .type
= WMFW_ADSP2_YM
, .base
= 0x2c0000 },
75 static const struct wm_adsp_region cs47l85_dsp6_regions
[] = {
76 { .type
= WMFW_ADSP2_PM
, .base
= 0x300000 },
77 { .type
= WMFW_ADSP2_ZM
, .base
= 0x360000 },
78 { .type
= WMFW_ADSP2_XM
, .base
= 0x320000 },
79 { .type
= WMFW_ADSP2_YM
, .base
= 0x340000 },
82 static const struct wm_adsp_region cs47l85_dsp7_regions
[] = {
83 { .type
= WMFW_ADSP2_PM
, .base
= 0x380000 },
84 { .type
= WMFW_ADSP2_ZM
, .base
= 0x3e0000 },
85 { .type
= WMFW_ADSP2_XM
, .base
= 0x3a0000 },
86 { .type
= WMFW_ADSP2_YM
, .base
= 0x3c0000 },
89 static const struct wm_adsp_region
*cs47l85_dsp_regions
[] = {
99 static const unsigned int wm_adsp2_control_bases
[] = {
100 MADERA_DSP1_CONFIG_1
,
101 MADERA_DSP2_CONFIG_1
,
102 MADERA_DSP3_CONFIG_1
,
103 MADERA_DSP4_CONFIG_1
,
104 MADERA_DSP5_CONFIG_1
,
105 MADERA_DSP6_CONFIG_1
,
106 MADERA_DSP7_CONFIG_1
,
109 static int cs47l85_adsp_power_ev(struct snd_soc_dapm_widget
*w
,
110 struct snd_kcontrol
*kcontrol
,
113 struct snd_soc_component
*component
=
114 snd_soc_dapm_to_component(w
->dapm
);
115 struct cs47l85
*cs47l85
= snd_soc_component_get_drvdata(component
);
116 struct madera_priv
*priv
= &cs47l85
->core
;
117 struct madera
*madera
= priv
->madera
;
121 ret
= regmap_read(madera
->regmap
, MADERA_DSP_CLOCK_1
, &freq
);
124 "Failed to read MADERA_DSP_CLOCK_1: %d\n", ret
);
128 freq
&= MADERA_DSP_CLK_FREQ_LEGACY_MASK
;
129 freq
>>= MADERA_DSP_CLK_FREQ_LEGACY_SHIFT
;
132 case SND_SOC_DAPM_PRE_PMU
:
133 ret
= madera_set_adsp_clk(&cs47l85
->core
, w
->shift
, freq
);
141 return wm_adsp_early_event(w
, kcontrol
, event
);
144 #define CS47L85_NG_SRC(name, base) \
145 SOC_SINGLE(name " NG HPOUT1L Switch", base, 0, 1, 0), \
146 SOC_SINGLE(name " NG HPOUT1R Switch", base, 1, 1, 0), \
147 SOC_SINGLE(name " NG HPOUT2L Switch", base, 2, 1, 0), \
148 SOC_SINGLE(name " NG HPOUT2R Switch", base, 3, 1, 0), \
149 SOC_SINGLE(name " NG HPOUT3L Switch", base, 4, 1, 0), \
150 SOC_SINGLE(name " NG HPOUT3R Switch", base, 5, 1, 0), \
151 SOC_SINGLE(name " NG SPKOUTL Switch", base, 6, 1, 0), \
152 SOC_SINGLE(name " NG SPKOUTR Switch", base, 7, 1, 0), \
153 SOC_SINGLE(name " NG SPKDAT1L Switch", base, 8, 1, 0), \
154 SOC_SINGLE(name " NG SPKDAT1R Switch", base, 9, 1, 0), \
155 SOC_SINGLE(name " NG SPKDAT2L Switch", base, 10, 1, 0), \
156 SOC_SINGLE(name " NG SPKDAT2R Switch", base, 11, 1, 0)
158 #define CS47L85_RXANC_INPUT_ROUTES(widget, name) \
159 { widget, NULL, name " NG Mux" }, \
160 { name " NG Internal", NULL, "RXANC NG Clock" }, \
161 { name " NG Internal", NULL, name " Channel" }, \
162 { name " NG External", NULL, "RXANC NG External Clock" }, \
163 { name " NG External", NULL, name " Channel" }, \
164 { name " NG Mux", "None", name " Channel" }, \
165 { name " NG Mux", "Internal", name " NG Internal" }, \
166 { name " NG Mux", "External", name " NG External" }, \
167 { name " Channel", "Left", name " Left Input" }, \
168 { name " Channel", "Combine", name " Left Input" }, \
169 { name " Channel", "Right", name " Right Input" }, \
170 { name " Channel", "Combine", name " Right Input" }, \
171 { name " Left Input", "IN1", "IN1L" }, \
172 { name " Right Input", "IN1", "IN1R" }, \
173 { name " Left Input", "IN2", "IN2L" }, \
174 { name " Right Input", "IN2", "IN2R" }, \
175 { name " Left Input", "IN3", "IN3L" }, \
176 { name " Right Input", "IN3", "IN3R" }, \
177 { name " Left Input", "IN4", "IN4L" }, \
178 { name " Right Input", "IN4", "IN4R" }, \
179 { name " Left Input", "IN5", "IN5L" }, \
180 { name " Right Input", "IN5", "IN5R" }, \
181 { name " Left Input", "IN6", "IN6L" }, \
182 { name " Right Input", "IN6", "IN6R" }
184 #define CS47L85_RXANC_OUTPUT_ROUTES(widget, name) \
185 { widget, NULL, name " ANC Source" }, \
186 { name " ANC Source", "RXANCL", "RXANCL" }, \
187 { name " ANC Source", "RXANCR", "RXANCR" }
189 static void cs47l85_hp_post_enable(struct snd_soc_dapm_widget
*w
)
191 struct snd_soc_component
*component
=
192 snd_soc_dapm_to_component(w
->dapm
);
196 case MADERA_OUT1L_ENA_SHIFT
:
197 case MADERA_OUT1R_ENA_SHIFT
:
198 val
= snd_soc_component_read(component
, MADERA_OUTPUT_ENABLES_1
);
199 val
&= (MADERA_OUT1L_ENA
| MADERA_OUT1R_ENA
);
201 if (val
!= (MADERA_OUT1L_ENA
| MADERA_OUT1R_ENA
))
204 snd_soc_component_update_bits(component
,
205 MADERA_EDRE_HP_STEREO_CONTROL
,
213 static void cs47l85_hp_post_disable(struct snd_soc_dapm_widget
*w
)
215 struct snd_soc_component
*component
=
216 snd_soc_dapm_to_component(w
->dapm
);
219 case MADERA_OUT1L_ENA_SHIFT
:
220 snd_soc_component_write(component
, MADERA_DCS_HP1L_CONTROL
,
223 case MADERA_OUT1R_ENA_SHIFT
:
224 snd_soc_component_write(component
, MADERA_DCS_HP1R_CONTROL
,
231 /* Only get to here for OUT1L and OUT1R */
232 snd_soc_component_update_bits(component
,
233 MADERA_EDRE_HP_STEREO_CONTROL
,
237 static int cs47l85_hp_ev(struct snd_soc_dapm_widget
*w
,
238 struct snd_kcontrol
*kcontrol
, int event
)
243 case SND_SOC_DAPM_PRE_PMU
:
244 case SND_SOC_DAPM_PRE_PMD
:
245 return madera_hp_ev(w
, kcontrol
, event
);
246 case SND_SOC_DAPM_POST_PMU
:
247 ret
= madera_hp_ev(w
, kcontrol
, event
);
251 cs47l85_hp_post_enable(w
);
253 case SND_SOC_DAPM_POST_PMD
:
254 ret
= madera_hp_ev(w
, kcontrol
, event
);
255 cs47l85_hp_post_disable(w
);
262 static const struct snd_kcontrol_new cs47l85_snd_controls
[] = {
263 SOC_ENUM("IN1 OSR", madera_in_dmic_osr
[0]),
264 SOC_ENUM("IN2 OSR", madera_in_dmic_osr
[1]),
265 SOC_ENUM("IN3 OSR", madera_in_dmic_osr
[2]),
266 SOC_ENUM("IN4 OSR", madera_in_dmic_osr
[3]),
267 SOC_ENUM("IN5 OSR", madera_in_dmic_osr
[4]),
268 SOC_ENUM("IN6 OSR", madera_in_dmic_osr
[5]),
270 SOC_SINGLE_RANGE_TLV("IN1L Volume", MADERA_IN1L_CONTROL
,
271 MADERA_IN1L_PGA_VOL_SHIFT
, 0x40, 0x5f, 0, madera_ana_tlv
),
272 SOC_SINGLE_RANGE_TLV("IN1R Volume", MADERA_IN1R_CONTROL
,
273 MADERA_IN1R_PGA_VOL_SHIFT
, 0x40, 0x5f, 0, madera_ana_tlv
),
274 SOC_SINGLE_RANGE_TLV("IN2L Volume", MADERA_IN2L_CONTROL
,
275 MADERA_IN2L_PGA_VOL_SHIFT
, 0x40, 0x5f, 0, madera_ana_tlv
),
276 SOC_SINGLE_RANGE_TLV("IN2R Volume", MADERA_IN2R_CONTROL
,
277 MADERA_IN2R_PGA_VOL_SHIFT
, 0x40, 0x5f, 0, madera_ana_tlv
),
278 SOC_SINGLE_RANGE_TLV("IN3L Volume", MADERA_IN3L_CONTROL
,
279 MADERA_IN3L_PGA_VOL_SHIFT
, 0x40, 0x5f, 0, madera_ana_tlv
),
280 SOC_SINGLE_RANGE_TLV("IN3R Volume", MADERA_IN3R_CONTROL
,
281 MADERA_IN3R_PGA_VOL_SHIFT
, 0x40, 0x5f, 0, madera_ana_tlv
),
283 SOC_ENUM("IN HPF Cutoff Frequency", madera_in_hpf_cut_enum
),
285 SOC_SINGLE("IN1L HPF Switch", MADERA_IN1L_CONTROL
,
286 MADERA_IN1L_HPF_SHIFT
, 1, 0),
287 SOC_SINGLE("IN1R HPF Switch", MADERA_IN1R_CONTROL
,
288 MADERA_IN1R_HPF_SHIFT
, 1, 0),
289 SOC_SINGLE("IN2L HPF Switch", MADERA_IN2L_CONTROL
,
290 MADERA_IN2L_HPF_SHIFT
, 1, 0),
291 SOC_SINGLE("IN2R HPF Switch", MADERA_IN2R_CONTROL
,
292 MADERA_IN2R_HPF_SHIFT
, 1, 0),
293 SOC_SINGLE("IN3L HPF Switch", MADERA_IN3L_CONTROL
,
294 MADERA_IN3L_HPF_SHIFT
, 1, 0),
295 SOC_SINGLE("IN3R HPF Switch", MADERA_IN3R_CONTROL
,
296 MADERA_IN3R_HPF_SHIFT
, 1, 0),
297 SOC_SINGLE("IN4L HPF Switch", MADERA_IN4L_CONTROL
,
298 MADERA_IN4L_HPF_SHIFT
, 1, 0),
299 SOC_SINGLE("IN4R HPF Switch", MADERA_IN4R_CONTROL
,
300 MADERA_IN4R_HPF_SHIFT
, 1, 0),
301 SOC_SINGLE("IN5L HPF Switch", MADERA_IN5L_CONTROL
,
302 MADERA_IN5L_HPF_SHIFT
, 1, 0),
303 SOC_SINGLE("IN5R HPF Switch", MADERA_IN5R_CONTROL
,
304 MADERA_IN5R_HPF_SHIFT
, 1, 0),
305 SOC_SINGLE("IN6L HPF Switch", MADERA_IN6L_CONTROL
,
306 MADERA_IN6L_HPF_SHIFT
, 1, 0),
307 SOC_SINGLE("IN6R HPF Switch", MADERA_IN6R_CONTROL
,
308 MADERA_IN6R_HPF_SHIFT
, 1, 0),
310 SOC_SINGLE_TLV("IN1L Digital Volume", MADERA_ADC_DIGITAL_VOLUME_1L
,
311 MADERA_IN1L_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
312 SOC_SINGLE_TLV("IN1R Digital Volume", MADERA_ADC_DIGITAL_VOLUME_1R
,
313 MADERA_IN1R_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
314 SOC_SINGLE_TLV("IN2L Digital Volume", MADERA_ADC_DIGITAL_VOLUME_2L
,
315 MADERA_IN2L_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
316 SOC_SINGLE_TLV("IN2R Digital Volume", MADERA_ADC_DIGITAL_VOLUME_2R
,
317 MADERA_IN2R_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
318 SOC_SINGLE_TLV("IN3L Digital Volume", MADERA_ADC_DIGITAL_VOLUME_3L
,
319 MADERA_IN3L_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
320 SOC_SINGLE_TLV("IN3R Digital Volume", MADERA_ADC_DIGITAL_VOLUME_3R
,
321 MADERA_IN3R_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
322 SOC_SINGLE_TLV("IN4L Digital Volume", MADERA_ADC_DIGITAL_VOLUME_4L
,
323 MADERA_IN4L_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
324 SOC_SINGLE_TLV("IN4R Digital Volume", MADERA_ADC_DIGITAL_VOLUME_4R
,
325 MADERA_IN4R_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
326 SOC_SINGLE_TLV("IN5L Digital Volume", MADERA_ADC_DIGITAL_VOLUME_5L
,
327 MADERA_IN5L_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
328 SOC_SINGLE_TLV("IN5R Digital Volume", MADERA_ADC_DIGITAL_VOLUME_5R
,
329 MADERA_IN5R_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
330 SOC_SINGLE_TLV("IN6L Digital Volume", MADERA_ADC_DIGITAL_VOLUME_6L
,
331 MADERA_IN6L_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
332 SOC_SINGLE_TLV("IN6R Digital Volume", MADERA_ADC_DIGITAL_VOLUME_6R
,
333 MADERA_IN6R_DIG_VOL_SHIFT
, 0xbf, 0, madera_digital_tlv
),
335 SOC_ENUM("Input Ramp Up", madera_in_vi_ramp
),
336 SOC_ENUM("Input Ramp Down", madera_in_vd_ramp
),
338 SND_SOC_BYTES("RXANC Coefficients", MADERA_ANC_COEFF_START
,
339 MADERA_ANC_COEFF_END
- MADERA_ANC_COEFF_START
+ 1),
340 SND_SOC_BYTES("RXANCL Config", MADERA_FCL_FILTER_CONTROL
, 1),
341 SND_SOC_BYTES("RXANCL Coefficients", MADERA_FCL_COEFF_START
,
342 MADERA_FCL_COEFF_END
- MADERA_FCL_COEFF_START
+ 1),
343 SND_SOC_BYTES("RXANCR Config", MADERA_FCR_FILTER_CONTROL
, 1),
344 SND_SOC_BYTES("RXANCR Coefficients", MADERA_FCR_COEFF_START
,
345 MADERA_FCR_COEFF_END
- MADERA_FCR_COEFF_START
+ 1),
347 MADERA_MIXER_CONTROLS("EQ1", MADERA_EQ1MIX_INPUT_1_SOURCE
),
348 MADERA_MIXER_CONTROLS("EQ2", MADERA_EQ2MIX_INPUT_1_SOURCE
),
349 MADERA_MIXER_CONTROLS("EQ3", MADERA_EQ3MIX_INPUT_1_SOURCE
),
350 MADERA_MIXER_CONTROLS("EQ4", MADERA_EQ4MIX_INPUT_1_SOURCE
),
352 MADERA_EQ_CONTROL("EQ1 Coefficients", MADERA_EQ1_2
),
353 SOC_SINGLE_TLV("EQ1 B1 Volume", MADERA_EQ1_1
, MADERA_EQ1_B1_GAIN_SHIFT
,
354 24, 0, madera_eq_tlv
),
355 SOC_SINGLE_TLV("EQ1 B2 Volume", MADERA_EQ1_1
, MADERA_EQ1_B2_GAIN_SHIFT
,
356 24, 0, madera_eq_tlv
),
357 SOC_SINGLE_TLV("EQ1 B3 Volume", MADERA_EQ1_1
, MADERA_EQ1_B3_GAIN_SHIFT
,
358 24, 0, madera_eq_tlv
),
359 SOC_SINGLE_TLV("EQ1 B4 Volume", MADERA_EQ1_2
, MADERA_EQ1_B4_GAIN_SHIFT
,
360 24, 0, madera_eq_tlv
),
361 SOC_SINGLE_TLV("EQ1 B5 Volume", MADERA_EQ1_2
, MADERA_EQ1_B5_GAIN_SHIFT
,
362 24, 0, madera_eq_tlv
),
364 MADERA_EQ_CONTROL("EQ2 Coefficients", MADERA_EQ2_2
),
365 SOC_SINGLE_TLV("EQ2 B1 Volume", MADERA_EQ2_1
, MADERA_EQ2_B1_GAIN_SHIFT
,
366 24, 0, madera_eq_tlv
),
367 SOC_SINGLE_TLV("EQ2 B2 Volume", MADERA_EQ2_1
, MADERA_EQ2_B2_GAIN_SHIFT
,
368 24, 0, madera_eq_tlv
),
369 SOC_SINGLE_TLV("EQ2 B3 Volume", MADERA_EQ2_1
, MADERA_EQ2_B3_GAIN_SHIFT
,
370 24, 0, madera_eq_tlv
),
371 SOC_SINGLE_TLV("EQ2 B4 Volume", MADERA_EQ2_2
, MADERA_EQ2_B4_GAIN_SHIFT
,
372 24, 0, madera_eq_tlv
),
373 SOC_SINGLE_TLV("EQ2 B5 Volume", MADERA_EQ2_2
, MADERA_EQ2_B5_GAIN_SHIFT
,
374 24, 0, madera_eq_tlv
),
376 MADERA_EQ_CONTROL("EQ3 Coefficients", MADERA_EQ3_2
),
377 SOC_SINGLE_TLV("EQ3 B1 Volume", MADERA_EQ3_1
, MADERA_EQ3_B1_GAIN_SHIFT
,
378 24, 0, madera_eq_tlv
),
379 SOC_SINGLE_TLV("EQ3 B2 Volume", MADERA_EQ3_1
, MADERA_EQ3_B2_GAIN_SHIFT
,
380 24, 0, madera_eq_tlv
),
381 SOC_SINGLE_TLV("EQ3 B3 Volume", MADERA_EQ3_1
, MADERA_EQ3_B3_GAIN_SHIFT
,
382 24, 0, madera_eq_tlv
),
383 SOC_SINGLE_TLV("EQ3 B4 Volume", MADERA_EQ3_2
, MADERA_EQ3_B4_GAIN_SHIFT
,
384 24, 0, madera_eq_tlv
),
385 SOC_SINGLE_TLV("EQ3 B5 Volume", MADERA_EQ3_2
, MADERA_EQ3_B5_GAIN_SHIFT
,
386 24, 0, madera_eq_tlv
),
388 MADERA_EQ_CONTROL("EQ4 Coefficients", MADERA_EQ4_2
),
389 SOC_SINGLE_TLV("EQ4 B1 Volume", MADERA_EQ4_1
, MADERA_EQ4_B1_GAIN_SHIFT
,
390 24, 0, madera_eq_tlv
),
391 SOC_SINGLE_TLV("EQ4 B2 Volume", MADERA_EQ4_1
, MADERA_EQ4_B2_GAIN_SHIFT
,
392 24, 0, madera_eq_tlv
),
393 SOC_SINGLE_TLV("EQ4 B3 Volume", MADERA_EQ4_1
, MADERA_EQ4_B3_GAIN_SHIFT
,
394 24, 0, madera_eq_tlv
),
395 SOC_SINGLE_TLV("EQ4 B4 Volume", MADERA_EQ4_2
, MADERA_EQ4_B4_GAIN_SHIFT
,
396 24, 0, madera_eq_tlv
),
397 SOC_SINGLE_TLV("EQ4 B5 Volume", MADERA_EQ4_2
, MADERA_EQ4_B5_GAIN_SHIFT
,
398 24, 0, madera_eq_tlv
),
400 MADERA_MIXER_CONTROLS("DRC1L", MADERA_DRC1LMIX_INPUT_1_SOURCE
),
401 MADERA_MIXER_CONTROLS("DRC1R", MADERA_DRC1RMIX_INPUT_1_SOURCE
),
402 MADERA_MIXER_CONTROLS("DRC2L", MADERA_DRC2LMIX_INPUT_1_SOURCE
),
403 MADERA_MIXER_CONTROLS("DRC2R", MADERA_DRC2RMIX_INPUT_1_SOURCE
),
405 SND_SOC_BYTES_MASK("DRC1", MADERA_DRC1_CTRL1
, 5,
406 MADERA_DRC1R_ENA
| MADERA_DRC1L_ENA
),
407 SND_SOC_BYTES_MASK("DRC2", MADERA_DRC2_CTRL1
, 5,
408 MADERA_DRC2R_ENA
| MADERA_DRC2L_ENA
),
410 MADERA_MIXER_CONTROLS("LHPF1", MADERA_HPLP1MIX_INPUT_1_SOURCE
),
411 MADERA_MIXER_CONTROLS("LHPF2", MADERA_HPLP2MIX_INPUT_1_SOURCE
),
412 MADERA_MIXER_CONTROLS("LHPF3", MADERA_HPLP3MIX_INPUT_1_SOURCE
),
413 MADERA_MIXER_CONTROLS("LHPF4", MADERA_HPLP4MIX_INPUT_1_SOURCE
),
415 MADERA_LHPF_CONTROL("LHPF1 Coefficients", MADERA_HPLPF1_2
),
416 MADERA_LHPF_CONTROL("LHPF2 Coefficients", MADERA_HPLPF2_2
),
417 MADERA_LHPF_CONTROL("LHPF3 Coefficients", MADERA_HPLPF3_2
),
418 MADERA_LHPF_CONTROL("LHPF4 Coefficients", MADERA_HPLPF4_2
),
420 SOC_ENUM("LHPF1 Mode", madera_lhpf1_mode
),
421 SOC_ENUM("LHPF2 Mode", madera_lhpf2_mode
),
422 SOC_ENUM("LHPF3 Mode", madera_lhpf3_mode
),
423 SOC_ENUM("LHPF4 Mode", madera_lhpf4_mode
),
425 MADERA_RATE_ENUM("ISRC1 FSL", madera_isrc_fsl
[0]),
426 MADERA_RATE_ENUM("ISRC2 FSL", madera_isrc_fsl
[1]),
427 MADERA_RATE_ENUM("ISRC3 FSL", madera_isrc_fsl
[2]),
428 MADERA_RATE_ENUM("ISRC4 FSL", madera_isrc_fsl
[3]),
429 MADERA_RATE_ENUM("ISRC1 FSH", madera_isrc_fsh
[0]),
430 MADERA_RATE_ENUM("ISRC2 FSH", madera_isrc_fsh
[1]),
431 MADERA_RATE_ENUM("ISRC3 FSH", madera_isrc_fsh
[2]),
432 MADERA_RATE_ENUM("ISRC4 FSH", madera_isrc_fsh
[3]),
433 MADERA_RATE_ENUM("ASRC1 Rate 1", madera_asrc1_rate
[0]),
434 MADERA_RATE_ENUM("ASRC1 Rate 2", madera_asrc1_rate
[1]),
435 MADERA_RATE_ENUM("ASRC2 Rate 1", madera_asrc2_rate
[0]),
436 MADERA_RATE_ENUM("ASRC2 Rate 2", madera_asrc2_rate
[1]),
438 WM_ADSP2_PRELOAD_SWITCH("DSP1", 1),
439 WM_ADSP2_PRELOAD_SWITCH("DSP2", 2),
440 WM_ADSP2_PRELOAD_SWITCH("DSP3", 3),
441 WM_ADSP2_PRELOAD_SWITCH("DSP4", 4),
442 WM_ADSP2_PRELOAD_SWITCH("DSP5", 5),
443 WM_ADSP2_PRELOAD_SWITCH("DSP6", 6),
444 WM_ADSP2_PRELOAD_SWITCH("DSP7", 7),
446 MADERA_MIXER_CONTROLS("DSP1L", MADERA_DSP1LMIX_INPUT_1_SOURCE
),
447 MADERA_MIXER_CONTROLS("DSP1R", MADERA_DSP1RMIX_INPUT_1_SOURCE
),
448 MADERA_MIXER_CONTROLS("DSP2L", MADERA_DSP2LMIX_INPUT_1_SOURCE
),
449 MADERA_MIXER_CONTROLS("DSP2R", MADERA_DSP2RMIX_INPUT_1_SOURCE
),
450 MADERA_MIXER_CONTROLS("DSP3L", MADERA_DSP3LMIX_INPUT_1_SOURCE
),
451 MADERA_MIXER_CONTROLS("DSP3R", MADERA_DSP3RMIX_INPUT_1_SOURCE
),
452 MADERA_MIXER_CONTROLS("DSP4L", MADERA_DSP4LMIX_INPUT_1_SOURCE
),
453 MADERA_MIXER_CONTROLS("DSP4R", MADERA_DSP4RMIX_INPUT_1_SOURCE
),
454 MADERA_MIXER_CONTROLS("DSP5L", MADERA_DSP5LMIX_INPUT_1_SOURCE
),
455 MADERA_MIXER_CONTROLS("DSP5R", MADERA_DSP5RMIX_INPUT_1_SOURCE
),
456 MADERA_MIXER_CONTROLS("DSP6L", MADERA_DSP6LMIX_INPUT_1_SOURCE
),
457 MADERA_MIXER_CONTROLS("DSP6R", MADERA_DSP6RMIX_INPUT_1_SOURCE
),
458 MADERA_MIXER_CONTROLS("DSP7L", MADERA_DSP7LMIX_INPUT_1_SOURCE
),
459 MADERA_MIXER_CONTROLS("DSP7R", MADERA_DSP7RMIX_INPUT_1_SOURCE
),
461 SOC_SINGLE_TLV("Noise Generator Volume", MADERA_COMFORT_NOISE_GENERATOR
,
462 MADERA_NOISE_GEN_GAIN_SHIFT
, 0x16, 0, madera_noise_tlv
),
464 MADERA_MIXER_CONTROLS("HPOUT1L", MADERA_OUT1LMIX_INPUT_1_SOURCE
),
465 MADERA_MIXER_CONTROLS("HPOUT1R", MADERA_OUT1RMIX_INPUT_1_SOURCE
),
466 MADERA_MIXER_CONTROLS("HPOUT2L", MADERA_OUT2LMIX_INPUT_1_SOURCE
),
467 MADERA_MIXER_CONTROLS("HPOUT2R", MADERA_OUT2RMIX_INPUT_1_SOURCE
),
468 MADERA_MIXER_CONTROLS("HPOUT3L", MADERA_OUT3LMIX_INPUT_1_SOURCE
),
469 MADERA_MIXER_CONTROLS("HPOUT3R", MADERA_OUT3RMIX_INPUT_1_SOURCE
),
470 MADERA_MIXER_CONTROLS("SPKOUTL", MADERA_OUT4LMIX_INPUT_1_SOURCE
),
471 MADERA_MIXER_CONTROLS("SPKOUTR", MADERA_OUT4RMIX_INPUT_1_SOURCE
),
472 MADERA_MIXER_CONTROLS("SPKDAT1L", MADERA_OUT5LMIX_INPUT_1_SOURCE
),
473 MADERA_MIXER_CONTROLS("SPKDAT1R", MADERA_OUT5RMIX_INPUT_1_SOURCE
),
474 MADERA_MIXER_CONTROLS("SPKDAT2L", MADERA_OUT6LMIX_INPUT_1_SOURCE
),
475 MADERA_MIXER_CONTROLS("SPKDAT2R", MADERA_OUT6RMIX_INPUT_1_SOURCE
),
477 SOC_SINGLE("HPOUT1 SC Protect Switch", MADERA_HP1_SHORT_CIRCUIT_CTRL
,
478 MADERA_HP1_SC_ENA_SHIFT
, 1, 0),
479 SOC_SINGLE("HPOUT2 SC Protect Switch", MADERA_HP2_SHORT_CIRCUIT_CTRL
,
480 MADERA_HP2_SC_ENA_SHIFT
, 1, 0),
481 SOC_SINGLE("HPOUT3 SC Protect Switch", MADERA_HP3_SHORT_CIRCUIT_CTRL
,
482 MADERA_HP3_SC_ENA_SHIFT
, 1, 0),
484 SOC_SINGLE("SPKDAT1 High Performance Switch", MADERA_OUTPUT_PATH_CONFIG_5L
,
485 MADERA_OUT5_OSR_SHIFT
, 1, 0),
486 SOC_SINGLE("SPKDAT2 High Performance Switch", MADERA_OUTPUT_PATH_CONFIG_6L
,
487 MADERA_OUT6_OSR_SHIFT
, 1, 0),
489 SOC_DOUBLE_R("HPOUT1 Digital Switch", MADERA_DAC_DIGITAL_VOLUME_1L
,
490 MADERA_DAC_DIGITAL_VOLUME_1R
, MADERA_OUT1L_MUTE_SHIFT
, 1, 1),
491 SOC_DOUBLE_R("HPOUT2 Digital Switch", MADERA_DAC_DIGITAL_VOLUME_2L
,
492 MADERA_DAC_DIGITAL_VOLUME_2R
, MADERA_OUT2L_MUTE_SHIFT
, 1, 1),
493 SOC_DOUBLE_R("HPOUT3 Digital Switch", MADERA_DAC_DIGITAL_VOLUME_3L
,
494 MADERA_DAC_DIGITAL_VOLUME_3R
, MADERA_OUT3L_MUTE_SHIFT
, 1, 1),
495 SOC_DOUBLE_R("Speaker Digital Switch", MADERA_DAC_DIGITAL_VOLUME_4L
,
496 MADERA_DAC_DIGITAL_VOLUME_4R
, MADERA_OUT4L_MUTE_SHIFT
, 1, 1),
497 SOC_DOUBLE_R("SPKDAT1 Digital Switch", MADERA_DAC_DIGITAL_VOLUME_5L
,
498 MADERA_DAC_DIGITAL_VOLUME_5R
, MADERA_OUT5L_MUTE_SHIFT
, 1, 1),
499 SOC_DOUBLE_R("SPKDAT2 Digital Switch", MADERA_DAC_DIGITAL_VOLUME_6L
,
500 MADERA_DAC_DIGITAL_VOLUME_6R
, MADERA_OUT6L_MUTE_SHIFT
, 1, 1),
502 SOC_DOUBLE_R_TLV("HPOUT1 Digital Volume", MADERA_DAC_DIGITAL_VOLUME_1L
,
503 MADERA_DAC_DIGITAL_VOLUME_1R
, MADERA_OUT1L_VOL_SHIFT
,
504 0xbf, 0, madera_digital_tlv
),
505 SOC_DOUBLE_R_TLV("HPOUT2 Digital Volume", MADERA_DAC_DIGITAL_VOLUME_2L
,
506 MADERA_DAC_DIGITAL_VOLUME_2R
, MADERA_OUT2L_VOL_SHIFT
,
507 0xbf, 0, madera_digital_tlv
),
508 SOC_DOUBLE_R_TLV("HPOUT3 Digital Volume", MADERA_DAC_DIGITAL_VOLUME_3L
,
509 MADERA_DAC_DIGITAL_VOLUME_3R
, MADERA_OUT3L_VOL_SHIFT
,
510 0xbf, 0, madera_digital_tlv
),
511 SOC_DOUBLE_R_TLV("Speaker Digital Volume", MADERA_DAC_DIGITAL_VOLUME_4L
,
512 MADERA_DAC_DIGITAL_VOLUME_4R
, MADERA_OUT4L_VOL_SHIFT
,
513 0xbf, 0, madera_digital_tlv
),
514 SOC_DOUBLE_R_TLV("SPKDAT1 Digital Volume", MADERA_DAC_DIGITAL_VOLUME_5L
,
515 MADERA_DAC_DIGITAL_VOLUME_5R
, MADERA_OUT5L_VOL_SHIFT
,
516 0xbf, 0, madera_digital_tlv
),
517 SOC_DOUBLE_R_TLV("SPKDAT2 Digital Volume", MADERA_DAC_DIGITAL_VOLUME_6L
,
518 MADERA_DAC_DIGITAL_VOLUME_6R
, MADERA_OUT6L_VOL_SHIFT
,
519 0xbf, 0, madera_digital_tlv
),
521 SOC_DOUBLE("SPKDAT1 Switch", MADERA_PDM_SPK1_CTRL_1
, MADERA_SPK1L_MUTE_SHIFT
,
522 MADERA_SPK1R_MUTE_SHIFT
, 1, 1),
523 SOC_DOUBLE("SPKDAT2 Switch", MADERA_PDM_SPK2_CTRL_1
, MADERA_SPK2L_MUTE_SHIFT
,
524 MADERA_SPK2R_MUTE_SHIFT
, 1, 1),
526 SOC_ENUM("Output Ramp Up", madera_out_vi_ramp
),
527 SOC_ENUM("Output Ramp Down", madera_out_vd_ramp
),
529 SOC_SINGLE("Noise Gate Switch", MADERA_NOISE_GATE_CONTROL
,
530 MADERA_NGATE_ENA_SHIFT
, 1, 0),
531 SOC_SINGLE_TLV("Noise Gate Threshold Volume", MADERA_NOISE_GATE_CONTROL
,
532 MADERA_NGATE_THR_SHIFT
, 7, 1, madera_ng_tlv
),
533 SOC_ENUM("Noise Gate Hold", madera_ng_hold
),
535 CS47L85_NG_SRC("HPOUT1L", MADERA_NOISE_GATE_SELECT_1L
),
536 CS47L85_NG_SRC("HPOUT1R", MADERA_NOISE_GATE_SELECT_1R
),
537 CS47L85_NG_SRC("HPOUT2L", MADERA_NOISE_GATE_SELECT_2L
),
538 CS47L85_NG_SRC("HPOUT2R", MADERA_NOISE_GATE_SELECT_2R
),
539 CS47L85_NG_SRC("HPOUT3L", MADERA_NOISE_GATE_SELECT_3L
),
540 CS47L85_NG_SRC("HPOUT3R", MADERA_NOISE_GATE_SELECT_3R
),
541 CS47L85_NG_SRC("SPKOUTL", MADERA_NOISE_GATE_SELECT_4L
),
542 CS47L85_NG_SRC("SPKOUTR", MADERA_NOISE_GATE_SELECT_4R
),
543 CS47L85_NG_SRC("SPKDAT1L", MADERA_NOISE_GATE_SELECT_5L
),
544 CS47L85_NG_SRC("SPKDAT1R", MADERA_NOISE_GATE_SELECT_5R
),
545 CS47L85_NG_SRC("SPKDAT2L", MADERA_NOISE_GATE_SELECT_6L
),
546 CS47L85_NG_SRC("SPKDAT2R", MADERA_NOISE_GATE_SELECT_6R
),
548 MADERA_MIXER_CONTROLS("AIF1TX1", MADERA_AIF1TX1MIX_INPUT_1_SOURCE
),
549 MADERA_MIXER_CONTROLS("AIF1TX2", MADERA_AIF1TX2MIX_INPUT_1_SOURCE
),
550 MADERA_MIXER_CONTROLS("AIF1TX3", MADERA_AIF1TX3MIX_INPUT_1_SOURCE
),
551 MADERA_MIXER_CONTROLS("AIF1TX4", MADERA_AIF1TX4MIX_INPUT_1_SOURCE
),
552 MADERA_MIXER_CONTROLS("AIF1TX5", MADERA_AIF1TX5MIX_INPUT_1_SOURCE
),
553 MADERA_MIXER_CONTROLS("AIF1TX6", MADERA_AIF1TX6MIX_INPUT_1_SOURCE
),
554 MADERA_MIXER_CONTROLS("AIF1TX7", MADERA_AIF1TX7MIX_INPUT_1_SOURCE
),
555 MADERA_MIXER_CONTROLS("AIF1TX8", MADERA_AIF1TX8MIX_INPUT_1_SOURCE
),
557 MADERA_MIXER_CONTROLS("AIF2TX1", MADERA_AIF2TX1MIX_INPUT_1_SOURCE
),
558 MADERA_MIXER_CONTROLS("AIF2TX2", MADERA_AIF2TX2MIX_INPUT_1_SOURCE
),
559 MADERA_MIXER_CONTROLS("AIF2TX3", MADERA_AIF2TX3MIX_INPUT_1_SOURCE
),
560 MADERA_MIXER_CONTROLS("AIF2TX4", MADERA_AIF2TX4MIX_INPUT_1_SOURCE
),
561 MADERA_MIXER_CONTROLS("AIF2TX5", MADERA_AIF2TX5MIX_INPUT_1_SOURCE
),
562 MADERA_MIXER_CONTROLS("AIF2TX6", MADERA_AIF2TX6MIX_INPUT_1_SOURCE
),
563 MADERA_MIXER_CONTROLS("AIF2TX7", MADERA_AIF2TX7MIX_INPUT_1_SOURCE
),
564 MADERA_MIXER_CONTROLS("AIF2TX8", MADERA_AIF2TX8MIX_INPUT_1_SOURCE
),
566 MADERA_MIXER_CONTROLS("AIF3TX1", MADERA_AIF3TX1MIX_INPUT_1_SOURCE
),
567 MADERA_MIXER_CONTROLS("AIF3TX2", MADERA_AIF3TX2MIX_INPUT_1_SOURCE
),
569 MADERA_MIXER_CONTROLS("AIF4TX1", MADERA_AIF4TX1MIX_INPUT_1_SOURCE
),
570 MADERA_MIXER_CONTROLS("AIF4TX2", MADERA_AIF4TX2MIX_INPUT_1_SOURCE
),
572 MADERA_MIXER_CONTROLS("SLIMTX1", MADERA_SLIMTX1MIX_INPUT_1_SOURCE
),
573 MADERA_MIXER_CONTROLS("SLIMTX2", MADERA_SLIMTX2MIX_INPUT_1_SOURCE
),
574 MADERA_MIXER_CONTROLS("SLIMTX3", MADERA_SLIMTX3MIX_INPUT_1_SOURCE
),
575 MADERA_MIXER_CONTROLS("SLIMTX4", MADERA_SLIMTX4MIX_INPUT_1_SOURCE
),
576 MADERA_MIXER_CONTROLS("SLIMTX5", MADERA_SLIMTX5MIX_INPUT_1_SOURCE
),
577 MADERA_MIXER_CONTROLS("SLIMTX6", MADERA_SLIMTX6MIX_INPUT_1_SOURCE
),
578 MADERA_MIXER_CONTROLS("SLIMTX7", MADERA_SLIMTX7MIX_INPUT_1_SOURCE
),
579 MADERA_MIXER_CONTROLS("SLIMTX8", MADERA_SLIMTX8MIX_INPUT_1_SOURCE
),
581 MADERA_GAINMUX_CONTROLS("SPDIF1TX1", MADERA_SPDIF1TX1MIX_INPUT_1_SOURCE
),
582 MADERA_GAINMUX_CONTROLS("SPDIF1TX2", MADERA_SPDIF1TX2MIX_INPUT_1_SOURCE
),
584 WM_ADSP_FW_CONTROL("DSP1", 0),
585 WM_ADSP_FW_CONTROL("DSP2", 1),
586 WM_ADSP_FW_CONTROL("DSP3", 2),
587 WM_ADSP_FW_CONTROL("DSP4", 3),
588 WM_ADSP_FW_CONTROL("DSP5", 4),
589 WM_ADSP_FW_CONTROL("DSP6", 5),
590 WM_ADSP_FW_CONTROL("DSP7", 6),
593 MADERA_MIXER_ENUMS(EQ1
, MADERA_EQ1MIX_INPUT_1_SOURCE
);
594 MADERA_MIXER_ENUMS(EQ2
, MADERA_EQ2MIX_INPUT_1_SOURCE
);
595 MADERA_MIXER_ENUMS(EQ3
, MADERA_EQ3MIX_INPUT_1_SOURCE
);
596 MADERA_MIXER_ENUMS(EQ4
, MADERA_EQ4MIX_INPUT_1_SOURCE
);
598 MADERA_MIXER_ENUMS(DRC1L
, MADERA_DRC1LMIX_INPUT_1_SOURCE
);
599 MADERA_MIXER_ENUMS(DRC1R
, MADERA_DRC1RMIX_INPUT_1_SOURCE
);
600 MADERA_MIXER_ENUMS(DRC2L
, MADERA_DRC2LMIX_INPUT_1_SOURCE
);
601 MADERA_MIXER_ENUMS(DRC2R
, MADERA_DRC2RMIX_INPUT_1_SOURCE
);
603 MADERA_MIXER_ENUMS(LHPF1
, MADERA_HPLP1MIX_INPUT_1_SOURCE
);
604 MADERA_MIXER_ENUMS(LHPF2
, MADERA_HPLP2MIX_INPUT_1_SOURCE
);
605 MADERA_MIXER_ENUMS(LHPF3
, MADERA_HPLP3MIX_INPUT_1_SOURCE
);
606 MADERA_MIXER_ENUMS(LHPF4
, MADERA_HPLP4MIX_INPUT_1_SOURCE
);
608 MADERA_MIXER_ENUMS(DSP1L
, MADERA_DSP1LMIX_INPUT_1_SOURCE
);
609 MADERA_MIXER_ENUMS(DSP1R
, MADERA_DSP1RMIX_INPUT_1_SOURCE
);
610 MADERA_DSP_AUX_ENUMS(DSP1
, MADERA_DSP1AUX1MIX_INPUT_1_SOURCE
);
612 MADERA_MIXER_ENUMS(DSP2L
, MADERA_DSP2LMIX_INPUT_1_SOURCE
);
613 MADERA_MIXER_ENUMS(DSP2R
, MADERA_DSP2RMIX_INPUT_1_SOURCE
);
614 MADERA_DSP_AUX_ENUMS(DSP2
, MADERA_DSP2AUX1MIX_INPUT_1_SOURCE
);
616 MADERA_MIXER_ENUMS(DSP3L
, MADERA_DSP3LMIX_INPUT_1_SOURCE
);
617 MADERA_MIXER_ENUMS(DSP3R
, MADERA_DSP3RMIX_INPUT_1_SOURCE
);
618 MADERA_DSP_AUX_ENUMS(DSP3
, MADERA_DSP3AUX1MIX_INPUT_1_SOURCE
);
620 MADERA_MIXER_ENUMS(DSP4L
, MADERA_DSP4LMIX_INPUT_1_SOURCE
);
621 MADERA_MIXER_ENUMS(DSP4R
, MADERA_DSP4RMIX_INPUT_1_SOURCE
);
622 MADERA_DSP_AUX_ENUMS(DSP4
, MADERA_DSP4AUX1MIX_INPUT_1_SOURCE
);
624 MADERA_MIXER_ENUMS(DSP5L
, MADERA_DSP5LMIX_INPUT_1_SOURCE
);
625 MADERA_MIXER_ENUMS(DSP5R
, MADERA_DSP5RMIX_INPUT_1_SOURCE
);
626 MADERA_DSP_AUX_ENUMS(DSP5
, MADERA_DSP5AUX1MIX_INPUT_1_SOURCE
);
628 MADERA_MIXER_ENUMS(DSP6L
, MADERA_DSP6LMIX_INPUT_1_SOURCE
);
629 MADERA_MIXER_ENUMS(DSP6R
, MADERA_DSP6RMIX_INPUT_1_SOURCE
);
630 MADERA_DSP_AUX_ENUMS(DSP6
, MADERA_DSP6AUX1MIX_INPUT_1_SOURCE
);
632 MADERA_MIXER_ENUMS(DSP7L
, MADERA_DSP7LMIX_INPUT_1_SOURCE
);
633 MADERA_MIXER_ENUMS(DSP7R
, MADERA_DSP7RMIX_INPUT_1_SOURCE
);
634 MADERA_DSP_AUX_ENUMS(DSP7
, MADERA_DSP7AUX1MIX_INPUT_1_SOURCE
);
636 MADERA_MIXER_ENUMS(PWM1
, MADERA_PWM1MIX_INPUT_1_SOURCE
);
637 MADERA_MIXER_ENUMS(PWM2
, MADERA_PWM2MIX_INPUT_1_SOURCE
);
639 MADERA_MIXER_ENUMS(OUT1L
, MADERA_OUT1LMIX_INPUT_1_SOURCE
);
640 MADERA_MIXER_ENUMS(OUT1R
, MADERA_OUT1RMIX_INPUT_1_SOURCE
);
641 MADERA_MIXER_ENUMS(OUT2L
, MADERA_OUT2LMIX_INPUT_1_SOURCE
);
642 MADERA_MIXER_ENUMS(OUT2R
, MADERA_OUT2RMIX_INPUT_1_SOURCE
);
643 MADERA_MIXER_ENUMS(OUT3L
, MADERA_OUT3LMIX_INPUT_1_SOURCE
);
644 MADERA_MIXER_ENUMS(OUT3R
, MADERA_OUT3RMIX_INPUT_1_SOURCE
);
645 MADERA_MIXER_ENUMS(SPKOUTL
, MADERA_OUT4LMIX_INPUT_1_SOURCE
);
646 MADERA_MIXER_ENUMS(SPKOUTR
, MADERA_OUT4RMIX_INPUT_1_SOURCE
);
647 MADERA_MIXER_ENUMS(SPKDAT1L
, MADERA_OUT5LMIX_INPUT_1_SOURCE
);
648 MADERA_MIXER_ENUMS(SPKDAT1R
, MADERA_OUT5RMIX_INPUT_1_SOURCE
);
649 MADERA_MIXER_ENUMS(SPKDAT2L
, MADERA_OUT6LMIX_INPUT_1_SOURCE
);
650 MADERA_MIXER_ENUMS(SPKDAT2R
, MADERA_OUT6RMIX_INPUT_1_SOURCE
);
652 MADERA_MIXER_ENUMS(AIF1TX1
, MADERA_AIF1TX1MIX_INPUT_1_SOURCE
);
653 MADERA_MIXER_ENUMS(AIF1TX2
, MADERA_AIF1TX2MIX_INPUT_1_SOURCE
);
654 MADERA_MIXER_ENUMS(AIF1TX3
, MADERA_AIF1TX3MIX_INPUT_1_SOURCE
);
655 MADERA_MIXER_ENUMS(AIF1TX4
, MADERA_AIF1TX4MIX_INPUT_1_SOURCE
);
656 MADERA_MIXER_ENUMS(AIF1TX5
, MADERA_AIF1TX5MIX_INPUT_1_SOURCE
);
657 MADERA_MIXER_ENUMS(AIF1TX6
, MADERA_AIF1TX6MIX_INPUT_1_SOURCE
);
658 MADERA_MIXER_ENUMS(AIF1TX7
, MADERA_AIF1TX7MIX_INPUT_1_SOURCE
);
659 MADERA_MIXER_ENUMS(AIF1TX8
, MADERA_AIF1TX8MIX_INPUT_1_SOURCE
);
661 MADERA_MIXER_ENUMS(AIF2TX1
, MADERA_AIF2TX1MIX_INPUT_1_SOURCE
);
662 MADERA_MIXER_ENUMS(AIF2TX2
, MADERA_AIF2TX2MIX_INPUT_1_SOURCE
);
663 MADERA_MIXER_ENUMS(AIF2TX3
, MADERA_AIF2TX3MIX_INPUT_1_SOURCE
);
664 MADERA_MIXER_ENUMS(AIF2TX4
, MADERA_AIF2TX4MIX_INPUT_1_SOURCE
);
665 MADERA_MIXER_ENUMS(AIF2TX5
, MADERA_AIF2TX5MIX_INPUT_1_SOURCE
);
666 MADERA_MIXER_ENUMS(AIF2TX6
, MADERA_AIF2TX6MIX_INPUT_1_SOURCE
);
667 MADERA_MIXER_ENUMS(AIF2TX7
, MADERA_AIF2TX7MIX_INPUT_1_SOURCE
);
668 MADERA_MIXER_ENUMS(AIF2TX8
, MADERA_AIF2TX8MIX_INPUT_1_SOURCE
);
670 MADERA_MIXER_ENUMS(AIF3TX1
, MADERA_AIF3TX1MIX_INPUT_1_SOURCE
);
671 MADERA_MIXER_ENUMS(AIF3TX2
, MADERA_AIF3TX2MIX_INPUT_1_SOURCE
);
673 MADERA_MIXER_ENUMS(AIF4TX1
, MADERA_AIF4TX1MIX_INPUT_1_SOURCE
);
674 MADERA_MIXER_ENUMS(AIF4TX2
, MADERA_AIF4TX2MIX_INPUT_1_SOURCE
);
676 MADERA_MIXER_ENUMS(SLIMTX1
, MADERA_SLIMTX1MIX_INPUT_1_SOURCE
);
677 MADERA_MIXER_ENUMS(SLIMTX2
, MADERA_SLIMTX2MIX_INPUT_1_SOURCE
);
678 MADERA_MIXER_ENUMS(SLIMTX3
, MADERA_SLIMTX3MIX_INPUT_1_SOURCE
);
679 MADERA_MIXER_ENUMS(SLIMTX4
, MADERA_SLIMTX4MIX_INPUT_1_SOURCE
);
680 MADERA_MIXER_ENUMS(SLIMTX5
, MADERA_SLIMTX5MIX_INPUT_1_SOURCE
);
681 MADERA_MIXER_ENUMS(SLIMTX6
, MADERA_SLIMTX6MIX_INPUT_1_SOURCE
);
682 MADERA_MIXER_ENUMS(SLIMTX7
, MADERA_SLIMTX7MIX_INPUT_1_SOURCE
);
683 MADERA_MIXER_ENUMS(SLIMTX8
, MADERA_SLIMTX8MIX_INPUT_1_SOURCE
);
685 MADERA_MUX_ENUMS(SPD1TX1
, MADERA_SPDIF1TX1MIX_INPUT_1_SOURCE
);
686 MADERA_MUX_ENUMS(SPD1TX2
, MADERA_SPDIF1TX2MIX_INPUT_1_SOURCE
);
688 MADERA_MUX_ENUMS(ASRC1IN1L
, MADERA_ASRC1_1LMIX_INPUT_1_SOURCE
);
689 MADERA_MUX_ENUMS(ASRC1IN1R
, MADERA_ASRC1_1RMIX_INPUT_1_SOURCE
);
690 MADERA_MUX_ENUMS(ASRC1IN2L
, MADERA_ASRC1_2LMIX_INPUT_1_SOURCE
);
691 MADERA_MUX_ENUMS(ASRC1IN2R
, MADERA_ASRC1_2RMIX_INPUT_1_SOURCE
);
692 MADERA_MUX_ENUMS(ASRC2IN1L
, MADERA_ASRC2_1LMIX_INPUT_1_SOURCE
);
693 MADERA_MUX_ENUMS(ASRC2IN1R
, MADERA_ASRC2_1RMIX_INPUT_1_SOURCE
);
694 MADERA_MUX_ENUMS(ASRC2IN2L
, MADERA_ASRC2_2LMIX_INPUT_1_SOURCE
);
695 MADERA_MUX_ENUMS(ASRC2IN2R
, MADERA_ASRC2_2RMIX_INPUT_1_SOURCE
);
697 MADERA_MUX_ENUMS(ISRC1INT1
, MADERA_ISRC1INT1MIX_INPUT_1_SOURCE
);
698 MADERA_MUX_ENUMS(ISRC1INT2
, MADERA_ISRC1INT2MIX_INPUT_1_SOURCE
);
699 MADERA_MUX_ENUMS(ISRC1INT3
, MADERA_ISRC1INT3MIX_INPUT_1_SOURCE
);
700 MADERA_MUX_ENUMS(ISRC1INT4
, MADERA_ISRC1INT4MIX_INPUT_1_SOURCE
);
702 MADERA_MUX_ENUMS(ISRC1DEC1
, MADERA_ISRC1DEC1MIX_INPUT_1_SOURCE
);
703 MADERA_MUX_ENUMS(ISRC1DEC2
, MADERA_ISRC1DEC2MIX_INPUT_1_SOURCE
);
704 MADERA_MUX_ENUMS(ISRC1DEC3
, MADERA_ISRC1DEC3MIX_INPUT_1_SOURCE
);
705 MADERA_MUX_ENUMS(ISRC1DEC4
, MADERA_ISRC1DEC4MIX_INPUT_1_SOURCE
);
707 MADERA_MUX_ENUMS(ISRC2INT1
, MADERA_ISRC2INT1MIX_INPUT_1_SOURCE
);
708 MADERA_MUX_ENUMS(ISRC2INT2
, MADERA_ISRC2INT2MIX_INPUT_1_SOURCE
);
709 MADERA_MUX_ENUMS(ISRC2INT3
, MADERA_ISRC2INT3MIX_INPUT_1_SOURCE
);
710 MADERA_MUX_ENUMS(ISRC2INT4
, MADERA_ISRC2INT4MIX_INPUT_1_SOURCE
);
712 MADERA_MUX_ENUMS(ISRC2DEC1
, MADERA_ISRC2DEC1MIX_INPUT_1_SOURCE
);
713 MADERA_MUX_ENUMS(ISRC2DEC2
, MADERA_ISRC2DEC2MIX_INPUT_1_SOURCE
);
714 MADERA_MUX_ENUMS(ISRC2DEC3
, MADERA_ISRC2DEC3MIX_INPUT_1_SOURCE
);
715 MADERA_MUX_ENUMS(ISRC2DEC4
, MADERA_ISRC2DEC4MIX_INPUT_1_SOURCE
);
717 MADERA_MUX_ENUMS(ISRC3INT1
, MADERA_ISRC3INT1MIX_INPUT_1_SOURCE
);
718 MADERA_MUX_ENUMS(ISRC3INT2
, MADERA_ISRC3INT2MIX_INPUT_1_SOURCE
);
720 MADERA_MUX_ENUMS(ISRC3DEC1
, MADERA_ISRC3DEC1MIX_INPUT_1_SOURCE
);
721 MADERA_MUX_ENUMS(ISRC3DEC2
, MADERA_ISRC3DEC2MIX_INPUT_1_SOURCE
);
723 MADERA_MUX_ENUMS(ISRC4INT1
, MADERA_ISRC4INT1MIX_INPUT_1_SOURCE
);
724 MADERA_MUX_ENUMS(ISRC4INT2
, MADERA_ISRC4INT2MIX_INPUT_1_SOURCE
);
726 MADERA_MUX_ENUMS(ISRC4DEC1
, MADERA_ISRC4DEC1MIX_INPUT_1_SOURCE
);
727 MADERA_MUX_ENUMS(ISRC4DEC2
, MADERA_ISRC4DEC2MIX_INPUT_1_SOURCE
);
729 static const char * const cs47l85_aec_loopback_texts
[] = {
730 "HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "HPOUT3L", "HPOUT3R",
731 "SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R", "SPKDAT2L", "SPKDAT2R",
734 static const unsigned int cs47l85_aec_loopback_values
[] = {
735 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
738 static const struct soc_enum cs47l85_aec1_loopback
=
739 SOC_VALUE_ENUM_SINGLE(MADERA_DAC_AEC_CONTROL_1
,
740 MADERA_AEC1_LOOPBACK_SRC_SHIFT
, 0xf,
741 ARRAY_SIZE(cs47l85_aec_loopback_texts
),
742 cs47l85_aec_loopback_texts
,
743 cs47l85_aec_loopback_values
);
745 static const struct soc_enum cs47l85_aec2_loopback
=
746 SOC_VALUE_ENUM_SINGLE(MADERA_DAC_AEC_CONTROL_2
,
747 MADERA_AEC2_LOOPBACK_SRC_SHIFT
, 0xf,
748 ARRAY_SIZE(cs47l85_aec_loopback_texts
),
749 cs47l85_aec_loopback_texts
,
750 cs47l85_aec_loopback_values
);
752 static const struct snd_kcontrol_new cs47l85_aec_loopback_mux
[] = {
753 SOC_DAPM_ENUM("AEC1 Loopback", cs47l85_aec1_loopback
),
754 SOC_DAPM_ENUM("AEC2 Loopback", cs47l85_aec2_loopback
),
757 static const struct snd_kcontrol_new cs47l85_anc_input_mux
[] = {
758 SOC_DAPM_ENUM("RXANCL Input", madera_anc_input_src
[0]),
759 SOC_DAPM_ENUM("RXANCL Channel", madera_anc_input_src
[1]),
760 SOC_DAPM_ENUM("RXANCR Input", madera_anc_input_src
[2]),
761 SOC_DAPM_ENUM("RXANCR Channel", madera_anc_input_src
[3]),
764 static const struct snd_kcontrol_new cs47l85_anc_ng_mux
=
765 SOC_DAPM_ENUM("RXANC NG Source", madera_anc_ng_enum
);
767 static const struct snd_kcontrol_new cs47l85_output_anc_src
[] = {
768 SOC_DAPM_ENUM("HPOUT1L ANC Source", madera_output_anc_src
[0]),
769 SOC_DAPM_ENUM("HPOUT1R ANC Source", madera_output_anc_src
[1]),
770 SOC_DAPM_ENUM("HPOUT2L ANC Source", madera_output_anc_src
[2]),
771 SOC_DAPM_ENUM("HPOUT2R ANC Source", madera_output_anc_src
[3]),
772 SOC_DAPM_ENUM("HPOUT3L ANC Source", madera_output_anc_src
[4]),
773 SOC_DAPM_ENUM("HPOUT3R ANC Source", madera_output_anc_src
[5]),
774 SOC_DAPM_ENUM("SPKOUTL ANC Source", madera_output_anc_src
[6]),
775 SOC_DAPM_ENUM("SPKOUTR ANC Source", madera_output_anc_src
[7]),
776 SOC_DAPM_ENUM("SPKDAT1L ANC Source", madera_output_anc_src
[8]),
777 SOC_DAPM_ENUM("SPKDAT1R ANC Source", madera_output_anc_src
[9]),
778 SOC_DAPM_ENUM("SPKDAT2L ANC Source", madera_output_anc_src
[10]),
779 SOC_DAPM_ENUM("SPKDAT2R ANC Source", madera_output_anc_src
[11]),
782 static const struct snd_soc_dapm_widget cs47l85_dapm_widgets
[] = {
783 SND_SOC_DAPM_SUPPLY("SYSCLK", MADERA_SYSTEM_CLOCK_1
, MADERA_SYSCLK_ENA_SHIFT
,
785 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
|
786 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
),
787 SND_SOC_DAPM_SUPPLY("ASYNCCLK", MADERA_ASYNC_CLOCK_1
,
788 MADERA_ASYNC_CLK_ENA_SHIFT
, 0, madera_clk_ev
,
789 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
790 SND_SOC_DAPM_SUPPLY("OPCLK", MADERA_OUTPUT_SYSTEM_CLOCK
,
791 MADERA_OPCLK_ENA_SHIFT
, 0, NULL
, 0),
792 SND_SOC_DAPM_SUPPLY("ASYNCOPCLK", MADERA_OUTPUT_ASYNC_CLOCK
,
793 MADERA_OPCLK_ASYNC_ENA_SHIFT
, 0, NULL
, 0),
794 SND_SOC_DAPM_SUPPLY("DSPCLK", MADERA_DSP_CLOCK_1
, MADERA_DSP_CLK_ENA_SHIFT
,
796 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
798 SND_SOC_DAPM_REGULATOR_SUPPLY("DBVDD2", 0, 0),
799 SND_SOC_DAPM_REGULATOR_SUPPLY("DBVDD3", 0, 0),
800 SND_SOC_DAPM_REGULATOR_SUPPLY("DBVDD4", 0, 0),
801 SND_SOC_DAPM_REGULATOR_SUPPLY("CPVDD1", 20, 0),
802 SND_SOC_DAPM_REGULATOR_SUPPLY("CPVDD2", 20, 0),
803 SND_SOC_DAPM_REGULATOR_SUPPLY("MICVDD", 0, SND_SOC_DAPM_REGULATOR_BYPASS
),
804 SND_SOC_DAPM_REGULATOR_SUPPLY("SPKVDDL", 0, 0),
805 SND_SOC_DAPM_REGULATOR_SUPPLY("SPKVDDR", 0, 0),
807 SND_SOC_DAPM_SUPPLY("MICBIAS1", MADERA_MIC_BIAS_CTRL_1
,
808 MADERA_MICB1_ENA_SHIFT
, 0, NULL
, 0),
809 SND_SOC_DAPM_SUPPLY("MICBIAS2", MADERA_MIC_BIAS_CTRL_2
,
810 MADERA_MICB1_ENA_SHIFT
, 0, NULL
, 0),
811 SND_SOC_DAPM_SUPPLY("MICBIAS3", MADERA_MIC_BIAS_CTRL_3
,
812 MADERA_MICB1_ENA_SHIFT
, 0, NULL
, 0),
813 SND_SOC_DAPM_SUPPLY("MICBIAS4", MADERA_MIC_BIAS_CTRL_4
,
814 MADERA_MICB1_ENA_SHIFT
, 0, NULL
, 0),
816 SND_SOC_DAPM_SUPPLY("FXCLK", SND_SOC_NOPM
,
817 MADERA_DOM_GRP_FX
, 0,
818 madera_domain_clk_ev
,
819 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
820 SND_SOC_DAPM_SUPPLY("ASRC1CLK", SND_SOC_NOPM
,
821 MADERA_DOM_GRP_ASRC1
, 0,
822 madera_domain_clk_ev
,
823 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
824 SND_SOC_DAPM_SUPPLY("ASRC2CLK", SND_SOC_NOPM
,
825 MADERA_DOM_GRP_ASRC2
, 0,
826 madera_domain_clk_ev
,
827 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
828 SND_SOC_DAPM_SUPPLY("ISRC1CLK", SND_SOC_NOPM
,
829 MADERA_DOM_GRP_ISRC1
, 0,
830 madera_domain_clk_ev
,
831 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
832 SND_SOC_DAPM_SUPPLY("ISRC2CLK", SND_SOC_NOPM
,
833 MADERA_DOM_GRP_ISRC2
, 0,
834 madera_domain_clk_ev
,
835 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
836 SND_SOC_DAPM_SUPPLY("ISRC3CLK", SND_SOC_NOPM
,
837 MADERA_DOM_GRP_ISRC3
, 0,
838 madera_domain_clk_ev
,
839 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
840 SND_SOC_DAPM_SUPPLY("ISRC4CLK", SND_SOC_NOPM
,
841 MADERA_DOM_GRP_ISRC4
, 0,
842 madera_domain_clk_ev
,
843 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
844 SND_SOC_DAPM_SUPPLY("OUTCLK", SND_SOC_NOPM
,
845 MADERA_DOM_GRP_OUT
, 0,
846 madera_domain_clk_ev
,
847 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
848 SND_SOC_DAPM_SUPPLY("SPDCLK", SND_SOC_NOPM
,
849 MADERA_DOM_GRP_SPD
, 0,
850 madera_domain_clk_ev
,
851 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
852 SND_SOC_DAPM_SUPPLY("DSP1CLK", SND_SOC_NOPM
,
853 MADERA_DOM_GRP_DSP1
, 0,
854 madera_domain_clk_ev
,
855 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
856 SND_SOC_DAPM_SUPPLY("DSP2CLK", SND_SOC_NOPM
,
857 MADERA_DOM_GRP_DSP2
, 0,
858 madera_domain_clk_ev
,
859 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
860 SND_SOC_DAPM_SUPPLY("DSP3CLK", SND_SOC_NOPM
,
861 MADERA_DOM_GRP_DSP3
, 0,
862 madera_domain_clk_ev
,
863 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
864 SND_SOC_DAPM_SUPPLY("DSP4CLK", SND_SOC_NOPM
,
865 MADERA_DOM_GRP_DSP4
, 0,
866 madera_domain_clk_ev
,
867 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
868 SND_SOC_DAPM_SUPPLY("DSP5CLK", SND_SOC_NOPM
,
869 MADERA_DOM_GRP_DSP5
, 0,
870 madera_domain_clk_ev
,
871 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
872 SND_SOC_DAPM_SUPPLY("DSP6CLK", SND_SOC_NOPM
,
873 MADERA_DOM_GRP_DSP6
, 0,
874 madera_domain_clk_ev
,
875 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
876 SND_SOC_DAPM_SUPPLY("DSP7CLK", SND_SOC_NOPM
,
877 MADERA_DOM_GRP_DSP7
, 0,
878 madera_domain_clk_ev
,
879 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
880 SND_SOC_DAPM_SUPPLY("AIF1TXCLK", SND_SOC_NOPM
,
881 MADERA_DOM_GRP_AIF1
, 0,
882 madera_domain_clk_ev
,
883 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
884 SND_SOC_DAPM_SUPPLY("AIF2TXCLK", SND_SOC_NOPM
,
885 MADERA_DOM_GRP_AIF2
, 0,
886 madera_domain_clk_ev
,
887 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
888 SND_SOC_DAPM_SUPPLY("AIF3TXCLK", SND_SOC_NOPM
,
889 MADERA_DOM_GRP_AIF3
, 0,
890 madera_domain_clk_ev
,
891 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
892 SND_SOC_DAPM_SUPPLY("AIF4TXCLK", SND_SOC_NOPM
,
893 MADERA_DOM_GRP_AIF4
, 0,
894 madera_domain_clk_ev
,
895 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
896 SND_SOC_DAPM_SUPPLY("SLIMBUSCLK", SND_SOC_NOPM
,
897 MADERA_DOM_GRP_SLIMBUS
, 0,
898 madera_domain_clk_ev
,
899 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
900 SND_SOC_DAPM_SUPPLY("PWMCLK", SND_SOC_NOPM
,
901 MADERA_DOM_GRP_PWM
, 0,
902 madera_domain_clk_ev
,
903 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMD
),
905 SND_SOC_DAPM_SUPPLY("RXANC NG External Clock", SND_SOC_NOPM
,
906 MADERA_EXT_NG_SEL_SET_SHIFT
, 0, madera_anc_ev
,
907 SND_SOC_DAPM_POST_PMU
| SND_SOC_DAPM_PRE_PMD
),
909 SND_SOC_DAPM_SUPPLY("RXANC NG Clock", SND_SOC_NOPM
,
910 MADERA_CLK_NG_ENA_SET_SHIFT
, 0, madera_anc_ev
,
911 SND_SOC_DAPM_POST_PMU
| SND_SOC_DAPM_PRE_PMD
),
913 SND_SOC_DAPM_SIGGEN("TONE"),
914 SND_SOC_DAPM_SIGGEN("NOISE"),
916 SND_SOC_DAPM_INPUT("IN1ALN"),
917 SND_SOC_DAPM_INPUT("IN1ALP"),
918 SND_SOC_DAPM_INPUT("IN1BN"),
919 SND_SOC_DAPM_INPUT("IN1BP"),
920 SND_SOC_DAPM_INPUT("IN1RN"),
921 SND_SOC_DAPM_INPUT("IN1RP"),
922 SND_SOC_DAPM_INPUT("IN2ALN"),
923 SND_SOC_DAPM_INPUT("IN2ALP"),
924 SND_SOC_DAPM_INPUT("IN2ARN"),
925 SND_SOC_DAPM_INPUT("IN2ARP"),
926 SND_SOC_DAPM_INPUT("IN2BLN"),
927 SND_SOC_DAPM_INPUT("IN2BLP"),
928 SND_SOC_DAPM_INPUT("IN2BRN"),
929 SND_SOC_DAPM_INPUT("IN2BRP"),
930 SND_SOC_DAPM_INPUT("IN3LN"),
931 SND_SOC_DAPM_INPUT("IN3LP"),
932 SND_SOC_DAPM_INPUT("IN3RN"),
933 SND_SOC_DAPM_INPUT("IN3RP"),
934 SND_SOC_DAPM_INPUT("DMICCLK4"),
935 SND_SOC_DAPM_INPUT("DMICDAT4"),
936 SND_SOC_DAPM_INPUT("DMICCLK5"),
937 SND_SOC_DAPM_INPUT("DMICDAT5"),
938 SND_SOC_DAPM_INPUT("DMICCLK6"),
939 SND_SOC_DAPM_INPUT("DMICDAT6"),
941 SND_SOC_DAPM_MUX("IN1L Analog Mux", SND_SOC_NOPM
, 0, 0, &madera_inmux
[0]),
942 SND_SOC_DAPM_MUX("IN2L Analog Mux", SND_SOC_NOPM
, 0, 0, &madera_inmux
[2]),
943 SND_SOC_DAPM_MUX("IN2R Analog Mux", SND_SOC_NOPM
, 0, 0, &madera_inmux
[3]),
945 SND_SOC_DAPM_MUX("IN1L Mode", SND_SOC_NOPM
, 0, 0, &madera_inmode
[0]),
946 SND_SOC_DAPM_MUX("IN1R Mode", SND_SOC_NOPM
, 0, 0, &madera_inmode
[0]),
948 SND_SOC_DAPM_MUX("IN2L Mode", SND_SOC_NOPM
, 0, 0, &madera_inmode
[1]),
949 SND_SOC_DAPM_MUX("IN2R Mode", SND_SOC_NOPM
, 0, 0, &madera_inmode
[1]),
951 SND_SOC_DAPM_MUX("IN3L Mode", SND_SOC_NOPM
, 0, 0, &madera_inmode
[2]),
952 SND_SOC_DAPM_MUX("IN3R Mode", SND_SOC_NOPM
, 0, 0, &madera_inmode
[2]),
954 SND_SOC_DAPM_OUTPUT("DRC1 Signal Activity"),
955 SND_SOC_DAPM_OUTPUT("DRC2 Signal Activity"),
957 SND_SOC_DAPM_OUTPUT("DSP Trigger Out"),
959 SND_SOC_DAPM_PGA("PWM1 Driver", MADERA_PWM_DRIVE_1
, MADERA_PWM1_ENA_SHIFT
,
961 SND_SOC_DAPM_PGA("PWM2 Driver", MADERA_PWM_DRIVE_1
, MADERA_PWM2_ENA_SHIFT
,
964 SND_SOC_DAPM_PGA("RXANCL NG External", SND_SOC_NOPM
, 0, 0, NULL
, 0),
965 SND_SOC_DAPM_PGA("RXANCR NG External", SND_SOC_NOPM
, 0, 0, NULL
, 0),
967 SND_SOC_DAPM_PGA("RXANCL NG Internal", SND_SOC_NOPM
, 0, 0, NULL
, 0),
968 SND_SOC_DAPM_PGA("RXANCR NG Internal", SND_SOC_NOPM
, 0, 0, NULL
, 0),
970 SND_SOC_DAPM_MUX("RXANCL Left Input", SND_SOC_NOPM
, 0, 0,
971 &cs47l85_anc_input_mux
[0]),
972 SND_SOC_DAPM_MUX("RXANCL Right Input", SND_SOC_NOPM
, 0, 0,
973 &cs47l85_anc_input_mux
[0]),
974 SND_SOC_DAPM_MUX("RXANCL Channel", SND_SOC_NOPM
, 0, 0,
975 &cs47l85_anc_input_mux
[1]),
976 SND_SOC_DAPM_MUX("RXANCL NG Mux", SND_SOC_NOPM
, 0, 0, &cs47l85_anc_ng_mux
),
977 SND_SOC_DAPM_MUX("RXANCR Left Input", SND_SOC_NOPM
, 0, 0,
978 &cs47l85_anc_input_mux
[2]),
979 SND_SOC_DAPM_MUX("RXANCR Right Input", SND_SOC_NOPM
, 0, 0,
980 &cs47l85_anc_input_mux
[2]),
981 SND_SOC_DAPM_MUX("RXANCR Channel", SND_SOC_NOPM
, 0, 0,
982 &cs47l85_anc_input_mux
[3]),
983 SND_SOC_DAPM_MUX("RXANCR NG Mux", SND_SOC_NOPM
, 0, 0, &cs47l85_anc_ng_mux
),
985 SND_SOC_DAPM_PGA_E("RXANCL", SND_SOC_NOPM
, MADERA_CLK_L_ENA_SET_SHIFT
,
986 0, NULL
, 0, madera_anc_ev
,
987 SND_SOC_DAPM_POST_PMU
| SND_SOC_DAPM_PRE_PMD
),
988 SND_SOC_DAPM_PGA_E("RXANCR", SND_SOC_NOPM
, MADERA_CLK_R_ENA_SET_SHIFT
,
989 0, NULL
, 0, madera_anc_ev
,
990 SND_SOC_DAPM_POST_PMU
| SND_SOC_DAPM_PRE_PMD
),
992 SND_SOC_DAPM_MUX("HPOUT1L ANC Source", SND_SOC_NOPM
, 0, 0,
993 &cs47l85_output_anc_src
[0]),
994 SND_SOC_DAPM_MUX("HPOUT1R ANC Source", SND_SOC_NOPM
, 0, 0,
995 &cs47l85_output_anc_src
[1]),
996 SND_SOC_DAPM_MUX("HPOUT2L ANC Source", SND_SOC_NOPM
, 0, 0,
997 &cs47l85_output_anc_src
[2]),
998 SND_SOC_DAPM_MUX("HPOUT2R ANC Source", SND_SOC_NOPM
, 0, 0,
999 &cs47l85_output_anc_src
[3]),
1000 SND_SOC_DAPM_MUX("HPOUT3L ANC Source", SND_SOC_NOPM
, 0, 0,
1001 &cs47l85_output_anc_src
[4]),
1002 SND_SOC_DAPM_MUX("HPOUT3R ANC Source", SND_SOC_NOPM
, 0, 0,
1003 &cs47l85_output_anc_src
[5]),
1004 SND_SOC_DAPM_MUX("SPKOUTL ANC Source", SND_SOC_NOPM
, 0, 0,
1005 &cs47l85_output_anc_src
[6]),
1006 SND_SOC_DAPM_MUX("SPKOUTR ANC Source", SND_SOC_NOPM
, 0, 0,
1007 &cs47l85_output_anc_src
[7]),
1008 SND_SOC_DAPM_MUX("SPKDAT1L ANC Source", SND_SOC_NOPM
, 0, 0,
1009 &cs47l85_output_anc_src
[8]),
1010 SND_SOC_DAPM_MUX("SPKDAT1R ANC Source", SND_SOC_NOPM
, 0, 0,
1011 &cs47l85_output_anc_src
[9]),
1012 SND_SOC_DAPM_MUX("SPKDAT2L ANC Source", SND_SOC_NOPM
, 0, 0,
1013 &cs47l85_output_anc_src
[10]),
1014 SND_SOC_DAPM_MUX("SPKDAT2R ANC Source", SND_SOC_NOPM
, 0, 0,
1015 &cs47l85_output_anc_src
[11]),
1017 SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL
, 0,
1018 MADERA_AIF1_TX_ENABLES
, MADERA_AIF1TX1_ENA_SHIFT
, 0),
1019 SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL
, 1,
1020 MADERA_AIF1_TX_ENABLES
, MADERA_AIF1TX2_ENA_SHIFT
, 0),
1021 SND_SOC_DAPM_AIF_OUT("AIF1TX3", NULL
, 2,
1022 MADERA_AIF1_TX_ENABLES
, MADERA_AIF1TX3_ENA_SHIFT
, 0),
1023 SND_SOC_DAPM_AIF_OUT("AIF1TX4", NULL
, 3,
1024 MADERA_AIF1_TX_ENABLES
, MADERA_AIF1TX4_ENA_SHIFT
, 0),
1025 SND_SOC_DAPM_AIF_OUT("AIF1TX5", NULL
, 4,
1026 MADERA_AIF1_TX_ENABLES
, MADERA_AIF1TX5_ENA_SHIFT
, 0),
1027 SND_SOC_DAPM_AIF_OUT("AIF1TX6", NULL
, 5,
1028 MADERA_AIF1_TX_ENABLES
, MADERA_AIF1TX6_ENA_SHIFT
, 0),
1029 SND_SOC_DAPM_AIF_OUT("AIF1TX7", NULL
, 6,
1030 MADERA_AIF1_TX_ENABLES
, MADERA_AIF1TX7_ENA_SHIFT
, 0),
1031 SND_SOC_DAPM_AIF_OUT("AIF1TX8", NULL
, 7,
1032 MADERA_AIF1_TX_ENABLES
, MADERA_AIF1TX8_ENA_SHIFT
, 0),
1034 SND_SOC_DAPM_AIF_OUT("AIF2TX1", NULL
, 0,
1035 MADERA_AIF2_TX_ENABLES
, MADERA_AIF2TX1_ENA_SHIFT
, 0),
1036 SND_SOC_DAPM_AIF_OUT("AIF2TX2", NULL
, 1,
1037 MADERA_AIF2_TX_ENABLES
, MADERA_AIF2TX2_ENA_SHIFT
, 0),
1038 SND_SOC_DAPM_AIF_OUT("AIF2TX3", NULL
, 2,
1039 MADERA_AIF2_TX_ENABLES
, MADERA_AIF2TX3_ENA_SHIFT
, 0),
1040 SND_SOC_DAPM_AIF_OUT("AIF2TX4", NULL
, 3,
1041 MADERA_AIF2_TX_ENABLES
, MADERA_AIF2TX4_ENA_SHIFT
, 0),
1042 SND_SOC_DAPM_AIF_OUT("AIF2TX5", NULL
, 4,
1043 MADERA_AIF2_TX_ENABLES
, MADERA_AIF2TX5_ENA_SHIFT
, 0),
1044 SND_SOC_DAPM_AIF_OUT("AIF2TX6", NULL
, 5,
1045 MADERA_AIF2_TX_ENABLES
, MADERA_AIF2TX6_ENA_SHIFT
, 0),
1046 SND_SOC_DAPM_AIF_OUT("AIF2TX7", NULL
, 6,
1047 MADERA_AIF2_TX_ENABLES
, MADERA_AIF2TX7_ENA_SHIFT
, 0),
1048 SND_SOC_DAPM_AIF_OUT("AIF2TX8", NULL
, 7,
1049 MADERA_AIF2_TX_ENABLES
, MADERA_AIF2TX8_ENA_SHIFT
, 0),
1051 SND_SOC_DAPM_AIF_OUT("SLIMTX1", NULL
, 0,
1052 MADERA_SLIMBUS_TX_CHANNEL_ENABLE
,
1053 MADERA_SLIMTX1_ENA_SHIFT
, 0),
1054 SND_SOC_DAPM_AIF_OUT("SLIMTX2", NULL
, 1,
1055 MADERA_SLIMBUS_TX_CHANNEL_ENABLE
,
1056 MADERA_SLIMTX2_ENA_SHIFT
, 0),
1057 SND_SOC_DAPM_AIF_OUT("SLIMTX3", NULL
, 2,
1058 MADERA_SLIMBUS_TX_CHANNEL_ENABLE
,
1059 MADERA_SLIMTX3_ENA_SHIFT
, 0),
1060 SND_SOC_DAPM_AIF_OUT("SLIMTX4", NULL
, 3,
1061 MADERA_SLIMBUS_TX_CHANNEL_ENABLE
,
1062 MADERA_SLIMTX4_ENA_SHIFT
, 0),
1063 SND_SOC_DAPM_AIF_OUT("SLIMTX5", NULL
, 4,
1064 MADERA_SLIMBUS_TX_CHANNEL_ENABLE
,
1065 MADERA_SLIMTX5_ENA_SHIFT
, 0),
1066 SND_SOC_DAPM_AIF_OUT("SLIMTX6", NULL
, 5,
1067 MADERA_SLIMBUS_TX_CHANNEL_ENABLE
,
1068 MADERA_SLIMTX6_ENA_SHIFT
, 0),
1069 SND_SOC_DAPM_AIF_OUT("SLIMTX7", NULL
, 6,
1070 MADERA_SLIMBUS_TX_CHANNEL_ENABLE
,
1071 MADERA_SLIMTX7_ENA_SHIFT
, 0),
1072 SND_SOC_DAPM_AIF_OUT("SLIMTX8", NULL
, 7,
1073 MADERA_SLIMBUS_TX_CHANNEL_ENABLE
,
1074 MADERA_SLIMTX8_ENA_SHIFT
, 0),
1076 SND_SOC_DAPM_AIF_OUT("AIF3TX1", NULL
, 0,
1077 MADERA_AIF3_TX_ENABLES
, MADERA_AIF3TX1_ENA_SHIFT
, 0),
1078 SND_SOC_DAPM_AIF_OUT("AIF3TX2", NULL
, 1,
1079 MADERA_AIF3_TX_ENABLES
, MADERA_AIF3TX2_ENA_SHIFT
, 0),
1081 SND_SOC_DAPM_AIF_OUT("AIF4TX1", NULL
, 0,
1082 MADERA_AIF4_TX_ENABLES
, MADERA_AIF4TX1_ENA_SHIFT
, 0),
1083 SND_SOC_DAPM_AIF_OUT("AIF4TX2", NULL
, 1,
1084 MADERA_AIF4_TX_ENABLES
, MADERA_AIF4TX2_ENA_SHIFT
, 0),
1086 SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM
,
1087 MADERA_OUT1L_ENA_SHIFT
, 0, NULL
, 0, cs47l85_hp_ev
,
1088 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1089 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1090 SND_SOC_DAPM_PGA_E("OUT1R", SND_SOC_NOPM
,
1091 MADERA_OUT1R_ENA_SHIFT
, 0, NULL
, 0, cs47l85_hp_ev
,
1092 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1093 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1094 SND_SOC_DAPM_PGA_E("OUT2L", MADERA_OUTPUT_ENABLES_1
,
1095 MADERA_OUT2L_ENA_SHIFT
, 0, NULL
, 0, madera_out_ev
,
1096 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1097 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1098 SND_SOC_DAPM_PGA_E("OUT2R", MADERA_OUTPUT_ENABLES_1
,
1099 MADERA_OUT2R_ENA_SHIFT
, 0, NULL
, 0, madera_out_ev
,
1100 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1101 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1102 SND_SOC_DAPM_PGA_E("OUT3L", MADERA_OUTPUT_ENABLES_1
,
1103 MADERA_OUT3L_ENA_SHIFT
, 0, NULL
, 0, madera_out_ev
,
1104 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1105 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1106 SND_SOC_DAPM_PGA_E("OUT3R", MADERA_OUTPUT_ENABLES_1
,
1107 MADERA_OUT3R_ENA_SHIFT
, 0, NULL
, 0, madera_out_ev
,
1108 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1109 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1110 SND_SOC_DAPM_PGA_E("OUT4L", SND_SOC_NOPM
,
1111 MADERA_OUT4L_ENA_SHIFT
, 0, NULL
, 0, madera_spk_ev
,
1112 SND_SOC_DAPM_POST_PMU
| SND_SOC_DAPM_PRE_PMD
),
1113 SND_SOC_DAPM_PGA_E("OUT4R", SND_SOC_NOPM
,
1114 MADERA_OUT4R_ENA_SHIFT
, 0, NULL
, 0, madera_spk_ev
,
1115 SND_SOC_DAPM_POST_PMU
| SND_SOC_DAPM_PRE_PMD
),
1116 SND_SOC_DAPM_PGA_E("OUT5L", MADERA_OUTPUT_ENABLES_1
,
1117 MADERA_OUT5L_ENA_SHIFT
, 0, NULL
, 0, madera_out_ev
,
1118 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMU
),
1119 SND_SOC_DAPM_PGA_E("OUT5R", MADERA_OUTPUT_ENABLES_1
,
1120 MADERA_OUT5R_ENA_SHIFT
, 0, NULL
, 0, madera_out_ev
,
1121 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMU
),
1122 SND_SOC_DAPM_PGA_E("OUT6L", MADERA_OUTPUT_ENABLES_1
,
1123 MADERA_OUT6L_ENA_SHIFT
, 0, NULL
, 0, madera_out_ev
,
1124 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMU
),
1125 SND_SOC_DAPM_PGA_E("OUT6R", MADERA_OUTPUT_ENABLES_1
,
1126 MADERA_OUT6R_ENA_SHIFT
, 0, NULL
, 0, madera_out_ev
,
1127 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMU
),
1129 SND_SOC_DAPM_PGA("SPD1TX1", MADERA_SPD1_TX_CONTROL
,
1130 MADERA_SPD1_VAL1_SHIFT
, 0, NULL
, 0),
1131 SND_SOC_DAPM_PGA("SPD1TX2", MADERA_SPD1_TX_CONTROL
,
1132 MADERA_SPD1_VAL2_SHIFT
, 0, NULL
, 0),
1133 SND_SOC_DAPM_OUT_DRV("SPD1", MADERA_SPD1_TX_CONTROL
,
1134 MADERA_SPD1_ENA_SHIFT
, 0, NULL
, 0),
1137 * Input mux widgets arranged in order of sources in MADERA_MIXER_INPUT_ROUTES
1138 * to take advantage of cache lookup in DAPM
1140 SND_SOC_DAPM_PGA("Noise Generator", MADERA_COMFORT_NOISE_GENERATOR
,
1141 MADERA_NOISE_GEN_ENA_SHIFT
, 0, NULL
, 0),
1143 SND_SOC_DAPM_PGA("Tone Generator 1", MADERA_TONE_GENERATOR_1
,
1144 MADERA_TONE1_ENA_SHIFT
, 0, NULL
, 0),
1145 SND_SOC_DAPM_PGA("Tone Generator 2", MADERA_TONE_GENERATOR_1
,
1146 MADERA_TONE2_ENA_SHIFT
, 0, NULL
, 0),
1148 SND_SOC_DAPM_SIGGEN("HAPTICS"),
1150 SND_SOC_DAPM_MUX("AEC1 Loopback", MADERA_DAC_AEC_CONTROL_1
,
1151 MADERA_AEC1_LOOPBACK_ENA_SHIFT
, 0,
1152 &cs47l85_aec_loopback_mux
[0]),
1153 SND_SOC_DAPM_MUX("AEC2 Loopback", MADERA_DAC_AEC_CONTROL_2
,
1154 MADERA_AEC2_LOOPBACK_ENA_SHIFT
, 0,
1155 &cs47l85_aec_loopback_mux
[1]),
1157 SND_SOC_DAPM_PGA_E("IN1L", MADERA_INPUT_ENABLES
, MADERA_IN1L_ENA_SHIFT
,
1158 0, NULL
, 0, madera_in_ev
,
1159 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1160 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1161 SND_SOC_DAPM_PGA_E("IN1R", MADERA_INPUT_ENABLES
, MADERA_IN1R_ENA_SHIFT
,
1162 0, NULL
, 0, madera_in_ev
,
1163 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1164 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1165 SND_SOC_DAPM_PGA_E("IN2L", MADERA_INPUT_ENABLES
, MADERA_IN2L_ENA_SHIFT
,
1166 0, NULL
, 0, madera_in_ev
,
1167 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1168 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1169 SND_SOC_DAPM_PGA_E("IN2R", MADERA_INPUT_ENABLES
, MADERA_IN2R_ENA_SHIFT
,
1170 0, NULL
, 0, madera_in_ev
,
1171 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1172 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1173 SND_SOC_DAPM_PGA_E("IN3L", MADERA_INPUT_ENABLES
, MADERA_IN3L_ENA_SHIFT
,
1174 0, NULL
, 0, madera_in_ev
,
1175 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1176 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1177 SND_SOC_DAPM_PGA_E("IN3R", MADERA_INPUT_ENABLES
, MADERA_IN3R_ENA_SHIFT
,
1178 0, NULL
, 0, madera_in_ev
,
1179 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1180 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1181 SND_SOC_DAPM_PGA_E("IN4L", MADERA_INPUT_ENABLES
, MADERA_IN4L_ENA_SHIFT
,
1182 0, NULL
, 0, madera_in_ev
,
1183 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1184 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1185 SND_SOC_DAPM_PGA_E("IN4R", MADERA_INPUT_ENABLES
, MADERA_IN4R_ENA_SHIFT
,
1186 0, NULL
, 0, madera_in_ev
,
1187 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1188 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1189 SND_SOC_DAPM_PGA_E("IN5L", MADERA_INPUT_ENABLES
, MADERA_IN5L_ENA_SHIFT
,
1190 0, NULL
, 0, madera_in_ev
,
1191 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1192 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1193 SND_SOC_DAPM_PGA_E("IN5R", MADERA_INPUT_ENABLES
, MADERA_IN5R_ENA_SHIFT
,
1194 0, NULL
, 0, madera_in_ev
,
1195 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1196 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1197 SND_SOC_DAPM_PGA_E("IN6L", MADERA_INPUT_ENABLES
, MADERA_IN6L_ENA_SHIFT
,
1198 0, NULL
, 0, madera_in_ev
,
1199 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1200 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1201 SND_SOC_DAPM_PGA_E("IN6R", MADERA_INPUT_ENABLES
, MADERA_IN6R_ENA_SHIFT
,
1202 0, NULL
, 0, madera_in_ev
,
1203 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1204 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1206 SND_SOC_DAPM_AIF_IN("AIF1RX1", NULL
, 0,
1207 MADERA_AIF1_RX_ENABLES
, MADERA_AIF1RX1_ENA_SHIFT
, 0),
1208 SND_SOC_DAPM_AIF_IN("AIF1RX2", NULL
, 1,
1209 MADERA_AIF1_RX_ENABLES
, MADERA_AIF1RX2_ENA_SHIFT
, 0),
1210 SND_SOC_DAPM_AIF_IN("AIF1RX3", NULL
, 2,
1211 MADERA_AIF1_RX_ENABLES
, MADERA_AIF1RX3_ENA_SHIFT
, 0),
1212 SND_SOC_DAPM_AIF_IN("AIF1RX4", NULL
, 3,
1213 MADERA_AIF1_RX_ENABLES
, MADERA_AIF1RX4_ENA_SHIFT
, 0),
1214 SND_SOC_DAPM_AIF_IN("AIF1RX5", NULL
, 4,
1215 MADERA_AIF1_RX_ENABLES
, MADERA_AIF1RX5_ENA_SHIFT
, 0),
1216 SND_SOC_DAPM_AIF_IN("AIF1RX6", NULL
, 5,
1217 MADERA_AIF1_RX_ENABLES
, MADERA_AIF1RX6_ENA_SHIFT
, 0),
1218 SND_SOC_DAPM_AIF_IN("AIF1RX7", NULL
, 6,
1219 MADERA_AIF1_RX_ENABLES
, MADERA_AIF1RX7_ENA_SHIFT
, 0),
1220 SND_SOC_DAPM_AIF_IN("AIF1RX8", NULL
, 7,
1221 MADERA_AIF1_RX_ENABLES
, MADERA_AIF1RX8_ENA_SHIFT
, 0),
1223 SND_SOC_DAPM_AIF_IN("AIF2RX1", NULL
, 0,
1224 MADERA_AIF2_RX_ENABLES
, MADERA_AIF2RX1_ENA_SHIFT
, 0),
1225 SND_SOC_DAPM_AIF_IN("AIF2RX2", NULL
, 1,
1226 MADERA_AIF2_RX_ENABLES
, MADERA_AIF2RX2_ENA_SHIFT
, 0),
1227 SND_SOC_DAPM_AIF_IN("AIF2RX3", NULL
, 2,
1228 MADERA_AIF2_RX_ENABLES
, MADERA_AIF2RX3_ENA_SHIFT
, 0),
1229 SND_SOC_DAPM_AIF_IN("AIF2RX4", NULL
, 3,
1230 MADERA_AIF2_RX_ENABLES
, MADERA_AIF2RX4_ENA_SHIFT
, 0),
1231 SND_SOC_DAPM_AIF_IN("AIF2RX5", NULL
, 4,
1232 MADERA_AIF2_RX_ENABLES
, MADERA_AIF2RX5_ENA_SHIFT
, 0),
1233 SND_SOC_DAPM_AIF_IN("AIF2RX6", NULL
, 5,
1234 MADERA_AIF2_RX_ENABLES
, MADERA_AIF2RX6_ENA_SHIFT
, 0),
1235 SND_SOC_DAPM_AIF_IN("AIF2RX7", NULL
, 6,
1236 MADERA_AIF2_RX_ENABLES
, MADERA_AIF2RX7_ENA_SHIFT
, 0),
1237 SND_SOC_DAPM_AIF_IN("AIF2RX8", NULL
, 7,
1238 MADERA_AIF2_RX_ENABLES
, MADERA_AIF2RX8_ENA_SHIFT
, 0),
1240 SND_SOC_DAPM_AIF_IN("AIF3RX1", NULL
, 0,
1241 MADERA_AIF3_RX_ENABLES
, MADERA_AIF3RX1_ENA_SHIFT
, 0),
1242 SND_SOC_DAPM_AIF_IN("AIF3RX2", NULL
, 1,
1243 MADERA_AIF3_RX_ENABLES
, MADERA_AIF3RX2_ENA_SHIFT
, 0),
1245 SND_SOC_DAPM_AIF_IN("AIF4RX1", NULL
, 0,
1246 MADERA_AIF4_RX_ENABLES
, MADERA_AIF4RX1_ENA_SHIFT
, 0),
1247 SND_SOC_DAPM_AIF_IN("AIF4RX2", NULL
, 1,
1248 MADERA_AIF4_RX_ENABLES
, MADERA_AIF4RX2_ENA_SHIFT
, 0),
1250 SND_SOC_DAPM_AIF_IN("SLIMRX1", NULL
, 0,
1251 MADERA_SLIMBUS_RX_CHANNEL_ENABLE
,
1252 MADERA_SLIMRX1_ENA_SHIFT
, 0),
1253 SND_SOC_DAPM_AIF_IN("SLIMRX2", NULL
, 1,
1254 MADERA_SLIMBUS_RX_CHANNEL_ENABLE
,
1255 MADERA_SLIMRX2_ENA_SHIFT
, 0),
1256 SND_SOC_DAPM_AIF_IN("SLIMRX3", NULL
, 2,
1257 MADERA_SLIMBUS_RX_CHANNEL_ENABLE
,
1258 MADERA_SLIMRX3_ENA_SHIFT
, 0),
1259 SND_SOC_DAPM_AIF_IN("SLIMRX4", NULL
, 3,
1260 MADERA_SLIMBUS_RX_CHANNEL_ENABLE
,
1261 MADERA_SLIMRX4_ENA_SHIFT
, 0),
1262 SND_SOC_DAPM_AIF_IN("SLIMRX5", NULL
, 4,
1263 MADERA_SLIMBUS_RX_CHANNEL_ENABLE
,
1264 MADERA_SLIMRX5_ENA_SHIFT
, 0),
1265 SND_SOC_DAPM_AIF_IN("SLIMRX6", NULL
, 5,
1266 MADERA_SLIMBUS_RX_CHANNEL_ENABLE
,
1267 MADERA_SLIMRX6_ENA_SHIFT
, 0),
1268 SND_SOC_DAPM_AIF_IN("SLIMRX7", NULL
, 6,
1269 MADERA_SLIMBUS_RX_CHANNEL_ENABLE
,
1270 MADERA_SLIMRX7_ENA_SHIFT
, 0),
1271 SND_SOC_DAPM_AIF_IN("SLIMRX8", NULL
, 7,
1272 MADERA_SLIMBUS_RX_CHANNEL_ENABLE
,
1273 MADERA_SLIMRX8_ENA_SHIFT
, 0),
1275 SND_SOC_DAPM_PGA("EQ1", MADERA_EQ1_1
, MADERA_EQ1_ENA_SHIFT
, 0, NULL
, 0),
1276 SND_SOC_DAPM_PGA("EQ2", MADERA_EQ2_1
, MADERA_EQ2_ENA_SHIFT
, 0, NULL
, 0),
1277 SND_SOC_DAPM_PGA("EQ3", MADERA_EQ3_1
, MADERA_EQ3_ENA_SHIFT
, 0, NULL
, 0),
1278 SND_SOC_DAPM_PGA("EQ4", MADERA_EQ4_1
, MADERA_EQ4_ENA_SHIFT
, 0, NULL
, 0),
1280 SND_SOC_DAPM_PGA("DRC1L", MADERA_DRC1_CTRL1
, MADERA_DRC1L_ENA_SHIFT
, 0,
1282 SND_SOC_DAPM_PGA("DRC1R", MADERA_DRC1_CTRL1
, MADERA_DRC1R_ENA_SHIFT
, 0,
1284 SND_SOC_DAPM_PGA("DRC2L", MADERA_DRC2_CTRL1
, MADERA_DRC2L_ENA_SHIFT
, 0,
1286 SND_SOC_DAPM_PGA("DRC2R", MADERA_DRC2_CTRL1
, MADERA_DRC2R_ENA_SHIFT
, 0,
1289 SND_SOC_DAPM_PGA("LHPF1", MADERA_HPLPF1_1
, MADERA_LHPF1_ENA_SHIFT
, 0,
1291 SND_SOC_DAPM_PGA("LHPF2", MADERA_HPLPF2_1
, MADERA_LHPF2_ENA_SHIFT
, 0,
1293 SND_SOC_DAPM_PGA("LHPF3", MADERA_HPLPF3_1
, MADERA_LHPF3_ENA_SHIFT
, 0,
1295 SND_SOC_DAPM_PGA("LHPF4", MADERA_HPLPF4_1
, MADERA_LHPF4_ENA_SHIFT
, 0,
1298 SND_SOC_DAPM_PGA("ASRC1IN1L", MADERA_ASRC1_ENABLE
, MADERA_ASRC1_IN1L_ENA_SHIFT
,
1300 SND_SOC_DAPM_PGA("ASRC1IN1R", MADERA_ASRC1_ENABLE
, MADERA_ASRC1_IN1R_ENA_SHIFT
,
1302 SND_SOC_DAPM_PGA("ASRC1IN2L", MADERA_ASRC1_ENABLE
, MADERA_ASRC1_IN2L_ENA_SHIFT
,
1304 SND_SOC_DAPM_PGA("ASRC1IN2R", MADERA_ASRC1_ENABLE
, MADERA_ASRC1_IN2R_ENA_SHIFT
,
1307 SND_SOC_DAPM_PGA("ASRC2IN1L", MADERA_ASRC2_ENABLE
, MADERA_ASRC2_IN1L_ENA_SHIFT
,
1309 SND_SOC_DAPM_PGA("ASRC2IN1R", MADERA_ASRC2_ENABLE
, MADERA_ASRC2_IN1R_ENA_SHIFT
,
1311 SND_SOC_DAPM_PGA("ASRC2IN2L", MADERA_ASRC2_ENABLE
, MADERA_ASRC2_IN2L_ENA_SHIFT
,
1313 SND_SOC_DAPM_PGA("ASRC2IN2R", MADERA_ASRC2_ENABLE
, MADERA_ASRC2_IN2R_ENA_SHIFT
,
1316 SND_SOC_DAPM_PGA("ISRC1DEC1", MADERA_ISRC_1_CTRL_3
,
1317 MADERA_ISRC1_DEC1_ENA_SHIFT
, 0, NULL
, 0),
1318 SND_SOC_DAPM_PGA("ISRC1DEC2", MADERA_ISRC_1_CTRL_3
,
1319 MADERA_ISRC1_DEC2_ENA_SHIFT
, 0, NULL
, 0),
1320 SND_SOC_DAPM_PGA("ISRC1DEC3", MADERA_ISRC_1_CTRL_3
,
1321 MADERA_ISRC1_DEC3_ENA_SHIFT
, 0, NULL
, 0),
1322 SND_SOC_DAPM_PGA("ISRC1DEC4", MADERA_ISRC_1_CTRL_3
,
1323 MADERA_ISRC1_DEC4_ENA_SHIFT
, 0, NULL
, 0),
1325 SND_SOC_DAPM_PGA("ISRC1INT1", MADERA_ISRC_1_CTRL_3
,
1326 MADERA_ISRC1_INT1_ENA_SHIFT
, 0, NULL
, 0),
1327 SND_SOC_DAPM_PGA("ISRC1INT2", MADERA_ISRC_1_CTRL_3
,
1328 MADERA_ISRC1_INT2_ENA_SHIFT
, 0, NULL
, 0),
1329 SND_SOC_DAPM_PGA("ISRC1INT3", MADERA_ISRC_1_CTRL_3
,
1330 MADERA_ISRC1_INT3_ENA_SHIFT
, 0, NULL
, 0),
1331 SND_SOC_DAPM_PGA("ISRC1INT4", MADERA_ISRC_1_CTRL_3
,
1332 MADERA_ISRC1_INT4_ENA_SHIFT
, 0, NULL
, 0),
1334 SND_SOC_DAPM_PGA("ISRC2DEC1", MADERA_ISRC_2_CTRL_3
,
1335 MADERA_ISRC2_DEC1_ENA_SHIFT
, 0, NULL
, 0),
1336 SND_SOC_DAPM_PGA("ISRC2DEC2", MADERA_ISRC_2_CTRL_3
,
1337 MADERA_ISRC2_DEC2_ENA_SHIFT
, 0, NULL
, 0),
1338 SND_SOC_DAPM_PGA("ISRC2DEC3", MADERA_ISRC_2_CTRL_3
,
1339 MADERA_ISRC2_DEC3_ENA_SHIFT
, 0, NULL
, 0),
1340 SND_SOC_DAPM_PGA("ISRC2DEC4", MADERA_ISRC_2_CTRL_3
,
1341 MADERA_ISRC2_DEC4_ENA_SHIFT
, 0, NULL
, 0),
1343 SND_SOC_DAPM_PGA("ISRC2INT1", MADERA_ISRC_2_CTRL_3
,
1344 MADERA_ISRC2_INT1_ENA_SHIFT
, 0, NULL
, 0),
1345 SND_SOC_DAPM_PGA("ISRC2INT2", MADERA_ISRC_2_CTRL_3
,
1346 MADERA_ISRC2_INT2_ENA_SHIFT
, 0, NULL
, 0),
1347 SND_SOC_DAPM_PGA("ISRC2INT3", MADERA_ISRC_2_CTRL_3
,
1348 MADERA_ISRC2_INT3_ENA_SHIFT
, 0, NULL
, 0),
1349 SND_SOC_DAPM_PGA("ISRC2INT4", MADERA_ISRC_2_CTRL_3
,
1350 MADERA_ISRC2_INT4_ENA_SHIFT
, 0, NULL
, 0),
1352 SND_SOC_DAPM_PGA("ISRC3DEC1", MADERA_ISRC_3_CTRL_3
,
1353 MADERA_ISRC3_DEC1_ENA_SHIFT
, 0, NULL
, 0),
1354 SND_SOC_DAPM_PGA("ISRC3DEC2", MADERA_ISRC_3_CTRL_3
,
1355 MADERA_ISRC3_DEC2_ENA_SHIFT
, 0, NULL
, 0),
1357 SND_SOC_DAPM_PGA("ISRC3INT1", MADERA_ISRC_3_CTRL_3
,
1358 MADERA_ISRC3_INT1_ENA_SHIFT
, 0, NULL
, 0),
1359 SND_SOC_DAPM_PGA("ISRC3INT2", MADERA_ISRC_3_CTRL_3
,
1360 MADERA_ISRC3_INT2_ENA_SHIFT
, 0, NULL
, 0),
1362 SND_SOC_DAPM_PGA("ISRC4DEC1", MADERA_ISRC_4_CTRL_3
,
1363 MADERA_ISRC4_DEC1_ENA_SHIFT
, 0, NULL
, 0),
1364 SND_SOC_DAPM_PGA("ISRC4DEC2", MADERA_ISRC_4_CTRL_3
,
1365 MADERA_ISRC4_DEC2_ENA_SHIFT
, 0, NULL
, 0),
1367 SND_SOC_DAPM_PGA("ISRC4INT1", MADERA_ISRC_4_CTRL_3
,
1368 MADERA_ISRC4_INT1_ENA_SHIFT
, 0, NULL
, 0),
1369 SND_SOC_DAPM_PGA("ISRC4INT2", MADERA_ISRC_4_CTRL_3
,
1370 MADERA_ISRC4_INT2_ENA_SHIFT
, 0, NULL
, 0),
1372 WM_ADSP2("DSP1", 0, cs47l85_adsp_power_ev
),
1373 WM_ADSP2("DSP2", 1, cs47l85_adsp_power_ev
),
1374 WM_ADSP2("DSP3", 2, cs47l85_adsp_power_ev
),
1375 WM_ADSP2("DSP4", 3, cs47l85_adsp_power_ev
),
1376 WM_ADSP2("DSP5", 4, cs47l85_adsp_power_ev
),
1377 WM_ADSP2("DSP6", 5, cs47l85_adsp_power_ev
),
1378 WM_ADSP2("DSP7", 6, cs47l85_adsp_power_ev
),
1380 /* End of ordered input mux widgets */
1382 MADERA_MIXER_WIDGETS(EQ1
, "EQ1"),
1383 MADERA_MIXER_WIDGETS(EQ2
, "EQ2"),
1384 MADERA_MIXER_WIDGETS(EQ3
, "EQ3"),
1385 MADERA_MIXER_WIDGETS(EQ4
, "EQ4"),
1387 MADERA_MIXER_WIDGETS(DRC1L
, "DRC1L"),
1388 MADERA_MIXER_WIDGETS(DRC1R
, "DRC1R"),
1389 MADERA_MIXER_WIDGETS(DRC2L
, "DRC2L"),
1390 MADERA_MIXER_WIDGETS(DRC2R
, "DRC2R"),
1392 SND_SOC_DAPM_SWITCH("DRC1 Activity Output", SND_SOC_NOPM
, 0, 0,
1393 &madera_drc_activity_output_mux
[0]),
1394 SND_SOC_DAPM_SWITCH("DRC2 Activity Output", SND_SOC_NOPM
, 0, 0,
1395 &madera_drc_activity_output_mux
[1]),
1397 MADERA_MIXER_WIDGETS(LHPF1
, "LHPF1"),
1398 MADERA_MIXER_WIDGETS(LHPF2
, "LHPF2"),
1399 MADERA_MIXER_WIDGETS(LHPF3
, "LHPF3"),
1400 MADERA_MIXER_WIDGETS(LHPF4
, "LHPF4"),
1402 MADERA_MIXER_WIDGETS(PWM1
, "PWM1"),
1403 MADERA_MIXER_WIDGETS(PWM2
, "PWM2"),
1405 MADERA_MIXER_WIDGETS(OUT1L
, "HPOUT1L"),
1406 MADERA_MIXER_WIDGETS(OUT1R
, "HPOUT1R"),
1407 MADERA_MIXER_WIDGETS(OUT2L
, "HPOUT2L"),
1408 MADERA_MIXER_WIDGETS(OUT2R
, "HPOUT2R"),
1409 MADERA_MIXER_WIDGETS(OUT3L
, "HPOUT3L"),
1410 MADERA_MIXER_WIDGETS(OUT3R
, "HPOUT3R"),
1411 MADERA_MIXER_WIDGETS(SPKOUTL
, "SPKOUTL"),
1412 MADERA_MIXER_WIDGETS(SPKOUTR
, "SPKOUTR"),
1413 MADERA_MIXER_WIDGETS(SPKDAT1L
, "SPKDAT1L"),
1414 MADERA_MIXER_WIDGETS(SPKDAT1R
, "SPKDAT1R"),
1415 MADERA_MIXER_WIDGETS(SPKDAT2L
, "SPKDAT2L"),
1416 MADERA_MIXER_WIDGETS(SPKDAT2R
, "SPKDAT2R"),
1418 MADERA_MIXER_WIDGETS(AIF1TX1
, "AIF1TX1"),
1419 MADERA_MIXER_WIDGETS(AIF1TX2
, "AIF1TX2"),
1420 MADERA_MIXER_WIDGETS(AIF1TX3
, "AIF1TX3"),
1421 MADERA_MIXER_WIDGETS(AIF1TX4
, "AIF1TX4"),
1422 MADERA_MIXER_WIDGETS(AIF1TX5
, "AIF1TX5"),
1423 MADERA_MIXER_WIDGETS(AIF1TX6
, "AIF1TX6"),
1424 MADERA_MIXER_WIDGETS(AIF1TX7
, "AIF1TX7"),
1425 MADERA_MIXER_WIDGETS(AIF1TX8
, "AIF1TX8"),
1427 MADERA_MIXER_WIDGETS(AIF2TX1
, "AIF2TX1"),
1428 MADERA_MIXER_WIDGETS(AIF2TX2
, "AIF2TX2"),
1429 MADERA_MIXER_WIDGETS(AIF2TX3
, "AIF2TX3"),
1430 MADERA_MIXER_WIDGETS(AIF2TX4
, "AIF2TX4"),
1431 MADERA_MIXER_WIDGETS(AIF2TX5
, "AIF2TX5"),
1432 MADERA_MIXER_WIDGETS(AIF2TX6
, "AIF2TX6"),
1433 MADERA_MIXER_WIDGETS(AIF2TX7
, "AIF2TX7"),
1434 MADERA_MIXER_WIDGETS(AIF2TX8
, "AIF2TX8"),
1436 MADERA_MIXER_WIDGETS(AIF3TX1
, "AIF3TX1"),
1437 MADERA_MIXER_WIDGETS(AIF3TX2
, "AIF3TX2"),
1439 MADERA_MIXER_WIDGETS(AIF4TX1
, "AIF4TX1"),
1440 MADERA_MIXER_WIDGETS(AIF4TX2
, "AIF4TX2"),
1442 MADERA_MIXER_WIDGETS(SLIMTX1
, "SLIMTX1"),
1443 MADERA_MIXER_WIDGETS(SLIMTX2
, "SLIMTX2"),
1444 MADERA_MIXER_WIDGETS(SLIMTX3
, "SLIMTX3"),
1445 MADERA_MIXER_WIDGETS(SLIMTX4
, "SLIMTX4"),
1446 MADERA_MIXER_WIDGETS(SLIMTX5
, "SLIMTX5"),
1447 MADERA_MIXER_WIDGETS(SLIMTX6
, "SLIMTX6"),
1448 MADERA_MIXER_WIDGETS(SLIMTX7
, "SLIMTX7"),
1449 MADERA_MIXER_WIDGETS(SLIMTX8
, "SLIMTX8"),
1451 MADERA_MUX_WIDGETS(SPD1TX1
, "SPDIF1TX1"),
1452 MADERA_MUX_WIDGETS(SPD1TX2
, "SPDIF1TX2"),
1454 MADERA_MUX_WIDGETS(ASRC1IN1L
, "ASRC1IN1L"),
1455 MADERA_MUX_WIDGETS(ASRC1IN1R
, "ASRC1IN1R"),
1456 MADERA_MUX_WIDGETS(ASRC1IN2L
, "ASRC1IN2L"),
1457 MADERA_MUX_WIDGETS(ASRC1IN2R
, "ASRC1IN2R"),
1458 MADERA_MUX_WIDGETS(ASRC2IN1L
, "ASRC2IN1L"),
1459 MADERA_MUX_WIDGETS(ASRC2IN1R
, "ASRC2IN1R"),
1460 MADERA_MUX_WIDGETS(ASRC2IN2L
, "ASRC2IN2L"),
1461 MADERA_MUX_WIDGETS(ASRC2IN2R
, "ASRC2IN2R"),
1463 MADERA_DSP_WIDGETS(DSP1
, "DSP1"),
1464 MADERA_DSP_WIDGETS(DSP2
, "DSP2"),
1465 MADERA_DSP_WIDGETS(DSP3
, "DSP3"),
1466 MADERA_DSP_WIDGETS(DSP4
, "DSP4"),
1467 MADERA_DSP_WIDGETS(DSP5
, "DSP5"),
1468 MADERA_DSP_WIDGETS(DSP6
, "DSP6"),
1469 MADERA_DSP_WIDGETS(DSP7
, "DSP7"),
1471 SND_SOC_DAPM_SWITCH("DSP1 Trigger Output", SND_SOC_NOPM
, 0, 0,
1472 &madera_dsp_trigger_output_mux
[0]),
1473 SND_SOC_DAPM_SWITCH("DSP2 Trigger Output", SND_SOC_NOPM
, 0, 0,
1474 &madera_dsp_trigger_output_mux
[1]),
1475 SND_SOC_DAPM_SWITCH("DSP3 Trigger Output", SND_SOC_NOPM
, 0, 0,
1476 &madera_dsp_trigger_output_mux
[2]),
1477 SND_SOC_DAPM_SWITCH("DSP4 Trigger Output", SND_SOC_NOPM
, 0, 0,
1478 &madera_dsp_trigger_output_mux
[3]),
1479 SND_SOC_DAPM_SWITCH("DSP5 Trigger Output", SND_SOC_NOPM
, 0, 0,
1480 &madera_dsp_trigger_output_mux
[4]),
1481 SND_SOC_DAPM_SWITCH("DSP6 Trigger Output", SND_SOC_NOPM
, 0, 0,
1482 &madera_dsp_trigger_output_mux
[5]),
1483 SND_SOC_DAPM_SWITCH("DSP7 Trigger Output", SND_SOC_NOPM
, 0, 0,
1484 &madera_dsp_trigger_output_mux
[6]),
1486 MADERA_MUX_WIDGETS(ISRC1DEC1
, "ISRC1DEC1"),
1487 MADERA_MUX_WIDGETS(ISRC1DEC2
, "ISRC1DEC2"),
1488 MADERA_MUX_WIDGETS(ISRC1DEC3
, "ISRC1DEC3"),
1489 MADERA_MUX_WIDGETS(ISRC1DEC4
, "ISRC1DEC4"),
1491 MADERA_MUX_WIDGETS(ISRC1INT1
, "ISRC1INT1"),
1492 MADERA_MUX_WIDGETS(ISRC1INT2
, "ISRC1INT2"),
1493 MADERA_MUX_WIDGETS(ISRC1INT3
, "ISRC1INT3"),
1494 MADERA_MUX_WIDGETS(ISRC1INT4
, "ISRC1INT4"),
1496 MADERA_MUX_WIDGETS(ISRC2DEC1
, "ISRC2DEC1"),
1497 MADERA_MUX_WIDGETS(ISRC2DEC2
, "ISRC2DEC2"),
1498 MADERA_MUX_WIDGETS(ISRC2DEC3
, "ISRC2DEC3"),
1499 MADERA_MUX_WIDGETS(ISRC2DEC4
, "ISRC2DEC4"),
1501 MADERA_MUX_WIDGETS(ISRC2INT1
, "ISRC2INT1"),
1502 MADERA_MUX_WIDGETS(ISRC2INT2
, "ISRC2INT2"),
1503 MADERA_MUX_WIDGETS(ISRC2INT3
, "ISRC2INT3"),
1504 MADERA_MUX_WIDGETS(ISRC2INT4
, "ISRC2INT4"),
1506 MADERA_MUX_WIDGETS(ISRC3DEC1
, "ISRC3DEC1"),
1507 MADERA_MUX_WIDGETS(ISRC3DEC2
, "ISRC3DEC2"),
1509 MADERA_MUX_WIDGETS(ISRC3INT1
, "ISRC3INT1"),
1510 MADERA_MUX_WIDGETS(ISRC3INT2
, "ISRC3INT2"),
1512 MADERA_MUX_WIDGETS(ISRC4DEC1
, "ISRC4DEC1"),
1513 MADERA_MUX_WIDGETS(ISRC4DEC2
, "ISRC4DEC2"),
1515 MADERA_MUX_WIDGETS(ISRC4INT1
, "ISRC4INT1"),
1516 MADERA_MUX_WIDGETS(ISRC4INT2
, "ISRC4INT2"),
1518 SND_SOC_DAPM_OUTPUT("HPOUT1L"),
1519 SND_SOC_DAPM_OUTPUT("HPOUT1R"),
1520 SND_SOC_DAPM_OUTPUT("HPOUT2L"),
1521 SND_SOC_DAPM_OUTPUT("HPOUT2R"),
1522 SND_SOC_DAPM_OUTPUT("HPOUT3L"),
1523 SND_SOC_DAPM_OUTPUT("HPOUT3R"),
1524 SND_SOC_DAPM_OUTPUT("SPKOUTLN"),
1525 SND_SOC_DAPM_OUTPUT("SPKOUTLP"),
1526 SND_SOC_DAPM_OUTPUT("SPKOUTRN"),
1527 SND_SOC_DAPM_OUTPUT("SPKOUTRP"),
1528 SND_SOC_DAPM_OUTPUT("SPKDAT1L"),
1529 SND_SOC_DAPM_OUTPUT("SPKDAT1R"),
1530 SND_SOC_DAPM_OUTPUT("SPKDAT2L"),
1531 SND_SOC_DAPM_OUTPUT("SPKDAT2R"),
1532 SND_SOC_DAPM_OUTPUT("SPDIF1"),
1534 SND_SOC_DAPM_OUTPUT("MICSUPP"),
1537 #define MADERA_MIXER_INPUT_ROUTES(name) \
1538 { name, "Noise Generator", "Noise Generator" }, \
1539 { name, "Tone Generator 1", "Tone Generator 1" }, \
1540 { name, "Tone Generator 2", "Tone Generator 2" }, \
1541 { name, "Haptics", "HAPTICS" }, \
1542 { name, "AEC1", "AEC1 Loopback" }, \
1543 { name, "AEC2", "AEC2 Loopback" }, \
1544 { name, "IN1L", "IN1L" }, \
1545 { name, "IN1R", "IN1R" }, \
1546 { name, "IN2L", "IN2L" }, \
1547 { name, "IN2R", "IN2R" }, \
1548 { name, "IN3L", "IN3L" }, \
1549 { name, "IN3R", "IN3R" }, \
1550 { name, "IN4L", "IN4L" }, \
1551 { name, "IN4R", "IN4R" }, \
1552 { name, "IN5L", "IN5L" }, \
1553 { name, "IN5R", "IN5R" }, \
1554 { name, "IN6L", "IN6L" }, \
1555 { name, "IN6R", "IN6R" }, \
1556 { name, "AIF1RX1", "AIF1RX1" }, \
1557 { name, "AIF1RX2", "AIF1RX2" }, \
1558 { name, "AIF1RX3", "AIF1RX3" }, \
1559 { name, "AIF1RX4", "AIF1RX4" }, \
1560 { name, "AIF1RX5", "AIF1RX5" }, \
1561 { name, "AIF1RX6", "AIF1RX6" }, \
1562 { name, "AIF1RX7", "AIF1RX7" }, \
1563 { name, "AIF1RX8", "AIF1RX8" }, \
1564 { name, "AIF2RX1", "AIF2RX1" }, \
1565 { name, "AIF2RX2", "AIF2RX2" }, \
1566 { name, "AIF2RX3", "AIF2RX3" }, \
1567 { name, "AIF2RX4", "AIF2RX4" }, \
1568 { name, "AIF2RX5", "AIF2RX5" }, \
1569 { name, "AIF2RX6", "AIF2RX6" }, \
1570 { name, "AIF2RX7", "AIF2RX7" }, \
1571 { name, "AIF2RX8", "AIF2RX8" }, \
1572 { name, "AIF3RX1", "AIF3RX1" }, \
1573 { name, "AIF3RX2", "AIF3RX2" }, \
1574 { name, "AIF4RX1", "AIF4RX1" }, \
1575 { name, "AIF4RX2", "AIF4RX2" }, \
1576 { name, "SLIMRX1", "SLIMRX1" }, \
1577 { name, "SLIMRX2", "SLIMRX2" }, \
1578 { name, "SLIMRX3", "SLIMRX3" }, \
1579 { name, "SLIMRX4", "SLIMRX4" }, \
1580 { name, "SLIMRX5", "SLIMRX5" }, \
1581 { name, "SLIMRX6", "SLIMRX6" }, \
1582 { name, "SLIMRX7", "SLIMRX7" }, \
1583 { name, "SLIMRX8", "SLIMRX8" }, \
1584 { name, "EQ1", "EQ1" }, \
1585 { name, "EQ2", "EQ2" }, \
1586 { name, "EQ3", "EQ3" }, \
1587 { name, "EQ4", "EQ4" }, \
1588 { name, "DRC1L", "DRC1L" }, \
1589 { name, "DRC1R", "DRC1R" }, \
1590 { name, "DRC2L", "DRC2L" }, \
1591 { name, "DRC2R", "DRC2R" }, \
1592 { name, "LHPF1", "LHPF1" }, \
1593 { name, "LHPF2", "LHPF2" }, \
1594 { name, "LHPF3", "LHPF3" }, \
1595 { name, "LHPF4", "LHPF4" }, \
1596 { name, "ASRC1IN1L", "ASRC1IN1L" }, \
1597 { name, "ASRC1IN1R", "ASRC1IN1R" }, \
1598 { name, "ASRC1IN2L", "ASRC1IN2L" }, \
1599 { name, "ASRC1IN2R", "ASRC1IN2R" }, \
1600 { name, "ASRC2IN1L", "ASRC2IN1L" }, \
1601 { name, "ASRC2IN1R", "ASRC2IN1R" }, \
1602 { name, "ASRC2IN2L", "ASRC2IN2L" }, \
1603 { name, "ASRC2IN2R", "ASRC2IN2R" }, \
1604 { name, "ISRC1DEC1", "ISRC1DEC1" }, \
1605 { name, "ISRC1DEC2", "ISRC1DEC2" }, \
1606 { name, "ISRC1DEC3", "ISRC1DEC3" }, \
1607 { name, "ISRC1DEC4", "ISRC1DEC4" }, \
1608 { name, "ISRC1INT1", "ISRC1INT1" }, \
1609 { name, "ISRC1INT2", "ISRC1INT2" }, \
1610 { name, "ISRC1INT3", "ISRC1INT3" }, \
1611 { name, "ISRC1INT4", "ISRC1INT4" }, \
1612 { name, "ISRC2DEC1", "ISRC2DEC1" }, \
1613 { name, "ISRC2DEC2", "ISRC2DEC2" }, \
1614 { name, "ISRC2DEC3", "ISRC2DEC3" }, \
1615 { name, "ISRC2DEC4", "ISRC2DEC4" }, \
1616 { name, "ISRC2INT1", "ISRC2INT1" }, \
1617 { name, "ISRC2INT2", "ISRC2INT2" }, \
1618 { name, "ISRC2INT3", "ISRC2INT3" }, \
1619 { name, "ISRC2INT4", "ISRC2INT4" }, \
1620 { name, "ISRC3DEC1", "ISRC3DEC1" }, \
1621 { name, "ISRC3DEC2", "ISRC3DEC2" }, \
1622 { name, "ISRC3INT1", "ISRC3INT1" }, \
1623 { name, "ISRC3INT2", "ISRC3INT2" }, \
1624 { name, "ISRC4DEC1", "ISRC4DEC1" }, \
1625 { name, "ISRC4DEC2", "ISRC4DEC2" }, \
1626 { name, "ISRC4INT1", "ISRC4INT1" }, \
1627 { name, "ISRC4INT2", "ISRC4INT2" }, \
1628 { name, "DSP1.1", "DSP1" }, \
1629 { name, "DSP1.2", "DSP1" }, \
1630 { name, "DSP1.3", "DSP1" }, \
1631 { name, "DSP1.4", "DSP1" }, \
1632 { name, "DSP1.5", "DSP1" }, \
1633 { name, "DSP1.6", "DSP1" }, \
1634 { name, "DSP2.1", "DSP2" }, \
1635 { name, "DSP2.2", "DSP2" }, \
1636 { name, "DSP2.3", "DSP2" }, \
1637 { name, "DSP2.4", "DSP2" }, \
1638 { name, "DSP2.5", "DSP2" }, \
1639 { name, "DSP2.6", "DSP2" }, \
1640 { name, "DSP3.1", "DSP3" }, \
1641 { name, "DSP3.2", "DSP3" }, \
1642 { name, "DSP3.3", "DSP3" }, \
1643 { name, "DSP3.4", "DSP3" }, \
1644 { name, "DSP3.5", "DSP3" }, \
1645 { name, "DSP3.6", "DSP3" }, \
1646 { name, "DSP4.1", "DSP4" }, \
1647 { name, "DSP4.2", "DSP4" }, \
1648 { name, "DSP4.3", "DSP4" }, \
1649 { name, "DSP4.4", "DSP4" }, \
1650 { name, "DSP4.5", "DSP4" }, \
1651 { name, "DSP4.6", "DSP4" }, \
1652 { name, "DSP5.1", "DSP5" }, \
1653 { name, "DSP5.2", "DSP5" }, \
1654 { name, "DSP5.3", "DSP5" }, \
1655 { name, "DSP5.4", "DSP5" }, \
1656 { name, "DSP5.5", "DSP5" }, \
1657 { name, "DSP5.6", "DSP5" }, \
1658 { name, "DSP6.1", "DSP6" }, \
1659 { name, "DSP6.2", "DSP6" }, \
1660 { name, "DSP6.3", "DSP6" }, \
1661 { name, "DSP6.4", "DSP6" }, \
1662 { name, "DSP6.5", "DSP6" }, \
1663 { name, "DSP6.6", "DSP6" }, \
1664 { name, "DSP7.1", "DSP7" }, \
1665 { name, "DSP7.2", "DSP7" }, \
1666 { name, "DSP7.3", "DSP7" }, \
1667 { name, "DSP7.4", "DSP7" }, \
1668 { name, "DSP7.5", "DSP7" }, \
1669 { name, "DSP7.6", "DSP7" }
1671 static const struct snd_soc_dapm_route cs47l85_dapm_routes
[] = {
1672 /* Internal clock domains */
1673 { "EQ1", NULL
, "FXCLK" },
1674 { "EQ2", NULL
, "FXCLK" },
1675 { "EQ3", NULL
, "FXCLK" },
1676 { "EQ4", NULL
, "FXCLK" },
1677 { "DRC1L", NULL
, "FXCLK" },
1678 { "DRC1R", NULL
, "FXCLK" },
1679 { "DRC2L", NULL
, "FXCLK" },
1680 { "DRC2R", NULL
, "FXCLK" },
1681 { "LHPF1", NULL
, "FXCLK" },
1682 { "LHPF2", NULL
, "FXCLK" },
1683 { "LHPF3", NULL
, "FXCLK" },
1684 { "LHPF4", NULL
, "FXCLK" },
1685 { "PWM1 Mixer", NULL
, "PWMCLK" },
1686 { "PWM2 Mixer", NULL
, "PWMCLK" },
1687 { "OUT1L", NULL
, "OUTCLK" },
1688 { "OUT1R", NULL
, "OUTCLK" },
1689 { "OUT2L", NULL
, "OUTCLK" },
1690 { "OUT2R", NULL
, "OUTCLK" },
1691 { "OUT3L", NULL
, "OUTCLK" },
1692 { "OUT3R", NULL
, "OUTCLK" },
1693 { "OUT4L", NULL
, "OUTCLK" },
1694 { "OUT4R", NULL
, "OUTCLK" },
1695 { "OUT5L", NULL
, "OUTCLK" },
1696 { "OUT5R", NULL
, "OUTCLK" },
1697 { "OUT6L", NULL
, "OUTCLK" },
1698 { "OUT6R", NULL
, "OUTCLK" },
1699 { "AIF1TX1", NULL
, "AIF1TXCLK" },
1700 { "AIF1TX2", NULL
, "AIF1TXCLK" },
1701 { "AIF1TX3", NULL
, "AIF1TXCLK" },
1702 { "AIF1TX4", NULL
, "AIF1TXCLK" },
1703 { "AIF1TX5", NULL
, "AIF1TXCLK" },
1704 { "AIF1TX6", NULL
, "AIF1TXCLK" },
1705 { "AIF1TX7", NULL
, "AIF1TXCLK" },
1706 { "AIF1TX8", NULL
, "AIF1TXCLK" },
1707 { "AIF2TX1", NULL
, "AIF2TXCLK" },
1708 { "AIF2TX2", NULL
, "AIF2TXCLK" },
1709 { "AIF2TX3", NULL
, "AIF2TXCLK" },
1710 { "AIF2TX4", NULL
, "AIF2TXCLK" },
1711 { "AIF2TX5", NULL
, "AIF2TXCLK" },
1712 { "AIF2TX6", NULL
, "AIF2TXCLK" },
1713 { "AIF2TX7", NULL
, "AIF2TXCLK" },
1714 { "AIF2TX8", NULL
, "AIF2TXCLK" },
1715 { "AIF3TX1", NULL
, "AIF3TXCLK" },
1716 { "AIF3TX2", NULL
, "AIF3TXCLK" },
1717 { "AIF4TX1", NULL
, "AIF4TXCLK" },
1718 { "AIF4TX2", NULL
, "AIF4TXCLK" },
1719 { "SLIMTX1", NULL
, "SLIMBUSCLK" },
1720 { "SLIMTX2", NULL
, "SLIMBUSCLK" },
1721 { "SLIMTX3", NULL
, "SLIMBUSCLK" },
1722 { "SLIMTX4", NULL
, "SLIMBUSCLK" },
1723 { "SLIMTX5", NULL
, "SLIMBUSCLK" },
1724 { "SLIMTX6", NULL
, "SLIMBUSCLK" },
1725 { "SLIMTX7", NULL
, "SLIMBUSCLK" },
1726 { "SLIMTX8", NULL
, "SLIMBUSCLK" },
1727 { "SPD1TX1", NULL
, "SPDCLK" },
1728 { "SPD1TX2", NULL
, "SPDCLK" },
1729 { "DSP1", NULL
, "DSP1CLK" },
1730 { "DSP2", NULL
, "DSP2CLK" },
1731 { "DSP3", NULL
, "DSP3CLK" },
1732 { "DSP4", NULL
, "DSP4CLK" },
1733 { "DSP5", NULL
, "DSP5CLK" },
1734 { "DSP6", NULL
, "DSP6CLK" },
1735 { "DSP7", NULL
, "DSP7CLK" },
1736 { "ISRC1DEC1", NULL
, "ISRC1CLK" },
1737 { "ISRC1DEC2", NULL
, "ISRC1CLK" },
1738 { "ISRC1DEC3", NULL
, "ISRC1CLK" },
1739 { "ISRC1DEC4", NULL
, "ISRC1CLK" },
1740 { "ISRC1INT1", NULL
, "ISRC1CLK" },
1741 { "ISRC1INT2", NULL
, "ISRC1CLK" },
1742 { "ISRC1INT3", NULL
, "ISRC1CLK" },
1743 { "ISRC1INT4", NULL
, "ISRC1CLK" },
1744 { "ISRC2DEC1", NULL
, "ISRC2CLK" },
1745 { "ISRC2DEC2", NULL
, "ISRC2CLK" },
1746 { "ISRC2DEC3", NULL
, "ISRC2CLK" },
1747 { "ISRC2DEC4", NULL
, "ISRC2CLK" },
1748 { "ISRC2INT1", NULL
, "ISRC2CLK" },
1749 { "ISRC2INT2", NULL
, "ISRC2CLK" },
1750 { "ISRC2INT3", NULL
, "ISRC2CLK" },
1751 { "ISRC2INT4", NULL
, "ISRC2CLK" },
1752 { "ISRC3DEC1", NULL
, "ISRC3CLK" },
1753 { "ISRC3DEC2", NULL
, "ISRC3CLK" },
1754 { "ISRC3INT1", NULL
, "ISRC3CLK" },
1755 { "ISRC3INT2", NULL
, "ISRC3CLK" },
1756 { "ISRC4DEC1", NULL
, "ISRC4CLK" },
1757 { "ISRC4DEC2", NULL
, "ISRC4CLK" },
1758 { "ISRC4INT1", NULL
, "ISRC4CLK" },
1759 { "ISRC4INT2", NULL
, "ISRC4CLK" },
1760 { "ASRC1IN1L", NULL
, "ASRC1CLK" },
1761 { "ASRC1IN1R", NULL
, "ASRC1CLK" },
1762 { "ASRC1IN2L", NULL
, "ASRC1CLK" },
1763 { "ASRC1IN2R", NULL
, "ASRC1CLK" },
1764 { "ASRC2IN1L", NULL
, "ASRC2CLK" },
1765 { "ASRC2IN1R", NULL
, "ASRC2CLK" },
1766 { "ASRC2IN2L", NULL
, "ASRC2CLK" },
1767 { "ASRC2IN2R", NULL
, "ASRC2CLK" },
1769 { "AIF2 Capture", NULL
, "DBVDD2" },
1770 { "AIF2 Playback", NULL
, "DBVDD2" },
1772 { "AIF3 Capture", NULL
, "DBVDD3" },
1773 { "AIF3 Playback", NULL
, "DBVDD3" },
1775 { "AIF4 Capture", NULL
, "DBVDD3" },
1776 { "AIF4 Playback", NULL
, "DBVDD3" },
1778 { "OUT1L", NULL
, "CPVDD1" },
1779 { "OUT1L", NULL
, "CPVDD2" },
1780 { "OUT1R", NULL
, "CPVDD1" },
1781 { "OUT1R", NULL
, "CPVDD2" },
1782 { "OUT2L", NULL
, "CPVDD1" },
1783 { "OUT2L", NULL
, "CPVDD2" },
1784 { "OUT2R", NULL
, "CPVDD1" },
1785 { "OUT2R", NULL
, "CPVDD2" },
1786 { "OUT3L", NULL
, "CPVDD1" },
1787 { "OUT3L", NULL
, "CPVDD2" },
1788 { "OUT3R", NULL
, "CPVDD1" },
1789 { "OUT3R", NULL
, "CPVDD2" },
1791 { "OUT4L", NULL
, "SPKVDDL" },
1792 { "OUT4R", NULL
, "SPKVDDR" },
1794 { "OUT1L", NULL
, "SYSCLK" },
1795 { "OUT1R", NULL
, "SYSCLK" },
1796 { "OUT2L", NULL
, "SYSCLK" },
1797 { "OUT2R", NULL
, "SYSCLK" },
1798 { "OUT3L", NULL
, "SYSCLK" },
1799 { "OUT3R", NULL
, "SYSCLK" },
1800 { "OUT4L", NULL
, "SYSCLK" },
1801 { "OUT4R", NULL
, "SYSCLK" },
1802 { "OUT5L", NULL
, "SYSCLK" },
1803 { "OUT5R", NULL
, "SYSCLK" },
1804 { "OUT6L", NULL
, "SYSCLK" },
1805 { "OUT6R", NULL
, "SYSCLK" },
1807 { "SPD1", NULL
, "SYSCLK" },
1808 { "SPD1", NULL
, "SPD1TX1" },
1809 { "SPD1", NULL
, "SPD1TX2" },
1811 { "IN1L", NULL
, "SYSCLK" },
1812 { "IN1R", NULL
, "SYSCLK" },
1813 { "IN2L", NULL
, "SYSCLK" },
1814 { "IN2R", NULL
, "SYSCLK" },
1815 { "IN3L", NULL
, "SYSCLK" },
1816 { "IN3R", NULL
, "SYSCLK" },
1817 { "IN4L", NULL
, "SYSCLK" },
1818 { "IN4R", NULL
, "SYSCLK" },
1819 { "IN5L", NULL
, "SYSCLK" },
1820 { "IN5R", NULL
, "SYSCLK" },
1821 { "IN6L", NULL
, "SYSCLK" },
1822 { "IN6R", NULL
, "SYSCLK" },
1824 { "IN4L", NULL
, "DBVDD4" },
1825 { "IN4R", NULL
, "DBVDD4" },
1826 { "IN5L", NULL
, "DBVDD4" },
1827 { "IN5R", NULL
, "DBVDD4" },
1828 { "IN6L", NULL
, "DBVDD4" },
1829 { "IN6R", NULL
, "DBVDD4" },
1831 { "ASRC1IN1L", NULL
, "SYSCLK" },
1832 { "ASRC1IN1R", NULL
, "SYSCLK" },
1833 { "ASRC1IN2L", NULL
, "SYSCLK" },
1834 { "ASRC1IN2R", NULL
, "SYSCLK" },
1835 { "ASRC2IN1L", NULL
, "SYSCLK" },
1836 { "ASRC2IN1R", NULL
, "SYSCLK" },
1837 { "ASRC2IN2L", NULL
, "SYSCLK" },
1838 { "ASRC2IN2R", NULL
, "SYSCLK" },
1840 { "ASRC1IN1L", NULL
, "ASYNCCLK" },
1841 { "ASRC1IN1R", NULL
, "ASYNCCLK" },
1842 { "ASRC1IN2L", NULL
, "ASYNCCLK" },
1843 { "ASRC1IN2R", NULL
, "ASYNCCLK" },
1844 { "ASRC2IN1L", NULL
, "ASYNCCLK" },
1845 { "ASRC2IN1R", NULL
, "ASYNCCLK" },
1846 { "ASRC2IN2L", NULL
, "ASYNCCLK" },
1847 { "ASRC2IN2R", NULL
, "ASYNCCLK" },
1849 { "MICBIAS1", NULL
, "MICVDD" },
1850 { "MICBIAS2", NULL
, "MICVDD" },
1851 { "MICBIAS3", NULL
, "MICVDD" },
1852 { "MICBIAS4", NULL
, "MICVDD" },
1854 { "Noise Generator", NULL
, "SYSCLK" },
1855 { "Tone Generator 1", NULL
, "SYSCLK" },
1856 { "Tone Generator 2", NULL
, "SYSCLK" },
1858 { "Noise Generator", NULL
, "NOISE" },
1859 { "Tone Generator 1", NULL
, "TONE" },
1860 { "Tone Generator 2", NULL
, "TONE" },
1862 { "AIF1 Capture", NULL
, "AIF1TX1" },
1863 { "AIF1 Capture", NULL
, "AIF1TX2" },
1864 { "AIF1 Capture", NULL
, "AIF1TX3" },
1865 { "AIF1 Capture", NULL
, "AIF1TX4" },
1866 { "AIF1 Capture", NULL
, "AIF1TX5" },
1867 { "AIF1 Capture", NULL
, "AIF1TX6" },
1868 { "AIF1 Capture", NULL
, "AIF1TX7" },
1869 { "AIF1 Capture", NULL
, "AIF1TX8" },
1871 { "AIF1RX1", NULL
, "AIF1 Playback" },
1872 { "AIF1RX2", NULL
, "AIF1 Playback" },
1873 { "AIF1RX3", NULL
, "AIF1 Playback" },
1874 { "AIF1RX4", NULL
, "AIF1 Playback" },
1875 { "AIF1RX5", NULL
, "AIF1 Playback" },
1876 { "AIF1RX6", NULL
, "AIF1 Playback" },
1877 { "AIF1RX7", NULL
, "AIF1 Playback" },
1878 { "AIF1RX8", NULL
, "AIF1 Playback" },
1880 { "AIF2 Capture", NULL
, "AIF2TX1" },
1881 { "AIF2 Capture", NULL
, "AIF2TX2" },
1882 { "AIF2 Capture", NULL
, "AIF2TX3" },
1883 { "AIF2 Capture", NULL
, "AIF2TX4" },
1884 { "AIF2 Capture", NULL
, "AIF2TX5" },
1885 { "AIF2 Capture", NULL
, "AIF2TX6" },
1886 { "AIF2 Capture", NULL
, "AIF2TX7" },
1887 { "AIF2 Capture", NULL
, "AIF2TX8" },
1889 { "AIF2RX1", NULL
, "AIF2 Playback" },
1890 { "AIF2RX2", NULL
, "AIF2 Playback" },
1891 { "AIF2RX3", NULL
, "AIF2 Playback" },
1892 { "AIF2RX4", NULL
, "AIF2 Playback" },
1893 { "AIF2RX5", NULL
, "AIF2 Playback" },
1894 { "AIF2RX6", NULL
, "AIF2 Playback" },
1895 { "AIF2RX7", NULL
, "AIF2 Playback" },
1896 { "AIF2RX8", NULL
, "AIF2 Playback" },
1898 { "AIF3 Capture", NULL
, "AIF3TX1" },
1899 { "AIF3 Capture", NULL
, "AIF3TX2" },
1901 { "AIF3RX1", NULL
, "AIF3 Playback" },
1902 { "AIF3RX2", NULL
, "AIF3 Playback" },
1904 { "AIF4 Capture", NULL
, "AIF4TX1" },
1905 { "AIF4 Capture", NULL
, "AIF4TX2" },
1907 { "AIF4RX1", NULL
, "AIF4 Playback" },
1908 { "AIF4RX2", NULL
, "AIF4 Playback" },
1910 { "Slim1 Capture", NULL
, "SLIMTX1" },
1911 { "Slim1 Capture", NULL
, "SLIMTX2" },
1912 { "Slim1 Capture", NULL
, "SLIMTX3" },
1913 { "Slim1 Capture", NULL
, "SLIMTX4" },
1915 { "SLIMRX1", NULL
, "Slim1 Playback" },
1916 { "SLIMRX2", NULL
, "Slim1 Playback" },
1917 { "SLIMRX3", NULL
, "Slim1 Playback" },
1918 { "SLIMRX4", NULL
, "Slim1 Playback" },
1920 { "Slim2 Capture", NULL
, "SLIMTX5" },
1921 { "Slim2 Capture", NULL
, "SLIMTX6" },
1923 { "SLIMRX5", NULL
, "Slim2 Playback" },
1924 { "SLIMRX6", NULL
, "Slim2 Playback" },
1926 { "Slim3 Capture", NULL
, "SLIMTX7" },
1927 { "Slim3 Capture", NULL
, "SLIMTX8" },
1929 { "SLIMRX7", NULL
, "Slim3 Playback" },
1930 { "SLIMRX8", NULL
, "Slim3 Playback" },
1932 { "AIF1 Playback", NULL
, "SYSCLK" },
1933 { "AIF2 Playback", NULL
, "SYSCLK" },
1934 { "AIF3 Playback", NULL
, "SYSCLK" },
1935 { "AIF4 Playback", NULL
, "SYSCLK" },
1936 { "Slim1 Playback", NULL
, "SYSCLK" },
1937 { "Slim2 Playback", NULL
, "SYSCLK" },
1938 { "Slim3 Playback", NULL
, "SYSCLK" },
1940 { "AIF1 Capture", NULL
, "SYSCLK" },
1941 { "AIF2 Capture", NULL
, "SYSCLK" },
1942 { "AIF3 Capture", NULL
, "SYSCLK" },
1943 { "AIF4 Capture", NULL
, "SYSCLK" },
1944 { "Slim1 Capture", NULL
, "SYSCLK" },
1945 { "Slim2 Capture", NULL
, "SYSCLK" },
1946 { "Slim3 Capture", NULL
, "SYSCLK" },
1948 { "Voice Control DSP", NULL
, "DSP6" },
1950 { "Audio Trace DSP", NULL
, "DSP1" },
1952 { "IN1L Analog Mux", "A", "IN1ALN" },
1953 { "IN1L Analog Mux", "A", "IN1ALP" },
1954 { "IN1L Analog Mux", "B", "IN1BN" },
1955 { "IN1L Analog Mux", "B", "IN1BP" },
1957 { "IN1L Mode", "Analog", "IN1L Analog Mux" },
1958 { "IN1R Mode", "Analog", "IN1RN" },
1959 { "IN1R Mode", "Analog", "IN1RP" },
1961 { "IN1L Mode", "Digital", "IN1ALN" },
1962 { "IN1L Mode", "Digital", "IN1RN" },
1963 { "IN1R Mode", "Digital", "IN1ALN" },
1964 { "IN1R Mode", "Digital", "IN1RN" },
1966 { "IN1L", NULL
, "IN1L Mode" },
1967 { "IN1R", NULL
, "IN1R Mode" },
1969 { "IN2L Analog Mux", "A", "IN2ALN" },
1970 { "IN2L Analog Mux", "A", "IN2ALP" },
1971 { "IN2L Analog Mux", "B", "IN2BLN" },
1972 { "IN2L Analog Mux", "B", "IN2BLP" },
1973 { "IN2R Analog Mux", "A", "IN2ARN" },
1974 { "IN2R Analog Mux", "A", "IN2ARP" },
1975 { "IN2R Analog Mux", "B", "IN2BRN" },
1976 { "IN2R Analog Mux", "B", "IN2BRP" },
1978 { "IN2L Mode", "Analog", "IN2L Analog Mux" },
1979 { "IN2R Mode", "Analog", "IN2R Analog Mux" },
1981 { "IN2L Mode", "Digital", "IN2ALN" },
1982 { "IN2L Mode", "Digital", "IN2ARN" },
1983 { "IN2R Mode", "Digital", "IN2ALN" },
1984 { "IN2R Mode", "Digital", "IN2ARN" },
1986 { "IN2L", NULL
, "IN2L Mode" },
1987 { "IN2R", NULL
, "IN2R Mode" },
1989 { "IN3L Mode", "Analog", "IN3LN" },
1990 { "IN3L Mode", "Analog", "IN3LP" },
1991 { "IN3R Mode", "Analog", "IN3RN" },
1992 { "IN3R Mode", "Analog", "IN3RP" },
1994 { "IN3L Mode", "Digital", "IN3LN" },
1995 { "IN3L Mode", "Digital", "IN3RN" },
1996 { "IN3R Mode", "Digital", "IN3LN" },
1997 { "IN3R Mode", "Digital", "IN3RN" },
1999 { "IN3L", NULL
, "IN3L Mode" },
2000 { "IN3R", NULL
, "IN3R Mode" },
2002 { "IN4L", NULL
, "DMICCLK4" },
2003 { "IN4L", NULL
, "DMICDAT4" },
2004 { "IN4R", NULL
, "DMICCLK4" },
2005 { "IN4R", NULL
, "DMICDAT4" },
2007 { "IN5L", NULL
, "DMICCLK5" },
2008 { "IN5L", NULL
, "DMICDAT5" },
2009 { "IN5R", NULL
, "DMICCLK5" },
2010 { "IN5R", NULL
, "DMICDAT5" },
2012 { "IN6L", NULL
, "DMICCLK6" },
2013 { "IN6L", NULL
, "DMICDAT6" },
2014 { "IN6R", NULL
, "DMICCLK6" },
2015 { "IN6R", NULL
, "DMICDAT6" },
2017 MADERA_MIXER_ROUTES("OUT1L", "HPOUT1L"),
2018 MADERA_MIXER_ROUTES("OUT1R", "HPOUT1R"),
2019 MADERA_MIXER_ROUTES("OUT2L", "HPOUT2L"),
2020 MADERA_MIXER_ROUTES("OUT2R", "HPOUT2R"),
2021 MADERA_MIXER_ROUTES("OUT3L", "HPOUT3L"),
2022 MADERA_MIXER_ROUTES("OUT3R", "HPOUT3R"),
2024 MADERA_MIXER_ROUTES("OUT4L", "SPKOUTL"),
2025 MADERA_MIXER_ROUTES("OUT4R", "SPKOUTR"),
2026 MADERA_MIXER_ROUTES("OUT5L", "SPKDAT1L"),
2027 MADERA_MIXER_ROUTES("OUT5R", "SPKDAT1R"),
2028 MADERA_MIXER_ROUTES("OUT6L", "SPKDAT2L"),
2029 MADERA_MIXER_ROUTES("OUT6R", "SPKDAT2R"),
2031 MADERA_MIXER_ROUTES("PWM1 Driver", "PWM1"),
2032 MADERA_MIXER_ROUTES("PWM2 Driver", "PWM2"),
2034 MADERA_MIXER_ROUTES("AIF1TX1", "AIF1TX1"),
2035 MADERA_MIXER_ROUTES("AIF1TX2", "AIF1TX2"),
2036 MADERA_MIXER_ROUTES("AIF1TX3", "AIF1TX3"),
2037 MADERA_MIXER_ROUTES("AIF1TX4", "AIF1TX4"),
2038 MADERA_MIXER_ROUTES("AIF1TX5", "AIF1TX5"),
2039 MADERA_MIXER_ROUTES("AIF1TX6", "AIF1TX6"),
2040 MADERA_MIXER_ROUTES("AIF1TX7", "AIF1TX7"),
2041 MADERA_MIXER_ROUTES("AIF1TX8", "AIF1TX8"),
2043 MADERA_MIXER_ROUTES("AIF2TX1", "AIF2TX1"),
2044 MADERA_MIXER_ROUTES("AIF2TX2", "AIF2TX2"),
2045 MADERA_MIXER_ROUTES("AIF2TX3", "AIF2TX3"),
2046 MADERA_MIXER_ROUTES("AIF2TX4", "AIF2TX4"),
2047 MADERA_MIXER_ROUTES("AIF2TX5", "AIF2TX5"),
2048 MADERA_MIXER_ROUTES("AIF2TX6", "AIF2TX6"),
2049 MADERA_MIXER_ROUTES("AIF2TX7", "AIF2TX7"),
2050 MADERA_MIXER_ROUTES("AIF2TX8", "AIF2TX8"),
2052 MADERA_MIXER_ROUTES("AIF3TX1", "AIF3TX1"),
2053 MADERA_MIXER_ROUTES("AIF3TX2", "AIF3TX2"),
2055 MADERA_MIXER_ROUTES("AIF4TX1", "AIF4TX1"),
2056 MADERA_MIXER_ROUTES("AIF4TX2", "AIF4TX2"),
2058 MADERA_MIXER_ROUTES("SLIMTX1", "SLIMTX1"),
2059 MADERA_MIXER_ROUTES("SLIMTX2", "SLIMTX2"),
2060 MADERA_MIXER_ROUTES("SLIMTX3", "SLIMTX3"),
2061 MADERA_MIXER_ROUTES("SLIMTX4", "SLIMTX4"),
2062 MADERA_MIXER_ROUTES("SLIMTX5", "SLIMTX5"),
2063 MADERA_MIXER_ROUTES("SLIMTX6", "SLIMTX6"),
2064 MADERA_MIXER_ROUTES("SLIMTX7", "SLIMTX7"),
2065 MADERA_MIXER_ROUTES("SLIMTX8", "SLIMTX8"),
2067 MADERA_MUX_ROUTES("SPD1TX1", "SPDIF1TX1"),
2068 MADERA_MUX_ROUTES("SPD1TX2", "SPDIF1TX2"),
2070 MADERA_MIXER_ROUTES("EQ1", "EQ1"),
2071 MADERA_MIXER_ROUTES("EQ2", "EQ2"),
2072 MADERA_MIXER_ROUTES("EQ3", "EQ3"),
2073 MADERA_MIXER_ROUTES("EQ4", "EQ4"),
2075 MADERA_MIXER_ROUTES("DRC1L", "DRC1L"),
2076 MADERA_MIXER_ROUTES("DRC1R", "DRC1R"),
2077 MADERA_MIXER_ROUTES("DRC2L", "DRC2L"),
2078 MADERA_MIXER_ROUTES("DRC2R", "DRC2R"),
2080 MADERA_MIXER_ROUTES("LHPF1", "LHPF1"),
2081 MADERA_MIXER_ROUTES("LHPF2", "LHPF2"),
2082 MADERA_MIXER_ROUTES("LHPF3", "LHPF3"),
2083 MADERA_MIXER_ROUTES("LHPF4", "LHPF4"),
2085 MADERA_MUX_ROUTES("ASRC1IN1L", "ASRC1IN1L"),
2086 MADERA_MUX_ROUTES("ASRC1IN1R", "ASRC1IN1R"),
2087 MADERA_MUX_ROUTES("ASRC1IN2L", "ASRC1IN2L"),
2088 MADERA_MUX_ROUTES("ASRC1IN2R", "ASRC1IN2R"),
2089 MADERA_MUX_ROUTES("ASRC2IN1L", "ASRC2IN1L"),
2090 MADERA_MUX_ROUTES("ASRC2IN1R", "ASRC2IN1R"),
2091 MADERA_MUX_ROUTES("ASRC2IN2L", "ASRC2IN2L"),
2092 MADERA_MUX_ROUTES("ASRC2IN2R", "ASRC2IN2R"),
2094 MADERA_DSP_ROUTES("DSP1"),
2095 MADERA_DSP_ROUTES("DSP2"),
2096 MADERA_DSP_ROUTES("DSP3"),
2097 MADERA_DSP_ROUTES("DSP4"),
2098 MADERA_DSP_ROUTES("DSP5"),
2099 MADERA_DSP_ROUTES("DSP6"),
2100 MADERA_DSP_ROUTES("DSP7"),
2102 { "DSP Trigger Out", NULL
, "DSP1 Trigger Output" },
2103 { "DSP Trigger Out", NULL
, "DSP2 Trigger Output" },
2104 { "DSP Trigger Out", NULL
, "DSP3 Trigger Output" },
2105 { "DSP Trigger Out", NULL
, "DSP4 Trigger Output" },
2106 { "DSP Trigger Out", NULL
, "DSP5 Trigger Output" },
2107 { "DSP Trigger Out", NULL
, "DSP6 Trigger Output" },
2108 { "DSP Trigger Out", NULL
, "DSP7 Trigger Output" },
2110 { "DSP1 Trigger Output", "Switch", "DSP1" },
2111 { "DSP2 Trigger Output", "Switch", "DSP2" },
2112 { "DSP3 Trigger Output", "Switch", "DSP3" },
2113 { "DSP4 Trigger Output", "Switch", "DSP4" },
2114 { "DSP5 Trigger Output", "Switch", "DSP5" },
2115 { "DSP6 Trigger Output", "Switch", "DSP6" },
2116 { "DSP7 Trigger Output", "Switch", "DSP7" },
2118 MADERA_MUX_ROUTES("ISRC1INT1", "ISRC1INT1"),
2119 MADERA_MUX_ROUTES("ISRC1INT2", "ISRC1INT2"),
2120 MADERA_MUX_ROUTES("ISRC1INT3", "ISRC1INT3"),
2121 MADERA_MUX_ROUTES("ISRC1INT4", "ISRC1INT4"),
2123 MADERA_MUX_ROUTES("ISRC1DEC1", "ISRC1DEC1"),
2124 MADERA_MUX_ROUTES("ISRC1DEC2", "ISRC1DEC2"),
2125 MADERA_MUX_ROUTES("ISRC1DEC3", "ISRC1DEC3"),
2126 MADERA_MUX_ROUTES("ISRC1DEC4", "ISRC1DEC4"),
2128 MADERA_MUX_ROUTES("ISRC2INT1", "ISRC2INT1"),
2129 MADERA_MUX_ROUTES("ISRC2INT2", "ISRC2INT2"),
2130 MADERA_MUX_ROUTES("ISRC2INT3", "ISRC2INT3"),
2131 MADERA_MUX_ROUTES("ISRC2INT4", "ISRC2INT4"),
2133 MADERA_MUX_ROUTES("ISRC2DEC1", "ISRC2DEC1"),
2134 MADERA_MUX_ROUTES("ISRC2DEC2", "ISRC2DEC2"),
2135 MADERA_MUX_ROUTES("ISRC2DEC3", "ISRC2DEC3"),
2136 MADERA_MUX_ROUTES("ISRC2DEC4", "ISRC2DEC4"),
2138 MADERA_MUX_ROUTES("ISRC3INT1", "ISRC3INT1"),
2139 MADERA_MUX_ROUTES("ISRC3INT2", "ISRC3INT2"),
2141 MADERA_MUX_ROUTES("ISRC3DEC1", "ISRC3DEC1"),
2142 MADERA_MUX_ROUTES("ISRC3DEC2", "ISRC3DEC2"),
2144 MADERA_MUX_ROUTES("ISRC4INT1", "ISRC4INT1"),
2145 MADERA_MUX_ROUTES("ISRC4INT2", "ISRC4INT2"),
2147 MADERA_MUX_ROUTES("ISRC4DEC1", "ISRC4DEC1"),
2148 MADERA_MUX_ROUTES("ISRC4DEC2", "ISRC4DEC2"),
2150 { "AEC1 Loopback", "HPOUT1L", "OUT1L" },
2151 { "AEC1 Loopback", "HPOUT1R", "OUT1R" },
2152 { "AEC2 Loopback", "HPOUT1L", "OUT1L" },
2153 { "AEC2 Loopback", "HPOUT1R", "OUT1R" },
2154 { "HPOUT1L", NULL
, "OUT1L" },
2155 { "HPOUT1R", NULL
, "OUT1R" },
2157 { "AEC1 Loopback", "HPOUT2L", "OUT2L" },
2158 { "AEC1 Loopback", "HPOUT2R", "OUT2R" },
2159 { "AEC2 Loopback", "HPOUT2L", "OUT2L" },
2160 { "AEC2 Loopback", "HPOUT2R", "OUT2R" },
2161 { "HPOUT2L", NULL
, "OUT2L" },
2162 { "HPOUT2R", NULL
, "OUT2R" },
2164 { "AEC1 Loopback", "HPOUT3L", "OUT3L" },
2165 { "AEC1 Loopback", "HPOUT3R", "OUT3R" },
2166 { "AEC2 Loopback", "HPOUT3L", "OUT3L" },
2167 { "AEC2 Loopback", "HPOUT3R", "OUT3R" },
2168 { "HPOUT3L", NULL
, "OUT3L" },
2169 { "HPOUT3R", NULL
, "OUT3R" },
2171 { "AEC1 Loopback", "SPKOUTL", "OUT4L" },
2172 { "AEC2 Loopback", "SPKOUTL", "OUT4L" },
2173 { "SPKOUTLN", NULL
, "OUT4L" },
2174 { "SPKOUTLP", NULL
, "OUT4L" },
2176 { "AEC1 Loopback", "SPKOUTR", "OUT4R" },
2177 { "AEC2 Loopback", "SPKOUTR", "OUT4R" },
2178 { "SPKOUTRN", NULL
, "OUT4R" },
2179 { "SPKOUTRP", NULL
, "OUT4R" },
2181 { "AEC1 Loopback", "SPKDAT1L", "OUT5L" },
2182 { "AEC1 Loopback", "SPKDAT1R", "OUT5R" },
2183 { "AEC2 Loopback", "SPKDAT1L", "OUT5L" },
2184 { "AEC2 Loopback", "SPKDAT1R", "OUT5R" },
2185 { "SPKDAT1L", NULL
, "OUT5L" },
2186 { "SPKDAT1R", NULL
, "OUT5R" },
2188 { "AEC1 Loopback", "SPKDAT2L", "OUT6L" },
2189 { "AEC1 Loopback", "SPKDAT2R", "OUT6R" },
2190 { "AEC2 Loopback", "SPKDAT2L", "OUT6L" },
2191 { "AEC2 Loopback", "SPKDAT2R", "OUT6R" },
2192 { "SPKDAT2L", NULL
, "OUT6L" },
2193 { "SPKDAT2R", NULL
, "OUT6R" },
2195 CS47L85_RXANC_INPUT_ROUTES("RXANCL", "RXANCL"),
2196 CS47L85_RXANC_INPUT_ROUTES("RXANCR", "RXANCR"),
2198 CS47L85_RXANC_OUTPUT_ROUTES("OUT1L", "HPOUT1L"),
2199 CS47L85_RXANC_OUTPUT_ROUTES("OUT1R", "HPOUT1R"),
2200 CS47L85_RXANC_OUTPUT_ROUTES("OUT2L", "HPOUT2L"),
2201 CS47L85_RXANC_OUTPUT_ROUTES("OUT2R", "HPOUT2R"),
2202 CS47L85_RXANC_OUTPUT_ROUTES("OUT3L", "HPOUT3L"),
2203 CS47L85_RXANC_OUTPUT_ROUTES("OUT3R", "HPOUT3R"),
2204 CS47L85_RXANC_OUTPUT_ROUTES("OUT4L", "SPKOUTL"),
2205 CS47L85_RXANC_OUTPUT_ROUTES("OUT4R", "SPKOUTR"),
2206 CS47L85_RXANC_OUTPUT_ROUTES("OUT5L", "SPKDAT1L"),
2207 CS47L85_RXANC_OUTPUT_ROUTES("OUT5R", "SPKDAT1R"),
2208 CS47L85_RXANC_OUTPUT_ROUTES("OUT6L", "SPKDAT2L"),
2209 CS47L85_RXANC_OUTPUT_ROUTES("OUT6R", "SPKDAT2R"),
2211 { "SPDIF1", NULL
, "SPD1" },
2213 { "MICSUPP", NULL
, "SYSCLK" },
2215 { "DRC1 Signal Activity", NULL
, "DRC1 Activity Output" },
2216 { "DRC2 Signal Activity", NULL
, "DRC2 Activity Output" },
2217 { "DRC1 Activity Output", "Switch", "DRC1L" },
2218 { "DRC1 Activity Output", "Switch", "DRC1R" },
2219 { "DRC2 Activity Output", "Switch", "DRC2L" },
2220 { "DRC2 Activity Output", "Switch", "DRC2R" },
2223 static int cs47l85_set_fll(struct snd_soc_component
*component
, int fll_id
,
2224 int source
, unsigned int fref
, unsigned int fout
)
2226 struct cs47l85
*cs47l85
= snd_soc_component_get_drvdata(component
);
2229 case MADERA_FLL1_REFCLK
:
2230 return madera_set_fll_refclk(&cs47l85
->fll
[0], source
, fref
,
2232 case MADERA_FLL2_REFCLK
:
2233 return madera_set_fll_refclk(&cs47l85
->fll
[1], source
, fref
,
2235 case MADERA_FLL3_REFCLK
:
2236 return madera_set_fll_refclk(&cs47l85
->fll
[2], source
, fref
,
2238 case MADERA_FLL1_SYNCCLK
:
2239 return madera_set_fll_syncclk(&cs47l85
->fll
[0], source
, fref
,
2241 case MADERA_FLL2_SYNCCLK
:
2242 return madera_set_fll_syncclk(&cs47l85
->fll
[1], source
, fref
,
2244 case MADERA_FLL3_SYNCCLK
:
2245 return madera_set_fll_syncclk(&cs47l85
->fll
[2], source
, fref
,
2252 static struct snd_soc_dai_driver cs47l85_dai
[] = {
2254 .name
= "cs47l85-aif1",
2256 .base
= MADERA_AIF1_BCLK_CTRL
,
2258 .stream_name
= "AIF1 Playback",
2261 .rates
= MADERA_RATES
,
2262 .formats
= MADERA_FORMATS
,
2265 .stream_name
= "AIF1 Capture",
2268 .rates
= MADERA_RATES
,
2269 .formats
= MADERA_FORMATS
,
2271 .ops
= &madera_dai_ops
,
2272 .symmetric_rates
= 1,
2273 .symmetric_samplebits
= 1,
2276 .name
= "cs47l85-aif2",
2278 .base
= MADERA_AIF2_BCLK_CTRL
,
2280 .stream_name
= "AIF2 Playback",
2283 .rates
= MADERA_RATES
,
2284 .formats
= MADERA_FORMATS
,
2287 .stream_name
= "AIF2 Capture",
2290 .rates
= MADERA_RATES
,
2291 .formats
= MADERA_FORMATS
,
2293 .ops
= &madera_dai_ops
,
2294 .symmetric_rates
= 1,
2295 .symmetric_samplebits
= 1,
2298 .name
= "cs47l85-aif3",
2300 .base
= MADERA_AIF3_BCLK_CTRL
,
2302 .stream_name
= "AIF3 Playback",
2305 .rates
= MADERA_RATES
,
2306 .formats
= MADERA_FORMATS
,
2309 .stream_name
= "AIF3 Capture",
2312 .rates
= MADERA_RATES
,
2313 .formats
= MADERA_FORMATS
,
2315 .ops
= &madera_dai_ops
,
2316 .symmetric_rates
= 1,
2317 .symmetric_samplebits
= 1,
2320 .name
= "cs47l85-aif4",
2322 .base
= MADERA_AIF4_BCLK_CTRL
,
2324 .stream_name
= "AIF4 Playback",
2327 .rates
= MADERA_RATES
,
2328 .formats
= MADERA_FORMATS
,
2331 .stream_name
= "AIF4 Capture",
2334 .rates
= MADERA_RATES
,
2335 .formats
= MADERA_FORMATS
,
2337 .ops
= &madera_dai_ops
,
2338 .symmetric_rates
= 1,
2339 .symmetric_samplebits
= 1,
2342 .name
= "cs47l85-slim1",
2345 .stream_name
= "Slim1 Playback",
2348 .rates
= MADERA_RATES
,
2349 .formats
= MADERA_FORMATS
,
2352 .stream_name
= "Slim1 Capture",
2355 .rates
= MADERA_RATES
,
2356 .formats
= MADERA_FORMATS
,
2358 .ops
= &madera_simple_dai_ops
,
2361 .name
= "cs47l85-slim2",
2364 .stream_name
= "Slim2 Playback",
2367 .rates
= MADERA_RATES
,
2368 .formats
= MADERA_FORMATS
,
2371 .stream_name
= "Slim2 Capture",
2374 .rates
= MADERA_RATES
,
2375 .formats
= MADERA_FORMATS
,
2377 .ops
= &madera_simple_dai_ops
,
2380 .name
= "cs47l85-slim3",
2383 .stream_name
= "Slim3 Playback",
2386 .rates
= MADERA_RATES
,
2387 .formats
= MADERA_FORMATS
,
2390 .stream_name
= "Slim3 Capture",
2393 .rates
= MADERA_RATES
,
2394 .formats
= MADERA_FORMATS
,
2396 .ops
= &madera_simple_dai_ops
,
2399 .name
= "cs47l85-cpu-voicectrl",
2401 .stream_name
= "Voice Control CPU",
2404 .rates
= MADERA_RATES
,
2405 .formats
= MADERA_FORMATS
,
2407 .compress_new
= &snd_soc_new_compress
,
2410 .name
= "cs47l85-dsp-voicectrl",
2412 .stream_name
= "Voice Control DSP",
2415 .rates
= MADERA_RATES
,
2416 .formats
= MADERA_FORMATS
,
2420 .name
= "cs47l85-cpu-trace",
2422 .stream_name
= "Audio Trace CPU",
2425 .rates
= MADERA_RATES
,
2426 .formats
= MADERA_FORMATS
,
2428 .compress_new
= &snd_soc_new_compress
,
2431 .name
= "cs47l85-dsp-trace",
2433 .stream_name
= "Audio Trace DSP",
2436 .rates
= MADERA_RATES
,
2437 .formats
= MADERA_FORMATS
,
2442 static int cs47l85_open(struct snd_soc_component
*component
,
2443 struct snd_compr_stream
*stream
)
2445 struct snd_soc_pcm_runtime
*rtd
= stream
->private_data
;
2446 struct cs47l85
*cs47l85
= snd_soc_component_get_drvdata(component
);
2447 struct madera_priv
*priv
= &cs47l85
->core
;
2448 struct madera
*madera
= priv
->madera
;
2451 if (strcmp(asoc_rtd_to_codec(rtd
, 0)->name
, "cs47l85-dsp-voicectrl") == 0) {
2453 } else if (strcmp(asoc_rtd_to_codec(rtd
, 0)->name
, "cs47l85-dsp-trace") == 0) {
2456 dev_err(madera
->dev
,
2457 "No suitable compressed stream for DAI '%s'\n",
2458 asoc_rtd_to_codec(rtd
, 0)->name
);
2462 return wm_adsp_compr_open(&priv
->adsp
[n_adsp
], stream
);
2465 static irqreturn_t
cs47l85_adsp2_irq(int irq
, void *data
)
2467 struct cs47l85
*cs47l85
= data
;
2468 struct madera_priv
*priv
= &cs47l85
->core
;
2469 struct madera
*madera
= priv
->madera
;
2470 struct madera_voice_trigger_info trig_info
;
2474 for (i
= 0; i
< CS47L85_NUM_ADSP
; ++i
) {
2475 ret
= wm_adsp_compr_handle_irq(&priv
->adsp
[i
]);
2478 if (ret
== WM_ADSP_COMPR_VOICE_TRIGGER
) {
2479 trig_info
.core_num
= i
+ 1;
2480 blocking_notifier_call_chain(&madera
->notifier
,
2481 MADERA_NOTIFY_VOICE_TRIGGER
,
2487 dev_err(madera
->dev
, "Spurious compressed data IRQ\n");
2494 static int cs47l85_component_probe(struct snd_soc_component
*component
)
2496 struct cs47l85
*cs47l85
= snd_soc_component_get_drvdata(component
);
2497 struct madera
*madera
= cs47l85
->core
.madera
;
2500 snd_soc_component_init_regmap(component
, madera
->regmap
);
2502 mutex_lock(&madera
->dapm_ptr_lock
);
2503 madera
->dapm
= snd_soc_component_get_dapm(component
);
2504 mutex_unlock(&madera
->dapm_ptr_lock
);
2506 ret
= madera_init_inputs(component
);
2510 ret
= madera_init_outputs(component
, NULL
, CS47L85_MONO_OUTPUTS
,
2511 CS47L85_MONO_OUTPUTS
);
2515 snd_soc_component_disable_pin(component
, "HAPTICS");
2517 ret
= snd_soc_add_component_controls(component
,
2518 madera_adsp_rate_controls
,
2523 for (i
= 0; i
< CS47L85_NUM_ADSP
; i
++)
2524 wm_adsp2_component_probe(&cs47l85
->core
.adsp
[i
], component
);
2529 static void cs47l85_component_remove(struct snd_soc_component
*component
)
2531 struct cs47l85
*cs47l85
= snd_soc_component_get_drvdata(component
);
2532 struct madera
*madera
= cs47l85
->core
.madera
;
2535 mutex_lock(&madera
->dapm_ptr_lock
);
2536 madera
->dapm
= NULL
;
2537 mutex_unlock(&madera
->dapm_ptr_lock
);
2539 for (i
= 0; i
< CS47L85_NUM_ADSP
; i
++)
2540 wm_adsp2_component_remove(&cs47l85
->core
.adsp
[i
], component
);
2543 #define MADERA_DIG_VU 0x0200
2545 static const unsigned int cs47l85_digital_vu
[] = {
2546 MADERA_DAC_DIGITAL_VOLUME_1L
,
2547 MADERA_DAC_DIGITAL_VOLUME_1R
,
2548 MADERA_DAC_DIGITAL_VOLUME_2L
,
2549 MADERA_DAC_DIGITAL_VOLUME_2R
,
2550 MADERA_DAC_DIGITAL_VOLUME_3L
,
2551 MADERA_DAC_DIGITAL_VOLUME_3R
,
2552 MADERA_DAC_DIGITAL_VOLUME_4L
,
2553 MADERA_DAC_DIGITAL_VOLUME_4R
,
2554 MADERA_DAC_DIGITAL_VOLUME_5L
,
2555 MADERA_DAC_DIGITAL_VOLUME_5R
,
2556 MADERA_DAC_DIGITAL_VOLUME_6L
,
2557 MADERA_DAC_DIGITAL_VOLUME_6R
,
2560 static const struct snd_compress_ops cs47l85_compress_ops
= {
2561 .open
= &cs47l85_open
,
2562 .free
= &wm_adsp_compr_free
,
2563 .set_params
= &wm_adsp_compr_set_params
,
2564 .get_caps
= &wm_adsp_compr_get_caps
,
2565 .trigger
= &wm_adsp_compr_trigger
,
2566 .pointer
= &wm_adsp_compr_pointer
,
2567 .copy
= &wm_adsp_compr_copy
,
2570 static const struct snd_soc_component_driver soc_component_dev_cs47l85
= {
2571 .probe
= &cs47l85_component_probe
,
2572 .remove
= &cs47l85_component_remove
,
2573 .set_sysclk
= &madera_set_sysclk
,
2574 .set_pll
= &cs47l85_set_fll
,
2576 .compress_ops
= &cs47l85_compress_ops
,
2577 .controls
= cs47l85_snd_controls
,
2578 .num_controls
= ARRAY_SIZE(cs47l85_snd_controls
),
2579 .dapm_widgets
= cs47l85_dapm_widgets
,
2580 .num_dapm_widgets
= ARRAY_SIZE(cs47l85_dapm_widgets
),
2581 .dapm_routes
= cs47l85_dapm_routes
,
2582 .num_dapm_routes
= ARRAY_SIZE(cs47l85_dapm_routes
),
2583 .use_pmdown_time
= 1,
2585 .non_legacy_dai_naming
= 1,
2588 static int cs47l85_probe(struct platform_device
*pdev
)
2590 struct madera
*madera
= dev_get_drvdata(pdev
->dev
.parent
);
2591 struct cs47l85
*cs47l85
;
2594 BUILD_BUG_ON(ARRAY_SIZE(cs47l85_dai
) > MADERA_MAX_DAI
);
2596 /* quick exit if Madera irqchip driver hasn't completed probe */
2597 if (!madera
->irq_dev
) {
2598 dev_dbg(&pdev
->dev
, "irqchip driver not ready\n");
2599 return -EPROBE_DEFER
;
2602 cs47l85
= devm_kzalloc(&pdev
->dev
, sizeof(struct cs47l85
),
2607 platform_set_drvdata(pdev
, cs47l85
);
2609 cs47l85
->core
.madera
= madera
;
2610 cs47l85
->core
.dev
= &pdev
->dev
;
2611 cs47l85
->core
.num_inputs
= 12;
2613 ret
= madera_core_init(&cs47l85
->core
);
2617 ret
= madera_init_overheat(&cs47l85
->core
);
2621 ret
= madera_request_irq(madera
, MADERA_IRQ_DSP_IRQ1
,
2622 "ADSP2 Compressed IRQ", cs47l85_adsp2_irq
,
2625 dev_err(&pdev
->dev
, "Failed to request DSP IRQ: %d\n", ret
);
2626 goto error_overheat
;
2629 ret
= madera_set_irq_wake(madera
, MADERA_IRQ_DSP_IRQ1
, 1);
2631 dev_warn(&pdev
->dev
, "Failed to set DSP IRQ wake: %d\n", ret
);
2633 for (i
= 0; i
< CS47L85_NUM_ADSP
; i
++) {
2634 cs47l85
->core
.adsp
[i
].part
= "cs47l85";
2635 cs47l85
->core
.adsp
[i
].num
= i
+ 1;
2636 cs47l85
->core
.adsp
[i
].type
= WMFW_ADSP2
;
2637 cs47l85
->core
.adsp
[i
].rev
= 1;
2638 cs47l85
->core
.adsp
[i
].dev
= madera
->dev
;
2639 cs47l85
->core
.adsp
[i
].regmap
= madera
->regmap_32bit
;
2641 cs47l85
->core
.adsp
[i
].base
= wm_adsp2_control_bases
[i
];
2642 cs47l85
->core
.adsp
[i
].mem
= cs47l85_dsp_regions
[i
];
2643 cs47l85
->core
.adsp
[i
].num_mems
=
2644 ARRAY_SIZE(cs47l85_dsp1_regions
);
2646 ret
= wm_adsp2_init(&cs47l85
->core
.adsp
[i
]);
2648 for (--i
; i
>= 0; --i
)
2649 wm_adsp2_remove(&cs47l85
->core
.adsp
[i
]);
2654 madera_init_fll(madera
, 1, MADERA_FLL1_CONTROL_1
- 1,
2656 madera_init_fll(madera
, 2, MADERA_FLL2_CONTROL_1
- 1,
2658 madera_init_fll(madera
, 3, MADERA_FLL3_CONTROL_1
- 1,
2661 for (i
= 0; i
< ARRAY_SIZE(cs47l85_dai
); i
++)
2662 madera_init_dai(&cs47l85
->core
, i
);
2664 /* Latch volume update bits */
2665 for (i
= 0; i
< ARRAY_SIZE(cs47l85_digital_vu
); i
++)
2666 regmap_update_bits(madera
->regmap
, cs47l85_digital_vu
[i
],
2667 MADERA_DIG_VU
, MADERA_DIG_VU
);
2669 pm_runtime_enable(&pdev
->dev
);
2670 pm_runtime_idle(&pdev
->dev
);
2672 ret
= devm_snd_soc_register_component(&pdev
->dev
,
2673 &soc_component_dev_cs47l85
,
2675 ARRAY_SIZE(cs47l85_dai
));
2677 dev_err(&pdev
->dev
, "Failed to register component: %d\n", ret
);
2678 goto error_pm_runtime
;
2684 pm_runtime_disable(&pdev
->dev
);
2686 for (i
= 0; i
< CS47L85_NUM_ADSP
; i
++)
2687 wm_adsp2_remove(&cs47l85
->core
.adsp
[i
]);
2689 madera_set_irq_wake(madera
, MADERA_IRQ_DSP_IRQ1
, 0);
2690 madera_free_irq(madera
, MADERA_IRQ_DSP_IRQ1
, cs47l85
);
2692 madera_free_overheat(&cs47l85
->core
);
2694 madera_core_free(&cs47l85
->core
);
2699 static int cs47l85_remove(struct platform_device
*pdev
)
2701 struct cs47l85
*cs47l85
= platform_get_drvdata(pdev
);
2704 pm_runtime_disable(&pdev
->dev
);
2706 for (i
= 0; i
< CS47L85_NUM_ADSP
; i
++)
2707 wm_adsp2_remove(&cs47l85
->core
.adsp
[i
]);
2709 madera_set_irq_wake(cs47l85
->core
.madera
, MADERA_IRQ_DSP_IRQ1
, 0);
2710 madera_free_irq(cs47l85
->core
.madera
, MADERA_IRQ_DSP_IRQ1
, cs47l85
);
2711 madera_free_overheat(&cs47l85
->core
);
2712 madera_core_free(&cs47l85
->core
);
2717 static struct platform_driver cs47l85_codec_driver
= {
2719 .name
= "cs47l85-codec",
2721 .probe
= &cs47l85_probe
,
2722 .remove
= &cs47l85_remove
,
2725 module_platform_driver(cs47l85_codec_driver
);
2727 MODULE_SOFTDEP("pre: madera irq-madera arizona-micsupp");
2728 MODULE_DESCRIPTION("ASoC CS47L85 driver");
2729 MODULE_AUTHOR("Nariman Poushin <nariman@opensource.cirrus.com>");
2730 MODULE_LICENSE("GPL v2");
2731 MODULE_ALIAS("platform:cs47l85-codec");