aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-18 03:44:23 -0500
committerMark Brown <broonie@linaro.org>2014-02-19 20:31:53 -0500
commitd07338b0f2e1697c99fcd52bf1895227ce5e1a14 (patch)
treedf22716251e0040248692d355c921291f51ac6e1 /sound/soc/codecs
parente156291c7bab1771df34acd583c3c1b1ad71231c (diff)
ASoC: wm8991: Fix the wrong number of enum items
wm8991 codec driver has a few places wrongly defining the number of enum items. Use SOC_ENUM_SINGLE_DECL() macro and they are automatically fixed. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/wm8991.c41
1 files changed, 19 insertions, 22 deletions
diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c
index 244eb09ffa43..32d219570cca 100644
--- a/sound/soc/codecs/wm8991.c
+++ b/sound/soc/codecs/wm8991.c
@@ -171,26 +171,23 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
171static const char *wm8991_digital_sidetone[] = 171static const char *wm8991_digital_sidetone[] =
172{"None", "Left ADC", "Right ADC", "Reserved"}; 172{"None", "Left ADC", "Right ADC", "Reserved"};
173 173
174static const struct soc_enum wm8991_left_digital_sidetone_enum = 174static SOC_ENUM_SINGLE_DECL(wm8991_left_digital_sidetone_enum,
175 SOC_ENUM_SINGLE(WM8991_DIGITAL_SIDE_TONE, 175 WM8991_DIGITAL_SIDE_TONE,
176 WM8991_ADC_TO_DACL_SHIFT, 176 WM8991_ADC_TO_DACL_SHIFT,
177 WM8991_ADC_TO_DACL_MASK, 177 wm8991_digital_sidetone);
178 wm8991_digital_sidetone); 178
179 179static SOC_ENUM_SINGLE_DECL(wm8991_right_digital_sidetone_enum,
180static const struct soc_enum wm8991_right_digital_sidetone_enum = 180 WM8991_DIGITAL_SIDE_TONE,
181 SOC_ENUM_SINGLE(WM8991_DIGITAL_SIDE_TONE, 181 WM8991_ADC_TO_DACR_SHIFT,
182 WM8991_ADC_TO_DACR_SHIFT, 182 wm8991_digital_sidetone);
183 WM8991_ADC_TO_DACR_MASK,
184 wm8991_digital_sidetone);
185 183
186static const char *wm8991_adcmode[] = 184static const char *wm8991_adcmode[] =
187{"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"}; 185{"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"};
188 186
189static const struct soc_enum wm8991_right_adcmode_enum = 187static SOC_ENUM_SINGLE_DECL(wm8991_right_adcmode_enum,
190 SOC_ENUM_SINGLE(WM8991_ADC_CTRL, 188 WM8991_ADC_CTRL,
191 WM8991_ADC_HPF_CUT_SHIFT, 189 WM8991_ADC_HPF_CUT_SHIFT,
192 WM8991_ADC_HPF_CUT_MASK, 190 wm8991_adcmode);
193 wm8991_adcmode);
194 191
195static const struct snd_kcontrol_new wm8991_snd_controls[] = { 192static const struct snd_kcontrol_new wm8991_snd_controls[] = {
196 /* INMIXL */ 193 /* INMIXL */
@@ -486,9 +483,9 @@ static const struct snd_kcontrol_new wm8991_dapm_inmixr_controls[] = {
486static const char *wm8991_ainlmux[] = 483static const char *wm8991_ainlmux[] =
487{"INMIXL Mix", "RXVOICE Mix", "DIFFINL Mix"}; 484{"INMIXL Mix", "RXVOICE Mix", "DIFFINL Mix"};
488 485
489static const struct soc_enum wm8991_ainlmux_enum = 486static SOC_ENUM_SINGLE_DECL(wm8991_ainlmux_enum,
490 SOC_ENUM_SINGLE(WM8991_INPUT_MIXER1, WM8991_AINLMODE_SHIFT, 487 WM8991_INPUT_MIXER1, WM8991_AINLMODE_SHIFT,
491 ARRAY_SIZE(wm8991_ainlmux), wm8991_ainlmux); 488 wm8991_ainlmux);
492 489
493static const struct snd_kcontrol_new wm8991_dapm_ainlmux_controls = 490static const struct snd_kcontrol_new wm8991_dapm_ainlmux_controls =
494 SOC_DAPM_ENUM("Route", wm8991_ainlmux_enum); 491 SOC_DAPM_ENUM("Route", wm8991_ainlmux_enum);
@@ -499,9 +496,9 @@ static const struct snd_kcontrol_new wm8991_dapm_ainlmux_controls =
499static const char *wm8991_ainrmux[] = 496static const char *wm8991_ainrmux[] =
500{"INMIXR Mix", "RXVOICE Mix", "DIFFINR Mix"}; 497{"INMIXR Mix", "RXVOICE Mix", "DIFFINR Mix"};
501 498
502static const struct soc_enum wm8991_ainrmux_enum = 499static SOC_ENUM_SINGLE_DECL(wm8991_ainrmux_enum,
503 SOC_ENUM_SINGLE(WM8991_INPUT_MIXER1, WM8991_AINRMODE_SHIFT, 500 WM8991_INPUT_MIXER1, WM8991_AINRMODE_SHIFT,
504 ARRAY_SIZE(wm8991_ainrmux), wm8991_ainrmux); 501 wm8991_ainrmux);
505 502
506static const struct snd_kcontrol_new wm8991_dapm_ainrmux_controls = 503static const struct snd_kcontrol_new wm8991_dapm_ainrmux_controls =
507 SOC_DAPM_ENUM("Route", wm8991_ainrmux_enum); 504 SOC_DAPM_ENUM("Route", wm8991_ainrmux_enum);