aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/wm8990.c41
1 files changed, 19 insertions, 22 deletions
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 0ccd4d8d043b..33f53ab1e7b0 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -157,26 +157,23 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
157static const char *wm8990_digital_sidetone[] = 157static const char *wm8990_digital_sidetone[] =
158 {"None", "Left ADC", "Right ADC", "Reserved"}; 158 {"None", "Left ADC", "Right ADC", "Reserved"};
159 159
160static const struct soc_enum wm8990_left_digital_sidetone_enum = 160static SOC_ENUM_SINGLE_DECL(wm8990_left_digital_sidetone_enum,
161SOC_ENUM_SINGLE(WM8990_DIGITAL_SIDE_TONE, 161 WM8990_DIGITAL_SIDE_TONE,
162 WM8990_ADC_TO_DACL_SHIFT, 162 WM8990_ADC_TO_DACL_SHIFT,
163 WM8990_ADC_TO_DACL_MASK, 163 wm8990_digital_sidetone);
164 wm8990_digital_sidetone); 164
165 165static SOC_ENUM_SINGLE_DECL(wm8990_right_digital_sidetone_enum,
166static const struct soc_enum wm8990_right_digital_sidetone_enum = 166 WM8990_DIGITAL_SIDE_TONE,
167SOC_ENUM_SINGLE(WM8990_DIGITAL_SIDE_TONE, 167 WM8990_ADC_TO_DACR_SHIFT,
168 WM8990_ADC_TO_DACR_SHIFT, 168 wm8990_digital_sidetone);
169 WM8990_ADC_TO_DACR_MASK,
170 wm8990_digital_sidetone);
171 169
172static const char *wm8990_adcmode[] = 170static const char *wm8990_adcmode[] =
173 {"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"}; 171 {"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"};
174 172
175static const struct soc_enum wm8990_right_adcmode_enum = 173static SOC_ENUM_SINGLE_DECL(wm8990_right_adcmode_enum,
176SOC_ENUM_SINGLE(WM8990_ADC_CTRL, 174 WM8990_ADC_CTRL,
177 WM8990_ADC_HPF_CUT_SHIFT, 175 WM8990_ADC_HPF_CUT_SHIFT,
178 WM8990_ADC_HPF_CUT_MASK, 176 wm8990_adcmode);
179 wm8990_adcmode);
180 177
181static const struct snd_kcontrol_new wm8990_snd_controls[] = { 178static const struct snd_kcontrol_new wm8990_snd_controls[] = {
182/* INMIXL */ 179/* INMIXL */
@@ -475,9 +472,9 @@ SOC_DAPM_SINGLE("RINPGA34 Switch", WM8990_INPUT_MIXER3, WM8990_L34MNB_BIT,
475static const char *wm8990_ainlmux[] = 472static const char *wm8990_ainlmux[] =
476 {"INMIXL Mix", "RXVOICE Mix", "DIFFINL Mix"}; 473 {"INMIXL Mix", "RXVOICE Mix", "DIFFINL Mix"};
477 474
478static const struct soc_enum wm8990_ainlmux_enum = 475static SOC_ENUM_SINGLE_DECL(wm8990_ainlmux_enum,
479SOC_ENUM_SINGLE(WM8990_INPUT_MIXER1, WM8990_AINLMODE_SHIFT, 476 WM8990_INPUT_MIXER1, WM8990_AINLMODE_SHIFT,
480 ARRAY_SIZE(wm8990_ainlmux), wm8990_ainlmux); 477 wm8990_ainlmux);
481 478
482static const struct snd_kcontrol_new wm8990_dapm_ainlmux_controls = 479static const struct snd_kcontrol_new wm8990_dapm_ainlmux_controls =
483SOC_DAPM_ENUM("Route", wm8990_ainlmux_enum); 480SOC_DAPM_ENUM("Route", wm8990_ainlmux_enum);
@@ -488,9 +485,9 @@ SOC_DAPM_ENUM("Route", wm8990_ainlmux_enum);
488static const char *wm8990_ainrmux[] = 485static const char *wm8990_ainrmux[] =
489 {"INMIXR Mix", "RXVOICE Mix", "DIFFINR Mix"}; 486 {"INMIXR Mix", "RXVOICE Mix", "DIFFINR Mix"};
490 487
491static const struct soc_enum wm8990_ainrmux_enum = 488static SOC_ENUM_SINGLE_DECL(wm8990_ainrmux_enum,
492SOC_ENUM_SINGLE(WM8990_INPUT_MIXER1, WM8990_AINRMODE_SHIFT, 489 WM8990_INPUT_MIXER1, WM8990_AINRMODE_SHIFT,
493 ARRAY_SIZE(wm8990_ainrmux), wm8990_ainrmux); 490 wm8990_ainrmux);
494 491
495static const struct snd_kcontrol_new wm8990_dapm_ainrmux_controls = 492static const struct snd_kcontrol_new wm8990_dapm_ainrmux_controls =
496SOC_DAPM_ENUM("Route", wm8990_ainrmux_enum); 493SOC_DAPM_ENUM("Route", wm8990_ainrmux_enum);