diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-18 04:46:48 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-22 21:59:39 -0500 |
commit | aedbfd9649c5a9ee8e601f8f35e74ea617371ae5 (patch) | |
tree | 3702a588431c20c4cba468b4cdd17f8b88cfb03a | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
ASoC: wm9081: 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: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/codecs/wm9081.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 0982c1d38ec4..721cee71d5fc 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
@@ -268,8 +268,7 @@ static const char *drc_high_text[] = { | |||
268 | "0", | 268 | "0", |
269 | }; | 269 | }; |
270 | 270 | ||
271 | static const struct soc_enum drc_high = | 271 | static SOC_ENUM_SINGLE_DECL(drc_high, WM9081_DRC_3, 3, drc_high_text); |
272 | SOC_ENUM_SINGLE(WM9081_DRC_3, 3, 6, drc_high_text); | ||
273 | 272 | ||
274 | static const char *drc_low_text[] = { | 273 | static const char *drc_low_text[] = { |
275 | "1", | 274 | "1", |
@@ -279,8 +278,7 @@ static const char *drc_low_text[] = { | |||
279 | "0", | 278 | "0", |
280 | }; | 279 | }; |
281 | 280 | ||
282 | static const struct soc_enum drc_low = | 281 | static SOC_ENUM_SINGLE_DECL(drc_low, WM9081_DRC_3, 0, drc_low_text); |
283 | SOC_ENUM_SINGLE(WM9081_DRC_3, 0, 5, drc_low_text); | ||
284 | 282 | ||
285 | static const char *drc_atk_text[] = { | 283 | static const char *drc_atk_text[] = { |
286 | "181us", | 284 | "181us", |
@@ -297,8 +295,7 @@ static const char *drc_atk_text[] = { | |||
297 | "185.6ms", | 295 | "185.6ms", |
298 | }; | 296 | }; |
299 | 297 | ||
300 | static const struct soc_enum drc_atk = | 298 | static SOC_ENUM_SINGLE_DECL(drc_atk, WM9081_DRC_2, 12, drc_atk_text); |
301 | SOC_ENUM_SINGLE(WM9081_DRC_2, 12, 12, drc_atk_text); | ||
302 | 299 | ||
303 | static const char *drc_dcy_text[] = { | 300 | static const char *drc_dcy_text[] = { |
304 | "186ms", | 301 | "186ms", |
@@ -312,8 +309,7 @@ static const char *drc_dcy_text[] = { | |||
312 | "47.56s", | 309 | "47.56s", |
313 | }; | 310 | }; |
314 | 311 | ||
315 | static const struct soc_enum drc_dcy = | 312 | static SOC_ENUM_SINGLE_DECL(drc_dcy, WM9081_DRC_2, 8, drc_dcy_text); |
316 | SOC_ENUM_SINGLE(WM9081_DRC_2, 8, 9, drc_dcy_text); | ||
317 | 313 | ||
318 | static const char *drc_qr_dcy_text[] = { | 314 | static const char *drc_qr_dcy_text[] = { |
319 | "0.725ms", | 315 | "0.725ms", |
@@ -321,8 +317,7 @@ static const char *drc_qr_dcy_text[] = { | |||
321 | "5.8ms", | 317 | "5.8ms", |
322 | }; | 318 | }; |
323 | 319 | ||
324 | static const struct soc_enum drc_qr_dcy = | 320 | static SOC_ENUM_SINGLE_DECL(drc_qr_dcy, WM9081_DRC_2, 4, drc_qr_dcy_text); |
325 | SOC_ENUM_SINGLE(WM9081_DRC_2, 4, 3, drc_qr_dcy_text); | ||
326 | 321 | ||
327 | static const char *dac_deemph_text[] = { | 322 | static const char *dac_deemph_text[] = { |
328 | "None", | 323 | "None", |
@@ -331,16 +326,16 @@ static const char *dac_deemph_text[] = { | |||
331 | "48kHz", | 326 | "48kHz", |
332 | }; | 327 | }; |
333 | 328 | ||
334 | static const struct soc_enum dac_deemph = | 329 | static SOC_ENUM_SINGLE_DECL(dac_deemph, WM9081_DAC_DIGITAL_2, 1, |
335 | SOC_ENUM_SINGLE(WM9081_DAC_DIGITAL_2, 1, 4, dac_deemph_text); | 330 | dac_deemph_text); |
336 | 331 | ||
337 | static const char *speaker_mode_text[] = { | 332 | static const char *speaker_mode_text[] = { |
338 | "Class D", | 333 | "Class D", |
339 | "Class AB", | 334 | "Class AB", |
340 | }; | 335 | }; |
341 | 336 | ||
342 | static const struct soc_enum speaker_mode = | 337 | static SOC_ENUM_SINGLE_DECL(speaker_mode, WM9081_ANALOGUE_SPEAKER_2, 6, |
343 | SOC_ENUM_SINGLE(WM9081_ANALOGUE_SPEAKER_2, 6, 2, speaker_mode_text); | 338 | speaker_mode_text); |
344 | 339 | ||
345 | static int speaker_mode_get(struct snd_kcontrol *kcontrol, | 340 | static int speaker_mode_get(struct snd_kcontrol *kcontrol, |
346 | struct snd_ctl_elem_value *ucontrol) | 341 | struct snd_ctl_elem_value *ucontrol) |