2 * wm5110.c -- WM5110 ALSA SoC Audio driver
4 * Copyright 2012 Wolfson Microelectronics plc
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/module.h>
14 #include <linux/moduleparam.h>
15 #include <linux/init.h>
16 #include <linux/delay.h>
18 #include <linux/pm_runtime.h>
19 #include <linux/regmap.h>
20 #include <linux/slab.h>
21 #include <sound/core.h>
22 #include <sound/pcm.h>
23 #include <sound/pcm_params.h>
24 #include <sound/soc.h>
25 #include <sound/jack.h>
26 #include <sound/initval.h>
27 #include <sound/tlv.h>
29 #include <linux/mfd/arizona/core.h>
30 #include <linux/mfd/arizona/registers.h>
36 #define WM5110_NUM_ADSP 4
39 struct arizona_priv core
;
40 struct arizona_fll fll
[2];
42 unsigned int in_value
;
46 unsigned int in_pga_cache
[6];
49 static const struct wm_adsp_region wm5110_dsp1_regions
[] = {
50 { .type
= WMFW_ADSP2_PM
, .base
= 0x100000 },
51 { .type
= WMFW_ADSP2_ZM
, .base
= 0x180000 },
52 { .type
= WMFW_ADSP2_XM
, .base
= 0x190000 },
53 { .type
= WMFW_ADSP2_YM
, .base
= 0x1a8000 },
56 static const struct wm_adsp_region wm5110_dsp2_regions
[] = {
57 { .type
= WMFW_ADSP2_PM
, .base
= 0x200000 },
58 { .type
= WMFW_ADSP2_ZM
, .base
= 0x280000 },
59 { .type
= WMFW_ADSP2_XM
, .base
= 0x290000 },
60 { .type
= WMFW_ADSP2_YM
, .base
= 0x2a8000 },
63 static const struct wm_adsp_region wm5110_dsp3_regions
[] = {
64 { .type
= WMFW_ADSP2_PM
, .base
= 0x300000 },
65 { .type
= WMFW_ADSP2_ZM
, .base
= 0x380000 },
66 { .type
= WMFW_ADSP2_XM
, .base
= 0x390000 },
67 { .type
= WMFW_ADSP2_YM
, .base
= 0x3a8000 },
70 static const struct wm_adsp_region wm5110_dsp4_regions
[] = {
71 { .type
= WMFW_ADSP2_PM
, .base
= 0x400000 },
72 { .type
= WMFW_ADSP2_ZM
, .base
= 0x480000 },
73 { .type
= WMFW_ADSP2_XM
, .base
= 0x490000 },
74 { .type
= WMFW_ADSP2_YM
, .base
= 0x4a8000 },
77 static const struct wm_adsp_region
*wm5110_dsp_regions
[] = {
84 static const struct reg_default wm5110_sysclk_revd_patch
[] = {
140 static const struct reg_default wm5110_sysclk_reve_patch
[] = {
159 static int wm5110_sysclk_ev(struct snd_soc_dapm_widget
*w
,
160 struct snd_kcontrol
*kcontrol
, int event
)
162 struct snd_soc_codec
*codec
= snd_soc_dapm_to_codec(w
->dapm
);
163 struct arizona
*arizona
= dev_get_drvdata(codec
->dev
->parent
);
164 struct regmap
*regmap
= arizona
->regmap
;
165 const struct reg_default
*patch
= NULL
;
168 switch (arizona
->rev
) {
170 patch
= wm5110_sysclk_revd_patch
;
171 patch_size
= ARRAY_SIZE(wm5110_sysclk_revd_patch
);
174 patch
= wm5110_sysclk_reve_patch
;
175 patch_size
= ARRAY_SIZE(wm5110_sysclk_reve_patch
);
180 case SND_SOC_DAPM_POST_PMU
:
182 for (i
= 0; i
< patch_size
; i
++)
183 regmap_write_async(regmap
, patch
[i
].reg
,
194 static const struct reg_sequence wm5110_no_dre_left_enable
[] = {
212 static const struct reg_sequence wm5110_dre_left_enable
[] = {
230 static const struct reg_sequence wm5110_no_dre_right_enable
[] = {
248 static const struct reg_sequence wm5110_dre_right_enable
[] = {
266 static int wm5110_hp_pre_enable(struct snd_soc_dapm_widget
*w
)
268 struct snd_soc_codec
*codec
= snd_soc_dapm_to_codec(w
->dapm
);
269 struct arizona_priv
*priv
= snd_soc_codec_get_drvdata(codec
);
270 struct arizona
*arizona
= priv
->arizona
;
271 unsigned int val
= snd_soc_read(codec
, ARIZONA_DRE_ENABLE
);
272 const struct reg_sequence
*wseq
;
276 case ARIZONA_OUT1L_ENA_SHIFT
:
277 if (val
& ARIZONA_DRE1L_ENA_MASK
) {
278 wseq
= wm5110_dre_left_enable
;
279 nregs
= ARRAY_SIZE(wm5110_dre_left_enable
);
281 wseq
= wm5110_no_dre_left_enable
;
282 nregs
= ARRAY_SIZE(wm5110_no_dre_left_enable
);
283 priv
->out_up_delay
+= 10;
286 case ARIZONA_OUT1R_ENA_SHIFT
:
287 if (val
& ARIZONA_DRE1R_ENA_MASK
) {
288 wseq
= wm5110_dre_right_enable
;
289 nregs
= ARRAY_SIZE(wm5110_dre_right_enable
);
291 wseq
= wm5110_no_dre_right_enable
;
292 nregs
= ARRAY_SIZE(wm5110_no_dre_right_enable
);
293 priv
->out_up_delay
+= 10;
300 return regmap_multi_reg_write(arizona
->regmap
, wseq
, nregs
);
303 static int wm5110_hp_pre_disable(struct snd_soc_dapm_widget
*w
)
305 struct snd_soc_codec
*codec
= snd_soc_dapm_to_codec(w
->dapm
);
306 struct arizona_priv
*priv
= snd_soc_codec_get_drvdata(codec
);
307 unsigned int val
= snd_soc_read(codec
, ARIZONA_DRE_ENABLE
);
310 case ARIZONA_OUT1L_ENA_SHIFT
:
311 if (!(val
& ARIZONA_DRE1L_ENA_MASK
)) {
312 snd_soc_update_bits(codec
, ARIZONA_SPARE_TRIGGERS
,
313 ARIZONA_WS_TRG1
, ARIZONA_WS_TRG1
);
314 snd_soc_update_bits(codec
, ARIZONA_SPARE_TRIGGERS
,
316 priv
->out_down_delay
+= 27;
319 case ARIZONA_OUT1R_ENA_SHIFT
:
320 if (!(val
& ARIZONA_DRE1R_ENA_MASK
)) {
321 snd_soc_update_bits(codec
, ARIZONA_SPARE_TRIGGERS
,
322 ARIZONA_WS_TRG2
, ARIZONA_WS_TRG2
);
323 snd_soc_update_bits(codec
, ARIZONA_SPARE_TRIGGERS
,
325 priv
->out_down_delay
+= 27;
335 static int wm5110_hp_ev(struct snd_soc_dapm_widget
*w
,
336 struct snd_kcontrol
*kcontrol
, int event
)
338 struct snd_soc_codec
*codec
= snd_soc_dapm_to_codec(w
->dapm
);
339 struct arizona_priv
*priv
= snd_soc_codec_get_drvdata(codec
);
341 switch (priv
->arizona
->rev
) {
346 case SND_SOC_DAPM_PRE_PMU
:
347 wm5110_hp_pre_enable(w
);
349 case SND_SOC_DAPM_PRE_PMD
:
350 wm5110_hp_pre_disable(w
);
358 return arizona_hp_ev(w
, kcontrol
, event
);
361 static int wm5110_clear_pga_volume(struct arizona
*arizona
, int output
)
363 struct reg_sequence clear_pga
= {
364 ARIZONA_OUTPUT_PATH_CONFIG_1L
+ output
* 4, 0x80
368 ret
= regmap_multi_reg_write_bypassed(arizona
->regmap
, &clear_pga
, 1);
370 dev_err(arizona
->dev
, "Failed to clear PGA (0x%x): %d\n",
376 static int wm5110_put_dre(struct snd_kcontrol
*kcontrol
,
377 struct snd_ctl_elem_value
*ucontrol
)
379 struct snd_soc_codec
*codec
= snd_soc_kcontrol_codec(kcontrol
);
380 struct snd_soc_dapm_context
*dapm
= snd_soc_codec_get_dapm(codec
);
381 struct arizona
*arizona
= dev_get_drvdata(codec
->dev
->parent
);
382 struct soc_mixer_control
*mc
=
383 (struct soc_mixer_control
*)kcontrol
->private_value
;
384 unsigned int ena
, dre
;
385 unsigned int mask
= (0x1 << mc
->shift
) | (0x1 << mc
->rshift
);
386 unsigned int lnew
= (!!ucontrol
->value
.integer
.value
[0]) << mc
->shift
;
387 unsigned int rnew
= (!!ucontrol
->value
.integer
.value
[1]) << mc
->rshift
;
388 unsigned int lold
, rold
;
389 unsigned int lena
, rena
;
392 snd_soc_dapm_mutex_lock(dapm
);
394 ret
= regmap_read(arizona
->regmap
, ARIZONA_OUTPUT_ENABLES_1
, &ena
);
396 dev_err(arizona
->dev
, "Failed to read output state: %d\n", ret
);
399 ret
= regmap_read(arizona
->regmap
, ARIZONA_DRE_ENABLE
, &dre
);
401 dev_err(arizona
->dev
, "Failed to read DRE state: %d\n", ret
);
405 lold
= dre
& (1 << mc
->shift
);
406 rold
= dre
& (1 << mc
->rshift
);
407 /* Enables are channel wise swapped from the DRE enables */
408 lena
= ena
& (1 << mc
->rshift
);
409 rena
= ena
& (1 << mc
->shift
);
411 if ((lena
&& lnew
!= lold
) || (rena
&& rnew
!= rold
)) {
412 dev_err(arizona
->dev
, "Can't change DRE on active outputs\n");
417 ret
= regmap_update_bits(arizona
->regmap
, ARIZONA_DRE_ENABLE
,
420 dev_err(arizona
->dev
, "Failed to set DRE: %d\n", ret
);
424 /* Force reset of PGA volumes, if turning DRE off */
426 wm5110_clear_pga_volume(arizona
, mc
->shift
);
429 wm5110_clear_pga_volume(arizona
, mc
->rshift
);
432 snd_soc_dapm_mutex_unlock(dapm
);
437 static int wm5110_in_pga_get(struct snd_kcontrol
*kcontrol
,
438 struct snd_ctl_elem_value
*ucontrol
)
440 struct snd_soc_codec
*codec
= snd_soc_kcontrol_codec(kcontrol
);
441 struct snd_soc_dapm_context
*dapm
= snd_soc_codec_get_dapm(codec
);
442 struct snd_soc_card
*card
= dapm
->card
;
446 * PGA Volume is also used as part of the enable sequence, so
447 * usage of it should be avoided whilst that is running.
449 mutex_lock_nested(&card
->dapm_mutex
, SND_SOC_DAPM_CLASS_RUNTIME
);
451 ret
= snd_soc_get_volsw_range(kcontrol
, ucontrol
);
453 mutex_unlock(&card
->dapm_mutex
);
458 static int wm5110_in_pga_put(struct snd_kcontrol
*kcontrol
,
459 struct snd_ctl_elem_value
*ucontrol
)
461 struct snd_soc_codec
*codec
= snd_soc_kcontrol_codec(kcontrol
);
462 struct snd_soc_dapm_context
*dapm
= snd_soc_codec_get_dapm(codec
);
463 struct snd_soc_card
*card
= dapm
->card
;
467 * PGA Volume is also used as part of the enable sequence, so
468 * usage of it should be avoided whilst that is running.
470 mutex_lock_nested(&card
->dapm_mutex
, SND_SOC_DAPM_CLASS_RUNTIME
);
472 ret
= snd_soc_put_volsw_range(kcontrol
, ucontrol
);
474 mutex_unlock(&card
->dapm_mutex
);
479 static int wm5110_in_analog_ev(struct snd_soc_dapm_widget
*w
,
480 struct snd_kcontrol
*kcontrol
, int event
)
482 struct snd_soc_codec
*codec
= snd_soc_dapm_to_codec(w
->dapm
);
483 struct arizona_priv
*priv
= snd_soc_codec_get_drvdata(codec
);
484 struct wm5110_priv
*wm5110
= snd_soc_codec_get_drvdata(codec
);
485 struct arizona
*arizona
= priv
->arizona
;
486 unsigned int reg
, mask
;
487 struct reg_sequence analog_seq
[] = {
493 reg
= ARIZONA_IN1L_CONTROL
+ ((w
->shift
^ 0x1) * 4);
494 mask
= ARIZONA_IN1L_PGA_VOL_MASK
;
497 case SND_SOC_DAPM_WILL_PMU
:
498 wm5110
->in_value
|= 0x3 << ((w
->shift
^ 0x1) * 2);
499 wm5110
->in_pre_pending
++;
500 wm5110
->in_post_pending
++;
502 case SND_SOC_DAPM_PRE_PMU
:
503 wm5110
->in_pga_cache
[w
->shift
] = snd_soc_read(codec
, reg
);
505 snd_soc_update_bits(codec
, reg
, mask
,
506 0x40 << ARIZONA_IN1L_PGA_VOL_SHIFT
);
508 wm5110
->in_pre_pending
--;
509 if (wm5110
->in_pre_pending
== 0) {
510 analog_seq
[1].def
= wm5110
->in_value
;
511 regmap_multi_reg_write_bypassed(arizona
->regmap
,
513 ARRAY_SIZE(analog_seq
));
517 wm5110
->in_value
= 0;
521 case SND_SOC_DAPM_POST_PMU
:
522 snd_soc_update_bits(codec
, reg
, mask
,
523 wm5110
->in_pga_cache
[w
->shift
]);
525 wm5110
->in_post_pending
--;
526 if (wm5110
->in_post_pending
== 0)
527 regmap_multi_reg_write_bypassed(arizona
->regmap
,
529 ARRAY_SIZE(analog_seq
));
538 static int wm5110_in_ev(struct snd_soc_dapm_widget
*w
,
539 struct snd_kcontrol
*kcontrol
, int event
)
541 struct snd_soc_codec
*codec
= snd_soc_dapm_to_codec(w
->dapm
);
542 struct arizona_priv
*priv
= snd_soc_codec_get_drvdata(codec
);
543 struct arizona
*arizona
= priv
->arizona
;
545 switch (arizona
->rev
) {
547 if (arizona_input_analog(codec
, w
->shift
))
548 wm5110_in_analog_ev(w
, kcontrol
, event
);
555 return arizona_in_ev(w
, kcontrol
, event
);
558 static DECLARE_TLV_DB_SCALE(ana_tlv
, 0, 100, 0);
559 static DECLARE_TLV_DB_SCALE(eq_tlv
, -1200, 100, 0);
560 static DECLARE_TLV_DB_SCALE(digital_tlv
, -6400, 50, 0);
561 static DECLARE_TLV_DB_SCALE(noise_tlv
, -13200, 600, 0);
562 static DECLARE_TLV_DB_SCALE(ng_tlv
, -10200, 600, 0);
564 #define WM5110_NG_SRC(name, base) \
565 SOC_SINGLE(name " NG HPOUT1L Switch", base, 0, 1, 0), \
566 SOC_SINGLE(name " NG HPOUT1R Switch", base, 1, 1, 0), \
567 SOC_SINGLE(name " NG HPOUT2L Switch", base, 2, 1, 0), \
568 SOC_SINGLE(name " NG HPOUT2R Switch", base, 3, 1, 0), \
569 SOC_SINGLE(name " NG HPOUT3L Switch", base, 4, 1, 0), \
570 SOC_SINGLE(name " NG HPOUT3R Switch", base, 5, 1, 0), \
571 SOC_SINGLE(name " NG SPKOUTL Switch", base, 6, 1, 0), \
572 SOC_SINGLE(name " NG SPKOUTR Switch", base, 7, 1, 0), \
573 SOC_SINGLE(name " NG SPKDAT1L Switch", base, 8, 1, 0), \
574 SOC_SINGLE(name " NG SPKDAT1R Switch", base, 9, 1, 0), \
575 SOC_SINGLE(name " NG SPKDAT2L Switch", base, 10, 1, 0), \
576 SOC_SINGLE(name " NG SPKDAT2R Switch", base, 11, 1, 0)
578 static const struct snd_kcontrol_new wm5110_snd_controls
[] = {
579 SOC_ENUM("IN1 OSR", arizona_in_dmic_osr
[0]),
580 SOC_ENUM("IN2 OSR", arizona_in_dmic_osr
[1]),
581 SOC_ENUM("IN3 OSR", arizona_in_dmic_osr
[2]),
582 SOC_ENUM("IN4 OSR", arizona_in_dmic_osr
[3]),
584 SOC_SINGLE_RANGE_EXT_TLV("IN1L Volume", ARIZONA_IN1L_CONTROL
,
585 ARIZONA_IN1L_PGA_VOL_SHIFT
, 0x40, 0x5f, 0,
586 wm5110_in_pga_get
, wm5110_in_pga_put
, ana_tlv
),
587 SOC_SINGLE_RANGE_EXT_TLV("IN1R Volume", ARIZONA_IN1R_CONTROL
,
588 ARIZONA_IN1R_PGA_VOL_SHIFT
, 0x40, 0x5f, 0,
589 wm5110_in_pga_get
, wm5110_in_pga_put
, ana_tlv
),
590 SOC_SINGLE_RANGE_EXT_TLV("IN2L Volume", ARIZONA_IN2L_CONTROL
,
591 ARIZONA_IN2L_PGA_VOL_SHIFT
, 0x40, 0x5f, 0,
592 wm5110_in_pga_get
, wm5110_in_pga_put
, ana_tlv
),
593 SOC_SINGLE_RANGE_EXT_TLV("IN2R Volume", ARIZONA_IN2R_CONTROL
,
594 ARIZONA_IN2R_PGA_VOL_SHIFT
, 0x40, 0x5f, 0,
595 wm5110_in_pga_get
, wm5110_in_pga_put
, ana_tlv
),
596 SOC_SINGLE_RANGE_EXT_TLV("IN3L Volume", ARIZONA_IN3L_CONTROL
,
597 ARIZONA_IN3L_PGA_VOL_SHIFT
, 0x40, 0x5f, 0,
598 wm5110_in_pga_get
, wm5110_in_pga_put
, ana_tlv
),
599 SOC_SINGLE_RANGE_EXT_TLV("IN3R Volume", ARIZONA_IN3R_CONTROL
,
600 ARIZONA_IN3R_PGA_VOL_SHIFT
, 0x40, 0x5f, 0,
601 wm5110_in_pga_get
, wm5110_in_pga_put
, ana_tlv
),
603 SOC_ENUM("IN HPF Cutoff Frequency", arizona_in_hpf_cut_enum
),
605 SOC_SINGLE("IN1L HPF Switch", ARIZONA_IN1L_CONTROL
,
606 ARIZONA_IN1L_HPF_SHIFT
, 1, 0),
607 SOC_SINGLE("IN1R HPF Switch", ARIZONA_IN1R_CONTROL
,
608 ARIZONA_IN1R_HPF_SHIFT
, 1, 0),
609 SOC_SINGLE("IN2L HPF Switch", ARIZONA_IN2L_CONTROL
,
610 ARIZONA_IN2L_HPF_SHIFT
, 1, 0),
611 SOC_SINGLE("IN2R HPF Switch", ARIZONA_IN2R_CONTROL
,
612 ARIZONA_IN2R_HPF_SHIFT
, 1, 0),
613 SOC_SINGLE("IN3L HPF Switch", ARIZONA_IN3L_CONTROL
,
614 ARIZONA_IN3L_HPF_SHIFT
, 1, 0),
615 SOC_SINGLE("IN3R HPF Switch", ARIZONA_IN3R_CONTROL
,
616 ARIZONA_IN3R_HPF_SHIFT
, 1, 0),
617 SOC_SINGLE("IN4L HPF Switch", ARIZONA_IN4L_CONTROL
,
618 ARIZONA_IN4L_HPF_SHIFT
, 1, 0),
619 SOC_SINGLE("IN4R HPF Switch", ARIZONA_IN4R_CONTROL
,
620 ARIZONA_IN4R_HPF_SHIFT
, 1, 0),
622 SOC_SINGLE_TLV("IN1L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_1L
,
623 ARIZONA_IN1L_DIG_VOL_SHIFT
, 0xbf, 0, digital_tlv
),
624 SOC_SINGLE_TLV("IN1R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_1R
,
625 ARIZONA_IN1R_DIG_VOL_SHIFT
, 0xbf, 0, digital_tlv
),
626 SOC_SINGLE_TLV("IN2L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_2L
,
627 ARIZONA_IN2L_DIG_VOL_SHIFT
, 0xbf, 0, digital_tlv
),
628 SOC_SINGLE_TLV("IN2R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_2R
,
629 ARIZONA_IN2R_DIG_VOL_SHIFT
, 0xbf, 0, digital_tlv
),
630 SOC_SINGLE_TLV("IN3L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_3L
,
631 ARIZONA_IN3L_DIG_VOL_SHIFT
, 0xbf, 0, digital_tlv
),
632 SOC_SINGLE_TLV("IN3R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_3R
,
633 ARIZONA_IN3R_DIG_VOL_SHIFT
, 0xbf, 0, digital_tlv
),
634 SOC_SINGLE_TLV("IN4L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_4L
,
635 ARIZONA_IN4L_DIG_VOL_SHIFT
, 0xbf, 0, digital_tlv
),
636 SOC_SINGLE_TLV("IN4R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_4R
,
637 ARIZONA_IN4R_DIG_VOL_SHIFT
, 0xbf, 0, digital_tlv
),
639 SOC_ENUM("Input Ramp Up", arizona_in_vi_ramp
),
640 SOC_ENUM("Input Ramp Down", arizona_in_vd_ramp
),
642 ARIZONA_MIXER_CONTROLS("EQ1", ARIZONA_EQ1MIX_INPUT_1_SOURCE
),
643 ARIZONA_MIXER_CONTROLS("EQ2", ARIZONA_EQ2MIX_INPUT_1_SOURCE
),
644 ARIZONA_MIXER_CONTROLS("EQ3", ARIZONA_EQ3MIX_INPUT_1_SOURCE
),
645 ARIZONA_MIXER_CONTROLS("EQ4", ARIZONA_EQ4MIX_INPUT_1_SOURCE
),
647 ARIZONA_EQ_CONTROL("EQ1 Coefficients", ARIZONA_EQ1_2
),
648 SOC_SINGLE_TLV("EQ1 B1 Volume", ARIZONA_EQ1_1
, ARIZONA_EQ1_B1_GAIN_SHIFT
,
650 SOC_SINGLE_TLV("EQ1 B2 Volume", ARIZONA_EQ1_1
, ARIZONA_EQ1_B2_GAIN_SHIFT
,
652 SOC_SINGLE_TLV("EQ1 B3 Volume", ARIZONA_EQ1_1
, ARIZONA_EQ1_B3_GAIN_SHIFT
,
654 SOC_SINGLE_TLV("EQ1 B4 Volume", ARIZONA_EQ1_2
, ARIZONA_EQ1_B4_GAIN_SHIFT
,
656 SOC_SINGLE_TLV("EQ1 B5 Volume", ARIZONA_EQ1_2
, ARIZONA_EQ1_B5_GAIN_SHIFT
,
659 ARIZONA_EQ_CONTROL("EQ2 Coefficients", ARIZONA_EQ2_2
),
660 SOC_SINGLE_TLV("EQ2 B1 Volume", ARIZONA_EQ2_1
, ARIZONA_EQ2_B1_GAIN_SHIFT
,
662 SOC_SINGLE_TLV("EQ2 B2 Volume", ARIZONA_EQ2_1
, ARIZONA_EQ2_B2_GAIN_SHIFT
,
664 SOC_SINGLE_TLV("EQ2 B3 Volume", ARIZONA_EQ2_1
, ARIZONA_EQ2_B3_GAIN_SHIFT
,
666 SOC_SINGLE_TLV("EQ2 B4 Volume", ARIZONA_EQ2_2
, ARIZONA_EQ2_B4_GAIN_SHIFT
,
668 SOC_SINGLE_TLV("EQ2 B5 Volume", ARIZONA_EQ2_2
, ARIZONA_EQ2_B5_GAIN_SHIFT
,
671 ARIZONA_EQ_CONTROL("EQ3 Coefficients", ARIZONA_EQ3_2
),
672 SOC_SINGLE_TLV("EQ3 B1 Volume", ARIZONA_EQ3_1
, ARIZONA_EQ3_B1_GAIN_SHIFT
,
674 SOC_SINGLE_TLV("EQ3 B2 Volume", ARIZONA_EQ3_1
, ARIZONA_EQ3_B2_GAIN_SHIFT
,
676 SOC_SINGLE_TLV("EQ3 B3 Volume", ARIZONA_EQ3_1
, ARIZONA_EQ3_B3_GAIN_SHIFT
,
678 SOC_SINGLE_TLV("EQ3 B4 Volume", ARIZONA_EQ3_2
, ARIZONA_EQ3_B4_GAIN_SHIFT
,
680 SOC_SINGLE_TLV("EQ3 B5 Volume", ARIZONA_EQ3_2
, ARIZONA_EQ3_B5_GAIN_SHIFT
,
683 ARIZONA_EQ_CONTROL("EQ4 Coefficients", ARIZONA_EQ4_2
),
684 SOC_SINGLE_TLV("EQ4 B1 Volume", ARIZONA_EQ4_1
, ARIZONA_EQ4_B1_GAIN_SHIFT
,
686 SOC_SINGLE_TLV("EQ4 B2 Volume", ARIZONA_EQ4_1
, ARIZONA_EQ4_B2_GAIN_SHIFT
,
688 SOC_SINGLE_TLV("EQ4 B3 Volume", ARIZONA_EQ4_1
, ARIZONA_EQ4_B3_GAIN_SHIFT
,
690 SOC_SINGLE_TLV("EQ4 B4 Volume", ARIZONA_EQ4_2
, ARIZONA_EQ4_B4_GAIN_SHIFT
,
692 SOC_SINGLE_TLV("EQ4 B5 Volume", ARIZONA_EQ4_2
, ARIZONA_EQ4_B5_GAIN_SHIFT
,
695 ARIZONA_MIXER_CONTROLS("DRC1L", ARIZONA_DRC1LMIX_INPUT_1_SOURCE
),
696 ARIZONA_MIXER_CONTROLS("DRC1R", ARIZONA_DRC1RMIX_INPUT_1_SOURCE
),
697 ARIZONA_MIXER_CONTROLS("DRC2L", ARIZONA_DRC2LMIX_INPUT_1_SOURCE
),
698 ARIZONA_MIXER_CONTROLS("DRC2R", ARIZONA_DRC2RMIX_INPUT_1_SOURCE
),
700 SND_SOC_BYTES_MASK("DRC1", ARIZONA_DRC1_CTRL1
, 5,
701 ARIZONA_DRC1R_ENA
| ARIZONA_DRC1L_ENA
),
702 SND_SOC_BYTES_MASK("DRC2", ARIZONA_DRC2_CTRL1
, 5,
703 ARIZONA_DRC2R_ENA
| ARIZONA_DRC2L_ENA
),
705 ARIZONA_MIXER_CONTROLS("LHPF1", ARIZONA_HPLP1MIX_INPUT_1_SOURCE
),
706 ARIZONA_MIXER_CONTROLS("LHPF2", ARIZONA_HPLP2MIX_INPUT_1_SOURCE
),
707 ARIZONA_MIXER_CONTROLS("LHPF3", ARIZONA_HPLP3MIX_INPUT_1_SOURCE
),
708 ARIZONA_MIXER_CONTROLS("LHPF4", ARIZONA_HPLP4MIX_INPUT_1_SOURCE
),
710 ARIZONA_LHPF_CONTROL("LHPF1 Coefficients", ARIZONA_HPLPF1_2
),
711 ARIZONA_LHPF_CONTROL("LHPF2 Coefficients", ARIZONA_HPLPF2_2
),
712 ARIZONA_LHPF_CONTROL("LHPF3 Coefficients", ARIZONA_HPLPF3_2
),
713 ARIZONA_LHPF_CONTROL("LHPF4 Coefficients", ARIZONA_HPLPF4_2
),
715 SOC_ENUM("LHPF1 Mode", arizona_lhpf1_mode
),
716 SOC_ENUM("LHPF2 Mode", arizona_lhpf2_mode
),
717 SOC_ENUM("LHPF3 Mode", arizona_lhpf3_mode
),
718 SOC_ENUM("LHPF4 Mode", arizona_lhpf4_mode
),
720 SOC_ENUM("ISRC1 FSL", arizona_isrc_fsl
[0]),
721 SOC_ENUM("ISRC2 FSL", arizona_isrc_fsl
[1]),
722 SOC_ENUM("ISRC3 FSL", arizona_isrc_fsl
[2]),
723 SOC_ENUM("ISRC1 FSH", arizona_isrc_fsh
[0]),
724 SOC_ENUM("ISRC2 FSH", arizona_isrc_fsh
[1]),
725 SOC_ENUM("ISRC3 FSH", arizona_isrc_fsh
[2]),
726 SOC_ENUM("ASRC RATE 1", arizona_asrc_rate1
),
728 ARIZONA_MIXER_CONTROLS("DSP1L", ARIZONA_DSP1LMIX_INPUT_1_SOURCE
),
729 ARIZONA_MIXER_CONTROLS("DSP1R", ARIZONA_DSP1RMIX_INPUT_1_SOURCE
),
730 ARIZONA_MIXER_CONTROLS("DSP2L", ARIZONA_DSP2LMIX_INPUT_1_SOURCE
),
731 ARIZONA_MIXER_CONTROLS("DSP2R", ARIZONA_DSP2RMIX_INPUT_1_SOURCE
),
732 ARIZONA_MIXER_CONTROLS("DSP3L", ARIZONA_DSP3LMIX_INPUT_1_SOURCE
),
733 ARIZONA_MIXER_CONTROLS("DSP3R", ARIZONA_DSP3RMIX_INPUT_1_SOURCE
),
734 ARIZONA_MIXER_CONTROLS("DSP4L", ARIZONA_DSP4LMIX_INPUT_1_SOURCE
),
735 ARIZONA_MIXER_CONTROLS("DSP4R", ARIZONA_DSP4RMIX_INPUT_1_SOURCE
),
737 ARIZONA_MIXER_CONTROLS("Mic", ARIZONA_MICMIX_INPUT_1_SOURCE
),
738 ARIZONA_MIXER_CONTROLS("Noise", ARIZONA_NOISEMIX_INPUT_1_SOURCE
),
740 SOC_SINGLE_TLV("Noise Generator Volume", ARIZONA_COMFORT_NOISE_GENERATOR
,
741 ARIZONA_NOISE_GEN_GAIN_SHIFT
, 0x16, 0, noise_tlv
),
743 ARIZONA_MIXER_CONTROLS("HPOUT1L", ARIZONA_OUT1LMIX_INPUT_1_SOURCE
),
744 ARIZONA_MIXER_CONTROLS("HPOUT1R", ARIZONA_OUT1RMIX_INPUT_1_SOURCE
),
745 ARIZONA_MIXER_CONTROLS("HPOUT2L", ARIZONA_OUT2LMIX_INPUT_1_SOURCE
),
746 ARIZONA_MIXER_CONTROLS("HPOUT2R", ARIZONA_OUT2RMIX_INPUT_1_SOURCE
),
747 ARIZONA_MIXER_CONTROLS("HPOUT3L", ARIZONA_OUT3LMIX_INPUT_1_SOURCE
),
748 ARIZONA_MIXER_CONTROLS("HPOUT3R", ARIZONA_OUT3RMIX_INPUT_1_SOURCE
),
749 ARIZONA_MIXER_CONTROLS("SPKOUTL", ARIZONA_OUT4LMIX_INPUT_1_SOURCE
),
750 ARIZONA_MIXER_CONTROLS("SPKOUTR", ARIZONA_OUT4RMIX_INPUT_1_SOURCE
),
751 ARIZONA_MIXER_CONTROLS("SPKDAT1L", ARIZONA_OUT5LMIX_INPUT_1_SOURCE
),
752 ARIZONA_MIXER_CONTROLS("SPKDAT1R", ARIZONA_OUT5RMIX_INPUT_1_SOURCE
),
753 ARIZONA_MIXER_CONTROLS("SPKDAT2L", ARIZONA_OUT6LMIX_INPUT_1_SOURCE
),
754 ARIZONA_MIXER_CONTROLS("SPKDAT2R", ARIZONA_OUT6RMIX_INPUT_1_SOURCE
),
756 SOC_SINGLE("HPOUT1 SC Protect Switch", ARIZONA_HP1_SHORT_CIRCUIT_CTRL
,
757 ARIZONA_HP1_SC_ENA_SHIFT
, 1, 0),
758 SOC_SINGLE("HPOUT2 SC Protect Switch", ARIZONA_HP2_SHORT_CIRCUIT_CTRL
,
759 ARIZONA_HP2_SC_ENA_SHIFT
, 1, 0),
760 SOC_SINGLE("HPOUT3 SC Protect Switch", ARIZONA_HP3_SHORT_CIRCUIT_CTRL
,
761 ARIZONA_HP3_SC_ENA_SHIFT
, 1, 0),
763 SOC_SINGLE("SPKDAT1 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_5L
,
764 ARIZONA_OUT5_OSR_SHIFT
, 1, 0),
765 SOC_SINGLE("SPKDAT2 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_6L
,
766 ARIZONA_OUT6_OSR_SHIFT
, 1, 0),
768 SOC_DOUBLE_R("HPOUT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_1L
,
769 ARIZONA_DAC_DIGITAL_VOLUME_1R
, ARIZONA_OUT1L_MUTE_SHIFT
, 1, 1),
770 SOC_DOUBLE_R("HPOUT2 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_2L
,
771 ARIZONA_DAC_DIGITAL_VOLUME_2R
, ARIZONA_OUT2L_MUTE_SHIFT
, 1, 1),
772 SOC_DOUBLE_R("HPOUT3 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_3L
,
773 ARIZONA_DAC_DIGITAL_VOLUME_3R
, ARIZONA_OUT3L_MUTE_SHIFT
, 1, 1),
774 SOC_DOUBLE_R("Speaker Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_4L
,
775 ARIZONA_DAC_DIGITAL_VOLUME_4R
, ARIZONA_OUT4L_MUTE_SHIFT
, 1, 1),
776 SOC_DOUBLE_R("SPKDAT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_5L
,
777 ARIZONA_DAC_DIGITAL_VOLUME_5R
, ARIZONA_OUT5L_MUTE_SHIFT
, 1, 1),
778 SOC_DOUBLE_R("SPKDAT2 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_6L
,
779 ARIZONA_DAC_DIGITAL_VOLUME_6R
, ARIZONA_OUT6L_MUTE_SHIFT
, 1, 1),
781 SOC_DOUBLE_R_TLV("HPOUT1 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_1L
,
782 ARIZONA_DAC_DIGITAL_VOLUME_1R
, ARIZONA_OUT1L_VOL_SHIFT
,
783 0xbf, 0, digital_tlv
),
784 SOC_DOUBLE_R_TLV("HPOUT2 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_2L
,
785 ARIZONA_DAC_DIGITAL_VOLUME_2R
, ARIZONA_OUT2L_VOL_SHIFT
,
786 0xbf, 0, digital_tlv
),
787 SOC_DOUBLE_R_TLV("HPOUT3 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_3L
,
788 ARIZONA_DAC_DIGITAL_VOLUME_3R
, ARIZONA_OUT3L_VOL_SHIFT
,
789 0xbf, 0, digital_tlv
),
790 SOC_DOUBLE_R_TLV("Speaker Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_4L
,
791 ARIZONA_DAC_DIGITAL_VOLUME_4R
, ARIZONA_OUT4L_VOL_SHIFT
,
792 0xbf, 0, digital_tlv
),
793 SOC_DOUBLE_R_TLV("SPKDAT1 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_5L
,
794 ARIZONA_DAC_DIGITAL_VOLUME_5R
, ARIZONA_OUT5L_VOL_SHIFT
,
795 0xbf, 0, digital_tlv
),
796 SOC_DOUBLE_R_TLV("SPKDAT2 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_6L
,
797 ARIZONA_DAC_DIGITAL_VOLUME_6R
, ARIZONA_OUT6L_VOL_SHIFT
,
798 0xbf, 0, digital_tlv
),
800 SOC_DOUBLE("SPKDAT1 Switch", ARIZONA_PDM_SPK1_CTRL_1
, ARIZONA_SPK1L_MUTE_SHIFT
,
801 ARIZONA_SPK1R_MUTE_SHIFT
, 1, 1),
802 SOC_DOUBLE("SPKDAT2 Switch", ARIZONA_PDM_SPK2_CTRL_1
, ARIZONA_SPK2L_MUTE_SHIFT
,
803 ARIZONA_SPK2R_MUTE_SHIFT
, 1, 1),
805 SOC_DOUBLE_EXT("HPOUT1 DRE Switch", ARIZONA_DRE_ENABLE
,
806 ARIZONA_DRE1L_ENA_SHIFT
, ARIZONA_DRE1R_ENA_SHIFT
, 1, 0,
807 snd_soc_get_volsw
, wm5110_put_dre
),
808 SOC_DOUBLE_EXT("HPOUT2 DRE Switch", ARIZONA_DRE_ENABLE
,
809 ARIZONA_DRE2L_ENA_SHIFT
, ARIZONA_DRE2R_ENA_SHIFT
, 1, 0,
810 snd_soc_get_volsw
, wm5110_put_dre
),
811 SOC_DOUBLE_EXT("HPOUT3 DRE Switch", ARIZONA_DRE_ENABLE
,
812 ARIZONA_DRE3L_ENA_SHIFT
, ARIZONA_DRE3R_ENA_SHIFT
, 1, 0,
813 snd_soc_get_volsw
, wm5110_put_dre
),
815 SOC_ENUM("Output Ramp Up", arizona_out_vi_ramp
),
816 SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp
),
818 SOC_SINGLE("Noise Gate Switch", ARIZONA_NOISE_GATE_CONTROL
,
819 ARIZONA_NGATE_ENA_SHIFT
, 1, 0),
820 SOC_SINGLE_TLV("Noise Gate Threshold Volume", ARIZONA_NOISE_GATE_CONTROL
,
821 ARIZONA_NGATE_THR_SHIFT
, 7, 1, ng_tlv
),
822 SOC_ENUM("Noise Gate Hold", arizona_ng_hold
),
824 WM5110_NG_SRC("HPOUT1L", ARIZONA_NOISE_GATE_SELECT_1L
),
825 WM5110_NG_SRC("HPOUT1R", ARIZONA_NOISE_GATE_SELECT_1R
),
826 WM5110_NG_SRC("HPOUT2L", ARIZONA_NOISE_GATE_SELECT_2L
),
827 WM5110_NG_SRC("HPOUT2R", ARIZONA_NOISE_GATE_SELECT_2R
),
828 WM5110_NG_SRC("HPOUT3L", ARIZONA_NOISE_GATE_SELECT_3L
),
829 WM5110_NG_SRC("HPOUT3R", ARIZONA_NOISE_GATE_SELECT_3R
),
830 WM5110_NG_SRC("SPKOUTL", ARIZONA_NOISE_GATE_SELECT_4L
),
831 WM5110_NG_SRC("SPKOUTR", ARIZONA_NOISE_GATE_SELECT_4R
),
832 WM5110_NG_SRC("SPKDAT1L", ARIZONA_NOISE_GATE_SELECT_5L
),
833 WM5110_NG_SRC("SPKDAT1R", ARIZONA_NOISE_GATE_SELECT_5R
),
834 WM5110_NG_SRC("SPKDAT2L", ARIZONA_NOISE_GATE_SELECT_6L
),
835 WM5110_NG_SRC("SPKDAT2R", ARIZONA_NOISE_GATE_SELECT_6R
),
837 ARIZONA_MIXER_CONTROLS("AIF1TX1", ARIZONA_AIF1TX1MIX_INPUT_1_SOURCE
),
838 ARIZONA_MIXER_CONTROLS("AIF1TX2", ARIZONA_AIF1TX2MIX_INPUT_1_SOURCE
),
839 ARIZONA_MIXER_CONTROLS("AIF1TX3", ARIZONA_AIF1TX3MIX_INPUT_1_SOURCE
),
840 ARIZONA_MIXER_CONTROLS("AIF1TX4", ARIZONA_AIF1TX4MIX_INPUT_1_SOURCE
),
841 ARIZONA_MIXER_CONTROLS("AIF1TX5", ARIZONA_AIF1TX5MIX_INPUT_1_SOURCE
),
842 ARIZONA_MIXER_CONTROLS("AIF1TX6", ARIZONA_AIF1TX6MIX_INPUT_1_SOURCE
),
843 ARIZONA_MIXER_CONTROLS("AIF1TX7", ARIZONA_AIF1TX7MIX_INPUT_1_SOURCE
),
844 ARIZONA_MIXER_CONTROLS("AIF1TX8", ARIZONA_AIF1TX8MIX_INPUT_1_SOURCE
),
846 ARIZONA_MIXER_CONTROLS("AIF2TX1", ARIZONA_AIF2TX1MIX_INPUT_1_SOURCE
),
847 ARIZONA_MIXER_CONTROLS("AIF2TX2", ARIZONA_AIF2TX2MIX_INPUT_1_SOURCE
),
848 ARIZONA_MIXER_CONTROLS("AIF2TX3", ARIZONA_AIF2TX3MIX_INPUT_1_SOURCE
),
849 ARIZONA_MIXER_CONTROLS("AIF2TX4", ARIZONA_AIF2TX4MIX_INPUT_1_SOURCE
),
850 ARIZONA_MIXER_CONTROLS("AIF2TX5", ARIZONA_AIF2TX5MIX_INPUT_1_SOURCE
),
851 ARIZONA_MIXER_CONTROLS("AIF2TX6", ARIZONA_AIF2TX6MIX_INPUT_1_SOURCE
),
853 ARIZONA_MIXER_CONTROLS("AIF3TX1", ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE
),
854 ARIZONA_MIXER_CONTROLS("AIF3TX2", ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE
),
856 ARIZONA_MIXER_CONTROLS("SLIMTX1", ARIZONA_SLIMTX1MIX_INPUT_1_SOURCE
),
857 ARIZONA_MIXER_CONTROLS("SLIMTX2", ARIZONA_SLIMTX2MIX_INPUT_1_SOURCE
),
858 ARIZONA_MIXER_CONTROLS("SLIMTX3", ARIZONA_SLIMTX3MIX_INPUT_1_SOURCE
),
859 ARIZONA_MIXER_CONTROLS("SLIMTX4", ARIZONA_SLIMTX4MIX_INPUT_1_SOURCE
),
860 ARIZONA_MIXER_CONTROLS("SLIMTX5", ARIZONA_SLIMTX5MIX_INPUT_1_SOURCE
),
861 ARIZONA_MIXER_CONTROLS("SLIMTX6", ARIZONA_SLIMTX6MIX_INPUT_1_SOURCE
),
862 ARIZONA_MIXER_CONTROLS("SLIMTX7", ARIZONA_SLIMTX7MIX_INPUT_1_SOURCE
),
863 ARIZONA_MIXER_CONTROLS("SLIMTX8", ARIZONA_SLIMTX8MIX_INPUT_1_SOURCE
),
866 ARIZONA_MIXER_ENUMS(EQ1
, ARIZONA_EQ1MIX_INPUT_1_SOURCE
);
867 ARIZONA_MIXER_ENUMS(EQ2
, ARIZONA_EQ2MIX_INPUT_1_SOURCE
);
868 ARIZONA_MIXER_ENUMS(EQ3
, ARIZONA_EQ3MIX_INPUT_1_SOURCE
);
869 ARIZONA_MIXER_ENUMS(EQ4
, ARIZONA_EQ4MIX_INPUT_1_SOURCE
);
871 ARIZONA_MIXER_ENUMS(DRC1L
, ARIZONA_DRC1LMIX_INPUT_1_SOURCE
);
872 ARIZONA_MIXER_ENUMS(DRC1R
, ARIZONA_DRC1RMIX_INPUT_1_SOURCE
);
873 ARIZONA_MIXER_ENUMS(DRC2L
, ARIZONA_DRC2LMIX_INPUT_1_SOURCE
);
874 ARIZONA_MIXER_ENUMS(DRC2R
, ARIZONA_DRC2RMIX_INPUT_1_SOURCE
);
876 ARIZONA_MIXER_ENUMS(LHPF1
, ARIZONA_HPLP1MIX_INPUT_1_SOURCE
);
877 ARIZONA_MIXER_ENUMS(LHPF2
, ARIZONA_HPLP2MIX_INPUT_1_SOURCE
);
878 ARIZONA_MIXER_ENUMS(LHPF3
, ARIZONA_HPLP3MIX_INPUT_1_SOURCE
);
879 ARIZONA_MIXER_ENUMS(LHPF4
, ARIZONA_HPLP4MIX_INPUT_1_SOURCE
);
881 ARIZONA_MIXER_ENUMS(DSP1L
, ARIZONA_DSP1LMIX_INPUT_1_SOURCE
);
882 ARIZONA_MIXER_ENUMS(DSP1R
, ARIZONA_DSP1RMIX_INPUT_1_SOURCE
);
883 ARIZONA_DSP_AUX_ENUMS(DSP1
, ARIZONA_DSP1AUX1MIX_INPUT_1_SOURCE
);
885 ARIZONA_MIXER_ENUMS(DSP2L
, ARIZONA_DSP2LMIX_INPUT_1_SOURCE
);
886 ARIZONA_MIXER_ENUMS(DSP2R
, ARIZONA_DSP2RMIX_INPUT_1_SOURCE
);
887 ARIZONA_DSP_AUX_ENUMS(DSP2
, ARIZONA_DSP2AUX1MIX_INPUT_1_SOURCE
);
889 ARIZONA_MIXER_ENUMS(DSP3L
, ARIZONA_DSP3LMIX_INPUT_1_SOURCE
);
890 ARIZONA_MIXER_ENUMS(DSP3R
, ARIZONA_DSP3RMIX_INPUT_1_SOURCE
);
891 ARIZONA_DSP_AUX_ENUMS(DSP3
, ARIZONA_DSP3AUX1MIX_INPUT_1_SOURCE
);
893 ARIZONA_MIXER_ENUMS(DSP4L
, ARIZONA_DSP4LMIX_INPUT_1_SOURCE
);
894 ARIZONA_MIXER_ENUMS(DSP4R
, ARIZONA_DSP4RMIX_INPUT_1_SOURCE
);
895 ARIZONA_DSP_AUX_ENUMS(DSP4
, ARIZONA_DSP4AUX1MIX_INPUT_1_SOURCE
);
897 ARIZONA_MIXER_ENUMS(Mic
, ARIZONA_MICMIX_INPUT_1_SOURCE
);
898 ARIZONA_MIXER_ENUMS(Noise
, ARIZONA_NOISEMIX_INPUT_1_SOURCE
);
900 ARIZONA_MIXER_ENUMS(PWM1
, ARIZONA_PWM1MIX_INPUT_1_SOURCE
);
901 ARIZONA_MIXER_ENUMS(PWM2
, ARIZONA_PWM2MIX_INPUT_1_SOURCE
);
903 ARIZONA_MIXER_ENUMS(OUT1L
, ARIZONA_OUT1LMIX_INPUT_1_SOURCE
);
904 ARIZONA_MIXER_ENUMS(OUT1R
, ARIZONA_OUT1RMIX_INPUT_1_SOURCE
);
905 ARIZONA_MIXER_ENUMS(OUT2L
, ARIZONA_OUT2LMIX_INPUT_1_SOURCE
);
906 ARIZONA_MIXER_ENUMS(OUT2R
, ARIZONA_OUT2RMIX_INPUT_1_SOURCE
);
907 ARIZONA_MIXER_ENUMS(OUT3L
, ARIZONA_OUT3LMIX_INPUT_1_SOURCE
);
908 ARIZONA_MIXER_ENUMS(OUT3R
, ARIZONA_OUT3RMIX_INPUT_1_SOURCE
);
909 ARIZONA_MIXER_ENUMS(SPKOUTL
, ARIZONA_OUT4LMIX_INPUT_1_SOURCE
);
910 ARIZONA_MIXER_ENUMS(SPKOUTR
, ARIZONA_OUT4RMIX_INPUT_1_SOURCE
);
911 ARIZONA_MIXER_ENUMS(SPKDAT1L
, ARIZONA_OUT5LMIX_INPUT_1_SOURCE
);
912 ARIZONA_MIXER_ENUMS(SPKDAT1R
, ARIZONA_OUT5RMIX_INPUT_1_SOURCE
);
913 ARIZONA_MIXER_ENUMS(SPKDAT2L
, ARIZONA_OUT6LMIX_INPUT_1_SOURCE
);
914 ARIZONA_MIXER_ENUMS(SPKDAT2R
, ARIZONA_OUT6RMIX_INPUT_1_SOURCE
);
916 ARIZONA_MIXER_ENUMS(AIF1TX1
, ARIZONA_AIF1TX1MIX_INPUT_1_SOURCE
);
917 ARIZONA_MIXER_ENUMS(AIF1TX2
, ARIZONA_AIF1TX2MIX_INPUT_1_SOURCE
);
918 ARIZONA_MIXER_ENUMS(AIF1TX3
, ARIZONA_AIF1TX3MIX_INPUT_1_SOURCE
);
919 ARIZONA_MIXER_ENUMS(AIF1TX4
, ARIZONA_AIF1TX4MIX_INPUT_1_SOURCE
);
920 ARIZONA_MIXER_ENUMS(AIF1TX5
, ARIZONA_AIF1TX5MIX_INPUT_1_SOURCE
);
921 ARIZONA_MIXER_ENUMS(AIF1TX6
, ARIZONA_AIF1TX6MIX_INPUT_1_SOURCE
);
922 ARIZONA_MIXER_ENUMS(AIF1TX7
, ARIZONA_AIF1TX7MIX_INPUT_1_SOURCE
);
923 ARIZONA_MIXER_ENUMS(AIF1TX8
, ARIZONA_AIF1TX8MIX_INPUT_1_SOURCE
);
925 ARIZONA_MIXER_ENUMS(AIF2TX1
, ARIZONA_AIF2TX1MIX_INPUT_1_SOURCE
);
926 ARIZONA_MIXER_ENUMS(AIF2TX2
, ARIZONA_AIF2TX2MIX_INPUT_1_SOURCE
);
927 ARIZONA_MIXER_ENUMS(AIF2TX3
, ARIZONA_AIF2TX3MIX_INPUT_1_SOURCE
);
928 ARIZONA_MIXER_ENUMS(AIF2TX4
, ARIZONA_AIF2TX4MIX_INPUT_1_SOURCE
);
929 ARIZONA_MIXER_ENUMS(AIF2TX5
, ARIZONA_AIF2TX5MIX_INPUT_1_SOURCE
);
930 ARIZONA_MIXER_ENUMS(AIF2TX6
, ARIZONA_AIF2TX6MIX_INPUT_1_SOURCE
);
932 ARIZONA_MIXER_ENUMS(AIF3TX1
, ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE
);
933 ARIZONA_MIXER_ENUMS(AIF3TX2
, ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE
);
935 ARIZONA_MIXER_ENUMS(SLIMTX1
, ARIZONA_SLIMTX1MIX_INPUT_1_SOURCE
);
936 ARIZONA_MIXER_ENUMS(SLIMTX2
, ARIZONA_SLIMTX2MIX_INPUT_1_SOURCE
);
937 ARIZONA_MIXER_ENUMS(SLIMTX3
, ARIZONA_SLIMTX3MIX_INPUT_1_SOURCE
);
938 ARIZONA_MIXER_ENUMS(SLIMTX4
, ARIZONA_SLIMTX4MIX_INPUT_1_SOURCE
);
939 ARIZONA_MIXER_ENUMS(SLIMTX5
, ARIZONA_SLIMTX5MIX_INPUT_1_SOURCE
);
940 ARIZONA_MIXER_ENUMS(SLIMTX6
, ARIZONA_SLIMTX6MIX_INPUT_1_SOURCE
);
941 ARIZONA_MIXER_ENUMS(SLIMTX7
, ARIZONA_SLIMTX7MIX_INPUT_1_SOURCE
);
942 ARIZONA_MIXER_ENUMS(SLIMTX8
, ARIZONA_SLIMTX8MIX_INPUT_1_SOURCE
);
944 ARIZONA_MUX_ENUMS(ASRC1L
, ARIZONA_ASRC1LMIX_INPUT_1_SOURCE
);
945 ARIZONA_MUX_ENUMS(ASRC1R
, ARIZONA_ASRC1RMIX_INPUT_1_SOURCE
);
946 ARIZONA_MUX_ENUMS(ASRC2L
, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE
);
947 ARIZONA_MUX_ENUMS(ASRC2R
, ARIZONA_ASRC2RMIX_INPUT_1_SOURCE
);
949 ARIZONA_MUX_ENUMS(ISRC1INT1
, ARIZONA_ISRC1INT1MIX_INPUT_1_SOURCE
);
950 ARIZONA_MUX_ENUMS(ISRC1INT2
, ARIZONA_ISRC1INT2MIX_INPUT_1_SOURCE
);
951 ARIZONA_MUX_ENUMS(ISRC1INT3
, ARIZONA_ISRC1INT3MIX_INPUT_1_SOURCE
);
952 ARIZONA_MUX_ENUMS(ISRC1INT4
, ARIZONA_ISRC1INT4MIX_INPUT_1_SOURCE
);
954 ARIZONA_MUX_ENUMS(ISRC1DEC1
, ARIZONA_ISRC1DEC1MIX_INPUT_1_SOURCE
);
955 ARIZONA_MUX_ENUMS(ISRC1DEC2
, ARIZONA_ISRC1DEC2MIX_INPUT_1_SOURCE
);
956 ARIZONA_MUX_ENUMS(ISRC1DEC3
, ARIZONA_ISRC1DEC3MIX_INPUT_1_SOURCE
);
957 ARIZONA_MUX_ENUMS(ISRC1DEC4
, ARIZONA_ISRC1DEC4MIX_INPUT_1_SOURCE
);
959 ARIZONA_MUX_ENUMS(ISRC2INT1
, ARIZONA_ISRC2INT1MIX_INPUT_1_SOURCE
);
960 ARIZONA_MUX_ENUMS(ISRC2INT2
, ARIZONA_ISRC2INT2MIX_INPUT_1_SOURCE
);
961 ARIZONA_MUX_ENUMS(ISRC2INT3
, ARIZONA_ISRC2INT3MIX_INPUT_1_SOURCE
);
962 ARIZONA_MUX_ENUMS(ISRC2INT4
, ARIZONA_ISRC2INT4MIX_INPUT_1_SOURCE
);
964 ARIZONA_MUX_ENUMS(ISRC2DEC1
, ARIZONA_ISRC2DEC1MIX_INPUT_1_SOURCE
);
965 ARIZONA_MUX_ENUMS(ISRC2DEC2
, ARIZONA_ISRC2DEC2MIX_INPUT_1_SOURCE
);
966 ARIZONA_MUX_ENUMS(ISRC2DEC3
, ARIZONA_ISRC2DEC3MIX_INPUT_1_SOURCE
);
967 ARIZONA_MUX_ENUMS(ISRC2DEC4
, ARIZONA_ISRC2DEC4MIX_INPUT_1_SOURCE
);
969 ARIZONA_MUX_ENUMS(ISRC3INT1
, ARIZONA_ISRC3INT1MIX_INPUT_1_SOURCE
);
970 ARIZONA_MUX_ENUMS(ISRC3INT2
, ARIZONA_ISRC3INT2MIX_INPUT_1_SOURCE
);
971 ARIZONA_MUX_ENUMS(ISRC3INT3
, ARIZONA_ISRC3INT3MIX_INPUT_1_SOURCE
);
972 ARIZONA_MUX_ENUMS(ISRC3INT4
, ARIZONA_ISRC3INT4MIX_INPUT_1_SOURCE
);
974 ARIZONA_MUX_ENUMS(ISRC3DEC1
, ARIZONA_ISRC3DEC1MIX_INPUT_1_SOURCE
);
975 ARIZONA_MUX_ENUMS(ISRC3DEC2
, ARIZONA_ISRC3DEC2MIX_INPUT_1_SOURCE
);
976 ARIZONA_MUX_ENUMS(ISRC3DEC3
, ARIZONA_ISRC3DEC3MIX_INPUT_1_SOURCE
);
977 ARIZONA_MUX_ENUMS(ISRC3DEC4
, ARIZONA_ISRC3DEC4MIX_INPUT_1_SOURCE
);
979 static const char *wm5110_aec_loopback_texts
[] = {
980 "HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "HPOUT3L", "HPOUT3R",
981 "SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R", "SPKDAT2L", "SPKDAT2R",
984 static const unsigned int wm5110_aec_loopback_values
[] = {
985 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
988 static const struct soc_enum wm5110_aec_loopback
=
989 SOC_VALUE_ENUM_SINGLE(ARIZONA_DAC_AEC_CONTROL_1
,
990 ARIZONA_AEC_LOOPBACK_SRC_SHIFT
, 0xf,
991 ARRAY_SIZE(wm5110_aec_loopback_texts
),
992 wm5110_aec_loopback_texts
,
993 wm5110_aec_loopback_values
);
995 static const struct snd_kcontrol_new wm5110_aec_loopback_mux
=
996 SOC_DAPM_ENUM("AEC Loopback", wm5110_aec_loopback
);
998 static const struct snd_soc_dapm_widget wm5110_dapm_widgets
[] = {
999 SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1
, ARIZONA_SYSCLK_ENA_SHIFT
,
1000 0, wm5110_sysclk_ev
, SND_SOC_DAPM_POST_PMU
),
1001 SND_SOC_DAPM_SUPPLY("ASYNCCLK", ARIZONA_ASYNC_CLOCK_1
,
1002 ARIZONA_ASYNC_CLK_ENA_SHIFT
, 0, NULL
, 0),
1003 SND_SOC_DAPM_SUPPLY("OPCLK", ARIZONA_OUTPUT_SYSTEM_CLOCK
,
1004 ARIZONA_OPCLK_ENA_SHIFT
, 0, NULL
, 0),
1005 SND_SOC_DAPM_SUPPLY("ASYNCOPCLK", ARIZONA_OUTPUT_ASYNC_CLOCK
,
1006 ARIZONA_OPCLK_ASYNC_ENA_SHIFT
, 0, NULL
, 0),
1008 SND_SOC_DAPM_REGULATOR_SUPPLY("DBVDD2", 0, 0),
1009 SND_SOC_DAPM_REGULATOR_SUPPLY("DBVDD3", 0, 0),
1010 SND_SOC_DAPM_REGULATOR_SUPPLY("CPVDD", 20, 0),
1011 SND_SOC_DAPM_REGULATOR_SUPPLY("MICVDD", 0, SND_SOC_DAPM_REGULATOR_BYPASS
),
1012 SND_SOC_DAPM_REGULATOR_SUPPLY("SPKVDDL", 0, 0),
1013 SND_SOC_DAPM_REGULATOR_SUPPLY("SPKVDDR", 0, 0),
1015 SND_SOC_DAPM_SIGGEN("TONE"),
1016 SND_SOC_DAPM_SIGGEN("NOISE"),
1017 SND_SOC_DAPM_SIGGEN("HAPTICS"),
1019 SND_SOC_DAPM_INPUT("IN1L"),
1020 SND_SOC_DAPM_INPUT("IN1R"),
1021 SND_SOC_DAPM_INPUT("IN2L"),
1022 SND_SOC_DAPM_INPUT("IN2R"),
1023 SND_SOC_DAPM_INPUT("IN3L"),
1024 SND_SOC_DAPM_INPUT("IN3R"),
1025 SND_SOC_DAPM_INPUT("IN4L"),
1026 SND_SOC_DAPM_INPUT("IN4R"),
1028 SND_SOC_DAPM_OUTPUT("DRC1 Signal Activity"),
1029 SND_SOC_DAPM_OUTPUT("DRC2 Signal Activity"),
1031 SND_SOC_DAPM_PGA_E("IN1L PGA", ARIZONA_INPUT_ENABLES
, ARIZONA_IN1L_ENA_SHIFT
,
1032 0, NULL
, 0, wm5110_in_ev
,
1033 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1034 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
|
1035 SND_SOC_DAPM_WILL_PMU
),
1036 SND_SOC_DAPM_PGA_E("IN1R PGA", ARIZONA_INPUT_ENABLES
, ARIZONA_IN1R_ENA_SHIFT
,
1037 0, NULL
, 0, wm5110_in_ev
,
1038 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1039 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
|
1040 SND_SOC_DAPM_WILL_PMU
),
1041 SND_SOC_DAPM_PGA_E("IN2L PGA", ARIZONA_INPUT_ENABLES
, ARIZONA_IN2L_ENA_SHIFT
,
1042 0, NULL
, 0, wm5110_in_ev
,
1043 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1044 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
|
1045 SND_SOC_DAPM_WILL_PMU
),
1046 SND_SOC_DAPM_PGA_E("IN2R PGA", ARIZONA_INPUT_ENABLES
, ARIZONA_IN2R_ENA_SHIFT
,
1047 0, NULL
, 0, wm5110_in_ev
,
1048 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1049 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
|
1050 SND_SOC_DAPM_WILL_PMU
),
1051 SND_SOC_DAPM_PGA_E("IN3L PGA", ARIZONA_INPUT_ENABLES
, ARIZONA_IN3L_ENA_SHIFT
,
1052 0, NULL
, 0, wm5110_in_ev
,
1053 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1054 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
|
1055 SND_SOC_DAPM_WILL_PMU
),
1056 SND_SOC_DAPM_PGA_E("IN3R PGA", ARIZONA_INPUT_ENABLES
, ARIZONA_IN3R_ENA_SHIFT
,
1057 0, NULL
, 0, wm5110_in_ev
,
1058 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1059 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
|
1060 SND_SOC_DAPM_WILL_PMU
),
1061 SND_SOC_DAPM_PGA_E("IN4L PGA", ARIZONA_INPUT_ENABLES
, ARIZONA_IN4L_ENA_SHIFT
,
1062 0, NULL
, 0, arizona_in_ev
,
1063 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1064 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1065 SND_SOC_DAPM_PGA_E("IN4R PGA", ARIZONA_INPUT_ENABLES
, ARIZONA_IN4R_ENA_SHIFT
,
1066 0, NULL
, 0, arizona_in_ev
,
1067 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1068 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1070 SND_SOC_DAPM_SUPPLY("MICBIAS1", ARIZONA_MIC_BIAS_CTRL_1
,
1071 ARIZONA_MICB1_ENA_SHIFT
, 0, NULL
, 0),
1072 SND_SOC_DAPM_SUPPLY("MICBIAS2", ARIZONA_MIC_BIAS_CTRL_2
,
1073 ARIZONA_MICB1_ENA_SHIFT
, 0, NULL
, 0),
1074 SND_SOC_DAPM_SUPPLY("MICBIAS3", ARIZONA_MIC_BIAS_CTRL_3
,
1075 ARIZONA_MICB1_ENA_SHIFT
, 0, NULL
, 0),
1077 SND_SOC_DAPM_PGA("Noise Generator", ARIZONA_COMFORT_NOISE_GENERATOR
,
1078 ARIZONA_NOISE_GEN_ENA_SHIFT
, 0, NULL
, 0),
1080 SND_SOC_DAPM_PGA("Tone Generator 1", ARIZONA_TONE_GENERATOR_1
,
1081 ARIZONA_TONE1_ENA_SHIFT
, 0, NULL
, 0),
1082 SND_SOC_DAPM_PGA("Tone Generator 2", ARIZONA_TONE_GENERATOR_1
,
1083 ARIZONA_TONE2_ENA_SHIFT
, 0, NULL
, 0),
1085 SND_SOC_DAPM_PGA("Mic Mute Mixer", ARIZONA_MIC_NOISE_MIX_CONTROL_1
,
1086 ARIZONA_MICMUTE_MIX_ENA_SHIFT
, 0, NULL
, 0),
1088 SND_SOC_DAPM_PGA("EQ1", ARIZONA_EQ1_1
, ARIZONA_EQ1_ENA_SHIFT
, 0, NULL
, 0),
1089 SND_SOC_DAPM_PGA("EQ2", ARIZONA_EQ2_1
, ARIZONA_EQ2_ENA_SHIFT
, 0, NULL
, 0),
1090 SND_SOC_DAPM_PGA("EQ3", ARIZONA_EQ3_1
, ARIZONA_EQ3_ENA_SHIFT
, 0, NULL
, 0),
1091 SND_SOC_DAPM_PGA("EQ4", ARIZONA_EQ4_1
, ARIZONA_EQ4_ENA_SHIFT
, 0, NULL
, 0),
1093 SND_SOC_DAPM_PGA("DRC1L", ARIZONA_DRC1_CTRL1
, ARIZONA_DRC1L_ENA_SHIFT
, 0,
1095 SND_SOC_DAPM_PGA("DRC1R", ARIZONA_DRC1_CTRL1
, ARIZONA_DRC1R_ENA_SHIFT
, 0,
1097 SND_SOC_DAPM_PGA("DRC2L", ARIZONA_DRC2_CTRL1
, ARIZONA_DRC2L_ENA_SHIFT
, 0,
1099 SND_SOC_DAPM_PGA("DRC2R", ARIZONA_DRC2_CTRL1
, ARIZONA_DRC2R_ENA_SHIFT
, 0,
1102 SND_SOC_DAPM_PGA("LHPF1", ARIZONA_HPLPF1_1
, ARIZONA_LHPF1_ENA_SHIFT
, 0,
1104 SND_SOC_DAPM_PGA("LHPF2", ARIZONA_HPLPF2_1
, ARIZONA_LHPF2_ENA_SHIFT
, 0,
1106 SND_SOC_DAPM_PGA("LHPF3", ARIZONA_HPLPF3_1
, ARIZONA_LHPF3_ENA_SHIFT
, 0,
1108 SND_SOC_DAPM_PGA("LHPF4", ARIZONA_HPLPF4_1
, ARIZONA_LHPF4_ENA_SHIFT
, 0,
1111 SND_SOC_DAPM_PGA("PWM1 Driver", ARIZONA_PWM_DRIVE_1
, ARIZONA_PWM1_ENA_SHIFT
,
1113 SND_SOC_DAPM_PGA("PWM2 Driver", ARIZONA_PWM_DRIVE_1
, ARIZONA_PWM2_ENA_SHIFT
,
1116 SND_SOC_DAPM_PGA("ASRC1L", ARIZONA_ASRC_ENABLE
, ARIZONA_ASRC1L_ENA_SHIFT
, 0,
1118 SND_SOC_DAPM_PGA("ASRC1R", ARIZONA_ASRC_ENABLE
, ARIZONA_ASRC1R_ENA_SHIFT
, 0,
1120 SND_SOC_DAPM_PGA("ASRC2L", ARIZONA_ASRC_ENABLE
, ARIZONA_ASRC2L_ENA_SHIFT
, 0,
1122 SND_SOC_DAPM_PGA("ASRC2R", ARIZONA_ASRC_ENABLE
, ARIZONA_ASRC2R_ENA_SHIFT
, 0,
1125 WM_ADSP2("DSP1", 0),
1126 WM_ADSP2("DSP2", 1),
1127 WM_ADSP2("DSP3", 2),
1128 WM_ADSP2("DSP4", 3),
1130 SND_SOC_DAPM_PGA("ISRC1INT1", ARIZONA_ISRC_1_CTRL_3
,
1131 ARIZONA_ISRC1_INT0_ENA_SHIFT
, 0, NULL
, 0),
1132 SND_SOC_DAPM_PGA("ISRC1INT2", ARIZONA_ISRC_1_CTRL_3
,
1133 ARIZONA_ISRC1_INT1_ENA_SHIFT
, 0, NULL
, 0),
1134 SND_SOC_DAPM_PGA("ISRC1INT3", ARIZONA_ISRC_1_CTRL_3
,
1135 ARIZONA_ISRC1_INT2_ENA_SHIFT
, 0, NULL
, 0),
1136 SND_SOC_DAPM_PGA("ISRC1INT4", ARIZONA_ISRC_1_CTRL_3
,
1137 ARIZONA_ISRC1_INT3_ENA_SHIFT
, 0, NULL
, 0),
1139 SND_SOC_DAPM_PGA("ISRC1DEC1", ARIZONA_ISRC_1_CTRL_3
,
1140 ARIZONA_ISRC1_DEC0_ENA_SHIFT
, 0, NULL
, 0),
1141 SND_SOC_DAPM_PGA("ISRC1DEC2", ARIZONA_ISRC_1_CTRL_3
,
1142 ARIZONA_ISRC1_DEC1_ENA_SHIFT
, 0, NULL
, 0),
1143 SND_SOC_DAPM_PGA("ISRC1DEC3", ARIZONA_ISRC_1_CTRL_3
,
1144 ARIZONA_ISRC1_DEC2_ENA_SHIFT
, 0, NULL
, 0),
1145 SND_SOC_DAPM_PGA("ISRC1DEC4", ARIZONA_ISRC_1_CTRL_3
,
1146 ARIZONA_ISRC1_DEC3_ENA_SHIFT
, 0, NULL
, 0),
1148 SND_SOC_DAPM_PGA("ISRC2INT1", ARIZONA_ISRC_2_CTRL_3
,
1149 ARIZONA_ISRC2_INT0_ENA_SHIFT
, 0, NULL
, 0),
1150 SND_SOC_DAPM_PGA("ISRC2INT2", ARIZONA_ISRC_2_CTRL_3
,
1151 ARIZONA_ISRC2_INT1_ENA_SHIFT
, 0, NULL
, 0),
1152 SND_SOC_DAPM_PGA("ISRC2INT3", ARIZONA_ISRC_2_CTRL_3
,
1153 ARIZONA_ISRC2_INT2_ENA_SHIFT
, 0, NULL
, 0),
1154 SND_SOC_DAPM_PGA("ISRC2INT4", ARIZONA_ISRC_2_CTRL_3
,
1155 ARIZONA_ISRC2_INT3_ENA_SHIFT
, 0, NULL
, 0),
1157 SND_SOC_DAPM_PGA("ISRC2DEC1", ARIZONA_ISRC_2_CTRL_3
,
1158 ARIZONA_ISRC2_DEC0_ENA_SHIFT
, 0, NULL
, 0),
1159 SND_SOC_DAPM_PGA("ISRC2DEC2", ARIZONA_ISRC_2_CTRL_3
,
1160 ARIZONA_ISRC2_DEC1_ENA_SHIFT
, 0, NULL
, 0),
1161 SND_SOC_DAPM_PGA("ISRC2DEC3", ARIZONA_ISRC_2_CTRL_3
,
1162 ARIZONA_ISRC2_DEC2_ENA_SHIFT
, 0, NULL
, 0),
1163 SND_SOC_DAPM_PGA("ISRC2DEC4", ARIZONA_ISRC_2_CTRL_3
,
1164 ARIZONA_ISRC2_DEC3_ENA_SHIFT
, 0, NULL
, 0),
1166 SND_SOC_DAPM_PGA("ISRC3INT1", ARIZONA_ISRC_3_CTRL_3
,
1167 ARIZONA_ISRC3_INT0_ENA_SHIFT
, 0, NULL
, 0),
1168 SND_SOC_DAPM_PGA("ISRC3INT2", ARIZONA_ISRC_3_CTRL_3
,
1169 ARIZONA_ISRC3_INT1_ENA_SHIFT
, 0, NULL
, 0),
1170 SND_SOC_DAPM_PGA("ISRC3INT3", ARIZONA_ISRC_3_CTRL_3
,
1171 ARIZONA_ISRC3_INT2_ENA_SHIFT
, 0, NULL
, 0),
1172 SND_SOC_DAPM_PGA("ISRC3INT4", ARIZONA_ISRC_3_CTRL_3
,
1173 ARIZONA_ISRC3_INT3_ENA_SHIFT
, 0, NULL
, 0),
1175 SND_SOC_DAPM_PGA("ISRC3DEC1", ARIZONA_ISRC_3_CTRL_3
,
1176 ARIZONA_ISRC3_DEC0_ENA_SHIFT
, 0, NULL
, 0),
1177 SND_SOC_DAPM_PGA("ISRC3DEC2", ARIZONA_ISRC_3_CTRL_3
,
1178 ARIZONA_ISRC3_DEC1_ENA_SHIFT
, 0, NULL
, 0),
1179 SND_SOC_DAPM_PGA("ISRC3DEC3", ARIZONA_ISRC_3_CTRL_3
,
1180 ARIZONA_ISRC3_DEC2_ENA_SHIFT
, 0, NULL
, 0),
1181 SND_SOC_DAPM_PGA("ISRC3DEC4", ARIZONA_ISRC_3_CTRL_3
,
1182 ARIZONA_ISRC3_DEC3_ENA_SHIFT
, 0, NULL
, 0),
1184 SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1
,
1185 ARIZONA_AEC_LOOPBACK_ENA_SHIFT
, 0,
1186 &wm5110_aec_loopback_mux
),
1188 SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL
, 0,
1189 ARIZONA_AIF1_TX_ENABLES
, ARIZONA_AIF1TX1_ENA_SHIFT
, 0),
1190 SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL
, 0,
1191 ARIZONA_AIF1_TX_ENABLES
, ARIZONA_AIF1TX2_ENA_SHIFT
, 0),
1192 SND_SOC_DAPM_AIF_OUT("AIF1TX3", NULL
, 0,
1193 ARIZONA_AIF1_TX_ENABLES
, ARIZONA_AIF1TX3_ENA_SHIFT
, 0),
1194 SND_SOC_DAPM_AIF_OUT("AIF1TX4", NULL
, 0,
1195 ARIZONA_AIF1_TX_ENABLES
, ARIZONA_AIF1TX4_ENA_SHIFT
, 0),
1196 SND_SOC_DAPM_AIF_OUT("AIF1TX5", NULL
, 0,
1197 ARIZONA_AIF1_TX_ENABLES
, ARIZONA_AIF1TX5_ENA_SHIFT
, 0),
1198 SND_SOC_DAPM_AIF_OUT("AIF1TX6", NULL
, 0,
1199 ARIZONA_AIF1_TX_ENABLES
, ARIZONA_AIF1TX6_ENA_SHIFT
, 0),
1200 SND_SOC_DAPM_AIF_OUT("AIF1TX7", NULL
, 0,
1201 ARIZONA_AIF1_TX_ENABLES
, ARIZONA_AIF1TX7_ENA_SHIFT
, 0),
1202 SND_SOC_DAPM_AIF_OUT("AIF1TX8", NULL
, 0,
1203 ARIZONA_AIF1_TX_ENABLES
, ARIZONA_AIF1TX8_ENA_SHIFT
, 0),
1205 SND_SOC_DAPM_AIF_IN("AIF1RX1", NULL
, 0,
1206 ARIZONA_AIF1_RX_ENABLES
, ARIZONA_AIF1RX1_ENA_SHIFT
, 0),
1207 SND_SOC_DAPM_AIF_IN("AIF1RX2", NULL
, 0,
1208 ARIZONA_AIF1_RX_ENABLES
, ARIZONA_AIF1RX2_ENA_SHIFT
, 0),
1209 SND_SOC_DAPM_AIF_IN("AIF1RX3", NULL
, 0,
1210 ARIZONA_AIF1_RX_ENABLES
, ARIZONA_AIF1RX3_ENA_SHIFT
, 0),
1211 SND_SOC_DAPM_AIF_IN("AIF1RX4", NULL
, 0,
1212 ARIZONA_AIF1_RX_ENABLES
, ARIZONA_AIF1RX4_ENA_SHIFT
, 0),
1213 SND_SOC_DAPM_AIF_IN("AIF1RX5", NULL
, 0,
1214 ARIZONA_AIF1_RX_ENABLES
, ARIZONA_AIF1RX5_ENA_SHIFT
, 0),
1215 SND_SOC_DAPM_AIF_IN("AIF1RX6", NULL
, 0,
1216 ARIZONA_AIF1_RX_ENABLES
, ARIZONA_AIF1RX6_ENA_SHIFT
, 0),
1217 SND_SOC_DAPM_AIF_IN("AIF1RX7", NULL
, 0,
1218 ARIZONA_AIF1_RX_ENABLES
, ARIZONA_AIF1RX7_ENA_SHIFT
, 0),
1219 SND_SOC_DAPM_AIF_IN("AIF1RX8", NULL
, 0,
1220 ARIZONA_AIF1_RX_ENABLES
, ARIZONA_AIF1RX8_ENA_SHIFT
, 0),
1222 SND_SOC_DAPM_AIF_OUT("AIF2TX1", NULL
, 0,
1223 ARIZONA_AIF2_TX_ENABLES
, ARIZONA_AIF2TX1_ENA_SHIFT
, 0),
1224 SND_SOC_DAPM_AIF_OUT("AIF2TX2", NULL
, 0,
1225 ARIZONA_AIF2_TX_ENABLES
, ARIZONA_AIF2TX2_ENA_SHIFT
, 0),
1226 SND_SOC_DAPM_AIF_OUT("AIF2TX3", NULL
, 0,
1227 ARIZONA_AIF2_TX_ENABLES
, ARIZONA_AIF2TX3_ENA_SHIFT
, 0),
1228 SND_SOC_DAPM_AIF_OUT("AIF2TX4", NULL
, 0,
1229 ARIZONA_AIF2_TX_ENABLES
, ARIZONA_AIF2TX4_ENA_SHIFT
, 0),
1230 SND_SOC_DAPM_AIF_OUT("AIF2TX5", NULL
, 0,
1231 ARIZONA_AIF2_TX_ENABLES
, ARIZONA_AIF2TX5_ENA_SHIFT
, 0),
1232 SND_SOC_DAPM_AIF_OUT("AIF2TX6", NULL
, 0,
1233 ARIZONA_AIF2_TX_ENABLES
, ARIZONA_AIF2TX6_ENA_SHIFT
, 0),
1235 SND_SOC_DAPM_AIF_IN("AIF2RX1", NULL
, 0,
1236 ARIZONA_AIF2_RX_ENABLES
, ARIZONA_AIF2RX1_ENA_SHIFT
, 0),
1237 SND_SOC_DAPM_AIF_IN("AIF2RX2", NULL
, 0,
1238 ARIZONA_AIF2_RX_ENABLES
, ARIZONA_AIF2RX2_ENA_SHIFT
, 0),
1239 SND_SOC_DAPM_AIF_IN("AIF2RX3", NULL
, 0,
1240 ARIZONA_AIF2_RX_ENABLES
, ARIZONA_AIF2RX3_ENA_SHIFT
, 0),
1241 SND_SOC_DAPM_AIF_IN("AIF2RX4", NULL
, 0,
1242 ARIZONA_AIF2_RX_ENABLES
, ARIZONA_AIF2RX4_ENA_SHIFT
, 0),
1243 SND_SOC_DAPM_AIF_IN("AIF2RX5", NULL
, 0,
1244 ARIZONA_AIF2_RX_ENABLES
, ARIZONA_AIF2RX5_ENA_SHIFT
, 0),
1245 SND_SOC_DAPM_AIF_IN("AIF2RX6", NULL
, 0,
1246 ARIZONA_AIF2_RX_ENABLES
, ARIZONA_AIF2RX6_ENA_SHIFT
, 0),
1248 SND_SOC_DAPM_AIF_IN("SLIMRX1", NULL
, 0,
1249 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE
,
1250 ARIZONA_SLIMRX1_ENA_SHIFT
, 0),
1251 SND_SOC_DAPM_AIF_IN("SLIMRX2", NULL
, 0,
1252 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE
,
1253 ARIZONA_SLIMRX2_ENA_SHIFT
, 0),
1254 SND_SOC_DAPM_AIF_IN("SLIMRX3", NULL
, 0,
1255 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE
,
1256 ARIZONA_SLIMRX3_ENA_SHIFT
, 0),
1257 SND_SOC_DAPM_AIF_IN("SLIMRX4", NULL
, 0,
1258 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE
,
1259 ARIZONA_SLIMRX4_ENA_SHIFT
, 0),
1260 SND_SOC_DAPM_AIF_IN("SLIMRX5", NULL
, 0,
1261 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE
,
1262 ARIZONA_SLIMRX5_ENA_SHIFT
, 0),
1263 SND_SOC_DAPM_AIF_IN("SLIMRX6", NULL
, 0,
1264 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE
,
1265 ARIZONA_SLIMRX6_ENA_SHIFT
, 0),
1266 SND_SOC_DAPM_AIF_IN("SLIMRX7", NULL
, 0,
1267 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE
,
1268 ARIZONA_SLIMRX7_ENA_SHIFT
, 0),
1269 SND_SOC_DAPM_AIF_IN("SLIMRX8", NULL
, 0,
1270 ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE
,
1271 ARIZONA_SLIMRX8_ENA_SHIFT
, 0),
1273 SND_SOC_DAPM_AIF_OUT("SLIMTX1", NULL
, 0,
1274 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE
,
1275 ARIZONA_SLIMTX1_ENA_SHIFT
, 0),
1276 SND_SOC_DAPM_AIF_OUT("SLIMTX2", NULL
, 0,
1277 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE
,
1278 ARIZONA_SLIMTX2_ENA_SHIFT
, 0),
1279 SND_SOC_DAPM_AIF_OUT("SLIMTX3", NULL
, 0,
1280 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE
,
1281 ARIZONA_SLIMTX3_ENA_SHIFT
, 0),
1282 SND_SOC_DAPM_AIF_OUT("SLIMTX4", NULL
, 0,
1283 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE
,
1284 ARIZONA_SLIMTX4_ENA_SHIFT
, 0),
1285 SND_SOC_DAPM_AIF_OUT("SLIMTX5", NULL
, 0,
1286 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE
,
1287 ARIZONA_SLIMTX5_ENA_SHIFT
, 0),
1288 SND_SOC_DAPM_AIF_OUT("SLIMTX6", NULL
, 0,
1289 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE
,
1290 ARIZONA_SLIMTX6_ENA_SHIFT
, 0),
1291 SND_SOC_DAPM_AIF_OUT("SLIMTX7", NULL
, 0,
1292 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE
,
1293 ARIZONA_SLIMTX7_ENA_SHIFT
, 0),
1294 SND_SOC_DAPM_AIF_OUT("SLIMTX8", NULL
, 0,
1295 ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE
,
1296 ARIZONA_SLIMTX8_ENA_SHIFT
, 0),
1298 SND_SOC_DAPM_AIF_OUT("AIF3TX1", NULL
, 0,
1299 ARIZONA_AIF3_TX_ENABLES
, ARIZONA_AIF3TX1_ENA_SHIFT
, 0),
1300 SND_SOC_DAPM_AIF_OUT("AIF3TX2", NULL
, 0,
1301 ARIZONA_AIF3_TX_ENABLES
, ARIZONA_AIF3TX2_ENA_SHIFT
, 0),
1303 SND_SOC_DAPM_AIF_IN("AIF3RX1", NULL
, 0,
1304 ARIZONA_AIF3_RX_ENABLES
, ARIZONA_AIF3RX1_ENA_SHIFT
, 0),
1305 SND_SOC_DAPM_AIF_IN("AIF3RX2", NULL
, 0,
1306 ARIZONA_AIF3_RX_ENABLES
, ARIZONA_AIF3RX2_ENA_SHIFT
, 0),
1308 SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM
,
1309 ARIZONA_OUT1L_ENA_SHIFT
, 0, NULL
, 0, wm5110_hp_ev
,
1310 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1311 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1312 SND_SOC_DAPM_PGA_E("OUT1R", SND_SOC_NOPM
,
1313 ARIZONA_OUT1R_ENA_SHIFT
, 0, NULL
, 0, wm5110_hp_ev
,
1314 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1315 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1316 SND_SOC_DAPM_PGA_E("OUT2L", ARIZONA_OUTPUT_ENABLES_1
,
1317 ARIZONA_OUT2L_ENA_SHIFT
, 0, NULL
, 0, arizona_out_ev
,
1318 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1319 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1320 SND_SOC_DAPM_PGA_E("OUT2R", ARIZONA_OUTPUT_ENABLES_1
,
1321 ARIZONA_OUT2R_ENA_SHIFT
, 0, NULL
, 0, arizona_out_ev
,
1322 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1323 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1324 SND_SOC_DAPM_PGA_E("OUT3L", ARIZONA_OUTPUT_ENABLES_1
,
1325 ARIZONA_OUT3L_ENA_SHIFT
, 0, NULL
, 0, arizona_out_ev
,
1326 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1327 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1328 SND_SOC_DAPM_PGA_E("OUT3R", ARIZONA_OUTPUT_ENABLES_1
,
1329 ARIZONA_OUT3R_ENA_SHIFT
, 0, NULL
, 0, arizona_out_ev
,
1330 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMD
|
1331 SND_SOC_DAPM_PRE_PMU
| SND_SOC_DAPM_POST_PMU
),
1332 SND_SOC_DAPM_PGA_E("OUT5L", ARIZONA_OUTPUT_ENABLES_1
,
1333 ARIZONA_OUT5L_ENA_SHIFT
, 0, NULL
, 0, arizona_out_ev
,
1334 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMU
),
1335 SND_SOC_DAPM_PGA_E("OUT5R", ARIZONA_OUTPUT_ENABLES_1
,
1336 ARIZONA_OUT5R_ENA_SHIFT
, 0, NULL
, 0, arizona_out_ev
,
1337 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMU
),
1338 SND_SOC_DAPM_PGA_E("OUT6L", ARIZONA_OUTPUT_ENABLES_1
,
1339 ARIZONA_OUT6L_ENA_SHIFT
, 0, NULL
, 0, arizona_out_ev
,
1340 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMU
),
1341 SND_SOC_DAPM_PGA_E("OUT6R", ARIZONA_OUTPUT_ENABLES_1
,
1342 ARIZONA_OUT6R_ENA_SHIFT
, 0, NULL
, 0, arizona_out_ev
,
1343 SND_SOC_DAPM_PRE_PMD
| SND_SOC_DAPM_POST_PMU
),
1345 ARIZONA_MIXER_WIDGETS(EQ1
, "EQ1"),
1346 ARIZONA_MIXER_WIDGETS(EQ2
, "EQ2"),
1347 ARIZONA_MIXER_WIDGETS(EQ3
, "EQ3"),
1348 ARIZONA_MIXER_WIDGETS(EQ4
, "EQ4"),
1350 ARIZONA_MIXER_WIDGETS(DRC1L
, "DRC1L"),
1351 ARIZONA_MIXER_WIDGETS(DRC1R
, "DRC1R"),
1352 ARIZONA_MIXER_WIDGETS(DRC2L
, "DRC2L"),
1353 ARIZONA_MIXER_WIDGETS(DRC2R
, "DRC2R"),
1355 ARIZONA_MIXER_WIDGETS(LHPF1
, "LHPF1"),
1356 ARIZONA_MIXER_WIDGETS(LHPF2
, "LHPF2"),
1357 ARIZONA_MIXER_WIDGETS(LHPF3
, "LHPF3"),
1358 ARIZONA_MIXER_WIDGETS(LHPF4
, "LHPF4"),
1360 ARIZONA_MIXER_WIDGETS(Mic
, "Mic"),
1361 ARIZONA_MIXER_WIDGETS(Noise
, "Noise"),
1363 ARIZONA_MIXER_WIDGETS(PWM1
, "PWM1"),
1364 ARIZONA_MIXER_WIDGETS(PWM2
, "PWM2"),
1366 ARIZONA_MIXER_WIDGETS(OUT1L
, "HPOUT1L"),
1367 ARIZONA_MIXER_WIDGETS(OUT1R
, "HPOUT1R"),
1368 ARIZONA_MIXER_WIDGETS(OUT2L
, "HPOUT2L"),
1369 ARIZONA_MIXER_WIDGETS(OUT2R
, "HPOUT2R"),
1370 ARIZONA_MIXER_WIDGETS(OUT3L
, "HPOUT3L"),
1371 ARIZONA_MIXER_WIDGETS(OUT3R
, "HPOUT3R"),
1372 ARIZONA_MIXER_WIDGETS(SPKOUTL
, "SPKOUTL"),
1373 ARIZONA_MIXER_WIDGETS(SPKOUTR
, "SPKOUTR"),
1374 ARIZONA_MIXER_WIDGETS(SPKDAT1L
, "SPKDAT1L"),
1375 ARIZONA_MIXER_WIDGETS(SPKDAT1R
, "SPKDAT1R"),
1376 ARIZONA_MIXER_WIDGETS(SPKDAT2L
, "SPKDAT2L"),
1377 ARIZONA_MIXER_WIDGETS(SPKDAT2R
, "SPKDAT2R"),
1379 ARIZONA_MIXER_WIDGETS(AIF1TX1
, "AIF1TX1"),
1380 ARIZONA_MIXER_WIDGETS(AIF1TX2
, "AIF1TX2"),
1381 ARIZONA_MIXER_WIDGETS(AIF1TX3
, "AIF1TX3"),
1382 ARIZONA_MIXER_WIDGETS(AIF1TX4
, "AIF1TX4"),
1383 ARIZONA_MIXER_WIDGETS(AIF1TX5
, "AIF1TX5"),
1384 ARIZONA_MIXER_WIDGETS(AIF1TX6
, "AIF1TX6"),
1385 ARIZONA_MIXER_WIDGETS(AIF1TX7
, "AIF1TX7"),
1386 ARIZONA_MIXER_WIDGETS(AIF1TX8
, "AIF1TX8"),
1388 ARIZONA_MIXER_WIDGETS(AIF2TX1
, "AIF2TX1"),
1389 ARIZONA_MIXER_WIDGETS(AIF2TX2
, "AIF2TX2"),
1390 ARIZONA_MIXER_WIDGETS(AIF2TX3
, "AIF2TX3"),
1391 ARIZONA_MIXER_WIDGETS(AIF2TX4
, "AIF2TX4"),
1392 ARIZONA_MIXER_WIDGETS(AIF2TX5
, "AIF2TX5"),
1393 ARIZONA_MIXER_WIDGETS(AIF2TX6
, "AIF2TX6"),
1395 ARIZONA_MIXER_WIDGETS(AIF3TX1
, "AIF3TX1"),
1396 ARIZONA_MIXER_WIDGETS(AIF3TX2
, "AIF3TX2"),
1398 ARIZONA_MIXER_WIDGETS(SLIMTX1
, "SLIMTX1"),
1399 ARIZONA_MIXER_WIDGETS(SLIMTX2
, "SLIMTX2"),
1400 ARIZONA_MIXER_WIDGETS(SLIMTX3
, "SLIMTX3"),
1401 ARIZONA_MIXER_WIDGETS(SLIMTX4
, "SLIMTX4"),
1402 ARIZONA_MIXER_WIDGETS(SLIMTX5
, "SLIMTX5"),
1403 ARIZONA_MIXER_WIDGETS(SLIMTX6
, "SLIMTX6"),
1404 ARIZONA_MIXER_WIDGETS(SLIMTX7
, "SLIMTX7"),
1405 ARIZONA_MIXER_WIDGETS(SLIMTX8
, "SLIMTX8"),
1407 ARIZONA_MUX_WIDGETS(ASRC1L
, "ASRC1L"),
1408 ARIZONA_MUX_WIDGETS(ASRC1R
, "ASRC1R"),
1409 ARIZONA_MUX_WIDGETS(ASRC2L
, "ASRC2L"),
1410 ARIZONA_MUX_WIDGETS(ASRC2R
, "ASRC2R"),
1412 ARIZONA_DSP_WIDGETS(DSP1
, "DSP1"),
1413 ARIZONA_DSP_WIDGETS(DSP2
, "DSP2"),
1414 ARIZONA_DSP_WIDGETS(DSP3
, "DSP3"),
1415 ARIZONA_DSP_WIDGETS(DSP4
, "DSP4"),
1417 ARIZONA_MUX_WIDGETS(ISRC1DEC1
, "ISRC1DEC1"),
1418 ARIZONA_MUX_WIDGETS(ISRC1DEC2
, "ISRC1DEC2"),
1419 ARIZONA_MUX_WIDGETS(ISRC1DEC3
, "ISRC1DEC3"),
1420 ARIZONA_MUX_WIDGETS(ISRC1DEC4
, "ISRC1DEC4"),
1422 ARIZONA_MUX_WIDGETS(ISRC1INT1
, "ISRC1INT1"),
1423 ARIZONA_MUX_WIDGETS(ISRC1INT2
, "ISRC1INT2"),
1424 ARIZONA_MUX_WIDGETS(ISRC1INT3
, "ISRC1INT3"),
1425 ARIZONA_MUX_WIDGETS(ISRC1INT4
, "ISRC1INT4"),
1427 ARIZONA_MUX_WIDGETS(ISRC2DEC1
, "ISRC2DEC1"),
1428 ARIZONA_MUX_WIDGETS(ISRC2DEC2
, "ISRC2DEC2"),
1429 ARIZONA_MUX_WIDGETS(ISRC2DEC3
, "ISRC2DEC3"),
1430 ARIZONA_MUX_WIDGETS(ISRC2DEC4
, "ISRC2DEC4"),
1432 ARIZONA_MUX_WIDGETS(ISRC2INT1
, "ISRC2INT1"),
1433 ARIZONA_MUX_WIDGETS(ISRC2INT2
, "ISRC2INT2"),
1434 ARIZONA_MUX_WIDGETS(ISRC2INT3
, "ISRC2INT3"),
1435 ARIZONA_MUX_WIDGETS(ISRC2INT4
, "ISRC2INT4"),
1437 ARIZONA_MUX_WIDGETS(ISRC3DEC1
, "ISRC3DEC1"),
1438 ARIZONA_MUX_WIDGETS(ISRC3DEC2
, "ISRC3DEC2"),
1439 ARIZONA_MUX_WIDGETS(ISRC3DEC3
, "ISRC3DEC3"),
1440 ARIZONA_MUX_WIDGETS(ISRC3DEC4
, "ISRC3DEC4"),
1442 ARIZONA_MUX_WIDGETS(ISRC3INT1
, "ISRC3INT1"),
1443 ARIZONA_MUX_WIDGETS(ISRC3INT2
, "ISRC3INT2"),
1444 ARIZONA_MUX_WIDGETS(ISRC3INT3
, "ISRC3INT3"),
1445 ARIZONA_MUX_WIDGETS(ISRC3INT4
, "ISRC3INT4"),
1447 SND_SOC_DAPM_OUTPUT("HPOUT1L"),
1448 SND_SOC_DAPM_OUTPUT("HPOUT1R"),
1449 SND_SOC_DAPM_OUTPUT("HPOUT2L"),
1450 SND_SOC_DAPM_OUTPUT("HPOUT2R"),
1451 SND_SOC_DAPM_OUTPUT("HPOUT3L"),
1452 SND_SOC_DAPM_OUTPUT("HPOUT3R"),
1453 SND_SOC_DAPM_OUTPUT("SPKOUTLN"),
1454 SND_SOC_DAPM_OUTPUT("SPKOUTLP"),
1455 SND_SOC_DAPM_OUTPUT("SPKOUTRN"),
1456 SND_SOC_DAPM_OUTPUT("SPKOUTRP"),
1457 SND_SOC_DAPM_OUTPUT("SPKDAT1L"),
1458 SND_SOC_DAPM_OUTPUT("SPKDAT1R"),
1459 SND_SOC_DAPM_OUTPUT("SPKDAT2L"),
1460 SND_SOC_DAPM_OUTPUT("SPKDAT2R"),
1462 SND_SOC_DAPM_OUTPUT("MICSUPP"),
1465 #define ARIZONA_MIXER_INPUT_ROUTES(name) \
1466 { name, "Noise Generator", "Noise Generator" }, \
1467 { name, "Tone Generator 1", "Tone Generator 1" }, \
1468 { name, "Tone Generator 2", "Tone Generator 2" }, \
1469 { name, "Haptics", "HAPTICS" }, \
1470 { name, "AEC", "AEC Loopback" }, \
1471 { name, "IN1L", "IN1L PGA" }, \
1472 { name, "IN1R", "IN1R PGA" }, \
1473 { name, "IN2L", "IN2L PGA" }, \
1474 { name, "IN2R", "IN2R PGA" }, \
1475 { name, "IN3L", "IN3L PGA" }, \
1476 { name, "IN3R", "IN3R PGA" }, \
1477 { name, "IN4L", "IN4L PGA" }, \
1478 { name, "IN4R", "IN4R PGA" }, \
1479 { name, "Mic Mute Mixer", "Mic Mute Mixer" }, \
1480 { name, "AIF1RX1", "AIF1RX1" }, \
1481 { name, "AIF1RX2", "AIF1RX2" }, \
1482 { name, "AIF1RX3", "AIF1RX3" }, \
1483 { name, "AIF1RX4", "AIF1RX4" }, \
1484 { name, "AIF1RX5", "AIF1RX5" }, \
1485 { name, "AIF1RX6", "AIF1RX6" }, \
1486 { name, "AIF1RX7", "AIF1RX7" }, \
1487 { name, "AIF1RX8", "AIF1RX8" }, \
1488 { name, "AIF2RX1", "AIF2RX1" }, \
1489 { name, "AIF2RX2", "AIF2RX2" }, \
1490 { name, "AIF2RX3", "AIF2RX3" }, \
1491 { name, "AIF2RX4", "AIF2RX4" }, \
1492 { name, "AIF2RX5", "AIF2RX5" }, \
1493 { name, "AIF2RX6", "AIF2RX6" }, \
1494 { name, "AIF3RX1", "AIF3RX1" }, \
1495 { name, "AIF3RX2", "AIF3RX2" }, \
1496 { name, "SLIMRX1", "SLIMRX1" }, \
1497 { name, "SLIMRX2", "SLIMRX2" }, \
1498 { name, "SLIMRX3", "SLIMRX3" }, \
1499 { name, "SLIMRX4", "SLIMRX4" }, \
1500 { name, "SLIMRX5", "SLIMRX5" }, \
1501 { name, "SLIMRX6", "SLIMRX6" }, \
1502 { name, "SLIMRX7", "SLIMRX7" }, \
1503 { name, "SLIMRX8", "SLIMRX8" }, \
1504 { name, "EQ1", "EQ1" }, \
1505 { name, "EQ2", "EQ2" }, \
1506 { name, "EQ3", "EQ3" }, \
1507 { name, "EQ4", "EQ4" }, \
1508 { name, "DRC1L", "DRC1L" }, \
1509 { name, "DRC1R", "DRC1R" }, \
1510 { name, "DRC2L", "DRC2L" }, \
1511 { name, "DRC2R", "DRC2R" }, \
1512 { name, "LHPF1", "LHPF1" }, \
1513 { name, "LHPF2", "LHPF2" }, \
1514 { name, "LHPF3", "LHPF3" }, \
1515 { name, "LHPF4", "LHPF4" }, \
1516 { name, "ASRC1L", "ASRC1L" }, \
1517 { name, "ASRC1R", "ASRC1R" }, \
1518 { name, "ASRC2L", "ASRC2L" }, \
1519 { name, "ASRC2R", "ASRC2R" }, \
1520 { name, "ISRC1DEC1", "ISRC1DEC1" }, \
1521 { name, "ISRC1DEC2", "ISRC1DEC2" }, \
1522 { name, "ISRC1DEC3", "ISRC1DEC3" }, \
1523 { name, "ISRC1DEC4", "ISRC1DEC4" }, \
1524 { name, "ISRC1INT1", "ISRC1INT1" }, \
1525 { name, "ISRC1INT2", "ISRC1INT2" }, \
1526 { name, "ISRC1INT3", "ISRC1INT3" }, \
1527 { name, "ISRC1INT4", "ISRC1INT4" }, \
1528 { name, "ISRC2DEC1", "ISRC2DEC1" }, \
1529 { name, "ISRC2DEC2", "ISRC2DEC2" }, \
1530 { name, "ISRC2DEC3", "ISRC2DEC3" }, \
1531 { name, "ISRC2DEC4", "ISRC2DEC4" }, \
1532 { name, "ISRC2INT1", "ISRC2INT1" }, \
1533 { name, "ISRC2INT2", "ISRC2INT2" }, \
1534 { name, "ISRC2INT3", "ISRC2INT3" }, \
1535 { name, "ISRC2INT4", "ISRC2INT4" }, \
1536 { name, "ISRC3DEC1", "ISRC3DEC1" }, \
1537 { name, "ISRC3DEC2", "ISRC3DEC2" }, \
1538 { name, "ISRC3DEC3", "ISRC3DEC3" }, \
1539 { name, "ISRC3DEC4", "ISRC3DEC4" }, \
1540 { name, "ISRC3INT1", "ISRC3INT1" }, \
1541 { name, "ISRC3INT2", "ISRC3INT2" }, \
1542 { name, "ISRC3INT3", "ISRC3INT3" }, \
1543 { name, "ISRC3INT4", "ISRC3INT4" }, \
1544 { name, "DSP1.1", "DSP1" }, \
1545 { name, "DSP1.2", "DSP1" }, \
1546 { name, "DSP1.3", "DSP1" }, \
1547 { name, "DSP1.4", "DSP1" }, \
1548 { name, "DSP1.5", "DSP1" }, \
1549 { name, "DSP1.6", "DSP1" }, \
1550 { name, "DSP2.1", "DSP2" }, \
1551 { name, "DSP2.2", "DSP2" }, \
1552 { name, "DSP2.3", "DSP2" }, \
1553 { name, "DSP2.4", "DSP2" }, \
1554 { name, "DSP2.5", "DSP2" }, \
1555 { name, "DSP2.6", "DSP2" }, \
1556 { name, "DSP3.1", "DSP3" }, \
1557 { name, "DSP3.2", "DSP3" }, \
1558 { name, "DSP3.3", "DSP3" }, \
1559 { name, "DSP3.4", "DSP3" }, \
1560 { name, "DSP3.5", "DSP3" }, \
1561 { name, "DSP3.6", "DSP3" }, \
1562 { name, "DSP4.1", "DSP4" }, \
1563 { name, "DSP4.2", "DSP4" }, \
1564 { name, "DSP4.3", "DSP4" }, \
1565 { name, "DSP4.4", "DSP4" }, \
1566 { name, "DSP4.5", "DSP4" }, \
1567 { name, "DSP4.6", "DSP4" }
1569 static const struct snd_soc_dapm_route wm5110_dapm_routes
[] = {
1570 { "AIF2 Capture", NULL
, "DBVDD2" },
1571 { "AIF2 Playback", NULL
, "DBVDD2" },
1573 { "AIF3 Capture", NULL
, "DBVDD3" },
1574 { "AIF3 Playback", NULL
, "DBVDD3" },
1576 { "OUT1L", NULL
, "CPVDD" },
1577 { "OUT1R", NULL
, "CPVDD" },
1578 { "OUT2L", NULL
, "CPVDD" },
1579 { "OUT2R", NULL
, "CPVDD" },
1580 { "OUT3L", NULL
, "CPVDD" },
1581 { "OUT3R", NULL
, "CPVDD" },
1583 { "OUT4L", NULL
, "SPKVDDL" },
1584 { "OUT4R", NULL
, "SPKVDDR" },
1586 { "OUT1L", NULL
, "SYSCLK" },
1587 { "OUT1R", NULL
, "SYSCLK" },
1588 { "OUT2L", NULL
, "SYSCLK" },
1589 { "OUT2R", NULL
, "SYSCLK" },
1590 { "OUT3L", NULL
, "SYSCLK" },
1591 { "OUT4L", NULL
, "SYSCLK" },
1592 { "OUT4R", NULL
, "SYSCLK" },
1593 { "OUT5L", NULL
, "SYSCLK" },
1594 { "OUT5R", NULL
, "SYSCLK" },
1595 { "OUT6L", NULL
, "SYSCLK" },
1596 { "OUT6R", NULL
, "SYSCLK" },
1598 { "IN1L", NULL
, "SYSCLK" },
1599 { "IN1R", NULL
, "SYSCLK" },
1600 { "IN2L", NULL
, "SYSCLK" },
1601 { "IN2R", NULL
, "SYSCLK" },
1602 { "IN3L", NULL
, "SYSCLK" },
1603 { "IN3R", NULL
, "SYSCLK" },
1604 { "IN4L", NULL
, "SYSCLK" },
1605 { "IN4R", NULL
, "SYSCLK" },
1607 { "MICBIAS1", NULL
, "MICVDD" },
1608 { "MICBIAS2", NULL
, "MICVDD" },
1609 { "MICBIAS3", NULL
, "MICVDD" },
1611 { "Noise Generator", NULL
, "SYSCLK" },
1612 { "Tone Generator 1", NULL
, "SYSCLK" },
1613 { "Tone Generator 2", NULL
, "SYSCLK" },
1615 { "Noise Generator", NULL
, "NOISE" },
1616 { "Tone Generator 1", NULL
, "TONE" },
1617 { "Tone Generator 2", NULL
, "TONE" },
1619 { "AIF1 Capture", NULL
, "AIF1TX1" },
1620 { "AIF1 Capture", NULL
, "AIF1TX2" },
1621 { "AIF1 Capture", NULL
, "AIF1TX3" },
1622 { "AIF1 Capture", NULL
, "AIF1TX4" },
1623 { "AIF1 Capture", NULL
, "AIF1TX5" },
1624 { "AIF1 Capture", NULL
, "AIF1TX6" },
1625 { "AIF1 Capture", NULL
, "AIF1TX7" },
1626 { "AIF1 Capture", NULL
, "AIF1TX8" },
1628 { "AIF1RX1", NULL
, "AIF1 Playback" },
1629 { "AIF1RX2", NULL
, "AIF1 Playback" },
1630 { "AIF1RX3", NULL
, "AIF1 Playback" },
1631 { "AIF1RX4", NULL
, "AIF1 Playback" },
1632 { "AIF1RX5", NULL
, "AIF1 Playback" },
1633 { "AIF1RX6", NULL
, "AIF1 Playback" },
1634 { "AIF1RX7", NULL
, "AIF1 Playback" },
1635 { "AIF1RX8", NULL
, "AIF1 Playback" },
1637 { "AIF2 Capture", NULL
, "AIF2TX1" },
1638 { "AIF2 Capture", NULL
, "AIF2TX2" },
1639 { "AIF2 Capture", NULL
, "AIF2TX3" },
1640 { "AIF2 Capture", NULL
, "AIF2TX4" },
1641 { "AIF2 Capture", NULL
, "AIF2TX5" },
1642 { "AIF2 Capture", NULL
, "AIF2TX6" },
1644 { "AIF2RX1", NULL
, "AIF2 Playback" },
1645 { "AIF2RX2", NULL
, "AIF2 Playback" },
1646 { "AIF2RX3", NULL
, "AIF2 Playback" },
1647 { "AIF2RX4", NULL
, "AIF2 Playback" },
1648 { "AIF2RX5", NULL
, "AIF2 Playback" },
1649 { "AIF2RX6", NULL
, "AIF2 Playback" },
1651 { "AIF3 Capture", NULL
, "AIF3TX1" },
1652 { "AIF3 Capture", NULL
, "AIF3TX2" },
1654 { "AIF3RX1", NULL
, "AIF3 Playback" },
1655 { "AIF3RX2", NULL
, "AIF3 Playback" },
1657 { "Slim1 Capture", NULL
, "SLIMTX1" },
1658 { "Slim1 Capture", NULL
, "SLIMTX2" },
1659 { "Slim1 Capture", NULL
, "SLIMTX3" },
1660 { "Slim1 Capture", NULL
, "SLIMTX4" },
1662 { "SLIMRX1", NULL
, "Slim1 Playback" },
1663 { "SLIMRX2", NULL
, "Slim1 Playback" },
1664 { "SLIMRX3", NULL
, "Slim1 Playback" },
1665 { "SLIMRX4", NULL
, "Slim1 Playback" },
1667 { "Slim2 Capture", NULL
, "SLIMTX5" },
1668 { "Slim2 Capture", NULL
, "SLIMTX6" },
1670 { "SLIMRX5", NULL
, "Slim2 Playback" },
1671 { "SLIMRX6", NULL
, "Slim2 Playback" },
1673 { "Slim3 Capture", NULL
, "SLIMTX7" },
1674 { "Slim3 Capture", NULL
, "SLIMTX8" },
1676 { "SLIMRX7", NULL
, "Slim3 Playback" },
1677 { "SLIMRX8", NULL
, "Slim3 Playback" },
1679 { "AIF1 Playback", NULL
, "SYSCLK" },
1680 { "AIF2 Playback", NULL
, "SYSCLK" },
1681 { "AIF3 Playback", NULL
, "SYSCLK" },
1682 { "Slim1 Playback", NULL
, "SYSCLK" },
1683 { "Slim2 Playback", NULL
, "SYSCLK" },
1684 { "Slim3 Playback", NULL
, "SYSCLK" },
1686 { "AIF1 Capture", NULL
, "SYSCLK" },
1687 { "AIF2 Capture", NULL
, "SYSCLK" },
1688 { "AIF3 Capture", NULL
, "SYSCLK" },
1689 { "Slim1 Capture", NULL
, "SYSCLK" },
1690 { "Slim2 Capture", NULL
, "SYSCLK" },
1691 { "Slim3 Capture", NULL
, "SYSCLK" },
1693 { "IN1L PGA", NULL
, "IN1L" },
1694 { "IN1R PGA", NULL
, "IN1R" },
1696 { "IN2L PGA", NULL
, "IN2L" },
1697 { "IN2R PGA", NULL
, "IN2R" },
1699 { "IN3L PGA", NULL
, "IN3L" },
1700 { "IN3R PGA", NULL
, "IN3R" },
1702 { "IN4L PGA", NULL
, "IN4L" },
1703 { "IN4R PGA", NULL
, "IN4R" },
1705 ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"),
1706 ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"),
1707 ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"),
1708 ARIZONA_MIXER_ROUTES("OUT2R", "HPOUT2R"),
1709 ARIZONA_MIXER_ROUTES("OUT3L", "HPOUT3L"),
1710 ARIZONA_MIXER_ROUTES("OUT3R", "HPOUT3R"),
1712 ARIZONA_MIXER_ROUTES("OUT4L", "SPKOUTL"),
1713 ARIZONA_MIXER_ROUTES("OUT4R", "SPKOUTR"),
1714 ARIZONA_MIXER_ROUTES("OUT5L", "SPKDAT1L"),
1715 ARIZONA_MIXER_ROUTES("OUT5R", "SPKDAT1R"),
1716 ARIZONA_MIXER_ROUTES("OUT6L", "SPKDAT2L"),
1717 ARIZONA_MIXER_ROUTES("OUT6R", "SPKDAT2R"),
1719 ARIZONA_MIXER_ROUTES("PWM1 Driver", "PWM1"),
1720 ARIZONA_MIXER_ROUTES("PWM2 Driver", "PWM2"),
1722 ARIZONA_MIXER_ROUTES("AIF1TX1", "AIF1TX1"),
1723 ARIZONA_MIXER_ROUTES("AIF1TX2", "AIF1TX2"),
1724 ARIZONA_MIXER_ROUTES("AIF1TX3", "AIF1TX3"),
1725 ARIZONA_MIXER_ROUTES("AIF1TX4", "AIF1TX4"),
1726 ARIZONA_MIXER_ROUTES("AIF1TX5", "AIF1TX5"),
1727 ARIZONA_MIXER_ROUTES("AIF1TX6", "AIF1TX6"),
1728 ARIZONA_MIXER_ROUTES("AIF1TX7", "AIF1TX7"),
1729 ARIZONA_MIXER_ROUTES("AIF1TX8", "AIF1TX8"),
1731 ARIZONA_MIXER_ROUTES("AIF2TX1", "AIF2TX1"),
1732 ARIZONA_MIXER_ROUTES("AIF2TX2", "AIF2TX2"),
1733 ARIZONA_MIXER_ROUTES("AIF2TX3", "AIF2TX3"),
1734 ARIZONA_MIXER_ROUTES("AIF2TX4", "AIF2TX4"),
1735 ARIZONA_MIXER_ROUTES("AIF2TX5", "AIF2TX5"),
1736 ARIZONA_MIXER_ROUTES("AIF2TX6", "AIF2TX6"),
1738 ARIZONA_MIXER_ROUTES("AIF3TX1", "AIF3TX1"),
1739 ARIZONA_MIXER_ROUTES("AIF3TX2", "AIF3TX2"),
1741 ARIZONA_MIXER_ROUTES("SLIMTX1", "SLIMTX1"),
1742 ARIZONA_MIXER_ROUTES("SLIMTX2", "SLIMTX2"),
1743 ARIZONA_MIXER_ROUTES("SLIMTX3", "SLIMTX3"),
1744 ARIZONA_MIXER_ROUTES("SLIMTX4", "SLIMTX4"),
1745 ARIZONA_MIXER_ROUTES("SLIMTX5", "SLIMTX5"),
1746 ARIZONA_MIXER_ROUTES("SLIMTX6", "SLIMTX6"),
1747 ARIZONA_MIXER_ROUTES("SLIMTX7", "SLIMTX7"),
1748 ARIZONA_MIXER_ROUTES("SLIMTX8", "SLIMTX8"),
1750 ARIZONA_MIXER_ROUTES("EQ1", "EQ1"),
1751 ARIZONA_MIXER_ROUTES("EQ2", "EQ2"),
1752 ARIZONA_MIXER_ROUTES("EQ3", "EQ3"),
1753 ARIZONA_MIXER_ROUTES("EQ4", "EQ4"),
1755 ARIZONA_MIXER_ROUTES("DRC1L", "DRC1L"),
1756 ARIZONA_MIXER_ROUTES("DRC1R", "DRC1R"),
1757 ARIZONA_MIXER_ROUTES("DRC2L", "DRC2L"),
1758 ARIZONA_MIXER_ROUTES("DRC2R", "DRC2R"),
1760 ARIZONA_MIXER_ROUTES("LHPF1", "LHPF1"),
1761 ARIZONA_MIXER_ROUTES("LHPF2", "LHPF2"),
1762 ARIZONA_MIXER_ROUTES("LHPF3", "LHPF3"),
1763 ARIZONA_MIXER_ROUTES("LHPF4", "LHPF4"),
1765 ARIZONA_MIXER_ROUTES("Mic Mute Mixer", "Noise"),
1766 ARIZONA_MIXER_ROUTES("Mic Mute Mixer", "Mic"),
1768 ARIZONA_MUX_ROUTES("ASRC1L", "ASRC1L"),
1769 ARIZONA_MUX_ROUTES("ASRC1R", "ASRC1R"),
1770 ARIZONA_MUX_ROUTES("ASRC2L", "ASRC2L"),
1771 ARIZONA_MUX_ROUTES("ASRC2R", "ASRC2R"),
1773 ARIZONA_DSP_ROUTES("DSP1"),
1774 ARIZONA_DSP_ROUTES("DSP2"),
1775 ARIZONA_DSP_ROUTES("DSP3"),
1776 ARIZONA_DSP_ROUTES("DSP4"),
1778 ARIZONA_MUX_ROUTES("ISRC1INT1", "ISRC1INT1"),
1779 ARIZONA_MUX_ROUTES("ISRC1INT2", "ISRC1INT2"),
1780 ARIZONA_MUX_ROUTES("ISRC1INT3", "ISRC1INT3"),
1781 ARIZONA_MUX_ROUTES("ISRC1INT4", "ISRC1INT4"),
1783 ARIZONA_MUX_ROUTES("ISRC1DEC1", "ISRC1DEC1"),
1784 ARIZONA_MUX_ROUTES("ISRC1DEC2", "ISRC1DEC2"),
1785 ARIZONA_MUX_ROUTES("ISRC1DEC3", "ISRC1DEC3"),
1786 ARIZONA_MUX_ROUTES("ISRC1DEC4", "ISRC1DEC4"),
1788 ARIZONA_MUX_ROUTES("ISRC2INT1", "ISRC2INT1"),
1789 ARIZONA_MUX_ROUTES("ISRC2INT2", "ISRC2INT2"),
1790 ARIZONA_MUX_ROUTES("ISRC2INT3", "ISRC2INT3"),
1791 ARIZONA_MUX_ROUTES("ISRC2INT4", "ISRC2INT4"),
1793 ARIZONA_MUX_ROUTES("ISRC2DEC1", "ISRC2DEC1"),
1794 ARIZONA_MUX_ROUTES("ISRC2DEC2", "ISRC2DEC2"),
1795 ARIZONA_MUX_ROUTES("ISRC2DEC3", "ISRC2DEC3"),
1796 ARIZONA_MUX_ROUTES("ISRC2DEC4", "ISRC2DEC4"),
1798 ARIZONA_MUX_ROUTES("ISRC3INT1", "ISRC3INT1"),
1799 ARIZONA_MUX_ROUTES("ISRC3INT2", "ISRC3INT2"),
1800 ARIZONA_MUX_ROUTES("ISRC3INT3", "ISRC3INT3"),
1801 ARIZONA_MUX_ROUTES("ISRC3INT4", "ISRC3INT4"),
1803 ARIZONA_MUX_ROUTES("ISRC3DEC1", "ISRC3DEC1"),
1804 ARIZONA_MUX_ROUTES("ISRC3DEC2", "ISRC3DEC2"),
1805 ARIZONA_MUX_ROUTES("ISRC3DEC3", "ISRC3DEC3"),
1806 ARIZONA_MUX_ROUTES("ISRC3DEC4", "ISRC3DEC4"),
1808 { "AEC Loopback", "HPOUT1L", "OUT1L" },
1809 { "AEC Loopback", "HPOUT1R", "OUT1R" },
1810 { "HPOUT1L", NULL
, "OUT1L" },
1811 { "HPOUT1R", NULL
, "OUT1R" },
1813 { "AEC Loopback", "HPOUT2L", "OUT2L" },
1814 { "AEC Loopback", "HPOUT2R", "OUT2R" },
1815 { "HPOUT2L", NULL
, "OUT2L" },
1816 { "HPOUT2R", NULL
, "OUT2R" },
1818 { "AEC Loopback", "HPOUT3L", "OUT3L" },
1819 { "AEC Loopback", "HPOUT3R", "OUT3R" },
1820 { "HPOUT3L", NULL
, "OUT3L" },
1821 { "HPOUT3R", NULL
, "OUT3R" },
1823 { "AEC Loopback", "SPKOUTL", "OUT4L" },
1824 { "SPKOUTLN", NULL
, "OUT4L" },
1825 { "SPKOUTLP", NULL
, "OUT4L" },
1827 { "AEC Loopback", "SPKOUTR", "OUT4R" },
1828 { "SPKOUTRN", NULL
, "OUT4R" },
1829 { "SPKOUTRP", NULL
, "OUT4R" },
1831 { "AEC Loopback", "SPKDAT1L", "OUT5L" },
1832 { "AEC Loopback", "SPKDAT1R", "OUT5R" },
1833 { "SPKDAT1L", NULL
, "OUT5L" },
1834 { "SPKDAT1R", NULL
, "OUT5R" },
1836 { "AEC Loopback", "SPKDAT2L", "OUT6L" },
1837 { "AEC Loopback", "SPKDAT2R", "OUT6R" },
1838 { "SPKDAT2L", NULL
, "OUT6L" },
1839 { "SPKDAT2R", NULL
, "OUT6R" },
1841 { "MICSUPP", NULL
, "SYSCLK" },
1843 { "DRC1 Signal Activity", NULL
, "DRC1L" },
1844 { "DRC1 Signal Activity", NULL
, "DRC1R" },
1845 { "DRC2 Signal Activity", NULL
, "DRC2L" },
1846 { "DRC2 Signal Activity", NULL
, "DRC2R" },
1849 static int wm5110_set_fll(struct snd_soc_codec
*codec
, int fll_id
, int source
,
1850 unsigned int Fref
, unsigned int Fout
)
1852 struct wm5110_priv
*wm5110
= snd_soc_codec_get_drvdata(codec
);
1856 return arizona_set_fll(&wm5110
->fll
[0], source
, Fref
, Fout
);
1858 return arizona_set_fll(&wm5110
->fll
[1], source
, Fref
, Fout
);
1859 case WM5110_FLL1_REFCLK
:
1860 return arizona_set_fll_refclk(&wm5110
->fll
[0], source
, Fref
,
1862 case WM5110_FLL2_REFCLK
:
1863 return arizona_set_fll_refclk(&wm5110
->fll
[1], source
, Fref
,
1870 #define WM5110_RATES SNDRV_PCM_RATE_8000_192000
1872 #define WM5110_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
1873 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
1875 static struct snd_soc_dai_driver wm5110_dai
[] = {
1877 .name
= "wm5110-aif1",
1879 .base
= ARIZONA_AIF1_BCLK_CTRL
,
1881 .stream_name
= "AIF1 Playback",
1884 .rates
= WM5110_RATES
,
1885 .formats
= WM5110_FORMATS
,
1888 .stream_name
= "AIF1 Capture",
1891 .rates
= WM5110_RATES
,
1892 .formats
= WM5110_FORMATS
,
1894 .ops
= &arizona_dai_ops
,
1895 .symmetric_rates
= 1,
1896 .symmetric_samplebits
= 1,
1899 .name
= "wm5110-aif2",
1901 .base
= ARIZONA_AIF2_BCLK_CTRL
,
1903 .stream_name
= "AIF2 Playback",
1906 .rates
= WM5110_RATES
,
1907 .formats
= WM5110_FORMATS
,
1910 .stream_name
= "AIF2 Capture",
1913 .rates
= WM5110_RATES
,
1914 .formats
= WM5110_FORMATS
,
1916 .ops
= &arizona_dai_ops
,
1917 .symmetric_rates
= 1,
1918 .symmetric_samplebits
= 1,
1921 .name
= "wm5110-aif3",
1923 .base
= ARIZONA_AIF3_BCLK_CTRL
,
1925 .stream_name
= "AIF3 Playback",
1928 .rates
= WM5110_RATES
,
1929 .formats
= WM5110_FORMATS
,
1932 .stream_name
= "AIF3 Capture",
1935 .rates
= WM5110_RATES
,
1936 .formats
= WM5110_FORMATS
,
1938 .ops
= &arizona_dai_ops
,
1939 .symmetric_rates
= 1,
1940 .symmetric_samplebits
= 1,
1943 .name
= "wm5110-slim1",
1946 .stream_name
= "Slim1 Playback",
1949 .rates
= WM5110_RATES
,
1950 .formats
= WM5110_FORMATS
,
1953 .stream_name
= "Slim1 Capture",
1956 .rates
= WM5110_RATES
,
1957 .formats
= WM5110_FORMATS
,
1959 .ops
= &arizona_simple_dai_ops
,
1962 .name
= "wm5110-slim2",
1965 .stream_name
= "Slim2 Playback",
1968 .rates
= WM5110_RATES
,
1969 .formats
= WM5110_FORMATS
,
1972 .stream_name
= "Slim2 Capture",
1975 .rates
= WM5110_RATES
,
1976 .formats
= WM5110_FORMATS
,
1978 .ops
= &arizona_simple_dai_ops
,
1981 .name
= "wm5110-slim3",
1984 .stream_name
= "Slim3 Playback",
1987 .rates
= WM5110_RATES
,
1988 .formats
= WM5110_FORMATS
,
1991 .stream_name
= "Slim3 Capture",
1994 .rates
= WM5110_RATES
,
1995 .formats
= WM5110_FORMATS
,
1997 .ops
= &arizona_simple_dai_ops
,
2001 static int wm5110_codec_probe(struct snd_soc_codec
*codec
)
2003 struct snd_soc_dapm_context
*dapm
= snd_soc_codec_get_dapm(codec
);
2004 struct wm5110_priv
*priv
= snd_soc_codec_get_drvdata(codec
);
2007 priv
->core
.arizona
->dapm
= dapm
;
2009 arizona_init_spk(codec
);
2010 arizona_init_gpio(codec
);
2011 arizona_init_mono(codec
);
2013 for (i
= 0; i
< WM5110_NUM_ADSP
; ++i
) {
2014 ret
= wm_adsp2_codec_probe(&priv
->core
.adsp
[i
], codec
);
2016 goto err_adsp2_codec_probe
;
2019 ret
= snd_soc_add_codec_controls(codec
,
2020 arizona_adsp2_rate_controls
,
2023 goto err_adsp2_codec_probe
;
2025 snd_soc_dapm_disable_pin(dapm
, "HAPTICS");
2029 err_adsp2_codec_probe
:
2030 for (--i
; i
>= 0; --i
)
2031 wm_adsp2_codec_remove(&priv
->core
.adsp
[i
], codec
);
2036 static int wm5110_codec_remove(struct snd_soc_codec
*codec
)
2038 struct wm5110_priv
*priv
= snd_soc_codec_get_drvdata(codec
);
2041 for (i
= 0; i
< WM5110_NUM_ADSP
; ++i
)
2042 wm_adsp2_codec_remove(&priv
->core
.adsp
[i
], codec
);
2044 priv
->core
.arizona
->dapm
= NULL
;
2049 #define WM5110_DIG_VU 0x0200
2051 static unsigned int wm5110_digital_vu
[] = {
2052 ARIZONA_DAC_DIGITAL_VOLUME_1L
,
2053 ARIZONA_DAC_DIGITAL_VOLUME_1R
,
2054 ARIZONA_DAC_DIGITAL_VOLUME_2L
,
2055 ARIZONA_DAC_DIGITAL_VOLUME_2R
,
2056 ARIZONA_DAC_DIGITAL_VOLUME_3L
,
2057 ARIZONA_DAC_DIGITAL_VOLUME_3R
,
2058 ARIZONA_DAC_DIGITAL_VOLUME_4L
,
2059 ARIZONA_DAC_DIGITAL_VOLUME_4R
,
2060 ARIZONA_DAC_DIGITAL_VOLUME_5L
,
2061 ARIZONA_DAC_DIGITAL_VOLUME_5R
,
2062 ARIZONA_DAC_DIGITAL_VOLUME_6L
,
2063 ARIZONA_DAC_DIGITAL_VOLUME_6R
,
2066 static struct regmap
*wm5110_get_regmap(struct device
*dev
)
2068 struct wm5110_priv
*priv
= dev_get_drvdata(dev
);
2070 return priv
->core
.arizona
->regmap
;
2073 static struct snd_soc_codec_driver soc_codec_dev_wm5110
= {
2074 .probe
= wm5110_codec_probe
,
2075 .remove
= wm5110_codec_remove
,
2076 .get_regmap
= wm5110_get_regmap
,
2078 .idle_bias_off
= true,
2080 .set_sysclk
= arizona_set_sysclk
,
2081 .set_pll
= wm5110_set_fll
,
2083 .controls
= wm5110_snd_controls
,
2084 .num_controls
= ARRAY_SIZE(wm5110_snd_controls
),
2085 .dapm_widgets
= wm5110_dapm_widgets
,
2086 .num_dapm_widgets
= ARRAY_SIZE(wm5110_dapm_widgets
),
2087 .dapm_routes
= wm5110_dapm_routes
,
2088 .num_dapm_routes
= ARRAY_SIZE(wm5110_dapm_routes
),
2091 static int wm5110_probe(struct platform_device
*pdev
)
2093 struct arizona
*arizona
= dev_get_drvdata(pdev
->dev
.parent
);
2094 struct wm5110_priv
*wm5110
;
2097 wm5110
= devm_kzalloc(&pdev
->dev
, sizeof(struct wm5110_priv
),
2101 platform_set_drvdata(pdev
, wm5110
);
2103 wm5110
->core
.arizona
= arizona
;
2104 wm5110
->core
.num_inputs
= 8;
2106 for (i
= 0; i
< WM5110_NUM_ADSP
; i
++) {
2107 wm5110
->core
.adsp
[i
].part
= "wm5110";
2108 wm5110
->core
.adsp
[i
].num
= i
+ 1;
2109 wm5110
->core
.adsp
[i
].type
= WMFW_ADSP2
;
2110 wm5110
->core
.adsp
[i
].dev
= arizona
->dev
;
2111 wm5110
->core
.adsp
[i
].regmap
= arizona
->regmap
;
2113 wm5110
->core
.adsp
[i
].base
= ARIZONA_DSP1_CONTROL_1
2115 wm5110
->core
.adsp
[i
].mem
= wm5110_dsp_regions
[i
];
2116 wm5110
->core
.adsp
[i
].num_mems
2117 = ARRAY_SIZE(wm5110_dsp1_regions
);
2119 ret
= wm_adsp2_init(&wm5110
->core
.adsp
[i
]);
2124 for (i
= 0; i
< ARRAY_SIZE(wm5110
->fll
); i
++)
2125 wm5110
->fll
[i
].vco_mult
= 3;
2127 arizona_init_fll(arizona
, 1, ARIZONA_FLL1_CONTROL_1
- 1,
2128 ARIZONA_IRQ_FLL1_LOCK
, ARIZONA_IRQ_FLL1_CLOCK_OK
,
2130 arizona_init_fll(arizona
, 2, ARIZONA_FLL2_CONTROL_1
- 1,
2131 ARIZONA_IRQ_FLL2_LOCK
, ARIZONA_IRQ_FLL2_CLOCK_OK
,
2134 /* SR2 fixed at 8kHz, SR3 fixed at 16kHz */
2135 regmap_update_bits(arizona
->regmap
, ARIZONA_SAMPLE_RATE_2
,
2136 ARIZONA_SAMPLE_RATE_2_MASK
, 0x11);
2137 regmap_update_bits(arizona
->regmap
, ARIZONA_SAMPLE_RATE_3
,
2138 ARIZONA_SAMPLE_RATE_3_MASK
, 0x12);
2140 for (i
= 0; i
< ARRAY_SIZE(wm5110_dai
); i
++)
2141 arizona_init_dai(&wm5110
->core
, i
);
2143 /* Latch volume update bits */
2144 for (i
= 0; i
< ARRAY_SIZE(wm5110_digital_vu
); i
++)
2145 regmap_update_bits(arizona
->regmap
, wm5110_digital_vu
[i
],
2146 WM5110_DIG_VU
, WM5110_DIG_VU
);
2148 pm_runtime_enable(&pdev
->dev
);
2149 pm_runtime_idle(&pdev
->dev
);
2151 return snd_soc_register_codec(&pdev
->dev
, &soc_codec_dev_wm5110
,
2152 wm5110_dai
, ARRAY_SIZE(wm5110_dai
));
2155 static int wm5110_remove(struct platform_device
*pdev
)
2157 snd_soc_unregister_codec(&pdev
->dev
);
2158 pm_runtime_disable(&pdev
->dev
);
2163 static struct platform_driver wm5110_codec_driver
= {
2165 .name
= "wm5110-codec",
2167 .probe
= wm5110_probe
,
2168 .remove
= wm5110_remove
,
2171 module_platform_driver(wm5110_codec_driver
);
2173 MODULE_DESCRIPTION("ASoC WM5110 driver");
2174 MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
2175 MODULE_LICENSE("GPL");
2176 MODULE_ALIAS("platform:wm5110-codec");