diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-18 04:01:43 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-19 20:43:59 -0500 |
commit | 27ca2c30f4fec73d53f727fe2fe729e16d9a43b2 (patch) | |
tree | 93b67d4fe6740513cef6aa68d1d90e15bd966978 /sound | |
parent | 48e50ce37fcf4c376845d1c42177eeb1601f99ad (diff) |
ASoC: arizona: Fix wrong number of items in enum ctls
arizona 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: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/arizona.c | 71 |
1 files changed, 40 insertions, 31 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index e4295fee8f13..a32b84ac03f6 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c | |||
@@ -542,67 +542,76 @@ static const char *arizona_vol_ramp_text[] = { | |||
542 | "15ms/6dB", "30ms/6dB", | 542 | "15ms/6dB", "30ms/6dB", |
543 | }; | 543 | }; |
544 | 544 | ||
545 | const struct soc_enum arizona_in_vd_ramp = | 545 | SOC_ENUM_SINGLE_DECL(arizona_in_vd_ramp, |
546 | SOC_ENUM_SINGLE(ARIZONA_INPUT_VOLUME_RAMP, | 546 | ARIZONA_INPUT_VOLUME_RAMP, |
547 | ARIZONA_IN_VD_RAMP_SHIFT, 7, arizona_vol_ramp_text); | 547 | ARIZONA_IN_VD_RAMP_SHIFT, |
548 | arizona_vol_ramp_text); | ||
548 | EXPORT_SYMBOL_GPL(arizona_in_vd_ramp); | 549 | EXPORT_SYMBOL_GPL(arizona_in_vd_ramp); |
549 | 550 | ||
550 | const struct soc_enum arizona_in_vi_ramp = | 551 | SOC_ENUM_SINGLE_DECL(arizona_in_vi_ramp, |
551 | SOC_ENUM_SINGLE(ARIZONA_INPUT_VOLUME_RAMP, | 552 | ARIZONA_INPUT_VOLUME_RAMP, |
552 | ARIZONA_IN_VI_RAMP_SHIFT, 7, arizona_vol_ramp_text); | 553 | ARIZONA_IN_VI_RAMP_SHIFT, |
554 | arizona_vol_ramp_text); | ||
553 | EXPORT_SYMBOL_GPL(arizona_in_vi_ramp); | 555 | EXPORT_SYMBOL_GPL(arizona_in_vi_ramp); |
554 | 556 | ||
555 | const struct soc_enum arizona_out_vd_ramp = | 557 | SOC_ENUM_SINGLE_DECL(arizona_out_vd_ramp, |
556 | SOC_ENUM_SINGLE(ARIZONA_OUTPUT_VOLUME_RAMP, | 558 | ARIZONA_OUTPUT_VOLUME_RAMP, |
557 | ARIZONA_OUT_VD_RAMP_SHIFT, 7, arizona_vol_ramp_text); | 559 | ARIZONA_OUT_VD_RAMP_SHIFT, |
560 | arizona_vol_ramp_text); | ||
558 | EXPORT_SYMBOL_GPL(arizona_out_vd_ramp); | 561 | EXPORT_SYMBOL_GPL(arizona_out_vd_ramp); |
559 | 562 | ||
560 | const struct soc_enum arizona_out_vi_ramp = | 563 | SOC_ENUM_SINGLE_DECL(arizona_out_vi_ramp, |
561 | SOC_ENUM_SINGLE(ARIZONA_OUTPUT_VOLUME_RAMP, | 564 | ARIZONA_OUTPUT_VOLUME_RAMP, |
562 | ARIZONA_OUT_VI_RAMP_SHIFT, 7, arizona_vol_ramp_text); | 565 | ARIZONA_OUT_VI_RAMP_SHIFT, |
566 | arizona_vol_ramp_text); | ||
563 | EXPORT_SYMBOL_GPL(arizona_out_vi_ramp); | 567 | EXPORT_SYMBOL_GPL(arizona_out_vi_ramp); |
564 | 568 | ||
565 | static const char *arizona_lhpf_mode_text[] = { | 569 | static const char *arizona_lhpf_mode_text[] = { |
566 | "Low-pass", "High-pass" | 570 | "Low-pass", "High-pass" |
567 | }; | 571 | }; |
568 | 572 | ||
569 | const struct soc_enum arizona_lhpf1_mode = | 573 | SOC_ENUM_SINGLE_DECL(arizona_lhpf1_mode, |
570 | SOC_ENUM_SINGLE(ARIZONA_HPLPF1_1, ARIZONA_LHPF1_MODE_SHIFT, 2, | 574 | ARIZONA_HPLPF1_1, |
571 | arizona_lhpf_mode_text); | 575 | ARIZONA_LHPF1_MODE_SHIFT, |
576 | arizona_lhpf_mode_text); | ||
572 | EXPORT_SYMBOL_GPL(arizona_lhpf1_mode); | 577 | EXPORT_SYMBOL_GPL(arizona_lhpf1_mode); |
573 | 578 | ||
574 | const struct soc_enum arizona_lhpf2_mode = | 579 | SOC_ENUM_SINGLE_DECL(arizona_lhpf2_mode, |
575 | SOC_ENUM_SINGLE(ARIZONA_HPLPF2_1, ARIZONA_LHPF2_MODE_SHIFT, 2, | 580 | ARIZONA_HPLPF2_1, |
576 | arizona_lhpf_mode_text); | 581 | ARIZONA_LHPF2_MODE_SHIFT, |
582 | arizona_lhpf_mode_text); | ||
577 | EXPORT_SYMBOL_GPL(arizona_lhpf2_mode); | 583 | EXPORT_SYMBOL_GPL(arizona_lhpf2_mode); |
578 | 584 | ||
579 | const struct soc_enum arizona_lhpf3_mode = | 585 | SOC_ENUM_SINGLE_DECL(arizona_lhpf3_mode, |
580 | SOC_ENUM_SINGLE(ARIZONA_HPLPF3_1, ARIZONA_LHPF3_MODE_SHIFT, 2, | 586 | ARIZONA_HPLPF3_1, |
581 | arizona_lhpf_mode_text); | 587 | ARIZONA_LHPF3_MODE_SHIFT, |
588 | arizona_lhpf_mode_text); | ||
582 | EXPORT_SYMBOL_GPL(arizona_lhpf3_mode); | 589 | EXPORT_SYMBOL_GPL(arizona_lhpf3_mode); |
583 | 590 | ||
584 | const struct soc_enum arizona_lhpf4_mode = | 591 | SOC_ENUM_SINGLE_DECL(arizona_lhpf4_mode, |
585 | SOC_ENUM_SINGLE(ARIZONA_HPLPF4_1, ARIZONA_LHPF4_MODE_SHIFT, 2, | 592 | ARIZONA_HPLPF4_1, |
586 | arizona_lhpf_mode_text); | 593 | ARIZONA_LHPF4_MODE_SHIFT, |
594 | arizona_lhpf_mode_text); | ||
587 | EXPORT_SYMBOL_GPL(arizona_lhpf4_mode); | 595 | EXPORT_SYMBOL_GPL(arizona_lhpf4_mode); |
588 | 596 | ||
589 | static const char *arizona_ng_hold_text[] = { | 597 | static const char *arizona_ng_hold_text[] = { |
590 | "30ms", "120ms", "250ms", "500ms", | 598 | "30ms", "120ms", "250ms", "500ms", |
591 | }; | 599 | }; |
592 | 600 | ||
593 | const struct soc_enum arizona_ng_hold = | 601 | SOC_ENUM_SINGLE_DECL(arizona_ng_hold, |
594 | SOC_ENUM_SINGLE(ARIZONA_NOISE_GATE_CONTROL, ARIZONA_NGATE_HOLD_SHIFT, | 602 | ARIZONA_NOISE_GATE_CONTROL, |
595 | 4, arizona_ng_hold_text); | 603 | ARIZONA_NGATE_HOLD_SHIFT, |
604 | arizona_ng_hold_text); | ||
596 | EXPORT_SYMBOL_GPL(arizona_ng_hold); | 605 | EXPORT_SYMBOL_GPL(arizona_ng_hold); |
597 | 606 | ||
598 | static const char * const arizona_in_hpf_cut_text[] = { | 607 | static const char * const arizona_in_hpf_cut_text[] = { |
599 | "2.5Hz", "5Hz", "10Hz", "20Hz", "40Hz" | 608 | "2.5Hz", "5Hz", "10Hz", "20Hz", "40Hz" |
600 | }; | 609 | }; |
601 | 610 | ||
602 | const struct soc_enum arizona_in_hpf_cut_enum = | 611 | SOC_ENUM_SINGLE_DECL(arizona_in_hpf_cut_enum, |
603 | SOC_ENUM_SINGLE(ARIZONA_HPF_CONTROL, ARIZONA_IN_HPF_CUT_SHIFT, | 612 | ARIZONA_HPF_CONTROL, |
604 | ARRAY_SIZE(arizona_in_hpf_cut_text), | 613 | ARIZONA_IN_HPF_CUT_SHIFT, |
605 | arizona_in_hpf_cut_text); | 614 | arizona_in_hpf_cut_text); |
606 | EXPORT_SYMBOL_GPL(arizona_in_hpf_cut_enum); | 615 | EXPORT_SYMBOL_GPL(arizona_in_hpf_cut_enum); |
607 | 616 | ||
608 | static const char * const arizona_in_dmic_osr_text[] = { | 617 | static const char * const arizona_in_dmic_osr_text[] = { |