Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1 | /* |
| 2 | * wm5110.c -- WM5110 ALSA SoC Audio driver |
| 3 | * |
| 4 | * Copyright 2012 Wolfson Microelectronics plc |
| 5 | * |
| 6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> |
| 7 | * |
| 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. |
| 11 | */ |
| 12 | |
| 13 | #include <linux/module.h> |
| 14 | #include <linux/moduleparam.h> |
| 15 | #include <linux/init.h> |
| 16 | #include <linux/delay.h> |
| 17 | #include <linux/pm.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> |
| 28 | |
| 29 | #include <linux/mfd/arizona/core.h> |
| 30 | #include <linux/mfd/arizona/registers.h> |
| 31 | |
| 32 | #include "arizona.h" |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 33 | #include "wm_adsp.h" |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 34 | #include "wm5110.h" |
| 35 | |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 36 | #define WM5110_NUM_ADSP 4 |
| 37 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 38 | struct wm5110_priv { |
| 39 | struct arizona_priv core; |
| 40 | struct arizona_fll fll[2]; |
| 41 | }; |
| 42 | |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 43 | static const struct wm_adsp_region wm5110_dsp1_regions[] = { |
| 44 | { .type = WMFW_ADSP2_PM, .base = 0x100000 }, |
| 45 | { .type = WMFW_ADSP2_ZM, .base = 0x180000 }, |
| 46 | { .type = WMFW_ADSP2_XM, .base = 0x190000 }, |
| 47 | { .type = WMFW_ADSP2_YM, .base = 0x1a8000 }, |
| 48 | }; |
| 49 | |
| 50 | static const struct wm_adsp_region wm5110_dsp2_regions[] = { |
| 51 | { .type = WMFW_ADSP2_PM, .base = 0x200000 }, |
| 52 | { .type = WMFW_ADSP2_ZM, .base = 0x280000 }, |
| 53 | { .type = WMFW_ADSP2_XM, .base = 0x290000 }, |
| 54 | { .type = WMFW_ADSP2_YM, .base = 0x2a8000 }, |
| 55 | }; |
| 56 | |
| 57 | static const struct wm_adsp_region wm5110_dsp3_regions[] = { |
| 58 | { .type = WMFW_ADSP2_PM, .base = 0x300000 }, |
| 59 | { .type = WMFW_ADSP2_ZM, .base = 0x380000 }, |
| 60 | { .type = WMFW_ADSP2_XM, .base = 0x390000 }, |
| 61 | { .type = WMFW_ADSP2_YM, .base = 0x3a8000 }, |
| 62 | }; |
| 63 | |
| 64 | static const struct wm_adsp_region wm5110_dsp4_regions[] = { |
| 65 | { .type = WMFW_ADSP2_PM, .base = 0x400000 }, |
| 66 | { .type = WMFW_ADSP2_ZM, .base = 0x480000 }, |
| 67 | { .type = WMFW_ADSP2_XM, .base = 0x490000 }, |
| 68 | { .type = WMFW_ADSP2_YM, .base = 0x4a8000 }, |
| 69 | }; |
| 70 | |
| 71 | static const struct wm_adsp_region *wm5110_dsp_regions[] = { |
| 72 | wm5110_dsp1_regions, |
| 73 | wm5110_dsp2_regions, |
| 74 | wm5110_dsp3_regions, |
| 75 | wm5110_dsp4_regions, |
| 76 | }; |
| 77 | |
Charles Keepax | f69f86b | 2013-11-19 10:51:29 +0000 | [diff] [blame] | 78 | static const struct reg_default wm5110_sysclk_revd_patch[] = { |
| 79 | { 0x3093, 0x1001 }, |
| 80 | { 0x30E3, 0x1301 }, |
| 81 | { 0x3133, 0x1201 }, |
| 82 | { 0x3183, 0x1501 }, |
| 83 | { 0x31D3, 0x1401 }, |
| 84 | }; |
| 85 | |
| 86 | static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w, |
| 87 | struct snd_kcontrol *kcontrol, int event) |
| 88 | { |
| 89 | struct snd_soc_codec *codec = w->codec; |
| 90 | struct arizona *arizona = dev_get_drvdata(codec->dev->parent); |
| 91 | struct regmap *regmap = codec->control_data; |
| 92 | const struct reg_default *patch = NULL; |
| 93 | int i, patch_size; |
| 94 | |
| 95 | switch (arizona->rev) { |
| 96 | case 3: |
| 97 | patch = wm5110_sysclk_revd_patch; |
| 98 | patch_size = ARRAY_SIZE(wm5110_sysclk_revd_patch); |
| 99 | break; |
| 100 | default: |
| 101 | return 0; |
| 102 | } |
| 103 | |
| 104 | switch (event) { |
| 105 | case SND_SOC_DAPM_POST_PMU: |
| 106 | if (patch) |
| 107 | for (i = 0; i < patch_size; i++) |
Mark Brown | 959e408 | 2013-12-12 00:49:56 +0000 | [diff] [blame] | 108 | regmap_write_async(regmap, patch[i].reg, |
| 109 | patch[i].def); |
Charles Keepax | f69f86b | 2013-11-19 10:51:29 +0000 | [diff] [blame] | 110 | break; |
| 111 | |
| 112 | default: |
| 113 | break; |
| 114 | } |
| 115 | |
| 116 | return 0; |
| 117 | } |
| 118 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 119 | static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0); |
| 120 | static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0); |
| 121 | static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0); |
| 122 | static DECLARE_TLV_DB_SCALE(noise_tlv, 0, 600, 0); |
Mark Brown | bd7fe24 | 2012-12-18 13:53:26 +0000 | [diff] [blame] | 123 | static DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0); |
| 124 | |
| 125 | #define WM5110_NG_SRC(name, base) \ |
| 126 | SOC_SINGLE(name " NG HPOUT1L Switch", base, 0, 1, 0), \ |
| 127 | SOC_SINGLE(name " NG HPOUT1R Switch", base, 1, 1, 0), \ |
| 128 | SOC_SINGLE(name " NG HPOUT2L Switch", base, 2, 1, 0), \ |
| 129 | SOC_SINGLE(name " NG HPOUT2R Switch", base, 3, 1, 0), \ |
| 130 | SOC_SINGLE(name " NG HPOUT3L Switch", base, 4, 1, 0), \ |
| 131 | SOC_SINGLE(name " NG HPOUT3R Switch", base, 5, 1, 0), \ |
| 132 | SOC_SINGLE(name " NG SPKOUTL Switch", base, 6, 1, 0), \ |
| 133 | SOC_SINGLE(name " NG SPKOUTR Switch", base, 7, 1, 0), \ |
| 134 | SOC_SINGLE(name " NG SPKDAT1L Switch", base, 8, 1, 0), \ |
| 135 | SOC_SINGLE(name " NG SPKDAT1R Switch", base, 9, 1, 0), \ |
| 136 | SOC_SINGLE(name " NG SPKDAT2L Switch", base, 10, 1, 0), \ |
| 137 | SOC_SINGLE(name " NG SPKDAT2R Switch", base, 11, 1, 0) |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 138 | |
| 139 | static const struct snd_kcontrol_new wm5110_snd_controls[] = { |
Charles Keepax | c7f3843 | 2013-08-06 17:03:55 +0100 | [diff] [blame] | 140 | SOC_ENUM("IN1 OSR", arizona_in_dmic_osr[0]), |
| 141 | SOC_ENUM("IN2 OSR", arizona_in_dmic_osr[1]), |
| 142 | SOC_ENUM("IN3 OSR", arizona_in_dmic_osr[2]), |
| 143 | SOC_ENUM("IN4 OSR", arizona_in_dmic_osr[3]), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 144 | |
Mark Brown | 02482da | 2012-12-14 15:18:30 +0900 | [diff] [blame] | 145 | SOC_SINGLE_RANGE_TLV("IN1L Volume", ARIZONA_IN1L_CONTROL, |
| 146 | ARIZONA_IN1L_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv), |
| 147 | SOC_SINGLE_RANGE_TLV("IN1R Volume", ARIZONA_IN1R_CONTROL, |
| 148 | ARIZONA_IN1R_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv), |
| 149 | SOC_SINGLE_RANGE_TLV("IN2L Volume", ARIZONA_IN2L_CONTROL, |
| 150 | ARIZONA_IN2L_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv), |
| 151 | SOC_SINGLE_RANGE_TLV("IN2R Volume", ARIZONA_IN2R_CONTROL, |
| 152 | ARIZONA_IN2R_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv), |
| 153 | SOC_SINGLE_RANGE_TLV("IN3L Volume", ARIZONA_IN3L_CONTROL, |
| 154 | ARIZONA_IN3L_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv), |
| 155 | SOC_SINGLE_RANGE_TLV("IN3R Volume", ARIZONA_IN3R_CONTROL, |
| 156 | ARIZONA_IN3R_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 157 | |
Charles Keepax | 254dc32 | 2013-11-19 16:04:03 +0000 | [diff] [blame] | 158 | SOC_ENUM("IN HPF Cutoff Frequency", arizona_in_hpf_cut_enum), |
| 159 | |
| 160 | SOC_SINGLE("IN1L HPF Switch", ARIZONA_IN1L_CONTROL, |
| 161 | ARIZONA_IN1L_HPF_SHIFT, 1, 0), |
| 162 | SOC_SINGLE("IN1R HPF Switch", ARIZONA_IN1R_CONTROL, |
| 163 | ARIZONA_IN1R_HPF_SHIFT, 1, 0), |
| 164 | SOC_SINGLE("IN2L HPF Switch", ARIZONA_IN2L_CONTROL, |
| 165 | ARIZONA_IN2L_HPF_SHIFT, 1, 0), |
| 166 | SOC_SINGLE("IN2R HPF Switch", ARIZONA_IN2R_CONTROL, |
| 167 | ARIZONA_IN2R_HPF_SHIFT, 1, 0), |
| 168 | SOC_SINGLE("IN3L HPF Switch", ARIZONA_IN3L_CONTROL, |
| 169 | ARIZONA_IN3L_HPF_SHIFT, 1, 0), |
| 170 | SOC_SINGLE("IN3R HPF Switch", ARIZONA_IN3R_CONTROL, |
| 171 | ARIZONA_IN3R_HPF_SHIFT, 1, 0), |
| 172 | SOC_SINGLE("IN4L HPF Switch", ARIZONA_IN4L_CONTROL, |
| 173 | ARIZONA_IN4L_HPF_SHIFT, 1, 0), |
| 174 | SOC_SINGLE("IN4R HPF Switch", ARIZONA_IN4R_CONTROL, |
| 175 | ARIZONA_IN4R_HPF_SHIFT, 1, 0), |
| 176 | |
Mark Brown | 02482da | 2012-12-14 15:18:30 +0900 | [diff] [blame] | 177 | SOC_SINGLE_TLV("IN1L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_1L, |
| 178 | ARIZONA_IN1L_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv), |
| 179 | SOC_SINGLE_TLV("IN1R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_1R, |
| 180 | ARIZONA_IN1R_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv), |
| 181 | SOC_SINGLE_TLV("IN2L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_2L, |
| 182 | ARIZONA_IN2L_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv), |
| 183 | SOC_SINGLE_TLV("IN2R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_2R, |
| 184 | ARIZONA_IN2R_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv), |
| 185 | SOC_SINGLE_TLV("IN3L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_3L, |
| 186 | ARIZONA_IN3L_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv), |
| 187 | SOC_SINGLE_TLV("IN3R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_3R, |
| 188 | ARIZONA_IN3R_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv), |
| 189 | SOC_SINGLE_TLV("IN4L Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_4L, |
| 190 | ARIZONA_IN4L_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv), |
| 191 | SOC_SINGLE_TLV("IN4R Digital Volume", ARIZONA_ADC_DIGITAL_VOLUME_4R, |
| 192 | ARIZONA_IN4R_DIG_VOL_SHIFT, 0xbf, 0, digital_tlv), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 193 | |
Mark Brown | a1abfa8 | 2012-12-09 12:50:05 +0900 | [diff] [blame] | 194 | SOC_ENUM("Input Ramp Up", arizona_in_vi_ramp), |
| 195 | SOC_ENUM("Input Ramp Down", arizona_in_vd_ramp), |
| 196 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 197 | ARIZONA_MIXER_CONTROLS("EQ1", ARIZONA_EQ1MIX_INPUT_1_SOURCE), |
| 198 | ARIZONA_MIXER_CONTROLS("EQ2", ARIZONA_EQ2MIX_INPUT_1_SOURCE), |
| 199 | ARIZONA_MIXER_CONTROLS("EQ3", ARIZONA_EQ3MIX_INPUT_1_SOURCE), |
| 200 | ARIZONA_MIXER_CONTROLS("EQ4", ARIZONA_EQ4MIX_INPUT_1_SOURCE), |
| 201 | |
Richard Fitzgerald | 12850b8 | 2013-11-13 13:01:49 +0000 | [diff] [blame] | 202 | SND_SOC_BYTES_MASK("EQ1 Coefficients", ARIZONA_EQ1_1, 21, |
Mark Brown | 56fd460 | 2012-12-05 16:38:12 +0900 | [diff] [blame] | 203 | ARIZONA_EQ1_ENA_MASK), |
Richard Fitzgerald | 12850b8 | 2013-11-13 13:01:49 +0000 | [diff] [blame] | 204 | SND_SOC_BYTES_MASK("EQ2 Coefficients", ARIZONA_EQ2_1, 21, |
Mark Brown | 56fd460 | 2012-12-05 16:38:12 +0900 | [diff] [blame] | 205 | ARIZONA_EQ2_ENA_MASK), |
Richard Fitzgerald | 12850b8 | 2013-11-13 13:01:49 +0000 | [diff] [blame] | 206 | SND_SOC_BYTES_MASK("EQ3 Coefficients", ARIZONA_EQ3_1, 21, |
Mark Brown | 56fd460 | 2012-12-05 16:38:12 +0900 | [diff] [blame] | 207 | ARIZONA_EQ3_ENA_MASK), |
Richard Fitzgerald | 12850b8 | 2013-11-13 13:01:49 +0000 | [diff] [blame] | 208 | SND_SOC_BYTES_MASK("EQ4 Coefficients", ARIZONA_EQ4_1, 21, |
Mark Brown | 56fd460 | 2012-12-05 16:38:12 +0900 | [diff] [blame] | 209 | ARIZONA_EQ4_ENA_MASK), |
| 210 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 211 | SOC_SINGLE_TLV("EQ1 B1 Volume", ARIZONA_EQ1_1, ARIZONA_EQ1_B1_GAIN_SHIFT, |
| 212 | 24, 0, eq_tlv), |
| 213 | SOC_SINGLE_TLV("EQ1 B2 Volume", ARIZONA_EQ1_1, ARIZONA_EQ1_B2_GAIN_SHIFT, |
| 214 | 24, 0, eq_tlv), |
| 215 | SOC_SINGLE_TLV("EQ1 B3 Volume", ARIZONA_EQ1_1, ARIZONA_EQ1_B3_GAIN_SHIFT, |
| 216 | 24, 0, eq_tlv), |
| 217 | SOC_SINGLE_TLV("EQ1 B4 Volume", ARIZONA_EQ1_2, ARIZONA_EQ1_B4_GAIN_SHIFT, |
| 218 | 24, 0, eq_tlv), |
| 219 | SOC_SINGLE_TLV("EQ1 B5 Volume", ARIZONA_EQ1_2, ARIZONA_EQ1_B5_GAIN_SHIFT, |
| 220 | 24, 0, eq_tlv), |
| 221 | |
| 222 | SOC_SINGLE_TLV("EQ2 B1 Volume", ARIZONA_EQ2_1, ARIZONA_EQ2_B1_GAIN_SHIFT, |
| 223 | 24, 0, eq_tlv), |
| 224 | SOC_SINGLE_TLV("EQ2 B2 Volume", ARIZONA_EQ2_1, ARIZONA_EQ2_B2_GAIN_SHIFT, |
| 225 | 24, 0, eq_tlv), |
| 226 | SOC_SINGLE_TLV("EQ2 B3 Volume", ARIZONA_EQ2_1, ARIZONA_EQ2_B3_GAIN_SHIFT, |
| 227 | 24, 0, eq_tlv), |
| 228 | SOC_SINGLE_TLV("EQ2 B4 Volume", ARIZONA_EQ2_2, ARIZONA_EQ2_B4_GAIN_SHIFT, |
| 229 | 24, 0, eq_tlv), |
| 230 | SOC_SINGLE_TLV("EQ2 B5 Volume", ARIZONA_EQ2_2, ARIZONA_EQ2_B5_GAIN_SHIFT, |
| 231 | 24, 0, eq_tlv), |
| 232 | |
| 233 | SOC_SINGLE_TLV("EQ3 B1 Volume", ARIZONA_EQ3_1, ARIZONA_EQ3_B1_GAIN_SHIFT, |
| 234 | 24, 0, eq_tlv), |
| 235 | SOC_SINGLE_TLV("EQ3 B2 Volume", ARIZONA_EQ3_1, ARIZONA_EQ3_B2_GAIN_SHIFT, |
| 236 | 24, 0, eq_tlv), |
| 237 | SOC_SINGLE_TLV("EQ3 B3 Volume", ARIZONA_EQ3_1, ARIZONA_EQ3_B3_GAIN_SHIFT, |
| 238 | 24, 0, eq_tlv), |
| 239 | SOC_SINGLE_TLV("EQ3 B4 Volume", ARIZONA_EQ3_2, ARIZONA_EQ3_B4_GAIN_SHIFT, |
| 240 | 24, 0, eq_tlv), |
| 241 | SOC_SINGLE_TLV("EQ3 B5 Volume", ARIZONA_EQ3_2, ARIZONA_EQ3_B5_GAIN_SHIFT, |
| 242 | 24, 0, eq_tlv), |
| 243 | |
| 244 | SOC_SINGLE_TLV("EQ4 B1 Volume", ARIZONA_EQ4_1, ARIZONA_EQ4_B1_GAIN_SHIFT, |
| 245 | 24, 0, eq_tlv), |
| 246 | SOC_SINGLE_TLV("EQ4 B2 Volume", ARIZONA_EQ4_1, ARIZONA_EQ4_B2_GAIN_SHIFT, |
| 247 | 24, 0, eq_tlv), |
| 248 | SOC_SINGLE_TLV("EQ4 B3 Volume", ARIZONA_EQ4_1, ARIZONA_EQ4_B3_GAIN_SHIFT, |
| 249 | 24, 0, eq_tlv), |
| 250 | SOC_SINGLE_TLV("EQ4 B4 Volume", ARIZONA_EQ4_2, ARIZONA_EQ4_B4_GAIN_SHIFT, |
| 251 | 24, 0, eq_tlv), |
| 252 | SOC_SINGLE_TLV("EQ4 B5 Volume", ARIZONA_EQ4_2, ARIZONA_EQ4_B5_GAIN_SHIFT, |
| 253 | 24, 0, eq_tlv), |
| 254 | |
| 255 | ARIZONA_MIXER_CONTROLS("DRC1L", ARIZONA_DRC1LMIX_INPUT_1_SOURCE), |
| 256 | ARIZONA_MIXER_CONTROLS("DRC1R", ARIZONA_DRC1RMIX_INPUT_1_SOURCE), |
| 257 | ARIZONA_MIXER_CONTROLS("DRC2L", ARIZONA_DRC2LMIX_INPUT_1_SOURCE), |
| 258 | ARIZONA_MIXER_CONTROLS("DRC2R", ARIZONA_DRC2RMIX_INPUT_1_SOURCE), |
| 259 | |
| 260 | SND_SOC_BYTES_MASK("DRC1", ARIZONA_DRC1_CTRL1, 5, |
| 261 | ARIZONA_DRC1R_ENA | ARIZONA_DRC1L_ENA), |
| 262 | SND_SOC_BYTES_MASK("DRC2", ARIZONA_DRC2_CTRL1, 5, |
| 263 | ARIZONA_DRC2R_ENA | ARIZONA_DRC2L_ENA), |
| 264 | |
| 265 | ARIZONA_MIXER_CONTROLS("LHPF1", ARIZONA_HPLP1MIX_INPUT_1_SOURCE), |
| 266 | ARIZONA_MIXER_CONTROLS("LHPF2", ARIZONA_HPLP2MIX_INPUT_1_SOURCE), |
| 267 | ARIZONA_MIXER_CONTROLS("LHPF3", ARIZONA_HPLP3MIX_INPUT_1_SOURCE), |
| 268 | ARIZONA_MIXER_CONTROLS("LHPF4", ARIZONA_HPLP4MIX_INPUT_1_SOURCE), |
| 269 | |
Mark Brown | d4d1eaa | 2012-12-05 16:38:30 +0900 | [diff] [blame] | 270 | SND_SOC_BYTES("LHPF1 Coefficients", ARIZONA_HPLPF1_2, 1), |
| 271 | SND_SOC_BYTES("LHPF2 Coefficients", ARIZONA_HPLPF2_2, 1), |
| 272 | SND_SOC_BYTES("LHPF3 Coefficients", ARIZONA_HPLPF3_2, 1), |
| 273 | SND_SOC_BYTES("LHPF4 Coefficients", ARIZONA_HPLPF4_2, 1), |
| 274 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 275 | SOC_ENUM("LHPF1 Mode", arizona_lhpf1_mode), |
| 276 | SOC_ENUM("LHPF2 Mode", arizona_lhpf2_mode), |
| 277 | SOC_ENUM("LHPF3 Mode", arizona_lhpf3_mode), |
| 278 | SOC_ENUM("LHPF4 Mode", arizona_lhpf4_mode), |
| 279 | |
Charles Keepax | 0da2e5b | 2013-11-19 16:04:02 +0000 | [diff] [blame] | 280 | SOC_VALUE_ENUM("ISRC1 FSL", arizona_isrc_fsl[0]), |
| 281 | SOC_VALUE_ENUM("ISRC2 FSL", arizona_isrc_fsl[1]), |
| 282 | SOC_VALUE_ENUM("ISRC3 FSL", arizona_isrc_fsl[2]), |
Charles Keepax | fbedc8c | 2013-12-19 09:30:12 +0000 | [diff] [blame] | 283 | SOC_VALUE_ENUM("ISRC1 FSH", arizona_isrc_fsh[0]), |
| 284 | SOC_VALUE_ENUM("ISRC2 FSH", arizona_isrc_fsh[1]), |
| 285 | SOC_VALUE_ENUM("ISRC3 FSH", arizona_isrc_fsh[2]), |
Charles Keepax | 56d37d8 | 2013-12-19 09:30:13 +0000 | [diff] [blame^] | 286 | SOC_VALUE_ENUM("ASRC RATE 1", arizona_asrc_rate1), |
Charles Keepax | 0da2e5b | 2013-11-19 16:04:02 +0000 | [diff] [blame] | 287 | |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 288 | ARIZONA_MIXER_CONTROLS("DSP1L", ARIZONA_DSP1LMIX_INPUT_1_SOURCE), |
| 289 | ARIZONA_MIXER_CONTROLS("DSP1R", ARIZONA_DSP1RMIX_INPUT_1_SOURCE), |
| 290 | ARIZONA_MIXER_CONTROLS("DSP2L", ARIZONA_DSP2LMIX_INPUT_1_SOURCE), |
| 291 | ARIZONA_MIXER_CONTROLS("DSP2R", ARIZONA_DSP2RMIX_INPUT_1_SOURCE), |
| 292 | ARIZONA_MIXER_CONTROLS("DSP3L", ARIZONA_DSP3LMIX_INPUT_1_SOURCE), |
| 293 | ARIZONA_MIXER_CONTROLS("DSP3R", ARIZONA_DSP3RMIX_INPUT_1_SOURCE), |
| 294 | ARIZONA_MIXER_CONTROLS("DSP4L", ARIZONA_DSP4LMIX_INPUT_1_SOURCE), |
Charles Keepax | 39d4ecd | 2013-05-24 11:38:24 +0100 | [diff] [blame] | 295 | ARIZONA_MIXER_CONTROLS("DSP4R", ARIZONA_DSP4RMIX_INPUT_1_SOURCE), |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 296 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 297 | ARIZONA_MIXER_CONTROLS("Mic", ARIZONA_MICMIX_INPUT_1_SOURCE), |
| 298 | ARIZONA_MIXER_CONTROLS("Noise", ARIZONA_NOISEMIX_INPUT_1_SOURCE), |
| 299 | |
| 300 | SOC_SINGLE_TLV("Noise Generator Volume", ARIZONA_COMFORT_NOISE_GENERATOR, |
| 301 | ARIZONA_NOISE_GEN_GAIN_SHIFT, 0x16, 0, noise_tlv), |
| 302 | |
| 303 | ARIZONA_MIXER_CONTROLS("HPOUT1L", ARIZONA_OUT1LMIX_INPUT_1_SOURCE), |
| 304 | ARIZONA_MIXER_CONTROLS("HPOUT1R", ARIZONA_OUT1RMIX_INPUT_1_SOURCE), |
| 305 | ARIZONA_MIXER_CONTROLS("HPOUT2L", ARIZONA_OUT2LMIX_INPUT_1_SOURCE), |
| 306 | ARIZONA_MIXER_CONTROLS("HPOUT2R", ARIZONA_OUT2RMIX_INPUT_1_SOURCE), |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 307 | ARIZONA_MIXER_CONTROLS("HPOUT3L", ARIZONA_OUT3LMIX_INPUT_1_SOURCE), |
| 308 | ARIZONA_MIXER_CONTROLS("HPOUT3R", ARIZONA_OUT3RMIX_INPUT_1_SOURCE), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 309 | ARIZONA_MIXER_CONTROLS("SPKOUTL", ARIZONA_OUT4LMIX_INPUT_1_SOURCE), |
| 310 | ARIZONA_MIXER_CONTROLS("SPKOUTR", ARIZONA_OUT4RMIX_INPUT_1_SOURCE), |
| 311 | ARIZONA_MIXER_CONTROLS("SPKDAT1L", ARIZONA_OUT5LMIX_INPUT_1_SOURCE), |
| 312 | ARIZONA_MIXER_CONTROLS("SPKDAT1R", ARIZONA_OUT5RMIX_INPUT_1_SOURCE), |
| 313 | ARIZONA_MIXER_CONTROLS("SPKDAT2L", ARIZONA_OUT6LMIX_INPUT_1_SOURCE), |
| 314 | ARIZONA_MIXER_CONTROLS("SPKDAT2R", ARIZONA_OUT6RMIX_INPUT_1_SOURCE), |
| 315 | |
| 316 | SOC_SINGLE("HPOUT1 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_1L, |
| 317 | ARIZONA_OUT1_OSR_SHIFT, 1, 0), |
Charles Keepax | 5752ec9 | 2013-02-15 10:37:27 +0000 | [diff] [blame] | 318 | SOC_SINGLE("HPOUT2 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_2L, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 319 | ARIZONA_OUT2_OSR_SHIFT, 1, 0), |
Charles Keepax | 5752ec9 | 2013-02-15 10:37:27 +0000 | [diff] [blame] | 320 | SOC_SINGLE("HPOUT3 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_3L, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 321 | ARIZONA_OUT3_OSR_SHIFT, 1, 0), |
| 322 | SOC_SINGLE("Speaker High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_4L, |
| 323 | ARIZONA_OUT4_OSR_SHIFT, 1, 0), |
| 324 | SOC_SINGLE("SPKDAT1 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_5L, |
| 325 | ARIZONA_OUT5_OSR_SHIFT, 1, 0), |
| 326 | SOC_SINGLE("SPKDAT2 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_6L, |
| 327 | ARIZONA_OUT6_OSR_SHIFT, 1, 0), |
| 328 | |
| 329 | SOC_DOUBLE_R("HPOUT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_1L, |
| 330 | ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_MUTE_SHIFT, 1, 1), |
Charles Keepax | 5752ec9 | 2013-02-15 10:37:27 +0000 | [diff] [blame] | 331 | SOC_DOUBLE_R("HPOUT2 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_2L, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 332 | ARIZONA_DAC_DIGITAL_VOLUME_2R, ARIZONA_OUT2L_MUTE_SHIFT, 1, 1), |
Charles Keepax | 5752ec9 | 2013-02-15 10:37:27 +0000 | [diff] [blame] | 333 | SOC_DOUBLE_R("HPOUT3 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_3L, |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 334 | ARIZONA_DAC_DIGITAL_VOLUME_3R, ARIZONA_OUT3L_MUTE_SHIFT, 1, 1), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 335 | SOC_DOUBLE_R("Speaker Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_4L, |
| 336 | ARIZONA_DAC_DIGITAL_VOLUME_4R, ARIZONA_OUT4L_MUTE_SHIFT, 1, 1), |
| 337 | SOC_DOUBLE_R("SPKDAT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_5L, |
| 338 | ARIZONA_DAC_DIGITAL_VOLUME_5R, ARIZONA_OUT5L_MUTE_SHIFT, 1, 1), |
| 339 | SOC_DOUBLE_R("SPKDAT2 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_6L, |
| 340 | ARIZONA_DAC_DIGITAL_VOLUME_6R, ARIZONA_OUT6L_MUTE_SHIFT, 1, 1), |
| 341 | |
| 342 | SOC_DOUBLE_R_TLV("HPOUT1 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_1L, |
| 343 | ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_VOL_SHIFT, |
| 344 | 0xbf, 0, digital_tlv), |
Charles Keepax | 5752ec9 | 2013-02-15 10:37:27 +0000 | [diff] [blame] | 345 | SOC_DOUBLE_R_TLV("HPOUT2 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_2L, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 346 | ARIZONA_DAC_DIGITAL_VOLUME_2R, ARIZONA_OUT2L_VOL_SHIFT, |
| 347 | 0xbf, 0, digital_tlv), |
Charles Keepax | 5752ec9 | 2013-02-15 10:37:27 +0000 | [diff] [blame] | 348 | SOC_DOUBLE_R_TLV("HPOUT3 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_3L, |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 349 | ARIZONA_DAC_DIGITAL_VOLUME_3R, ARIZONA_OUT3L_VOL_SHIFT, |
| 350 | 0xbf, 0, digital_tlv), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 351 | SOC_DOUBLE_R_TLV("Speaker Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_4L, |
| 352 | ARIZONA_DAC_DIGITAL_VOLUME_4R, ARIZONA_OUT4L_VOL_SHIFT, |
| 353 | 0xbf, 0, digital_tlv), |
| 354 | SOC_DOUBLE_R_TLV("SPKDAT1 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_5L, |
| 355 | ARIZONA_DAC_DIGITAL_VOLUME_5R, ARIZONA_OUT5L_VOL_SHIFT, |
| 356 | 0xbf, 0, digital_tlv), |
| 357 | SOC_DOUBLE_R_TLV("SPKDAT2 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_6L, |
| 358 | ARIZONA_DAC_DIGITAL_VOLUME_6R, ARIZONA_OUT6L_VOL_SHIFT, |
| 359 | 0xbf, 0, digital_tlv), |
| 360 | |
| 361 | SOC_DOUBLE_R_RANGE_TLV("HPOUT1 Volume", ARIZONA_OUTPUT_PATH_CONFIG_1L, |
| 362 | ARIZONA_OUTPUT_PATH_CONFIG_1R, |
| 363 | ARIZONA_OUT1L_PGA_VOL_SHIFT, |
| 364 | 0x34, 0x40, 0, ana_tlv), |
Charles Keepax | 5752ec9 | 2013-02-15 10:37:27 +0000 | [diff] [blame] | 365 | SOC_DOUBLE_R_RANGE_TLV("HPOUT2 Volume", ARIZONA_OUTPUT_PATH_CONFIG_2L, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 366 | ARIZONA_OUTPUT_PATH_CONFIG_2R, |
| 367 | ARIZONA_OUT2L_PGA_VOL_SHIFT, |
| 368 | 0x34, 0x40, 0, ana_tlv), |
Charles Keepax | 5752ec9 | 2013-02-15 10:37:27 +0000 | [diff] [blame] | 369 | SOC_DOUBLE_R_RANGE_TLV("HPOUT3 Volume", ARIZONA_OUTPUT_PATH_CONFIG_3L, |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 370 | ARIZONA_OUTPUT_PATH_CONFIG_3R, |
| 371 | ARIZONA_OUT3L_PGA_VOL_SHIFT, 0x34, 0x40, 0, ana_tlv), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 372 | |
| 373 | SOC_DOUBLE("SPKDAT1 Switch", ARIZONA_PDM_SPK1_CTRL_1, ARIZONA_SPK1L_MUTE_SHIFT, |
| 374 | ARIZONA_SPK1R_MUTE_SHIFT, 1, 1), |
| 375 | SOC_DOUBLE("SPKDAT2 Switch", ARIZONA_PDM_SPK2_CTRL_1, ARIZONA_SPK2L_MUTE_SHIFT, |
| 376 | ARIZONA_SPK2R_MUTE_SHIFT, 1, 1), |
| 377 | |
Charles Keepax | a4c0d27 | 2013-12-19 09:11:02 +0000 | [diff] [blame] | 378 | SOC_DOUBLE("HPOUT1 DRE Switch", ARIZONA_DRE_ENABLE, |
| 379 | ARIZONA_DRE1L_ENA_SHIFT, ARIZONA_DRE1R_ENA_SHIFT, 1, 0), |
| 380 | SOC_DOUBLE("HPOUT2 DRE Switch", ARIZONA_DRE_ENABLE, |
| 381 | ARIZONA_DRE2L_ENA_SHIFT, ARIZONA_DRE2R_ENA_SHIFT, 1, 0), |
| 382 | SOC_DOUBLE("HPOUT3 DRE Switch", ARIZONA_DRE_ENABLE, |
| 383 | ARIZONA_DRE3L_ENA_SHIFT, ARIZONA_DRE3R_ENA_SHIFT, 1, 0), |
| 384 | |
Mark Brown | a1abfa8 | 2012-12-09 12:50:05 +0900 | [diff] [blame] | 385 | SOC_ENUM("Output Ramp Up", arizona_out_vi_ramp), |
| 386 | SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp), |
| 387 | |
Mark Brown | bd7fe24 | 2012-12-18 13:53:26 +0000 | [diff] [blame] | 388 | SOC_SINGLE("Noise Gate Switch", ARIZONA_NOISE_GATE_CONTROL, |
| 389 | ARIZONA_NGATE_ENA_SHIFT, 1, 0), |
| 390 | SOC_SINGLE_TLV("Noise Gate Threshold Volume", ARIZONA_NOISE_GATE_CONTROL, |
| 391 | ARIZONA_NGATE_THR_SHIFT, 7, 1, ng_tlv), |
| 392 | SOC_ENUM("Noise Gate Hold", arizona_ng_hold), |
| 393 | |
| 394 | WM5110_NG_SRC("HPOUT1L", ARIZONA_NOISE_GATE_SELECT_1L), |
| 395 | WM5110_NG_SRC("HPOUT1R", ARIZONA_NOISE_GATE_SELECT_1R), |
| 396 | WM5110_NG_SRC("HPOUT2L", ARIZONA_NOISE_GATE_SELECT_2L), |
| 397 | WM5110_NG_SRC("HPOUT2R", ARIZONA_NOISE_GATE_SELECT_2R), |
| 398 | WM5110_NG_SRC("HPOUT3L", ARIZONA_NOISE_GATE_SELECT_3L), |
| 399 | WM5110_NG_SRC("HPOUT3R", ARIZONA_NOISE_GATE_SELECT_3R), |
| 400 | WM5110_NG_SRC("SPKOUTL", ARIZONA_NOISE_GATE_SELECT_4L), |
| 401 | WM5110_NG_SRC("SPKOUTR", ARIZONA_NOISE_GATE_SELECT_4R), |
| 402 | WM5110_NG_SRC("SPKDAT1L", ARIZONA_NOISE_GATE_SELECT_5L), |
| 403 | WM5110_NG_SRC("SPKDAT1R", ARIZONA_NOISE_GATE_SELECT_5R), |
| 404 | WM5110_NG_SRC("SPKDAT2L", ARIZONA_NOISE_GATE_SELECT_6L), |
| 405 | WM5110_NG_SRC("SPKDAT2R", ARIZONA_NOISE_GATE_SELECT_6R), |
| 406 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 407 | ARIZONA_MIXER_CONTROLS("AIF1TX1", ARIZONA_AIF1TX1MIX_INPUT_1_SOURCE), |
| 408 | ARIZONA_MIXER_CONTROLS("AIF1TX2", ARIZONA_AIF1TX2MIX_INPUT_1_SOURCE), |
| 409 | ARIZONA_MIXER_CONTROLS("AIF1TX3", ARIZONA_AIF1TX3MIX_INPUT_1_SOURCE), |
| 410 | ARIZONA_MIXER_CONTROLS("AIF1TX4", ARIZONA_AIF1TX4MIX_INPUT_1_SOURCE), |
| 411 | ARIZONA_MIXER_CONTROLS("AIF1TX5", ARIZONA_AIF1TX5MIX_INPUT_1_SOURCE), |
| 412 | ARIZONA_MIXER_CONTROLS("AIF1TX6", ARIZONA_AIF1TX6MIX_INPUT_1_SOURCE), |
| 413 | ARIZONA_MIXER_CONTROLS("AIF1TX7", ARIZONA_AIF1TX7MIX_INPUT_1_SOURCE), |
| 414 | ARIZONA_MIXER_CONTROLS("AIF1TX8", ARIZONA_AIF1TX8MIX_INPUT_1_SOURCE), |
| 415 | |
| 416 | ARIZONA_MIXER_CONTROLS("AIF2TX1", ARIZONA_AIF2TX1MIX_INPUT_1_SOURCE), |
| 417 | ARIZONA_MIXER_CONTROLS("AIF2TX2", ARIZONA_AIF2TX2MIX_INPUT_1_SOURCE), |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 418 | ARIZONA_MIXER_CONTROLS("AIF2TX3", ARIZONA_AIF2TX3MIX_INPUT_1_SOURCE), |
| 419 | ARIZONA_MIXER_CONTROLS("AIF2TX4", ARIZONA_AIF2TX4MIX_INPUT_1_SOURCE), |
| 420 | ARIZONA_MIXER_CONTROLS("AIF2TX5", ARIZONA_AIF2TX5MIX_INPUT_1_SOURCE), |
| 421 | ARIZONA_MIXER_CONTROLS("AIF2TX6", ARIZONA_AIF2TX6MIX_INPUT_1_SOURCE), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 422 | |
| 423 | ARIZONA_MIXER_CONTROLS("AIF3TX1", ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE), |
| 424 | ARIZONA_MIXER_CONTROLS("AIF3TX2", ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE), |
Mark Brown | d217f90 | 2013-05-17 13:29:05 +0100 | [diff] [blame] | 425 | |
| 426 | ARIZONA_MIXER_CONTROLS("SLIMTX1", ARIZONA_SLIMTX1MIX_INPUT_1_SOURCE), |
| 427 | ARIZONA_MIXER_CONTROLS("SLIMTX2", ARIZONA_SLIMTX2MIX_INPUT_1_SOURCE), |
| 428 | ARIZONA_MIXER_CONTROLS("SLIMTX3", ARIZONA_SLIMTX3MIX_INPUT_1_SOURCE), |
| 429 | ARIZONA_MIXER_CONTROLS("SLIMTX4", ARIZONA_SLIMTX4MIX_INPUT_1_SOURCE), |
| 430 | ARIZONA_MIXER_CONTROLS("SLIMTX5", ARIZONA_SLIMTX5MIX_INPUT_1_SOURCE), |
| 431 | ARIZONA_MIXER_CONTROLS("SLIMTX6", ARIZONA_SLIMTX6MIX_INPUT_1_SOURCE), |
| 432 | ARIZONA_MIXER_CONTROLS("SLIMTX7", ARIZONA_SLIMTX7MIX_INPUT_1_SOURCE), |
| 433 | ARIZONA_MIXER_CONTROLS("SLIMTX8", ARIZONA_SLIMTX8MIX_INPUT_1_SOURCE), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 434 | }; |
| 435 | |
| 436 | ARIZONA_MIXER_ENUMS(EQ1, ARIZONA_EQ1MIX_INPUT_1_SOURCE); |
| 437 | ARIZONA_MIXER_ENUMS(EQ2, ARIZONA_EQ2MIX_INPUT_1_SOURCE); |
| 438 | ARIZONA_MIXER_ENUMS(EQ3, ARIZONA_EQ3MIX_INPUT_1_SOURCE); |
| 439 | ARIZONA_MIXER_ENUMS(EQ4, ARIZONA_EQ4MIX_INPUT_1_SOURCE); |
| 440 | |
| 441 | ARIZONA_MIXER_ENUMS(DRC1L, ARIZONA_DRC1LMIX_INPUT_1_SOURCE); |
| 442 | ARIZONA_MIXER_ENUMS(DRC1R, ARIZONA_DRC1RMIX_INPUT_1_SOURCE); |
| 443 | ARIZONA_MIXER_ENUMS(DRC2L, ARIZONA_DRC2LMIX_INPUT_1_SOURCE); |
| 444 | ARIZONA_MIXER_ENUMS(DRC2R, ARIZONA_DRC2RMIX_INPUT_1_SOURCE); |
| 445 | |
| 446 | ARIZONA_MIXER_ENUMS(LHPF1, ARIZONA_HPLP1MIX_INPUT_1_SOURCE); |
| 447 | ARIZONA_MIXER_ENUMS(LHPF2, ARIZONA_HPLP2MIX_INPUT_1_SOURCE); |
| 448 | ARIZONA_MIXER_ENUMS(LHPF3, ARIZONA_HPLP3MIX_INPUT_1_SOURCE); |
| 449 | ARIZONA_MIXER_ENUMS(LHPF4, ARIZONA_HPLP4MIX_INPUT_1_SOURCE); |
| 450 | |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 451 | ARIZONA_MIXER_ENUMS(DSP1L, ARIZONA_DSP1LMIX_INPUT_1_SOURCE); |
| 452 | ARIZONA_MIXER_ENUMS(DSP1R, ARIZONA_DSP1RMIX_INPUT_1_SOURCE); |
| 453 | ARIZONA_DSP_AUX_ENUMS(DSP1, ARIZONA_DSP1AUX1MIX_INPUT_1_SOURCE); |
| 454 | |
| 455 | ARIZONA_MIXER_ENUMS(DSP2L, ARIZONA_DSP2LMIX_INPUT_1_SOURCE); |
| 456 | ARIZONA_MIXER_ENUMS(DSP2R, ARIZONA_DSP2RMIX_INPUT_1_SOURCE); |
| 457 | ARIZONA_DSP_AUX_ENUMS(DSP2, ARIZONA_DSP2AUX1MIX_INPUT_1_SOURCE); |
| 458 | |
| 459 | ARIZONA_MIXER_ENUMS(DSP3L, ARIZONA_DSP3LMIX_INPUT_1_SOURCE); |
| 460 | ARIZONA_MIXER_ENUMS(DSP3R, ARIZONA_DSP3RMIX_INPUT_1_SOURCE); |
| 461 | ARIZONA_DSP_AUX_ENUMS(DSP3, ARIZONA_DSP3AUX1MIX_INPUT_1_SOURCE); |
| 462 | |
| 463 | ARIZONA_MIXER_ENUMS(DSP4L, ARIZONA_DSP4LMIX_INPUT_1_SOURCE); |
| 464 | ARIZONA_MIXER_ENUMS(DSP4R, ARIZONA_DSP4RMIX_INPUT_1_SOURCE); |
| 465 | ARIZONA_DSP_AUX_ENUMS(DSP4, ARIZONA_DSP4AUX1MIX_INPUT_1_SOURCE); |
| 466 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 467 | ARIZONA_MIXER_ENUMS(Mic, ARIZONA_MICMIX_INPUT_1_SOURCE); |
| 468 | ARIZONA_MIXER_ENUMS(Noise, ARIZONA_NOISEMIX_INPUT_1_SOURCE); |
| 469 | |
| 470 | ARIZONA_MIXER_ENUMS(PWM1, ARIZONA_PWM1MIX_INPUT_1_SOURCE); |
| 471 | ARIZONA_MIXER_ENUMS(PWM2, ARIZONA_PWM2MIX_INPUT_1_SOURCE); |
| 472 | |
| 473 | ARIZONA_MIXER_ENUMS(OUT1L, ARIZONA_OUT1LMIX_INPUT_1_SOURCE); |
| 474 | ARIZONA_MIXER_ENUMS(OUT1R, ARIZONA_OUT1RMIX_INPUT_1_SOURCE); |
| 475 | ARIZONA_MIXER_ENUMS(OUT2L, ARIZONA_OUT2LMIX_INPUT_1_SOURCE); |
| 476 | ARIZONA_MIXER_ENUMS(OUT2R, ARIZONA_OUT2RMIX_INPUT_1_SOURCE); |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 477 | ARIZONA_MIXER_ENUMS(OUT3L, ARIZONA_OUT3LMIX_INPUT_1_SOURCE); |
| 478 | ARIZONA_MIXER_ENUMS(OUT3R, ARIZONA_OUT3RMIX_INPUT_1_SOURCE); |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 479 | ARIZONA_MIXER_ENUMS(SPKOUTL, ARIZONA_OUT4LMIX_INPUT_1_SOURCE); |
| 480 | ARIZONA_MIXER_ENUMS(SPKOUTR, ARIZONA_OUT4RMIX_INPUT_1_SOURCE); |
| 481 | ARIZONA_MIXER_ENUMS(SPKDAT1L, ARIZONA_OUT5LMIX_INPUT_1_SOURCE); |
| 482 | ARIZONA_MIXER_ENUMS(SPKDAT1R, ARIZONA_OUT5RMIX_INPUT_1_SOURCE); |
| 483 | ARIZONA_MIXER_ENUMS(SPKDAT2L, ARIZONA_OUT6LMIX_INPUT_1_SOURCE); |
| 484 | ARIZONA_MIXER_ENUMS(SPKDAT2R, ARIZONA_OUT6RMIX_INPUT_1_SOURCE); |
| 485 | |
| 486 | ARIZONA_MIXER_ENUMS(AIF1TX1, ARIZONA_AIF1TX1MIX_INPUT_1_SOURCE); |
| 487 | ARIZONA_MIXER_ENUMS(AIF1TX2, ARIZONA_AIF1TX2MIX_INPUT_1_SOURCE); |
| 488 | ARIZONA_MIXER_ENUMS(AIF1TX3, ARIZONA_AIF1TX3MIX_INPUT_1_SOURCE); |
| 489 | ARIZONA_MIXER_ENUMS(AIF1TX4, ARIZONA_AIF1TX4MIX_INPUT_1_SOURCE); |
| 490 | ARIZONA_MIXER_ENUMS(AIF1TX5, ARIZONA_AIF1TX5MIX_INPUT_1_SOURCE); |
| 491 | ARIZONA_MIXER_ENUMS(AIF1TX6, ARIZONA_AIF1TX6MIX_INPUT_1_SOURCE); |
| 492 | ARIZONA_MIXER_ENUMS(AIF1TX7, ARIZONA_AIF1TX7MIX_INPUT_1_SOURCE); |
| 493 | ARIZONA_MIXER_ENUMS(AIF1TX8, ARIZONA_AIF1TX8MIX_INPUT_1_SOURCE); |
| 494 | |
| 495 | ARIZONA_MIXER_ENUMS(AIF2TX1, ARIZONA_AIF2TX1MIX_INPUT_1_SOURCE); |
| 496 | ARIZONA_MIXER_ENUMS(AIF2TX2, ARIZONA_AIF2TX2MIX_INPUT_1_SOURCE); |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 497 | ARIZONA_MIXER_ENUMS(AIF2TX3, ARIZONA_AIF2TX3MIX_INPUT_1_SOURCE); |
| 498 | ARIZONA_MIXER_ENUMS(AIF2TX4, ARIZONA_AIF2TX4MIX_INPUT_1_SOURCE); |
| 499 | ARIZONA_MIXER_ENUMS(AIF2TX5, ARIZONA_AIF2TX5MIX_INPUT_1_SOURCE); |
| 500 | ARIZONA_MIXER_ENUMS(AIF2TX6, ARIZONA_AIF2TX6MIX_INPUT_1_SOURCE); |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 501 | |
| 502 | ARIZONA_MIXER_ENUMS(AIF3TX1, ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE); |
| 503 | ARIZONA_MIXER_ENUMS(AIF3TX2, ARIZONA_AIF3TX2MIX_INPUT_1_SOURCE); |
| 504 | |
Mark Brown | d217f90 | 2013-05-17 13:29:05 +0100 | [diff] [blame] | 505 | ARIZONA_MIXER_ENUMS(SLIMTX1, ARIZONA_SLIMTX1MIX_INPUT_1_SOURCE); |
| 506 | ARIZONA_MIXER_ENUMS(SLIMTX2, ARIZONA_SLIMTX2MIX_INPUT_1_SOURCE); |
| 507 | ARIZONA_MIXER_ENUMS(SLIMTX3, ARIZONA_SLIMTX3MIX_INPUT_1_SOURCE); |
| 508 | ARIZONA_MIXER_ENUMS(SLIMTX4, ARIZONA_SLIMTX4MIX_INPUT_1_SOURCE); |
| 509 | ARIZONA_MIXER_ENUMS(SLIMTX5, ARIZONA_SLIMTX5MIX_INPUT_1_SOURCE); |
| 510 | ARIZONA_MIXER_ENUMS(SLIMTX6, ARIZONA_SLIMTX6MIX_INPUT_1_SOURCE); |
| 511 | ARIZONA_MIXER_ENUMS(SLIMTX7, ARIZONA_SLIMTX7MIX_INPUT_1_SOURCE); |
| 512 | ARIZONA_MIXER_ENUMS(SLIMTX8, ARIZONA_SLIMTX8MIX_INPUT_1_SOURCE); |
| 513 | |
Charles Keepax | 5886c74 | 2012-11-13 16:40:34 +0000 | [diff] [blame] | 514 | ARIZONA_MUX_ENUMS(ASRC1L, ARIZONA_ASRC1LMIX_INPUT_1_SOURCE); |
| 515 | ARIZONA_MUX_ENUMS(ASRC1R, ARIZONA_ASRC1RMIX_INPUT_1_SOURCE); |
| 516 | ARIZONA_MUX_ENUMS(ASRC2L, ARIZONA_ASRC2LMIX_INPUT_1_SOURCE); |
| 517 | ARIZONA_MUX_ENUMS(ASRC2R, ARIZONA_ASRC2RMIX_INPUT_1_SOURCE); |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 518 | |
Charles Keepax | 0da2e5b | 2013-11-19 16:04:02 +0000 | [diff] [blame] | 519 | ARIZONA_MUX_ENUMS(ISRC1INT1, ARIZONA_ISRC1INT1MIX_INPUT_1_SOURCE); |
| 520 | ARIZONA_MUX_ENUMS(ISRC1INT2, ARIZONA_ISRC1INT2MIX_INPUT_1_SOURCE); |
| 521 | ARIZONA_MUX_ENUMS(ISRC1INT3, ARIZONA_ISRC1INT3MIX_INPUT_1_SOURCE); |
| 522 | ARIZONA_MUX_ENUMS(ISRC1INT4, ARIZONA_ISRC1INT4MIX_INPUT_1_SOURCE); |
| 523 | |
| 524 | ARIZONA_MUX_ENUMS(ISRC1DEC1, ARIZONA_ISRC1DEC1MIX_INPUT_1_SOURCE); |
| 525 | ARIZONA_MUX_ENUMS(ISRC1DEC2, ARIZONA_ISRC1DEC2MIX_INPUT_1_SOURCE); |
| 526 | ARIZONA_MUX_ENUMS(ISRC1DEC3, ARIZONA_ISRC1DEC3MIX_INPUT_1_SOURCE); |
| 527 | ARIZONA_MUX_ENUMS(ISRC1DEC4, ARIZONA_ISRC1DEC4MIX_INPUT_1_SOURCE); |
| 528 | |
| 529 | ARIZONA_MUX_ENUMS(ISRC2INT1, ARIZONA_ISRC2INT1MIX_INPUT_1_SOURCE); |
| 530 | ARIZONA_MUX_ENUMS(ISRC2INT2, ARIZONA_ISRC2INT2MIX_INPUT_1_SOURCE); |
| 531 | ARIZONA_MUX_ENUMS(ISRC2INT3, ARIZONA_ISRC2INT3MIX_INPUT_1_SOURCE); |
| 532 | ARIZONA_MUX_ENUMS(ISRC2INT4, ARIZONA_ISRC2INT4MIX_INPUT_1_SOURCE); |
| 533 | |
| 534 | ARIZONA_MUX_ENUMS(ISRC2DEC1, ARIZONA_ISRC2DEC1MIX_INPUT_1_SOURCE); |
| 535 | ARIZONA_MUX_ENUMS(ISRC2DEC2, ARIZONA_ISRC2DEC2MIX_INPUT_1_SOURCE); |
| 536 | ARIZONA_MUX_ENUMS(ISRC2DEC3, ARIZONA_ISRC2DEC3MIX_INPUT_1_SOURCE); |
| 537 | ARIZONA_MUX_ENUMS(ISRC2DEC4, ARIZONA_ISRC2DEC4MIX_INPUT_1_SOURCE); |
| 538 | |
| 539 | ARIZONA_MUX_ENUMS(ISRC3INT1, ARIZONA_ISRC3INT1MIX_INPUT_1_SOURCE); |
| 540 | ARIZONA_MUX_ENUMS(ISRC3INT2, ARIZONA_ISRC3INT2MIX_INPUT_1_SOURCE); |
| 541 | ARIZONA_MUX_ENUMS(ISRC3INT3, ARIZONA_ISRC3INT3MIX_INPUT_1_SOURCE); |
| 542 | ARIZONA_MUX_ENUMS(ISRC3INT4, ARIZONA_ISRC3INT4MIX_INPUT_1_SOURCE); |
| 543 | |
| 544 | ARIZONA_MUX_ENUMS(ISRC3DEC1, ARIZONA_ISRC3DEC1MIX_INPUT_1_SOURCE); |
| 545 | ARIZONA_MUX_ENUMS(ISRC3DEC2, ARIZONA_ISRC3DEC2MIX_INPUT_1_SOURCE); |
| 546 | ARIZONA_MUX_ENUMS(ISRC3DEC3, ARIZONA_ISRC3DEC3MIX_INPUT_1_SOURCE); |
| 547 | ARIZONA_MUX_ENUMS(ISRC3DEC4, ARIZONA_ISRC3DEC4MIX_INPUT_1_SOURCE); |
| 548 | |
Mark Brown | dac8f1c | 2012-08-26 13:51:27 -0700 | [diff] [blame] | 549 | static const char *wm5110_aec_loopback_texts[] = { |
| 550 | "HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "HPOUT3L", "HPOUT3R", |
| 551 | "SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R", "SPKDAT2L", "SPKDAT2R", |
| 552 | }; |
| 553 | |
| 554 | static const unsigned int wm5110_aec_loopback_values[] = { |
| 555 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
| 556 | }; |
| 557 | |
| 558 | static const struct soc_enum wm5110_aec_loopback = |
| 559 | SOC_VALUE_ENUM_SINGLE(ARIZONA_DAC_AEC_CONTROL_1, |
Mark Brown | 7d5cb4f | 2013-01-11 13:32:00 +0000 | [diff] [blame] | 560 | ARIZONA_AEC_LOOPBACK_SRC_SHIFT, 0xf, |
Mark Brown | dac8f1c | 2012-08-26 13:51:27 -0700 | [diff] [blame] | 561 | ARRAY_SIZE(wm5110_aec_loopback_texts), |
| 562 | wm5110_aec_loopback_texts, |
| 563 | wm5110_aec_loopback_values); |
| 564 | |
| 565 | static const struct snd_kcontrol_new wm5110_aec_loopback_mux = |
| 566 | SOC_DAPM_VALUE_ENUM("AEC Loopback", wm5110_aec_loopback); |
| 567 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 568 | static const struct snd_soc_dapm_widget wm5110_dapm_widgets[] = { |
| 569 | SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT, |
Charles Keepax | f69f86b | 2013-11-19 10:51:29 +0000 | [diff] [blame] | 570 | 0, wm5110_sysclk_ev, SND_SOC_DAPM_POST_PMU), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 571 | SND_SOC_DAPM_SUPPLY("ASYNCCLK", ARIZONA_ASYNC_CLOCK_1, |
| 572 | ARIZONA_ASYNC_CLK_ENA_SHIFT, 0, NULL, 0), |
Mark Brown | 94237f8 | 2012-08-09 19:14:43 +0100 | [diff] [blame] | 573 | SND_SOC_DAPM_SUPPLY("OPCLK", ARIZONA_OUTPUT_SYSTEM_CLOCK, |
| 574 | ARIZONA_OPCLK_ENA_SHIFT, 0, NULL, 0), |
| 575 | SND_SOC_DAPM_SUPPLY("ASYNCOPCLK", ARIZONA_OUTPUT_ASYNC_CLOCK, |
| 576 | ARIZONA_OPCLK_ASYNC_ENA_SHIFT, 0, NULL, 0), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 577 | |
Mark Brown | 822b4b8 | 2012-09-07 10:54:32 +0800 | [diff] [blame] | 578 | SND_SOC_DAPM_REGULATOR_SUPPLY("DBVDD2", 0, 0), |
| 579 | SND_SOC_DAPM_REGULATOR_SUPPLY("DBVDD3", 0, 0), |
| 580 | SND_SOC_DAPM_REGULATOR_SUPPLY("CPVDD", 20, 0), |
Mark Brown | 76dbd2a | 2012-09-07 12:58:54 +0800 | [diff] [blame] | 581 | SND_SOC_DAPM_REGULATOR_SUPPLY("MICVDD", 0, SND_SOC_DAPM_REGULATOR_BYPASS), |
Mark Brown | 822b4b8 | 2012-09-07 10:54:32 +0800 | [diff] [blame] | 582 | SND_SOC_DAPM_REGULATOR_SUPPLY("SPKVDDL", 0, 0), |
| 583 | SND_SOC_DAPM_REGULATOR_SUPPLY("SPKVDDR", 0, 0), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 584 | |
| 585 | SND_SOC_DAPM_SIGGEN("TONE"), |
| 586 | SND_SOC_DAPM_SIGGEN("NOISE"), |
Mark Brown | 2f76e68 | 2012-11-26 21:18:18 +0000 | [diff] [blame] | 587 | SND_SOC_DAPM_SIGGEN("HAPTICS"), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 588 | |
| 589 | SND_SOC_DAPM_INPUT("IN1L"), |
| 590 | SND_SOC_DAPM_INPUT("IN1R"), |
| 591 | SND_SOC_DAPM_INPUT("IN2L"), |
| 592 | SND_SOC_DAPM_INPUT("IN2R"), |
| 593 | SND_SOC_DAPM_INPUT("IN3L"), |
| 594 | SND_SOC_DAPM_INPUT("IN3R"), |
| 595 | SND_SOC_DAPM_INPUT("IN4L"), |
| 596 | SND_SOC_DAPM_INPUT("IN4R"), |
| 597 | |
Charles Keepax | b63144e | 2013-07-04 08:56:28 +0100 | [diff] [blame] | 598 | SND_SOC_DAPM_OUTPUT("DRC1 Signal Activity"), |
| 599 | SND_SOC_DAPM_OUTPUT("DRC2 Signal Activity"), |
| 600 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 601 | SND_SOC_DAPM_PGA_E("IN1L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1L_ENA_SHIFT, |
| 602 | 0, NULL, 0, arizona_in_ev, |
Mark Brown | ddbce97 | 2013-02-15 17:27:22 +0000 | [diff] [blame] | 603 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | |
| 604 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 605 | SND_SOC_DAPM_PGA_E("IN1R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1R_ENA_SHIFT, |
| 606 | 0, NULL, 0, arizona_in_ev, |
Mark Brown | ddbce97 | 2013-02-15 17:27:22 +0000 | [diff] [blame] | 607 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | |
| 608 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 609 | SND_SOC_DAPM_PGA_E("IN2L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN2L_ENA_SHIFT, |
| 610 | 0, NULL, 0, arizona_in_ev, |
Mark Brown | ddbce97 | 2013-02-15 17:27:22 +0000 | [diff] [blame] | 611 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | |
| 612 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 613 | SND_SOC_DAPM_PGA_E("IN2R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN2R_ENA_SHIFT, |
| 614 | 0, NULL, 0, arizona_in_ev, |
Mark Brown | ddbce97 | 2013-02-15 17:27:22 +0000 | [diff] [blame] | 615 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | |
| 616 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 617 | SND_SOC_DAPM_PGA_E("IN3L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN3L_ENA_SHIFT, |
| 618 | 0, NULL, 0, arizona_in_ev, |
Mark Brown | ddbce97 | 2013-02-15 17:27:22 +0000 | [diff] [blame] | 619 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | |
| 620 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 621 | SND_SOC_DAPM_PGA_E("IN3R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN3R_ENA_SHIFT, |
| 622 | 0, NULL, 0, arizona_in_ev, |
Mark Brown | ddbce97 | 2013-02-15 17:27:22 +0000 | [diff] [blame] | 623 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | |
| 624 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 625 | SND_SOC_DAPM_PGA_E("IN4L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN4L_ENA_SHIFT, |
| 626 | 0, NULL, 0, arizona_in_ev, |
Mark Brown | ddbce97 | 2013-02-15 17:27:22 +0000 | [diff] [blame] | 627 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | |
| 628 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 629 | SND_SOC_DAPM_PGA_E("IN4R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN4R_ENA_SHIFT, |
| 630 | 0, NULL, 0, arizona_in_ev, |
Mark Brown | ddbce97 | 2013-02-15 17:27:22 +0000 | [diff] [blame] | 631 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | |
| 632 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 633 | |
| 634 | SND_SOC_DAPM_SUPPLY("MICBIAS1", ARIZONA_MIC_BIAS_CTRL_1, |
| 635 | ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), |
| 636 | SND_SOC_DAPM_SUPPLY("MICBIAS2", ARIZONA_MIC_BIAS_CTRL_2, |
| 637 | ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), |
| 638 | SND_SOC_DAPM_SUPPLY("MICBIAS3", ARIZONA_MIC_BIAS_CTRL_3, |
| 639 | ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), |
| 640 | |
| 641 | SND_SOC_DAPM_PGA("Noise Generator", ARIZONA_COMFORT_NOISE_GENERATOR, |
| 642 | ARIZONA_NOISE_GEN_ENA_SHIFT, 0, NULL, 0), |
| 643 | |
| 644 | SND_SOC_DAPM_PGA("Tone Generator 1", ARIZONA_TONE_GENERATOR_1, |
| 645 | ARIZONA_TONE1_ENA_SHIFT, 0, NULL, 0), |
| 646 | SND_SOC_DAPM_PGA("Tone Generator 2", ARIZONA_TONE_GENERATOR_1, |
| 647 | ARIZONA_TONE2_ENA_SHIFT, 0, NULL, 0), |
| 648 | |
| 649 | SND_SOC_DAPM_PGA("Mic Mute Mixer", ARIZONA_MIC_NOISE_MIX_CONTROL_1, |
| 650 | ARIZONA_MICMUTE_MIX_ENA_SHIFT, 0, NULL, 0), |
| 651 | |
| 652 | SND_SOC_DAPM_PGA("EQ1", ARIZONA_EQ1_1, ARIZONA_EQ1_ENA_SHIFT, 0, NULL, 0), |
| 653 | SND_SOC_DAPM_PGA("EQ2", ARIZONA_EQ2_1, ARIZONA_EQ2_ENA_SHIFT, 0, NULL, 0), |
| 654 | SND_SOC_DAPM_PGA("EQ3", ARIZONA_EQ3_1, ARIZONA_EQ3_ENA_SHIFT, 0, NULL, 0), |
| 655 | SND_SOC_DAPM_PGA("EQ4", ARIZONA_EQ4_1, ARIZONA_EQ4_ENA_SHIFT, 0, NULL, 0), |
| 656 | |
| 657 | SND_SOC_DAPM_PGA("DRC1L", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1L_ENA_SHIFT, 0, |
| 658 | NULL, 0), |
| 659 | SND_SOC_DAPM_PGA("DRC1R", ARIZONA_DRC1_CTRL1, ARIZONA_DRC1R_ENA_SHIFT, 0, |
| 660 | NULL, 0), |
| 661 | SND_SOC_DAPM_PGA("DRC2L", ARIZONA_DRC2_CTRL1, ARIZONA_DRC2L_ENA_SHIFT, 0, |
| 662 | NULL, 0), |
| 663 | SND_SOC_DAPM_PGA("DRC2R", ARIZONA_DRC2_CTRL1, ARIZONA_DRC2R_ENA_SHIFT, 0, |
| 664 | NULL, 0), |
| 665 | |
| 666 | SND_SOC_DAPM_PGA("LHPF1", ARIZONA_HPLPF1_1, ARIZONA_LHPF1_ENA_SHIFT, 0, |
| 667 | NULL, 0), |
| 668 | SND_SOC_DAPM_PGA("LHPF2", ARIZONA_HPLPF2_1, ARIZONA_LHPF2_ENA_SHIFT, 0, |
| 669 | NULL, 0), |
| 670 | SND_SOC_DAPM_PGA("LHPF3", ARIZONA_HPLPF3_1, ARIZONA_LHPF3_ENA_SHIFT, 0, |
| 671 | NULL, 0), |
| 672 | SND_SOC_DAPM_PGA("LHPF4", ARIZONA_HPLPF4_1, ARIZONA_LHPF4_ENA_SHIFT, 0, |
| 673 | NULL, 0), |
| 674 | |
| 675 | SND_SOC_DAPM_PGA("PWM1 Driver", ARIZONA_PWM_DRIVE_1, ARIZONA_PWM1_ENA_SHIFT, |
| 676 | 0, NULL, 0), |
| 677 | SND_SOC_DAPM_PGA("PWM2 Driver", ARIZONA_PWM_DRIVE_1, ARIZONA_PWM2_ENA_SHIFT, |
| 678 | 0, NULL, 0), |
| 679 | |
| 680 | SND_SOC_DAPM_PGA("ASRC1L", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC1L_ENA_SHIFT, 0, |
| 681 | NULL, 0), |
| 682 | SND_SOC_DAPM_PGA("ASRC1R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC1R_ENA_SHIFT, 0, |
| 683 | NULL, 0), |
| 684 | SND_SOC_DAPM_PGA("ASRC2L", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2L_ENA_SHIFT, 0, |
| 685 | NULL, 0), |
| 686 | SND_SOC_DAPM_PGA("ASRC2R", ARIZONA_ASRC_ENABLE, ARIZONA_ASRC2R_ENA_SHIFT, 0, |
| 687 | NULL, 0), |
| 688 | |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 689 | WM_ADSP2("DSP1", 0), |
| 690 | WM_ADSP2("DSP2", 1), |
| 691 | WM_ADSP2("DSP3", 2), |
| 692 | WM_ADSP2("DSP4", 3), |
| 693 | |
Charles Keepax | 0da2e5b | 2013-11-19 16:04:02 +0000 | [diff] [blame] | 694 | SND_SOC_DAPM_PGA("ISRC1INT1", ARIZONA_ISRC_1_CTRL_3, |
| 695 | ARIZONA_ISRC1_INT0_ENA_SHIFT, 0, NULL, 0), |
| 696 | SND_SOC_DAPM_PGA("ISRC1INT2", ARIZONA_ISRC_1_CTRL_3, |
| 697 | ARIZONA_ISRC1_INT1_ENA_SHIFT, 0, NULL, 0), |
| 698 | SND_SOC_DAPM_PGA("ISRC1INT3", ARIZONA_ISRC_1_CTRL_3, |
| 699 | ARIZONA_ISRC1_INT2_ENA_SHIFT, 0, NULL, 0), |
| 700 | SND_SOC_DAPM_PGA("ISRC1INT4", ARIZONA_ISRC_1_CTRL_3, |
| 701 | ARIZONA_ISRC1_INT3_ENA_SHIFT, 0, NULL, 0), |
| 702 | |
| 703 | SND_SOC_DAPM_PGA("ISRC1DEC1", ARIZONA_ISRC_1_CTRL_3, |
| 704 | ARIZONA_ISRC1_DEC0_ENA_SHIFT, 0, NULL, 0), |
| 705 | SND_SOC_DAPM_PGA("ISRC1DEC2", ARIZONA_ISRC_1_CTRL_3, |
| 706 | ARIZONA_ISRC1_DEC1_ENA_SHIFT, 0, NULL, 0), |
| 707 | SND_SOC_DAPM_PGA("ISRC1DEC3", ARIZONA_ISRC_1_CTRL_3, |
| 708 | ARIZONA_ISRC1_DEC2_ENA_SHIFT, 0, NULL, 0), |
| 709 | SND_SOC_DAPM_PGA("ISRC1DEC4", ARIZONA_ISRC_1_CTRL_3, |
| 710 | ARIZONA_ISRC1_DEC3_ENA_SHIFT, 0, NULL, 0), |
| 711 | |
| 712 | SND_SOC_DAPM_PGA("ISRC2INT1", ARIZONA_ISRC_2_CTRL_3, |
| 713 | ARIZONA_ISRC2_INT0_ENA_SHIFT, 0, NULL, 0), |
| 714 | SND_SOC_DAPM_PGA("ISRC2INT2", ARIZONA_ISRC_2_CTRL_3, |
| 715 | ARIZONA_ISRC2_INT1_ENA_SHIFT, 0, NULL, 0), |
| 716 | SND_SOC_DAPM_PGA("ISRC2INT3", ARIZONA_ISRC_2_CTRL_3, |
| 717 | ARIZONA_ISRC2_INT2_ENA_SHIFT, 0, NULL, 0), |
| 718 | SND_SOC_DAPM_PGA("ISRC2INT4", ARIZONA_ISRC_2_CTRL_3, |
| 719 | ARIZONA_ISRC2_INT3_ENA_SHIFT, 0, NULL, 0), |
| 720 | |
| 721 | SND_SOC_DAPM_PGA("ISRC2DEC1", ARIZONA_ISRC_2_CTRL_3, |
| 722 | ARIZONA_ISRC2_DEC0_ENA_SHIFT, 0, NULL, 0), |
| 723 | SND_SOC_DAPM_PGA("ISRC2DEC2", ARIZONA_ISRC_2_CTRL_3, |
| 724 | ARIZONA_ISRC2_DEC1_ENA_SHIFT, 0, NULL, 0), |
| 725 | SND_SOC_DAPM_PGA("ISRC2DEC3", ARIZONA_ISRC_2_CTRL_3, |
| 726 | ARIZONA_ISRC2_DEC2_ENA_SHIFT, 0, NULL, 0), |
| 727 | SND_SOC_DAPM_PGA("ISRC2DEC4", ARIZONA_ISRC_2_CTRL_3, |
| 728 | ARIZONA_ISRC2_DEC3_ENA_SHIFT, 0, NULL, 0), |
| 729 | |
| 730 | SND_SOC_DAPM_PGA("ISRC3INT1", ARIZONA_ISRC_3_CTRL_3, |
| 731 | ARIZONA_ISRC3_INT0_ENA_SHIFT, 0, NULL, 0), |
| 732 | SND_SOC_DAPM_PGA("ISRC3INT2", ARIZONA_ISRC_3_CTRL_3, |
| 733 | ARIZONA_ISRC3_INT1_ENA_SHIFT, 0, NULL, 0), |
| 734 | SND_SOC_DAPM_PGA("ISRC3INT3", ARIZONA_ISRC_3_CTRL_3, |
| 735 | ARIZONA_ISRC3_INT2_ENA_SHIFT, 0, NULL, 0), |
| 736 | SND_SOC_DAPM_PGA("ISRC3INT4", ARIZONA_ISRC_3_CTRL_3, |
| 737 | ARIZONA_ISRC3_INT3_ENA_SHIFT, 0, NULL, 0), |
| 738 | |
| 739 | SND_SOC_DAPM_PGA("ISRC3DEC1", ARIZONA_ISRC_3_CTRL_3, |
| 740 | ARIZONA_ISRC3_DEC0_ENA_SHIFT, 0, NULL, 0), |
| 741 | SND_SOC_DAPM_PGA("ISRC3DEC2", ARIZONA_ISRC_3_CTRL_3, |
| 742 | ARIZONA_ISRC3_DEC1_ENA_SHIFT, 0, NULL, 0), |
| 743 | SND_SOC_DAPM_PGA("ISRC3DEC3", ARIZONA_ISRC_3_CTRL_3, |
| 744 | ARIZONA_ISRC3_DEC2_ENA_SHIFT, 0, NULL, 0), |
| 745 | SND_SOC_DAPM_PGA("ISRC3DEC4", ARIZONA_ISRC_3_CTRL_3, |
| 746 | ARIZONA_ISRC3_DEC3_ENA_SHIFT, 0, NULL, 0), |
| 747 | |
Mark Brown | dac8f1c | 2012-08-26 13:51:27 -0700 | [diff] [blame] | 748 | SND_SOC_DAPM_VALUE_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1, |
Charles Keepax | ee4b7c7 | 2013-06-05 14:51:30 +0100 | [diff] [blame] | 749 | ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, |
| 750 | &wm5110_aec_loopback_mux), |
Mark Brown | dac8f1c | 2012-08-26 13:51:27 -0700 | [diff] [blame] | 751 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 752 | SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0, |
| 753 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0), |
| 754 | SND_SOC_DAPM_AIF_OUT("AIF1TX2", NULL, 0, |
| 755 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX2_ENA_SHIFT, 0), |
| 756 | SND_SOC_DAPM_AIF_OUT("AIF1TX3", NULL, 0, |
| 757 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX3_ENA_SHIFT, 0), |
| 758 | SND_SOC_DAPM_AIF_OUT("AIF1TX4", NULL, 0, |
| 759 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX4_ENA_SHIFT, 0), |
| 760 | SND_SOC_DAPM_AIF_OUT("AIF1TX5", NULL, 0, |
| 761 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX5_ENA_SHIFT, 0), |
| 762 | SND_SOC_DAPM_AIF_OUT("AIF1TX6", NULL, 0, |
| 763 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX6_ENA_SHIFT, 0), |
| 764 | SND_SOC_DAPM_AIF_OUT("AIF1TX7", NULL, 0, |
| 765 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX7_ENA_SHIFT, 0), |
| 766 | SND_SOC_DAPM_AIF_OUT("AIF1TX8", NULL, 0, |
| 767 | ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX8_ENA_SHIFT, 0), |
| 768 | |
| 769 | SND_SOC_DAPM_AIF_IN("AIF1RX1", NULL, 0, |
| 770 | ARIZONA_AIF1_RX_ENABLES, ARIZONA_AIF1RX1_ENA_SHIFT, 0), |
| 771 | SND_SOC_DAPM_AIF_IN("AIF1RX2", NULL, 0, |
| 772 | ARIZONA_AIF1_RX_ENABLES, ARIZONA_AIF1RX2_ENA_SHIFT, 0), |
| 773 | SND_SOC_DAPM_AIF_IN("AIF1RX3", NULL, 0, |
| 774 | ARIZONA_AIF1_RX_ENABLES, ARIZONA_AIF1RX3_ENA_SHIFT, 0), |
| 775 | SND_SOC_DAPM_AIF_IN("AIF1RX4", NULL, 0, |
| 776 | ARIZONA_AIF1_RX_ENABLES, ARIZONA_AIF1RX4_ENA_SHIFT, 0), |
| 777 | SND_SOC_DAPM_AIF_IN("AIF1RX5", NULL, 0, |
| 778 | ARIZONA_AIF1_RX_ENABLES, ARIZONA_AIF1RX5_ENA_SHIFT, 0), |
| 779 | SND_SOC_DAPM_AIF_IN("AIF1RX6", NULL, 0, |
| 780 | ARIZONA_AIF1_RX_ENABLES, ARIZONA_AIF1RX6_ENA_SHIFT, 0), |
| 781 | SND_SOC_DAPM_AIF_IN("AIF1RX7", NULL, 0, |
| 782 | ARIZONA_AIF1_RX_ENABLES, ARIZONA_AIF1RX7_ENA_SHIFT, 0), |
| 783 | SND_SOC_DAPM_AIF_IN("AIF1RX8", NULL, 0, |
| 784 | ARIZONA_AIF1_RX_ENABLES, ARIZONA_AIF1RX8_ENA_SHIFT, 0), |
| 785 | |
| 786 | SND_SOC_DAPM_AIF_OUT("AIF2TX1", NULL, 0, |
| 787 | ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX1_ENA_SHIFT, 0), |
| 788 | SND_SOC_DAPM_AIF_OUT("AIF2TX2", NULL, 0, |
| 789 | ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX2_ENA_SHIFT, 0), |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 790 | SND_SOC_DAPM_AIF_OUT("AIF2TX3", NULL, 0, |
| 791 | ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX3_ENA_SHIFT, 0), |
| 792 | SND_SOC_DAPM_AIF_OUT("AIF2TX4", NULL, 0, |
| 793 | ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX4_ENA_SHIFT, 0), |
| 794 | SND_SOC_DAPM_AIF_OUT("AIF2TX5", NULL, 0, |
| 795 | ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX5_ENA_SHIFT, 0), |
| 796 | SND_SOC_DAPM_AIF_OUT("AIF2TX6", NULL, 0, |
| 797 | ARIZONA_AIF2_TX_ENABLES, ARIZONA_AIF2TX6_ENA_SHIFT, 0), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 798 | |
| 799 | SND_SOC_DAPM_AIF_IN("AIF2RX1", NULL, 0, |
| 800 | ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX1_ENA_SHIFT, 0), |
| 801 | SND_SOC_DAPM_AIF_IN("AIF2RX2", NULL, 0, |
| 802 | ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX2_ENA_SHIFT, 0), |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 803 | SND_SOC_DAPM_AIF_IN("AIF2RX3", NULL, 0, |
| 804 | ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX3_ENA_SHIFT, 0), |
| 805 | SND_SOC_DAPM_AIF_IN("AIF2RX4", NULL, 0, |
| 806 | ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX4_ENA_SHIFT, 0), |
| 807 | SND_SOC_DAPM_AIF_IN("AIF2RX5", NULL, 0, |
| 808 | ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX5_ENA_SHIFT, 0), |
| 809 | SND_SOC_DAPM_AIF_IN("AIF2RX6", NULL, 0, |
| 810 | ARIZONA_AIF2_RX_ENABLES, ARIZONA_AIF2RX6_ENA_SHIFT, 0), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 811 | |
Mark Brown | d217f90 | 2013-05-17 13:29:05 +0100 | [diff] [blame] | 812 | SND_SOC_DAPM_AIF_IN("SLIMRX1", NULL, 0, |
| 813 | ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE, |
| 814 | ARIZONA_SLIMRX1_ENA_SHIFT, 0), |
| 815 | SND_SOC_DAPM_AIF_IN("SLIMRX2", NULL, 0, |
| 816 | ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE, |
| 817 | ARIZONA_SLIMRX2_ENA_SHIFT, 0), |
| 818 | SND_SOC_DAPM_AIF_IN("SLIMRX3", NULL, 0, |
| 819 | ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE, |
| 820 | ARIZONA_SLIMRX3_ENA_SHIFT, 0), |
| 821 | SND_SOC_DAPM_AIF_IN("SLIMRX4", NULL, 0, |
| 822 | ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE, |
| 823 | ARIZONA_SLIMRX4_ENA_SHIFT, 0), |
| 824 | SND_SOC_DAPM_AIF_IN("SLIMRX5", NULL, 0, |
| 825 | ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE, |
| 826 | ARIZONA_SLIMRX5_ENA_SHIFT, 0), |
| 827 | SND_SOC_DAPM_AIF_IN("SLIMRX6", NULL, 0, |
| 828 | ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE, |
| 829 | ARIZONA_SLIMRX6_ENA_SHIFT, 0), |
| 830 | SND_SOC_DAPM_AIF_IN("SLIMRX7", NULL, 0, |
| 831 | ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE, |
| 832 | ARIZONA_SLIMRX7_ENA_SHIFT, 0), |
| 833 | SND_SOC_DAPM_AIF_IN("SLIMRX8", NULL, 0, |
| 834 | ARIZONA_SLIMBUS_RX_CHANNEL_ENABLE, |
| 835 | ARIZONA_SLIMRX8_ENA_SHIFT, 0), |
| 836 | |
| 837 | SND_SOC_DAPM_AIF_OUT("SLIMTX1", NULL, 0, |
| 838 | ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE, |
| 839 | ARIZONA_SLIMTX1_ENA_SHIFT, 0), |
| 840 | SND_SOC_DAPM_AIF_OUT("SLIMTX2", NULL, 0, |
| 841 | ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE, |
| 842 | ARIZONA_SLIMTX2_ENA_SHIFT, 0), |
| 843 | SND_SOC_DAPM_AIF_OUT("SLIMTX3", NULL, 0, |
| 844 | ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE, |
| 845 | ARIZONA_SLIMTX3_ENA_SHIFT, 0), |
| 846 | SND_SOC_DAPM_AIF_OUT("SLIMTX4", NULL, 0, |
| 847 | ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE, |
| 848 | ARIZONA_SLIMTX4_ENA_SHIFT, 0), |
| 849 | SND_SOC_DAPM_AIF_OUT("SLIMTX5", NULL, 0, |
| 850 | ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE, |
| 851 | ARIZONA_SLIMTX5_ENA_SHIFT, 0), |
| 852 | SND_SOC_DAPM_AIF_OUT("SLIMTX6", NULL, 0, |
| 853 | ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE, |
| 854 | ARIZONA_SLIMTX6_ENA_SHIFT, 0), |
| 855 | SND_SOC_DAPM_AIF_OUT("SLIMTX7", NULL, 0, |
| 856 | ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE, |
| 857 | ARIZONA_SLIMTX7_ENA_SHIFT, 0), |
| 858 | SND_SOC_DAPM_AIF_OUT("SLIMTX8", NULL, 0, |
| 859 | ARIZONA_SLIMBUS_TX_CHANNEL_ENABLE, |
| 860 | ARIZONA_SLIMTX8_ENA_SHIFT, 0), |
| 861 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 862 | SND_SOC_DAPM_AIF_OUT("AIF3TX1", NULL, 0, |
| 863 | ARIZONA_AIF3_TX_ENABLES, ARIZONA_AIF3TX1_ENA_SHIFT, 0), |
| 864 | SND_SOC_DAPM_AIF_OUT("AIF3TX2", NULL, 0, |
| 865 | ARIZONA_AIF3_TX_ENABLES, ARIZONA_AIF3TX2_ENA_SHIFT, 0), |
| 866 | |
| 867 | SND_SOC_DAPM_AIF_IN("AIF3RX1", NULL, 0, |
| 868 | ARIZONA_AIF3_RX_ENABLES, ARIZONA_AIF3RX1_ENA_SHIFT, 0), |
| 869 | SND_SOC_DAPM_AIF_IN("AIF3RX2", NULL, 0, |
| 870 | ARIZONA_AIF3_RX_ENABLES, ARIZONA_AIF3RX2_ENA_SHIFT, 0), |
| 871 | |
Mark Brown | f607e31 | 2013-02-22 18:36:53 +0000 | [diff] [blame] | 872 | SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM, |
| 873 | ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 874 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
Mark Brown | f607e31 | 2013-02-22 18:36:53 +0000 | [diff] [blame] | 875 | SND_SOC_DAPM_PGA_E("OUT1R", SND_SOC_NOPM, |
| 876 | ARIZONA_OUT1R_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 877 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
| 878 | SND_SOC_DAPM_PGA_E("OUT2L", ARIZONA_OUTPUT_ENABLES_1, |
| 879 | ARIZONA_OUT2L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
| 880 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
| 881 | SND_SOC_DAPM_PGA_E("OUT2R", ARIZONA_OUTPUT_ENABLES_1, |
| 882 | ARIZONA_OUT2R_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
| 883 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
| 884 | SND_SOC_DAPM_PGA_E("OUT3L", ARIZONA_OUTPUT_ENABLES_1, |
| 885 | ARIZONA_OUT3L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
| 886 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
Mark Brown | 20bf691 | 2012-09-26 17:52:36 +0100 | [diff] [blame] | 887 | SND_SOC_DAPM_PGA_E("OUT3R", ARIZONA_OUTPUT_ENABLES_1, |
| 888 | ARIZONA_OUT3R_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
| 889 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 890 | SND_SOC_DAPM_PGA_E("OUT5L", ARIZONA_OUTPUT_ENABLES_1, |
| 891 | ARIZONA_OUT5L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
| 892 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
| 893 | SND_SOC_DAPM_PGA_E("OUT5R", ARIZONA_OUTPUT_ENABLES_1, |
| 894 | ARIZONA_OUT5R_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
| 895 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
| 896 | SND_SOC_DAPM_PGA_E("OUT6L", ARIZONA_OUTPUT_ENABLES_1, |
| 897 | ARIZONA_OUT6L_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
| 898 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
| 899 | SND_SOC_DAPM_PGA_E("OUT6R", ARIZONA_OUTPUT_ENABLES_1, |
| 900 | ARIZONA_OUT6R_ENA_SHIFT, 0, NULL, 0, arizona_out_ev, |
| 901 | SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), |
| 902 | |
| 903 | ARIZONA_MIXER_WIDGETS(EQ1, "EQ1"), |
| 904 | ARIZONA_MIXER_WIDGETS(EQ2, "EQ2"), |
| 905 | ARIZONA_MIXER_WIDGETS(EQ3, "EQ3"), |
| 906 | ARIZONA_MIXER_WIDGETS(EQ4, "EQ4"), |
| 907 | |
| 908 | ARIZONA_MIXER_WIDGETS(DRC1L, "DRC1L"), |
| 909 | ARIZONA_MIXER_WIDGETS(DRC1R, "DRC1R"), |
| 910 | ARIZONA_MIXER_WIDGETS(DRC2L, "DRC2L"), |
| 911 | ARIZONA_MIXER_WIDGETS(DRC2R, "DRC2R"), |
| 912 | |
| 913 | ARIZONA_MIXER_WIDGETS(LHPF1, "LHPF1"), |
| 914 | ARIZONA_MIXER_WIDGETS(LHPF2, "LHPF2"), |
| 915 | ARIZONA_MIXER_WIDGETS(LHPF3, "LHPF3"), |
| 916 | ARIZONA_MIXER_WIDGETS(LHPF4, "LHPF4"), |
| 917 | |
| 918 | ARIZONA_MIXER_WIDGETS(Mic, "Mic"), |
| 919 | ARIZONA_MIXER_WIDGETS(Noise, "Noise"), |
| 920 | |
| 921 | ARIZONA_MIXER_WIDGETS(PWM1, "PWM1"), |
| 922 | ARIZONA_MIXER_WIDGETS(PWM2, "PWM2"), |
| 923 | |
| 924 | ARIZONA_MIXER_WIDGETS(OUT1L, "HPOUT1L"), |
| 925 | ARIZONA_MIXER_WIDGETS(OUT1R, "HPOUT1R"), |
| 926 | ARIZONA_MIXER_WIDGETS(OUT2L, "HPOUT2L"), |
| 927 | ARIZONA_MIXER_WIDGETS(OUT2R, "HPOUT2R"), |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 928 | ARIZONA_MIXER_WIDGETS(OUT3L, "HPOUT3L"), |
| 929 | ARIZONA_MIXER_WIDGETS(OUT3R, "HPOUT3R"), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 930 | ARIZONA_MIXER_WIDGETS(SPKOUTL, "SPKOUTL"), |
| 931 | ARIZONA_MIXER_WIDGETS(SPKOUTR, "SPKOUTR"), |
| 932 | ARIZONA_MIXER_WIDGETS(SPKDAT1L, "SPKDAT1L"), |
| 933 | ARIZONA_MIXER_WIDGETS(SPKDAT1R, "SPKDAT1R"), |
| 934 | ARIZONA_MIXER_WIDGETS(SPKDAT2L, "SPKDAT2L"), |
| 935 | ARIZONA_MIXER_WIDGETS(SPKDAT2R, "SPKDAT2R"), |
| 936 | |
| 937 | ARIZONA_MIXER_WIDGETS(AIF1TX1, "AIF1TX1"), |
| 938 | ARIZONA_MIXER_WIDGETS(AIF1TX2, "AIF1TX2"), |
| 939 | ARIZONA_MIXER_WIDGETS(AIF1TX3, "AIF1TX3"), |
| 940 | ARIZONA_MIXER_WIDGETS(AIF1TX4, "AIF1TX4"), |
| 941 | ARIZONA_MIXER_WIDGETS(AIF1TX5, "AIF1TX5"), |
| 942 | ARIZONA_MIXER_WIDGETS(AIF1TX6, "AIF1TX6"), |
| 943 | ARIZONA_MIXER_WIDGETS(AIF1TX7, "AIF1TX7"), |
| 944 | ARIZONA_MIXER_WIDGETS(AIF1TX8, "AIF1TX8"), |
| 945 | |
| 946 | ARIZONA_MIXER_WIDGETS(AIF2TX1, "AIF2TX1"), |
| 947 | ARIZONA_MIXER_WIDGETS(AIF2TX2, "AIF2TX2"), |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 948 | ARIZONA_MIXER_WIDGETS(AIF2TX3, "AIF2TX3"), |
| 949 | ARIZONA_MIXER_WIDGETS(AIF2TX4, "AIF2TX4"), |
| 950 | ARIZONA_MIXER_WIDGETS(AIF2TX5, "AIF2TX5"), |
| 951 | ARIZONA_MIXER_WIDGETS(AIF2TX6, "AIF2TX6"), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 952 | |
| 953 | ARIZONA_MIXER_WIDGETS(AIF3TX1, "AIF3TX1"), |
| 954 | ARIZONA_MIXER_WIDGETS(AIF3TX2, "AIF3TX2"), |
| 955 | |
Mark Brown | d217f90 | 2013-05-17 13:29:05 +0100 | [diff] [blame] | 956 | ARIZONA_MIXER_WIDGETS(SLIMTX1, "SLIMTX1"), |
| 957 | ARIZONA_MIXER_WIDGETS(SLIMTX2, "SLIMTX2"), |
| 958 | ARIZONA_MIXER_WIDGETS(SLIMTX3, "SLIMTX3"), |
| 959 | ARIZONA_MIXER_WIDGETS(SLIMTX4, "SLIMTX4"), |
| 960 | ARIZONA_MIXER_WIDGETS(SLIMTX5, "SLIMTX5"), |
| 961 | ARIZONA_MIXER_WIDGETS(SLIMTX6, "SLIMTX6"), |
| 962 | ARIZONA_MIXER_WIDGETS(SLIMTX7, "SLIMTX7"), |
| 963 | ARIZONA_MIXER_WIDGETS(SLIMTX8, "SLIMTX8"), |
| 964 | |
Charles Keepax | 5886c74 | 2012-11-13 16:40:34 +0000 | [diff] [blame] | 965 | ARIZONA_MUX_WIDGETS(ASRC1L, "ASRC1L"), |
| 966 | ARIZONA_MUX_WIDGETS(ASRC1R, "ASRC1R"), |
| 967 | ARIZONA_MUX_WIDGETS(ASRC2L, "ASRC2L"), |
| 968 | ARIZONA_MUX_WIDGETS(ASRC2R, "ASRC2R"), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 969 | |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 970 | ARIZONA_DSP_WIDGETS(DSP1, "DSP1"), |
| 971 | ARIZONA_DSP_WIDGETS(DSP2, "DSP2"), |
| 972 | ARIZONA_DSP_WIDGETS(DSP3, "DSP3"), |
| 973 | ARIZONA_DSP_WIDGETS(DSP4, "DSP4"), |
| 974 | |
Charles Keepax | 0da2e5b | 2013-11-19 16:04:02 +0000 | [diff] [blame] | 975 | ARIZONA_MUX_WIDGETS(ISRC1DEC1, "ISRC1DEC1"), |
| 976 | ARIZONA_MUX_WIDGETS(ISRC1DEC2, "ISRC1DEC2"), |
| 977 | ARIZONA_MUX_WIDGETS(ISRC1DEC3, "ISRC1DEC3"), |
| 978 | ARIZONA_MUX_WIDGETS(ISRC1DEC4, "ISRC1DEC4"), |
| 979 | |
| 980 | ARIZONA_MUX_WIDGETS(ISRC1INT1, "ISRC1INT1"), |
| 981 | ARIZONA_MUX_WIDGETS(ISRC1INT2, "ISRC1INT2"), |
| 982 | ARIZONA_MUX_WIDGETS(ISRC1INT3, "ISRC1INT3"), |
| 983 | ARIZONA_MUX_WIDGETS(ISRC1INT4, "ISRC1INT4"), |
| 984 | |
| 985 | ARIZONA_MUX_WIDGETS(ISRC2DEC1, "ISRC2DEC1"), |
| 986 | ARIZONA_MUX_WIDGETS(ISRC2DEC2, "ISRC2DEC2"), |
| 987 | ARIZONA_MUX_WIDGETS(ISRC2DEC3, "ISRC2DEC3"), |
| 988 | ARIZONA_MUX_WIDGETS(ISRC2DEC4, "ISRC2DEC4"), |
| 989 | |
| 990 | ARIZONA_MUX_WIDGETS(ISRC2INT1, "ISRC2INT1"), |
| 991 | ARIZONA_MUX_WIDGETS(ISRC2INT2, "ISRC2INT2"), |
| 992 | ARIZONA_MUX_WIDGETS(ISRC2INT3, "ISRC2INT3"), |
| 993 | ARIZONA_MUX_WIDGETS(ISRC2INT4, "ISRC2INT4"), |
| 994 | |
| 995 | ARIZONA_MUX_WIDGETS(ISRC3DEC1, "ISRC3DEC1"), |
| 996 | ARIZONA_MUX_WIDGETS(ISRC3DEC2, "ISRC3DEC2"), |
| 997 | ARIZONA_MUX_WIDGETS(ISRC3DEC3, "ISRC3DEC3"), |
| 998 | ARIZONA_MUX_WIDGETS(ISRC3DEC4, "ISRC3DEC4"), |
| 999 | |
| 1000 | ARIZONA_MUX_WIDGETS(ISRC3INT1, "ISRC3INT1"), |
| 1001 | ARIZONA_MUX_WIDGETS(ISRC3INT2, "ISRC3INT2"), |
| 1002 | ARIZONA_MUX_WIDGETS(ISRC3INT3, "ISRC3INT3"), |
| 1003 | ARIZONA_MUX_WIDGETS(ISRC3INT4, "ISRC3INT4"), |
| 1004 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1005 | SND_SOC_DAPM_OUTPUT("HPOUT1L"), |
| 1006 | SND_SOC_DAPM_OUTPUT("HPOUT1R"), |
| 1007 | SND_SOC_DAPM_OUTPUT("HPOUT2L"), |
| 1008 | SND_SOC_DAPM_OUTPUT("HPOUT2R"), |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 1009 | SND_SOC_DAPM_OUTPUT("HPOUT3L"), |
| 1010 | SND_SOC_DAPM_OUTPUT("HPOUT3R"), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1011 | SND_SOC_DAPM_OUTPUT("SPKOUTLN"), |
| 1012 | SND_SOC_DAPM_OUTPUT("SPKOUTLP"), |
| 1013 | SND_SOC_DAPM_OUTPUT("SPKOUTRN"), |
| 1014 | SND_SOC_DAPM_OUTPUT("SPKOUTRP"), |
| 1015 | SND_SOC_DAPM_OUTPUT("SPKDAT1L"), |
| 1016 | SND_SOC_DAPM_OUTPUT("SPKDAT1R"), |
| 1017 | SND_SOC_DAPM_OUTPUT("SPKDAT2L"), |
| 1018 | SND_SOC_DAPM_OUTPUT("SPKDAT2R"), |
Mark Brown | 57a10a1 | 2013-01-10 19:32:33 +0000 | [diff] [blame] | 1019 | |
| 1020 | SND_SOC_DAPM_OUTPUT("MICSUPP"), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1021 | }; |
| 1022 | |
| 1023 | #define ARIZONA_MIXER_INPUT_ROUTES(name) \ |
| 1024 | { name, "Noise Generator", "Noise Generator" }, \ |
| 1025 | { name, "Tone Generator 1", "Tone Generator 1" }, \ |
| 1026 | { name, "Tone Generator 2", "Tone Generator 2" }, \ |
Mark Brown | 2f76e68 | 2012-11-26 21:18:18 +0000 | [diff] [blame] | 1027 | { name, "Haptics", "HAPTICS" }, \ |
Mark Brown | dac8f1c | 2012-08-26 13:51:27 -0700 | [diff] [blame] | 1028 | { name, "AEC", "AEC Loopback" }, \ |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1029 | { name, "IN1L", "IN1L PGA" }, \ |
| 1030 | { name, "IN1R", "IN1R PGA" }, \ |
| 1031 | { name, "IN2L", "IN2L PGA" }, \ |
| 1032 | { name, "IN2R", "IN2R PGA" }, \ |
| 1033 | { name, "IN3L", "IN3L PGA" }, \ |
| 1034 | { name, "IN3R", "IN3R PGA" }, \ |
| 1035 | { name, "IN4L", "IN4L PGA" }, \ |
| 1036 | { name, "IN4R", "IN4R PGA" }, \ |
| 1037 | { name, "Mic Mute Mixer", "Mic Mute Mixer" }, \ |
| 1038 | { name, "AIF1RX1", "AIF1RX1" }, \ |
| 1039 | { name, "AIF1RX2", "AIF1RX2" }, \ |
| 1040 | { name, "AIF1RX3", "AIF1RX3" }, \ |
| 1041 | { name, "AIF1RX4", "AIF1RX4" }, \ |
| 1042 | { name, "AIF1RX5", "AIF1RX5" }, \ |
| 1043 | { name, "AIF1RX6", "AIF1RX6" }, \ |
| 1044 | { name, "AIF1RX7", "AIF1RX7" }, \ |
| 1045 | { name, "AIF1RX8", "AIF1RX8" }, \ |
| 1046 | { name, "AIF2RX1", "AIF2RX1" }, \ |
| 1047 | { name, "AIF2RX2", "AIF2RX2" }, \ |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 1048 | { name, "AIF2RX3", "AIF2RX3" }, \ |
| 1049 | { name, "AIF2RX4", "AIF2RX4" }, \ |
| 1050 | { name, "AIF2RX5", "AIF2RX5" }, \ |
| 1051 | { name, "AIF2RX6", "AIF2RX6" }, \ |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1052 | { name, "AIF3RX1", "AIF3RX1" }, \ |
| 1053 | { name, "AIF3RX2", "AIF3RX2" }, \ |
Mark Brown | d217f90 | 2013-05-17 13:29:05 +0100 | [diff] [blame] | 1054 | { name, "SLIMRX1", "SLIMRX1" }, \ |
| 1055 | { name, "SLIMRX2", "SLIMRX2" }, \ |
| 1056 | { name, "SLIMRX3", "SLIMRX3" }, \ |
| 1057 | { name, "SLIMRX4", "SLIMRX4" }, \ |
| 1058 | { name, "SLIMRX5", "SLIMRX5" }, \ |
| 1059 | { name, "SLIMRX6", "SLIMRX6" }, \ |
| 1060 | { name, "SLIMRX7", "SLIMRX7" }, \ |
| 1061 | { name, "SLIMRX8", "SLIMRX8" }, \ |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1062 | { name, "EQ1", "EQ1" }, \ |
| 1063 | { name, "EQ2", "EQ2" }, \ |
| 1064 | { name, "EQ3", "EQ3" }, \ |
| 1065 | { name, "EQ4", "EQ4" }, \ |
| 1066 | { name, "DRC1L", "DRC1L" }, \ |
| 1067 | { name, "DRC1R", "DRC1R" }, \ |
| 1068 | { name, "DRC2L", "DRC2L" }, \ |
| 1069 | { name, "DRC2R", "DRC2R" }, \ |
| 1070 | { name, "LHPF1", "LHPF1" }, \ |
| 1071 | { name, "LHPF2", "LHPF2" }, \ |
| 1072 | { name, "LHPF3", "LHPF3" }, \ |
| 1073 | { name, "LHPF4", "LHPF4" }, \ |
| 1074 | { name, "ASRC1L", "ASRC1L" }, \ |
| 1075 | { name, "ASRC1R", "ASRC1R" }, \ |
| 1076 | { name, "ASRC2L", "ASRC2L" }, \ |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 1077 | { name, "ASRC2R", "ASRC2R" }, \ |
Charles Keepax | 0da2e5b | 2013-11-19 16:04:02 +0000 | [diff] [blame] | 1078 | { name, "ISRC1DEC1", "ISRC1DEC1" }, \ |
| 1079 | { name, "ISRC1DEC2", "ISRC1DEC2" }, \ |
| 1080 | { name, "ISRC1DEC3", "ISRC1DEC3" }, \ |
| 1081 | { name, "ISRC1DEC4", "ISRC1DEC4" }, \ |
| 1082 | { name, "ISRC1INT1", "ISRC1INT1" }, \ |
| 1083 | { name, "ISRC1INT2", "ISRC1INT2" }, \ |
| 1084 | { name, "ISRC1INT3", "ISRC1INT3" }, \ |
| 1085 | { name, "ISRC1INT4", "ISRC1INT4" }, \ |
| 1086 | { name, "ISRC2DEC1", "ISRC2DEC1" }, \ |
| 1087 | { name, "ISRC2DEC2", "ISRC2DEC2" }, \ |
| 1088 | { name, "ISRC2DEC3", "ISRC2DEC3" }, \ |
| 1089 | { name, "ISRC2DEC4", "ISRC2DEC4" }, \ |
| 1090 | { name, "ISRC2INT1", "ISRC2INT1" }, \ |
| 1091 | { name, "ISRC2INT2", "ISRC2INT2" }, \ |
| 1092 | { name, "ISRC2INT3", "ISRC2INT3" }, \ |
| 1093 | { name, "ISRC2INT4", "ISRC2INT4" }, \ |
| 1094 | { name, "ISRC3DEC1", "ISRC3DEC1" }, \ |
| 1095 | { name, "ISRC3DEC2", "ISRC3DEC2" }, \ |
| 1096 | { name, "ISRC3DEC3", "ISRC3DEC3" }, \ |
| 1097 | { name, "ISRC3DEC4", "ISRC3DEC4" }, \ |
| 1098 | { name, "ISRC3INT1", "ISRC3INT1" }, \ |
| 1099 | { name, "ISRC3INT2", "ISRC3INT2" }, \ |
| 1100 | { name, "ISRC3INT3", "ISRC3INT3" }, \ |
| 1101 | { name, "ISRC3INT4", "ISRC3INT4" }, \ |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 1102 | { name, "DSP1.1", "DSP1" }, \ |
| 1103 | { name, "DSP1.2", "DSP1" }, \ |
| 1104 | { name, "DSP1.3", "DSP1" }, \ |
| 1105 | { name, "DSP1.4", "DSP1" }, \ |
| 1106 | { name, "DSP1.5", "DSP1" }, \ |
| 1107 | { name, "DSP1.6", "DSP1" }, \ |
| 1108 | { name, "DSP2.1", "DSP2" }, \ |
| 1109 | { name, "DSP2.2", "DSP2" }, \ |
| 1110 | { name, "DSP2.3", "DSP2" }, \ |
| 1111 | { name, "DSP2.4", "DSP2" }, \ |
| 1112 | { name, "DSP2.5", "DSP2" }, \ |
| 1113 | { name, "DSP2.6", "DSP2" }, \ |
| 1114 | { name, "DSP3.1", "DSP3" }, \ |
| 1115 | { name, "DSP3.2", "DSP3" }, \ |
| 1116 | { name, "DSP3.3", "DSP3" }, \ |
| 1117 | { name, "DSP3.4", "DSP3" }, \ |
| 1118 | { name, "DSP3.5", "DSP3" }, \ |
| 1119 | { name, "DSP3.6", "DSP3" }, \ |
| 1120 | { name, "DSP4.1", "DSP4" }, \ |
| 1121 | { name, "DSP4.2", "DSP4" }, \ |
| 1122 | { name, "DSP4.3", "DSP4" }, \ |
| 1123 | { name, "DSP4.4", "DSP4" }, \ |
| 1124 | { name, "DSP4.5", "DSP4" }, \ |
| 1125 | { name, "DSP4.6", "DSP4" } |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1126 | |
| 1127 | static const struct snd_soc_dapm_route wm5110_dapm_routes[] = { |
| 1128 | { "AIF2 Capture", NULL, "DBVDD2" }, |
| 1129 | { "AIF2 Playback", NULL, "DBVDD2" }, |
| 1130 | |
| 1131 | { "AIF3 Capture", NULL, "DBVDD3" }, |
| 1132 | { "AIF3 Playback", NULL, "DBVDD3" }, |
| 1133 | |
| 1134 | { "OUT1L", NULL, "CPVDD" }, |
| 1135 | { "OUT1R", NULL, "CPVDD" }, |
| 1136 | { "OUT2L", NULL, "CPVDD" }, |
| 1137 | { "OUT2R", NULL, "CPVDD" }, |
| 1138 | { "OUT3L", NULL, "CPVDD" }, |
Mark Brown | 20bf691 | 2012-09-26 17:52:36 +0100 | [diff] [blame] | 1139 | { "OUT3R", NULL, "CPVDD" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1140 | |
| 1141 | { "OUT4L", NULL, "SPKVDDL" }, |
| 1142 | { "OUT4R", NULL, "SPKVDDR" }, |
| 1143 | |
| 1144 | { "OUT1L", NULL, "SYSCLK" }, |
| 1145 | { "OUT1R", NULL, "SYSCLK" }, |
| 1146 | { "OUT2L", NULL, "SYSCLK" }, |
| 1147 | { "OUT2R", NULL, "SYSCLK" }, |
| 1148 | { "OUT3L", NULL, "SYSCLK" }, |
| 1149 | { "OUT4L", NULL, "SYSCLK" }, |
| 1150 | { "OUT4R", NULL, "SYSCLK" }, |
| 1151 | { "OUT5L", NULL, "SYSCLK" }, |
| 1152 | { "OUT5R", NULL, "SYSCLK" }, |
| 1153 | { "OUT6L", NULL, "SYSCLK" }, |
| 1154 | { "OUT6R", NULL, "SYSCLK" }, |
| 1155 | |
Charles Keepax | 6dc6a3f | 2013-06-05 14:51:31 +0100 | [diff] [blame] | 1156 | { "IN1L", NULL, "SYSCLK" }, |
| 1157 | { "IN1R", NULL, "SYSCLK" }, |
| 1158 | { "IN2L", NULL, "SYSCLK" }, |
| 1159 | { "IN2R", NULL, "SYSCLK" }, |
| 1160 | { "IN3L", NULL, "SYSCLK" }, |
| 1161 | { "IN3R", NULL, "SYSCLK" }, |
| 1162 | { "IN4L", NULL, "SYSCLK" }, |
| 1163 | { "IN4R", NULL, "SYSCLK" }, |
| 1164 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1165 | { "MICBIAS1", NULL, "MICVDD" }, |
| 1166 | { "MICBIAS2", NULL, "MICVDD" }, |
| 1167 | { "MICBIAS3", NULL, "MICVDD" }, |
| 1168 | |
Charles Keepax | 6dc6a3f | 2013-06-05 14:51:31 +0100 | [diff] [blame] | 1169 | { "Noise Generator", NULL, "SYSCLK" }, |
| 1170 | { "Tone Generator 1", NULL, "SYSCLK" }, |
| 1171 | { "Tone Generator 2", NULL, "SYSCLK" }, |
| 1172 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1173 | { "Noise Generator", NULL, "NOISE" }, |
| 1174 | { "Tone Generator 1", NULL, "TONE" }, |
| 1175 | { "Tone Generator 2", NULL, "TONE" }, |
| 1176 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1177 | { "AIF1 Capture", NULL, "AIF1TX1" }, |
| 1178 | { "AIF1 Capture", NULL, "AIF1TX2" }, |
| 1179 | { "AIF1 Capture", NULL, "AIF1TX3" }, |
| 1180 | { "AIF1 Capture", NULL, "AIF1TX4" }, |
| 1181 | { "AIF1 Capture", NULL, "AIF1TX5" }, |
| 1182 | { "AIF1 Capture", NULL, "AIF1TX6" }, |
| 1183 | { "AIF1 Capture", NULL, "AIF1TX7" }, |
| 1184 | { "AIF1 Capture", NULL, "AIF1TX8" }, |
| 1185 | |
| 1186 | { "AIF1RX1", NULL, "AIF1 Playback" }, |
| 1187 | { "AIF1RX2", NULL, "AIF1 Playback" }, |
| 1188 | { "AIF1RX3", NULL, "AIF1 Playback" }, |
| 1189 | { "AIF1RX4", NULL, "AIF1 Playback" }, |
| 1190 | { "AIF1RX5", NULL, "AIF1 Playback" }, |
| 1191 | { "AIF1RX6", NULL, "AIF1 Playback" }, |
| 1192 | { "AIF1RX7", NULL, "AIF1 Playback" }, |
| 1193 | { "AIF1RX8", NULL, "AIF1 Playback" }, |
| 1194 | |
| 1195 | { "AIF2 Capture", NULL, "AIF2TX1" }, |
| 1196 | { "AIF2 Capture", NULL, "AIF2TX2" }, |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 1197 | { "AIF2 Capture", NULL, "AIF2TX3" }, |
| 1198 | { "AIF2 Capture", NULL, "AIF2TX4" }, |
| 1199 | { "AIF2 Capture", NULL, "AIF2TX5" }, |
| 1200 | { "AIF2 Capture", NULL, "AIF2TX6" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1201 | |
| 1202 | { "AIF2RX1", NULL, "AIF2 Playback" }, |
| 1203 | { "AIF2RX2", NULL, "AIF2 Playback" }, |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 1204 | { "AIF2RX3", NULL, "AIF2 Playback" }, |
| 1205 | { "AIF2RX4", NULL, "AIF2 Playback" }, |
| 1206 | { "AIF2RX5", NULL, "AIF2 Playback" }, |
| 1207 | { "AIF2RX6", NULL, "AIF2 Playback" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1208 | |
| 1209 | { "AIF3 Capture", NULL, "AIF3TX1" }, |
| 1210 | { "AIF3 Capture", NULL, "AIF3TX2" }, |
| 1211 | |
| 1212 | { "AIF3RX1", NULL, "AIF3 Playback" }, |
| 1213 | { "AIF3RX2", NULL, "AIF3 Playback" }, |
| 1214 | |
Mark Brown | d217f90 | 2013-05-17 13:29:05 +0100 | [diff] [blame] | 1215 | { "Slim1 Capture", NULL, "SLIMTX1" }, |
| 1216 | { "Slim1 Capture", NULL, "SLIMTX2" }, |
| 1217 | { "Slim1 Capture", NULL, "SLIMTX3" }, |
| 1218 | { "Slim1 Capture", NULL, "SLIMTX4" }, |
| 1219 | |
| 1220 | { "SLIMRX1", NULL, "Slim1 Playback" }, |
| 1221 | { "SLIMRX2", NULL, "Slim1 Playback" }, |
| 1222 | { "SLIMRX3", NULL, "Slim1 Playback" }, |
| 1223 | { "SLIMRX4", NULL, "Slim1 Playback" }, |
| 1224 | |
| 1225 | { "Slim2 Capture", NULL, "SLIMTX5" }, |
| 1226 | { "Slim2 Capture", NULL, "SLIMTX6" }, |
| 1227 | |
| 1228 | { "SLIMRX5", NULL, "Slim2 Playback" }, |
| 1229 | { "SLIMRX6", NULL, "Slim2 Playback" }, |
| 1230 | |
| 1231 | { "Slim3 Capture", NULL, "SLIMTX7" }, |
| 1232 | { "Slim3 Capture", NULL, "SLIMTX8" }, |
| 1233 | |
| 1234 | { "SLIMRX7", NULL, "Slim3 Playback" }, |
| 1235 | { "SLIMRX8", NULL, "Slim3 Playback" }, |
| 1236 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1237 | { "AIF1 Playback", NULL, "SYSCLK" }, |
| 1238 | { "AIF2 Playback", NULL, "SYSCLK" }, |
| 1239 | { "AIF3 Playback", NULL, "SYSCLK" }, |
Mark Brown | d217f90 | 2013-05-17 13:29:05 +0100 | [diff] [blame] | 1240 | { "Slim1 Playback", NULL, "SYSCLK" }, |
| 1241 | { "Slim2 Playback", NULL, "SYSCLK" }, |
| 1242 | { "Slim3 Playback", NULL, "SYSCLK" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1243 | |
| 1244 | { "AIF1 Capture", NULL, "SYSCLK" }, |
| 1245 | { "AIF2 Capture", NULL, "SYSCLK" }, |
| 1246 | { "AIF3 Capture", NULL, "SYSCLK" }, |
Mark Brown | d217f90 | 2013-05-17 13:29:05 +0100 | [diff] [blame] | 1247 | { "Slim1 Capture", NULL, "SYSCLK" }, |
| 1248 | { "Slim2 Capture", NULL, "SYSCLK" }, |
| 1249 | { "Slim3 Capture", NULL, "SYSCLK" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1250 | |
Mark Brown | 17c3f7e | 2012-08-10 15:40:22 +0100 | [diff] [blame] | 1251 | { "IN1L PGA", NULL, "IN1L" }, |
| 1252 | { "IN1R PGA", NULL, "IN1R" }, |
| 1253 | |
| 1254 | { "IN2L PGA", NULL, "IN2L" }, |
| 1255 | { "IN2R PGA", NULL, "IN2R" }, |
| 1256 | |
| 1257 | { "IN3L PGA", NULL, "IN3L" }, |
| 1258 | { "IN3R PGA", NULL, "IN3R" }, |
| 1259 | |
| 1260 | { "IN4L PGA", NULL, "IN4L" }, |
| 1261 | { "IN4R PGA", NULL, "IN4R" }, |
| 1262 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1263 | ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"), |
| 1264 | ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"), |
| 1265 | ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"), |
| 1266 | ARIZONA_MIXER_ROUTES("OUT2R", "HPOUT2R"), |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 1267 | ARIZONA_MIXER_ROUTES("OUT3L", "HPOUT3L"), |
| 1268 | ARIZONA_MIXER_ROUTES("OUT3R", "HPOUT3R"), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1269 | |
| 1270 | ARIZONA_MIXER_ROUTES("OUT4L", "SPKOUTL"), |
| 1271 | ARIZONA_MIXER_ROUTES("OUT4R", "SPKOUTR"), |
| 1272 | ARIZONA_MIXER_ROUTES("OUT5L", "SPKDAT1L"), |
| 1273 | ARIZONA_MIXER_ROUTES("OUT5R", "SPKDAT1R"), |
| 1274 | ARIZONA_MIXER_ROUTES("OUT6L", "SPKDAT2L"), |
| 1275 | ARIZONA_MIXER_ROUTES("OUT6R", "SPKDAT2R"), |
| 1276 | |
| 1277 | ARIZONA_MIXER_ROUTES("PWM1 Driver", "PWM1"), |
| 1278 | ARIZONA_MIXER_ROUTES("PWM2 Driver", "PWM2"), |
| 1279 | |
| 1280 | ARIZONA_MIXER_ROUTES("AIF1TX1", "AIF1TX1"), |
| 1281 | ARIZONA_MIXER_ROUTES("AIF1TX2", "AIF1TX2"), |
| 1282 | ARIZONA_MIXER_ROUTES("AIF1TX3", "AIF1TX3"), |
| 1283 | ARIZONA_MIXER_ROUTES("AIF1TX4", "AIF1TX4"), |
| 1284 | ARIZONA_MIXER_ROUTES("AIF1TX5", "AIF1TX5"), |
| 1285 | ARIZONA_MIXER_ROUTES("AIF1TX6", "AIF1TX6"), |
| 1286 | ARIZONA_MIXER_ROUTES("AIF1TX7", "AIF1TX7"), |
| 1287 | ARIZONA_MIXER_ROUTES("AIF1TX8", "AIF1TX8"), |
| 1288 | |
| 1289 | ARIZONA_MIXER_ROUTES("AIF2TX1", "AIF2TX1"), |
| 1290 | ARIZONA_MIXER_ROUTES("AIF2TX2", "AIF2TX2"), |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 1291 | ARIZONA_MIXER_ROUTES("AIF2TX3", "AIF2TX3"), |
| 1292 | ARIZONA_MIXER_ROUTES("AIF2TX4", "AIF2TX4"), |
| 1293 | ARIZONA_MIXER_ROUTES("AIF2TX5", "AIF2TX5"), |
| 1294 | ARIZONA_MIXER_ROUTES("AIF2TX6", "AIF2TX6"), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1295 | |
| 1296 | ARIZONA_MIXER_ROUTES("AIF3TX1", "AIF3TX1"), |
| 1297 | ARIZONA_MIXER_ROUTES("AIF3TX2", "AIF3TX2"), |
| 1298 | |
Mark Brown | d217f90 | 2013-05-17 13:29:05 +0100 | [diff] [blame] | 1299 | ARIZONA_MIXER_ROUTES("SLIMTX1", "SLIMTX1"), |
| 1300 | ARIZONA_MIXER_ROUTES("SLIMTX2", "SLIMTX2"), |
| 1301 | ARIZONA_MIXER_ROUTES("SLIMTX3", "SLIMTX3"), |
| 1302 | ARIZONA_MIXER_ROUTES("SLIMTX4", "SLIMTX4"), |
| 1303 | ARIZONA_MIXER_ROUTES("SLIMTX5", "SLIMTX5"), |
| 1304 | ARIZONA_MIXER_ROUTES("SLIMTX6", "SLIMTX6"), |
| 1305 | ARIZONA_MIXER_ROUTES("SLIMTX7", "SLIMTX7"), |
| 1306 | ARIZONA_MIXER_ROUTES("SLIMTX8", "SLIMTX8"), |
| 1307 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1308 | ARIZONA_MIXER_ROUTES("EQ1", "EQ1"), |
| 1309 | ARIZONA_MIXER_ROUTES("EQ2", "EQ2"), |
| 1310 | ARIZONA_MIXER_ROUTES("EQ3", "EQ3"), |
| 1311 | ARIZONA_MIXER_ROUTES("EQ4", "EQ4"), |
| 1312 | |
| 1313 | ARIZONA_MIXER_ROUTES("DRC1L", "DRC1L"), |
| 1314 | ARIZONA_MIXER_ROUTES("DRC1R", "DRC1R"), |
| 1315 | ARIZONA_MIXER_ROUTES("DRC2L", "DRC2L"), |
| 1316 | ARIZONA_MIXER_ROUTES("DRC2R", "DRC2R"), |
| 1317 | |
| 1318 | ARIZONA_MIXER_ROUTES("LHPF1", "LHPF1"), |
| 1319 | ARIZONA_MIXER_ROUTES("LHPF2", "LHPF2"), |
| 1320 | ARIZONA_MIXER_ROUTES("LHPF3", "LHPF3"), |
| 1321 | ARIZONA_MIXER_ROUTES("LHPF4", "LHPF4"), |
| 1322 | |
Mark Brown | 66e7aa2 | 2013-08-12 23:59:08 +0100 | [diff] [blame] | 1323 | ARIZONA_MIXER_ROUTES("Mic Mute Mixer", "Noise"), |
| 1324 | ARIZONA_MIXER_ROUTES("Mic Mute Mixer", "Mic"), |
| 1325 | |
Charles Keepax | e7edb27 | 2013-08-12 11:33:32 +0100 | [diff] [blame] | 1326 | ARIZONA_MUX_ROUTES("ASRC1L", "ASRC1L"), |
| 1327 | ARIZONA_MUX_ROUTES("ASRC1R", "ASRC1R"), |
| 1328 | ARIZONA_MUX_ROUTES("ASRC2L", "ASRC2L"), |
| 1329 | ARIZONA_MUX_ROUTES("ASRC2R", "ASRC2R"), |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1330 | |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 1331 | ARIZONA_DSP_ROUTES("DSP1"), |
| 1332 | ARIZONA_DSP_ROUTES("DSP2"), |
| 1333 | ARIZONA_DSP_ROUTES("DSP3"), |
| 1334 | ARIZONA_DSP_ROUTES("DSP4"), |
| 1335 | |
Charles Keepax | 0da2e5b | 2013-11-19 16:04:02 +0000 | [diff] [blame] | 1336 | ARIZONA_MUX_ROUTES("ISRC1INT1", "ISRC1INT1"), |
| 1337 | ARIZONA_MUX_ROUTES("ISRC1INT2", "ISRC1INT2"), |
| 1338 | ARIZONA_MUX_ROUTES("ISRC1INT3", "ISRC1INT3"), |
| 1339 | ARIZONA_MUX_ROUTES("ISRC1INT4", "ISRC1INT4"), |
| 1340 | |
| 1341 | ARIZONA_MUX_ROUTES("ISRC1DEC1", "ISRC1DEC1"), |
| 1342 | ARIZONA_MUX_ROUTES("ISRC1DEC2", "ISRC1DEC2"), |
| 1343 | ARIZONA_MUX_ROUTES("ISRC1DEC3", "ISRC1DEC3"), |
| 1344 | ARIZONA_MUX_ROUTES("ISRC1DEC4", "ISRC1DEC4"), |
| 1345 | |
| 1346 | ARIZONA_MUX_ROUTES("ISRC2INT1", "ISRC2INT1"), |
| 1347 | ARIZONA_MUX_ROUTES("ISRC2INT2", "ISRC2INT2"), |
| 1348 | ARIZONA_MUX_ROUTES("ISRC2INT3", "ISRC2INT3"), |
| 1349 | ARIZONA_MUX_ROUTES("ISRC2INT4", "ISRC2INT4"), |
| 1350 | |
| 1351 | ARIZONA_MUX_ROUTES("ISRC2DEC1", "ISRC2DEC1"), |
| 1352 | ARIZONA_MUX_ROUTES("ISRC2DEC2", "ISRC2DEC2"), |
| 1353 | ARIZONA_MUX_ROUTES("ISRC2DEC3", "ISRC2DEC3"), |
| 1354 | ARIZONA_MUX_ROUTES("ISRC2DEC4", "ISRC2DEC4"), |
| 1355 | |
| 1356 | ARIZONA_MUX_ROUTES("ISRC3INT1", "ISRC3INT1"), |
| 1357 | ARIZONA_MUX_ROUTES("ISRC3INT2", "ISRC3INT2"), |
| 1358 | ARIZONA_MUX_ROUTES("ISRC3INT3", "ISRC3INT3"), |
| 1359 | ARIZONA_MUX_ROUTES("ISRC3INT4", "ISRC3INT4"), |
| 1360 | |
| 1361 | ARIZONA_MUX_ROUTES("ISRC3DEC1", "ISRC3DEC1"), |
| 1362 | ARIZONA_MUX_ROUTES("ISRC3DEC2", "ISRC3DEC2"), |
| 1363 | ARIZONA_MUX_ROUTES("ISRC3DEC3", "ISRC3DEC3"), |
| 1364 | ARIZONA_MUX_ROUTES("ISRC3DEC4", "ISRC3DEC4"), |
| 1365 | |
Charles Keepax | a9c9caf | 2013-10-26 15:31:26 +0100 | [diff] [blame] | 1366 | { "AEC Loopback", "HPOUT1L", "OUT1L" }, |
| 1367 | { "AEC Loopback", "HPOUT1R", "OUT1R" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1368 | { "HPOUT1L", NULL, "OUT1L" }, |
| 1369 | { "HPOUT1R", NULL, "OUT1R" }, |
| 1370 | |
Charles Keepax | a9c9caf | 2013-10-26 15:31:26 +0100 | [diff] [blame] | 1371 | { "AEC Loopback", "HPOUT2L", "OUT2L" }, |
| 1372 | { "AEC Loopback", "HPOUT2R", "OUT2R" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1373 | { "HPOUT2L", NULL, "OUT2L" }, |
| 1374 | { "HPOUT2R", NULL, "OUT2R" }, |
| 1375 | |
Charles Keepax | a9c9caf | 2013-10-26 15:31:26 +0100 | [diff] [blame] | 1376 | { "AEC Loopback", "HPOUT3L", "OUT3L" }, |
| 1377 | { "AEC Loopback", "HPOUT3R", "OUT3R" }, |
Mark Brown | 35d3889 | 2012-08-26 13:50:48 -0700 | [diff] [blame] | 1378 | { "HPOUT3L", NULL, "OUT3L" }, |
| 1379 | { "HPOUT3R", NULL, "OUT3L" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1380 | |
Charles Keepax | a9c9caf | 2013-10-26 15:31:26 +0100 | [diff] [blame] | 1381 | { "AEC Loopback", "SPKOUTL", "OUT4L" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1382 | { "SPKOUTLN", NULL, "OUT4L" }, |
| 1383 | { "SPKOUTLP", NULL, "OUT4L" }, |
| 1384 | |
Charles Keepax | a9c9caf | 2013-10-26 15:31:26 +0100 | [diff] [blame] | 1385 | { "AEC Loopback", "SPKOUTR", "OUT4R" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1386 | { "SPKOUTRN", NULL, "OUT4R" }, |
| 1387 | { "SPKOUTRP", NULL, "OUT4R" }, |
| 1388 | |
Charles Keepax | a9c9caf | 2013-10-26 15:31:26 +0100 | [diff] [blame] | 1389 | { "AEC Loopback", "SPKDAT1L", "OUT5L" }, |
| 1390 | { "AEC Loopback", "SPKDAT1R", "OUT5R" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1391 | { "SPKDAT1L", NULL, "OUT5L" }, |
| 1392 | { "SPKDAT1R", NULL, "OUT5R" }, |
| 1393 | |
Charles Keepax | a9c9caf | 2013-10-26 15:31:26 +0100 | [diff] [blame] | 1394 | { "AEC Loopback", "SPKDAT2L", "OUT6L" }, |
| 1395 | { "AEC Loopback", "SPKDAT2R", "OUT6R" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1396 | { "SPKDAT2L", NULL, "OUT6L" }, |
| 1397 | { "SPKDAT2R", NULL, "OUT6R" }, |
Mark Brown | 57a10a1 | 2013-01-10 19:32:33 +0000 | [diff] [blame] | 1398 | |
| 1399 | { "MICSUPP", NULL, "SYSCLK" }, |
Charles Keepax | b63144e | 2013-07-04 08:56:28 +0100 | [diff] [blame] | 1400 | |
| 1401 | { "DRC1 Signal Activity", NULL, "DRC1L" }, |
| 1402 | { "DRC1 Signal Activity", NULL, "DRC1R" }, |
| 1403 | { "DRC2 Signal Activity", NULL, "DRC2L" }, |
| 1404 | { "DRC2 Signal Activity", NULL, "DRC2R" }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1405 | }; |
| 1406 | |
| 1407 | static int wm5110_set_fll(struct snd_soc_codec *codec, int fll_id, int source, |
| 1408 | unsigned int Fref, unsigned int Fout) |
| 1409 | { |
| 1410 | struct wm5110_priv *wm5110 = snd_soc_codec_get_drvdata(codec); |
| 1411 | |
| 1412 | switch (fll_id) { |
| 1413 | case WM5110_FLL1: |
| 1414 | return arizona_set_fll(&wm5110->fll[0], source, Fref, Fout); |
| 1415 | case WM5110_FLL2: |
| 1416 | return arizona_set_fll(&wm5110->fll[1], source, Fref, Fout); |
Charles Keepax | ee929a9 | 2013-02-20 17:28:40 +0000 | [diff] [blame] | 1417 | case WM5110_FLL1_REFCLK: |
| 1418 | return arizona_set_fll_refclk(&wm5110->fll[0], source, Fref, |
| 1419 | Fout); |
| 1420 | case WM5110_FLL2_REFCLK: |
| 1421 | return arizona_set_fll_refclk(&wm5110->fll[1], source, Fref, |
| 1422 | Fout); |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1423 | default: |
| 1424 | return -EINVAL; |
| 1425 | } |
| 1426 | } |
| 1427 | |
| 1428 | #define WM5110_RATES SNDRV_PCM_RATE_8000_192000 |
| 1429 | |
| 1430 | #define WM5110_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ |
| 1431 | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) |
| 1432 | |
| 1433 | static struct snd_soc_dai_driver wm5110_dai[] = { |
| 1434 | { |
| 1435 | .name = "wm5110-aif1", |
| 1436 | .id = 1, |
| 1437 | .base = ARIZONA_AIF1_BCLK_CTRL, |
| 1438 | .playback = { |
| 1439 | .stream_name = "AIF1 Playback", |
| 1440 | .channels_min = 1, |
| 1441 | .channels_max = 8, |
| 1442 | .rates = WM5110_RATES, |
| 1443 | .formats = WM5110_FORMATS, |
| 1444 | }, |
| 1445 | .capture = { |
| 1446 | .stream_name = "AIF1 Capture", |
| 1447 | .channels_min = 1, |
| 1448 | .channels_max = 8, |
| 1449 | .rates = WM5110_RATES, |
| 1450 | .formats = WM5110_FORMATS, |
| 1451 | }, |
| 1452 | .ops = &arizona_dai_ops, |
| 1453 | .symmetric_rates = 1, |
| 1454 | }, |
| 1455 | { |
| 1456 | .name = "wm5110-aif2", |
| 1457 | .id = 2, |
| 1458 | .base = ARIZONA_AIF2_BCLK_CTRL, |
| 1459 | .playback = { |
| 1460 | .stream_name = "AIF2 Playback", |
| 1461 | .channels_min = 1, |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 1462 | .channels_max = 6, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1463 | .rates = WM5110_RATES, |
| 1464 | .formats = WM5110_FORMATS, |
| 1465 | }, |
| 1466 | .capture = { |
| 1467 | .stream_name = "AIF2 Capture", |
| 1468 | .channels_min = 1, |
Richard Fitzgerald | e64001e | 2013-11-20 13:17:07 +0000 | [diff] [blame] | 1469 | .channels_max = 6, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1470 | .rates = WM5110_RATES, |
| 1471 | .formats = WM5110_FORMATS, |
| 1472 | }, |
| 1473 | .ops = &arizona_dai_ops, |
| 1474 | .symmetric_rates = 1, |
| 1475 | }, |
| 1476 | { |
| 1477 | .name = "wm5110-aif3", |
| 1478 | .id = 3, |
| 1479 | .base = ARIZONA_AIF3_BCLK_CTRL, |
| 1480 | .playback = { |
| 1481 | .stream_name = "AIF3 Playback", |
| 1482 | .channels_min = 1, |
| 1483 | .channels_max = 2, |
| 1484 | .rates = WM5110_RATES, |
| 1485 | .formats = WM5110_FORMATS, |
| 1486 | }, |
| 1487 | .capture = { |
| 1488 | .stream_name = "AIF3 Capture", |
| 1489 | .channels_min = 1, |
| 1490 | .channels_max = 2, |
| 1491 | .rates = WM5110_RATES, |
| 1492 | .formats = WM5110_FORMATS, |
| 1493 | }, |
| 1494 | .ops = &arizona_dai_ops, |
| 1495 | .symmetric_rates = 1, |
| 1496 | }, |
Mark Brown | d217f90 | 2013-05-17 13:29:05 +0100 | [diff] [blame] | 1497 | { |
| 1498 | .name = "wm5110-slim1", |
| 1499 | .id = 4, |
| 1500 | .playback = { |
| 1501 | .stream_name = "Slim1 Playback", |
| 1502 | .channels_min = 1, |
| 1503 | .channels_max = 4, |
| 1504 | .rates = WM5110_RATES, |
| 1505 | .formats = WM5110_FORMATS, |
| 1506 | }, |
| 1507 | .capture = { |
| 1508 | .stream_name = "Slim1 Capture", |
| 1509 | .channels_min = 1, |
| 1510 | .channels_max = 4, |
| 1511 | .rates = WM5110_RATES, |
| 1512 | .formats = WM5110_FORMATS, |
| 1513 | }, |
| 1514 | .ops = &arizona_simple_dai_ops, |
| 1515 | }, |
| 1516 | { |
| 1517 | .name = "wm5110-slim2", |
| 1518 | .id = 5, |
| 1519 | .playback = { |
| 1520 | .stream_name = "Slim2 Playback", |
| 1521 | .channels_min = 1, |
| 1522 | .channels_max = 2, |
| 1523 | .rates = WM5110_RATES, |
| 1524 | .formats = WM5110_FORMATS, |
| 1525 | }, |
| 1526 | .capture = { |
| 1527 | .stream_name = "Slim2 Capture", |
| 1528 | .channels_min = 1, |
| 1529 | .channels_max = 2, |
| 1530 | .rates = WM5110_RATES, |
| 1531 | .formats = WM5110_FORMATS, |
| 1532 | }, |
| 1533 | .ops = &arizona_simple_dai_ops, |
| 1534 | }, |
| 1535 | { |
| 1536 | .name = "wm5110-slim3", |
| 1537 | .id = 6, |
| 1538 | .playback = { |
| 1539 | .stream_name = "Slim3 Playback", |
| 1540 | .channels_min = 1, |
| 1541 | .channels_max = 2, |
| 1542 | .rates = WM5110_RATES, |
| 1543 | .formats = WM5110_FORMATS, |
| 1544 | }, |
| 1545 | .capture = { |
| 1546 | .stream_name = "Slim3 Capture", |
| 1547 | .channels_min = 1, |
| 1548 | .channels_max = 2, |
| 1549 | .rates = WM5110_RATES, |
| 1550 | .formats = WM5110_FORMATS, |
| 1551 | }, |
| 1552 | .ops = &arizona_simple_dai_ops, |
| 1553 | }, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1554 | }; |
| 1555 | |
| 1556 | static int wm5110_codec_probe(struct snd_soc_codec *codec) |
| 1557 | { |
| 1558 | struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec); |
Mark Brown | 2f76e68 | 2012-11-26 21:18:18 +0000 | [diff] [blame] | 1559 | int ret; |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1560 | |
| 1561 | codec->control_data = priv->core.arizona->regmap; |
Mark Brown | 2f76e68 | 2012-11-26 21:18:18 +0000 | [diff] [blame] | 1562 | priv->core.arizona->dapm = &codec->dapm; |
| 1563 | |
| 1564 | ret = snd_soc_codec_set_cache_io(codec, 32, 16, SND_SOC_REGMAP); |
| 1565 | if (ret != 0) |
| 1566 | return ret; |
| 1567 | |
Mark Brown | 62cc4d5 | 2013-05-20 11:28:35 -0500 | [diff] [blame] | 1568 | arizona_init_spk(codec); |
Charles Keepax | b63144e | 2013-07-04 08:56:28 +0100 | [diff] [blame] | 1569 | arizona_init_gpio(codec); |
Mark Brown | 62cc4d5 | 2013-05-20 11:28:35 -0500 | [diff] [blame] | 1570 | |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 1571 | ret = snd_soc_add_codec_controls(codec, wm_adsp2_fw_controls, 8); |
| 1572 | if (ret != 0) |
| 1573 | return ret; |
| 1574 | |
Mark Brown | 2f76e68 | 2012-11-26 21:18:18 +0000 | [diff] [blame] | 1575 | snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS"); |
| 1576 | |
| 1577 | priv->core.arizona->dapm = &codec->dapm; |
| 1578 | |
| 1579 | return 0; |
| 1580 | } |
| 1581 | |
| 1582 | static int wm5110_codec_remove(struct snd_soc_codec *codec) |
| 1583 | { |
| 1584 | struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec); |
| 1585 | |
| 1586 | priv->core.arizona->dapm = NULL; |
| 1587 | |
| 1588 | return 0; |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1589 | } |
| 1590 | |
| 1591 | #define WM5110_DIG_VU 0x0200 |
| 1592 | |
| 1593 | static unsigned int wm5110_digital_vu[] = { |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1594 | ARIZONA_DAC_DIGITAL_VOLUME_1L, |
| 1595 | ARIZONA_DAC_DIGITAL_VOLUME_1R, |
| 1596 | ARIZONA_DAC_DIGITAL_VOLUME_2L, |
| 1597 | ARIZONA_DAC_DIGITAL_VOLUME_2R, |
| 1598 | ARIZONA_DAC_DIGITAL_VOLUME_3L, |
| 1599 | ARIZONA_DAC_DIGITAL_VOLUME_3R, |
| 1600 | ARIZONA_DAC_DIGITAL_VOLUME_4L, |
| 1601 | ARIZONA_DAC_DIGITAL_VOLUME_4R, |
| 1602 | ARIZONA_DAC_DIGITAL_VOLUME_5L, |
| 1603 | ARIZONA_DAC_DIGITAL_VOLUME_5R, |
Charles Keepax | ae60503 | 2012-09-27 13:21:48 +0100 | [diff] [blame] | 1604 | ARIZONA_DAC_DIGITAL_VOLUME_6L, |
| 1605 | ARIZONA_DAC_DIGITAL_VOLUME_6R, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1606 | }; |
| 1607 | |
| 1608 | static struct snd_soc_codec_driver soc_codec_dev_wm5110 = { |
| 1609 | .probe = wm5110_codec_probe, |
Mark Brown | 2f76e68 | 2012-11-26 21:18:18 +0000 | [diff] [blame] | 1610 | .remove = wm5110_codec_remove, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1611 | |
| 1612 | .idle_bias_off = true, |
| 1613 | |
| 1614 | .set_sysclk = arizona_set_sysclk, |
| 1615 | .set_pll = wm5110_set_fll, |
| 1616 | |
| 1617 | .controls = wm5110_snd_controls, |
| 1618 | .num_controls = ARRAY_SIZE(wm5110_snd_controls), |
| 1619 | .dapm_widgets = wm5110_dapm_widgets, |
| 1620 | .num_dapm_widgets = ARRAY_SIZE(wm5110_dapm_widgets), |
| 1621 | .dapm_routes = wm5110_dapm_routes, |
| 1622 | .num_dapm_routes = ARRAY_SIZE(wm5110_dapm_routes), |
| 1623 | }; |
| 1624 | |
Bill Pemberton | 7a79e94 | 2012-12-07 09:26:37 -0500 | [diff] [blame] | 1625 | static int wm5110_probe(struct platform_device *pdev) |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1626 | { |
| 1627 | struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); |
| 1628 | struct wm5110_priv *wm5110; |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 1629 | int i, ret; |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1630 | |
| 1631 | wm5110 = devm_kzalloc(&pdev->dev, sizeof(struct wm5110_priv), |
| 1632 | GFP_KERNEL); |
| 1633 | if (wm5110 == NULL) |
| 1634 | return -ENOMEM; |
| 1635 | platform_set_drvdata(pdev, wm5110); |
| 1636 | |
| 1637 | wm5110->core.arizona = arizona; |
Mark Brown | ddbce97 | 2013-02-15 17:27:22 +0000 | [diff] [blame] | 1638 | wm5110->core.num_inputs = 8; |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1639 | |
Mark Brown | 9a3e1b8 | 2013-11-19 16:04:01 +0000 | [diff] [blame] | 1640 | for (i = 0; i < WM5110_NUM_ADSP; i++) { |
| 1641 | wm5110->core.adsp[i].part = "wm5110"; |
| 1642 | wm5110->core.adsp[i].num = i + 1; |
| 1643 | wm5110->core.adsp[i].type = WMFW_ADSP2; |
| 1644 | wm5110->core.adsp[i].dev = arizona->dev; |
| 1645 | wm5110->core.adsp[i].regmap = arizona->regmap; |
| 1646 | |
| 1647 | wm5110->core.adsp[i].base = ARIZONA_DSP1_CONTROL_1 |
| 1648 | + (0x100 * i); |
| 1649 | wm5110->core.adsp[i].mem = wm5110_dsp_regions[i]; |
| 1650 | wm5110->core.adsp[i].num_mems |
| 1651 | = ARRAY_SIZE(wm5110_dsp1_regions); |
| 1652 | |
| 1653 | ret = wm_adsp2_init(&wm5110->core.adsp[i], false); |
| 1654 | if (ret != 0) |
| 1655 | return ret; |
| 1656 | } |
| 1657 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1658 | for (i = 0; i < ARRAY_SIZE(wm5110->fll); i++) |
| 1659 | wm5110->fll[i].vco_mult = 3; |
| 1660 | |
| 1661 | arizona_init_fll(arizona, 1, ARIZONA_FLL1_CONTROL_1 - 1, |
| 1662 | ARIZONA_IRQ_FLL1_LOCK, ARIZONA_IRQ_FLL1_CLOCK_OK, |
| 1663 | &wm5110->fll[0]); |
| 1664 | arizona_init_fll(arizona, 2, ARIZONA_FLL2_CONTROL_1 - 1, |
| 1665 | ARIZONA_IRQ_FLL2_LOCK, ARIZONA_IRQ_FLL2_CLOCK_OK, |
| 1666 | &wm5110->fll[1]); |
| 1667 | |
Charles Keepax | 0da2e5b | 2013-11-19 16:04:02 +0000 | [diff] [blame] | 1668 | /* SR2 fixed at 8kHz, SR3 fixed at 16kHz */ |
| 1669 | regmap_update_bits(arizona->regmap, ARIZONA_SAMPLE_RATE_2, |
| 1670 | ARIZONA_SAMPLE_RATE_2_MASK, 0x11); |
| 1671 | regmap_update_bits(arizona->regmap, ARIZONA_SAMPLE_RATE_3, |
| 1672 | ARIZONA_SAMPLE_RATE_3_MASK, 0x12); |
| 1673 | |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1674 | for (i = 0; i < ARRAY_SIZE(wm5110_dai); i++) |
| 1675 | arizona_init_dai(&wm5110->core, i); |
| 1676 | |
| 1677 | /* Latch volume update bits */ |
| 1678 | for (i = 0; i < ARRAY_SIZE(wm5110_digital_vu); i++) |
| 1679 | regmap_update_bits(arizona->regmap, wm5110_digital_vu[i], |
| 1680 | WM5110_DIG_VU, WM5110_DIG_VU); |
| 1681 | |
| 1682 | pm_runtime_enable(&pdev->dev); |
| 1683 | pm_runtime_idle(&pdev->dev); |
| 1684 | |
| 1685 | return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_wm5110, |
| 1686 | wm5110_dai, ARRAY_SIZE(wm5110_dai)); |
| 1687 | } |
| 1688 | |
Bill Pemberton | 7a79e94 | 2012-12-07 09:26:37 -0500 | [diff] [blame] | 1689 | static int wm5110_remove(struct platform_device *pdev) |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1690 | { |
| 1691 | snd_soc_unregister_codec(&pdev->dev); |
| 1692 | pm_runtime_disable(&pdev->dev); |
| 1693 | |
| 1694 | return 0; |
| 1695 | } |
| 1696 | |
| 1697 | static struct platform_driver wm5110_codec_driver = { |
| 1698 | .driver = { |
| 1699 | .name = "wm5110-codec", |
| 1700 | .owner = THIS_MODULE, |
| 1701 | }, |
| 1702 | .probe = wm5110_probe, |
Bill Pemberton | 7a79e94 | 2012-12-07 09:26:37 -0500 | [diff] [blame] | 1703 | .remove = wm5110_remove, |
Mark Brown | 5c6af63 | 2012-07-09 19:09:41 +0100 | [diff] [blame] | 1704 | }; |
| 1705 | |
| 1706 | module_platform_driver(wm5110_codec_driver); |
| 1707 | |
| 1708 | MODULE_DESCRIPTION("ASoC WM5110 driver"); |
| 1709 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |
| 1710 | MODULE_LICENSE("GPL"); |
| 1711 | MODULE_ALIAS("platform:wm5110-codec"); |