diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-18 04:32:16 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-22 21:31:20 -0500 |
commit | 1dbb348d904baed36789078e1202344f5a6ecc84 (patch) | |
tree | 3b02ab65662070bd728f2b8560cb84979db8a92b /sound/soc/codecs | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
ASoC: uda1380: Use SOC_ENUM_SINGLE_DECL()
Just replace with the helper macro.
Also, use ARRAY_SIZE() in some ASOC_ENUM_SINGLE() lines.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.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/uda1380.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index 726df6d43c2b..72ee8e1838e5 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c | |||
@@ -237,25 +237,27 @@ static const char *uda1380_os_setting[] = { | |||
237 | }; | 237 | }; |
238 | 238 | ||
239 | static const struct soc_enum uda1380_deemp_enum[] = { | 239 | static const struct soc_enum uda1380_deemp_enum[] = { |
240 | SOC_ENUM_SINGLE(UDA1380_DEEMP, 8, 5, uda1380_deemp), | 240 | SOC_ENUM_SINGLE(UDA1380_DEEMP, 8, ARRAY_SIZE(uda1380_deemp), |
241 | SOC_ENUM_SINGLE(UDA1380_DEEMP, 0, 5, uda1380_deemp), | 241 | uda1380_deemp), |
242 | SOC_ENUM_SINGLE(UDA1380_DEEMP, 0, ARRAY_SIZE(uda1380_deemp), | ||
243 | uda1380_deemp), | ||
242 | }; | 244 | }; |
243 | static const struct soc_enum uda1380_input_sel_enum = | 245 | static SOC_ENUM_SINGLE_DECL(uda1380_input_sel_enum, |
244 | SOC_ENUM_SINGLE(UDA1380_ADC, 2, 4, uda1380_input_sel); /* SEL_MIC, SEL_LNA */ | 246 | UDA1380_ADC, 2, uda1380_input_sel); /* SEL_MIC, SEL_LNA */ |
245 | static const struct soc_enum uda1380_output_sel_enum = | 247 | static SOC_ENUM_SINGLE_DECL(uda1380_output_sel_enum, |
246 | SOC_ENUM_SINGLE(UDA1380_PM, 7, 2, uda1380_output_sel); /* R02_EN_AVC */ | 248 | UDA1380_PM, 7, uda1380_output_sel); /* R02_EN_AVC */ |
247 | static const struct soc_enum uda1380_spf_enum = | 249 | static SOC_ENUM_SINGLE_DECL(uda1380_spf_enum, |
248 | SOC_ENUM_SINGLE(UDA1380_MODE, 14, 4, uda1380_spf_mode); /* M */ | 250 | UDA1380_MODE, 14, uda1380_spf_mode); /* M */ |
249 | static const struct soc_enum uda1380_capture_sel_enum = | 251 | static SOC_ENUM_SINGLE_DECL(uda1380_capture_sel_enum, |
250 | SOC_ENUM_SINGLE(UDA1380_IFACE, 6, 2, uda1380_capture_sel); /* SEL_SOURCE */ | 252 | UDA1380_IFACE, 6, uda1380_capture_sel); /* SEL_SOURCE */ |
251 | static const struct soc_enum uda1380_sel_ns_enum = | 253 | static SOC_ENUM_SINGLE_DECL(uda1380_sel_ns_enum, |
252 | SOC_ENUM_SINGLE(UDA1380_MIXER, 14, 2, uda1380_sel_ns); /* SEL_NS */ | 254 | UDA1380_MIXER, 14, uda1380_sel_ns); /* SEL_NS */ |
253 | static const struct soc_enum uda1380_mix_enum = | 255 | static SOC_ENUM_SINGLE_DECL(uda1380_mix_enum, |
254 | SOC_ENUM_SINGLE(UDA1380_MIXER, 12, 4, uda1380_mix_control); /* MIX, MIX_POS */ | 256 | UDA1380_MIXER, 12, uda1380_mix_control); /* MIX, MIX_POS */ |
255 | static const struct soc_enum uda1380_sdet_enum = | 257 | static SOC_ENUM_SINGLE_DECL(uda1380_sdet_enum, |
256 | SOC_ENUM_SINGLE(UDA1380_MIXER, 4, 4, uda1380_sdet_setting); /* SD_VALUE */ | 258 | UDA1380_MIXER, 4, uda1380_sdet_setting); /* SD_VALUE */ |
257 | static const struct soc_enum uda1380_os_enum = | 259 | static SOC_ENUM_SINGLE_DECL(uda1380_os_enum, |
258 | SOC_ENUM_SINGLE(UDA1380_MIXER, 0, 3, uda1380_os_setting); /* OS */ | 260 | UDA1380_MIXER, 0, uda1380_os_setting); /* OS */ |
259 | 261 | ||
260 | /* | 262 | /* |
261 | * from -48 dB in 1.5 dB steps (mute instead of -49.5 dB) | 263 | * from -48 dB in 1.5 dB steps (mute instead of -49.5 dB) |