aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l52.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-18 04:05:01 -0500
committerMark Brown <broonie@linaro.org>2014-02-19 21:14:39 -0500
commit4682a0a2b8e5d9633727276455f445e0b402767c (patch)
tree0c11cb2c3559d4648a5c8f10a9c76769af1203cd /sound/soc/codecs/cs42l52.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
ASoC: cs42l52: Use SOC_ENUM_SINGLE_DECL()
Just replace with the helper macro. No functional change at all. 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> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/cs42l52.c')
-rw-r--r--sound/soc/codecs/cs42l52.c92
1 files changed, 43 insertions, 49 deletions
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 0bac6d5a4ac8..be455ea5f2fe 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -210,13 +210,11 @@ static const char * const cs42l52_adca_text[] = {
210static const char * const cs42l52_adcb_text[] = { 210static const char * const cs42l52_adcb_text[] = {
211 "Input1B", "Input2B", "Input3B", "Input4B", "PGA Input Right"}; 211 "Input1B", "Input2B", "Input3B", "Input4B", "PGA Input Right"};
212 212
213static const struct soc_enum adca_enum = 213static SOC_ENUM_SINGLE_DECL(adca_enum,
214 SOC_ENUM_SINGLE(CS42L52_ADC_PGA_A, 5, 214 CS42L52_ADC_PGA_A, 5, cs42l52_adca_text);
215 ARRAY_SIZE(cs42l52_adca_text), cs42l52_adca_text);
216 215
217static const struct soc_enum adcb_enum = 216static SOC_ENUM_SINGLE_DECL(adcb_enum,
218 SOC_ENUM_SINGLE(CS42L52_ADC_PGA_B, 5, 217 CS42L52_ADC_PGA_B, 5, cs42l52_adcb_text);
219 ARRAY_SIZE(cs42l52_adcb_text), cs42l52_adcb_text);
220 218
221static const struct snd_kcontrol_new adca_mux = 219static const struct snd_kcontrol_new adca_mux =
222 SOC_DAPM_ENUM("Left ADC Input Capture Mux", adca_enum); 220 SOC_DAPM_ENUM("Left ADC Input Capture Mux", adca_enum);
@@ -229,26 +227,22 @@ static const char * const mic_bias_level_text[] = {
229 "0.8 +VA", "0.83 +VA", "0.91 +VA" 227 "0.8 +VA", "0.83 +VA", "0.91 +VA"
230}; 228};
231 229
232static const struct soc_enum mic_bias_level_enum = 230static SOC_ENUM_SINGLE_DECL(mic_bias_level_enum,
233 SOC_ENUM_SINGLE(CS42L52_IFACE_CTL2, 0, 231 CS42L52_IFACE_CTL2, 0, mic_bias_level_text);
234 ARRAY_SIZE(mic_bias_level_text), mic_bias_level_text);
235 232
236static const char * const cs42l52_mic_text[] = { "MIC1", "MIC2" }; 233static const char * const cs42l52_mic_text[] = { "MIC1", "MIC2" };
237 234
238static const struct soc_enum mica_enum = 235static SOC_ENUM_SINGLE_DECL(mica_enum,
239 SOC_ENUM_SINGLE(CS42L52_MICA_CTL, 5, 236 CS42L52_MICA_CTL, 5, cs42l52_mic_text);
240 ARRAY_SIZE(cs42l52_mic_text), cs42l52_mic_text);
241 237
242static const struct soc_enum micb_enum = 238static SOC_ENUM_SINGLE_DECL(micb_enum,
243 SOC_ENUM_SINGLE(CS42L52_MICB_CTL, 5, 239 CS42L52_MICB_CTL, 5, cs42l52_mic_text);
244 ARRAY_SIZE(cs42l52_mic_text), cs42l52_mic_text);
245 240
246static const char * const digital_output_mux_text[] = {"ADC", "DSP"}; 241static const char * const digital_output_mux_text[] = {"ADC", "DSP"};
247 242
248static const struct soc_enum digital_output_mux_enum = 243static SOC_ENUM_SINGLE_DECL(digital_output_mux_enum,
249 SOC_ENUM_SINGLE(CS42L52_ADC_MISC_CTL, 6, 244 CS42L52_ADC_MISC_CTL, 6,
250 ARRAY_SIZE(digital_output_mux_text), 245 digital_output_mux_text);
251 digital_output_mux_text);
252 246
253static const struct snd_kcontrol_new digital_output_mux = 247static const struct snd_kcontrol_new digital_output_mux =
254 SOC_DAPM_ENUM("Digital Output Mux", digital_output_mux_enum); 248 SOC_DAPM_ENUM("Digital Output Mux", digital_output_mux_enum);
@@ -258,18 +252,18 @@ static const char * const hp_gain_num_text[] = {
258 "0.7099", "0.8399", "1.000", "1.1430" 252 "0.7099", "0.8399", "1.000", "1.1430"
259}; 253};
260 254
261static const struct soc_enum hp_gain_enum = 255static SOC_ENUM_SINGLE_DECL(hp_gain_enum,
262 SOC_ENUM_SINGLE(CS42L52_PB_CTL1, 5, 256 CS42L52_PB_CTL1, 5,
263 ARRAY_SIZE(hp_gain_num_text), hp_gain_num_text); 257 hp_gain_num_text);
264 258
265static const char * const beep_pitch_text[] = { 259static const char * const beep_pitch_text[] = {
266 "C4", "C5", "D5", "E5", "F5", "G5", "A5", "B5", 260 "C4", "C5", "D5", "E5", "F5", "G5", "A5", "B5",
267 "C6", "D6", "E6", "F6", "G6", "A6", "B6", "C7" 261 "C6", "D6", "E6", "F6", "G6", "A6", "B6", "C7"
268}; 262};
269 263
270static const struct soc_enum beep_pitch_enum = 264static SOC_ENUM_SINGLE_DECL(beep_pitch_enum,
271 SOC_ENUM_SINGLE(CS42L52_BEEP_FREQ, 4, 265 CS42L52_BEEP_FREQ, 4,
272 ARRAY_SIZE(beep_pitch_text), beep_pitch_text); 266 beep_pitch_text);
273 267
274static const char * const beep_ontime_text[] = { 268static const char * const beep_ontime_text[] = {
275 "86 ms", "430 ms", "780 ms", "1.20 s", "1.50 s", 269 "86 ms", "430 ms", "780 ms", "1.20 s", "1.50 s",
@@ -277,66 +271,66 @@ static const char * const beep_ontime_text[] = {
277 "3.50 s", "3.80 s", "4.20 s", "4.50 s", "4.80 s", "5.20 s" 271 "3.50 s", "3.80 s", "4.20 s", "4.50 s", "4.80 s", "5.20 s"
278}; 272};
279 273
280static const struct soc_enum beep_ontime_enum = 274static SOC_ENUM_SINGLE_DECL(beep_ontime_enum,
281 SOC_ENUM_SINGLE(CS42L52_BEEP_FREQ, 0, 275 CS42L52_BEEP_FREQ, 0,
282 ARRAY_SIZE(beep_ontime_text), beep_ontime_text); 276 beep_ontime_text);
283 277
284static const char * const beep_offtime_text[] = { 278static const char * const beep_offtime_text[] = {
285 "1.23 s", "2.58 s", "3.90 s", "5.20 s", 279 "1.23 s", "2.58 s", "3.90 s", "5.20 s",
286 "6.60 s", "8.05 s", "9.35 s", "10.80 s" 280 "6.60 s", "8.05 s", "9.35 s", "10.80 s"
287}; 281};
288 282
289static const struct soc_enum beep_offtime_enum = 283static SOC_ENUM_SINGLE_DECL(beep_offtime_enum,
290 SOC_ENUM_SINGLE(CS42L52_BEEP_VOL, 5, 284 CS42L52_BEEP_VOL, 5,
291 ARRAY_SIZE(beep_offtime_text), beep_offtime_text); 285 beep_offtime_text);
292 286
293static const char * const beep_config_text[] = { 287static const char * const beep_config_text[] = {
294 "Off", "Single", "Multiple", "Continuous" 288 "Off", "Single", "Multiple", "Continuous"
295}; 289};
296 290
297static const struct soc_enum beep_config_enum = 291static SOC_ENUM_SINGLE_DECL(beep_config_enum,
298 SOC_ENUM_SINGLE(CS42L52_BEEP_TONE_CTL, 6, 292 CS42L52_BEEP_TONE_CTL, 6,
299 ARRAY_SIZE(beep_config_text), beep_config_text); 293 beep_config_text);
300 294
301static const char * const beep_bass_text[] = { 295static const char * const beep_bass_text[] = {
302 "50 Hz", "100 Hz", "200 Hz", "250 Hz" 296 "50 Hz", "100 Hz", "200 Hz", "250 Hz"
303}; 297};
304 298
305static const struct soc_enum beep_bass_enum = 299static SOC_ENUM_SINGLE_DECL(beep_bass_enum,
306 SOC_ENUM_SINGLE(CS42L52_BEEP_TONE_CTL, 1, 300 CS42L52_BEEP_TONE_CTL, 1,
307 ARRAY_SIZE(beep_bass_text), beep_bass_text); 301 beep_bass_text);
308 302
309static const char * const beep_treble_text[] = { 303static const char * const beep_treble_text[] = {
310 "5 kHz", "7 kHz", "10 kHz", " 15 kHz" 304 "5 kHz", "7 kHz", "10 kHz", " 15 kHz"
311}; 305};
312 306
313static const struct soc_enum beep_treble_enum = 307static SOC_ENUM_SINGLE_DECL(beep_treble_enum,
314 SOC_ENUM_SINGLE(CS42L52_BEEP_TONE_CTL, 3, 308 CS42L52_BEEP_TONE_CTL, 3,
315 ARRAY_SIZE(beep_treble_text), beep_treble_text); 309 beep_treble_text);
316 310
317static const char * const ng_threshold_text[] = { 311static const char * const ng_threshold_text[] = {
318 "-34dB", "-37dB", "-40dB", "-43dB", 312 "-34dB", "-37dB", "-40dB", "-43dB",
319 "-46dB", "-52dB", "-58dB", "-64dB" 313 "-46dB", "-52dB", "-58dB", "-64dB"
320}; 314};
321 315
322static const struct soc_enum ng_threshold_enum = 316static SOC_ENUM_SINGLE_DECL(ng_threshold_enum,
323 SOC_ENUM_SINGLE(CS42L52_NOISE_GATE_CTL, 2, 317 CS42L52_NOISE_GATE_CTL, 2,
324 ARRAY_SIZE(ng_threshold_text), ng_threshold_text); 318 ng_threshold_text);
325 319
326static const char * const cs42l52_ng_delay_text[] = { 320static const char * const cs42l52_ng_delay_text[] = {
327 "50ms", "100ms", "150ms", "200ms"}; 321 "50ms", "100ms", "150ms", "200ms"};
328 322
329static const struct soc_enum ng_delay_enum = 323static SOC_ENUM_SINGLE_DECL(ng_delay_enum,
330 SOC_ENUM_SINGLE(CS42L52_NOISE_GATE_CTL, 0, 324 CS42L52_NOISE_GATE_CTL, 0,
331 ARRAY_SIZE(cs42l52_ng_delay_text), cs42l52_ng_delay_text); 325 cs42l52_ng_delay_text);
332 326
333static const char * const cs42l52_ng_type_text[] = { 327static const char * const cs42l52_ng_type_text[] = {
334 "Apply Specific", "Apply All" 328 "Apply Specific", "Apply All"
335}; 329};
336 330
337static const struct soc_enum ng_type_enum = 331static SOC_ENUM_SINGLE_DECL(ng_type_enum,
338 SOC_ENUM_SINGLE(CS42L52_NOISE_GATE_CTL, 6, 332 CS42L52_NOISE_GATE_CTL, 6,
339 ARRAY_SIZE(cs42l52_ng_type_text), cs42l52_ng_type_text); 333 cs42l52_ng_type_text);
340 334
341static const char * const left_swap_text[] = { 335static const char * const left_swap_text[] = {
342 "Left", "LR 2", "Right"}; 336 "Left", "LR 2", "Right"};