From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 019/102] ASoC: arizona: Fix wrong number of items in enum ctls
Date: Tue, 18 Feb 2014 12:54:37 +0100 [thread overview]
Message-ID: <s5hr470y6te.wl%tiwai@suse.de> (raw)
In-Reply-To: <1392723422-12689-4-git-send-email-tiwai@suse.de>
At Tue, 18 Feb 2014 12:36:54 +0100,
Takashi Iwai wrote:
>
> 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>
Note that this change needs the previous preliminary patch for adding
const to SOC_ENUM_SINGLE_DECL(). Otherwise the build will fail due to
type conflicts.
Other patches for converting with SOC_ENUM_SINGLE_DECL() should be
applicable individually, but only this one needs attention.
Takashi
> ---
> sound/soc/codecs/arizona.c | 71 ++++++++++++++++++++++++++--------------------
> 1 file 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[] = {
> "15ms/6dB", "30ms/6dB",
> };
>
> -const struct soc_enum arizona_in_vd_ramp =
> - SOC_ENUM_SINGLE(ARIZONA_INPUT_VOLUME_RAMP,
> - ARIZONA_IN_VD_RAMP_SHIFT, 7, arizona_vol_ramp_text);
> +SOC_ENUM_SINGLE_DECL(arizona_in_vd_ramp,
> + ARIZONA_INPUT_VOLUME_RAMP,
> + ARIZONA_IN_VD_RAMP_SHIFT,
> + arizona_vol_ramp_text);
> EXPORT_SYMBOL_GPL(arizona_in_vd_ramp);
>
> -const struct soc_enum arizona_in_vi_ramp =
> - SOC_ENUM_SINGLE(ARIZONA_INPUT_VOLUME_RAMP,
> - ARIZONA_IN_VI_RAMP_SHIFT, 7, arizona_vol_ramp_text);
> +SOC_ENUM_SINGLE_DECL(arizona_in_vi_ramp,
> + ARIZONA_INPUT_VOLUME_RAMP,
> + ARIZONA_IN_VI_RAMP_SHIFT,
> + arizona_vol_ramp_text);
> EXPORT_SYMBOL_GPL(arizona_in_vi_ramp);
>
> -const struct soc_enum arizona_out_vd_ramp =
> - SOC_ENUM_SINGLE(ARIZONA_OUTPUT_VOLUME_RAMP,
> - ARIZONA_OUT_VD_RAMP_SHIFT, 7, arizona_vol_ramp_text);
> +SOC_ENUM_SINGLE_DECL(arizona_out_vd_ramp,
> + ARIZONA_OUTPUT_VOLUME_RAMP,
> + ARIZONA_OUT_VD_RAMP_SHIFT,
> + arizona_vol_ramp_text);
> EXPORT_SYMBOL_GPL(arizona_out_vd_ramp);
>
> -const struct soc_enum arizona_out_vi_ramp =
> - SOC_ENUM_SINGLE(ARIZONA_OUTPUT_VOLUME_RAMP,
> - ARIZONA_OUT_VI_RAMP_SHIFT, 7, arizona_vol_ramp_text);
> +SOC_ENUM_SINGLE_DECL(arizona_out_vi_ramp,
> + ARIZONA_OUTPUT_VOLUME_RAMP,
> + ARIZONA_OUT_VI_RAMP_SHIFT,
> + arizona_vol_ramp_text);
> EXPORT_SYMBOL_GPL(arizona_out_vi_ramp);
>
> static const char *arizona_lhpf_mode_text[] = {
> "Low-pass", "High-pass"
> };
>
> -const struct soc_enum arizona_lhpf1_mode =
> - SOC_ENUM_SINGLE(ARIZONA_HPLPF1_1, ARIZONA_LHPF1_MODE_SHIFT, 2,
> - arizona_lhpf_mode_text);
> +SOC_ENUM_SINGLE_DECL(arizona_lhpf1_mode,
> + ARIZONA_HPLPF1_1,
> + ARIZONA_LHPF1_MODE_SHIFT,
> + arizona_lhpf_mode_text);
> EXPORT_SYMBOL_GPL(arizona_lhpf1_mode);
>
> -const struct soc_enum arizona_lhpf2_mode =
> - SOC_ENUM_SINGLE(ARIZONA_HPLPF2_1, ARIZONA_LHPF2_MODE_SHIFT, 2,
> - arizona_lhpf_mode_text);
> +SOC_ENUM_SINGLE_DECL(arizona_lhpf2_mode,
> + ARIZONA_HPLPF2_1,
> + ARIZONA_LHPF2_MODE_SHIFT,
> + arizona_lhpf_mode_text);
> EXPORT_SYMBOL_GPL(arizona_lhpf2_mode);
>
> -const struct soc_enum arizona_lhpf3_mode =
> - SOC_ENUM_SINGLE(ARIZONA_HPLPF3_1, ARIZONA_LHPF3_MODE_SHIFT, 2,
> - arizona_lhpf_mode_text);
> +SOC_ENUM_SINGLE_DECL(arizona_lhpf3_mode,
> + ARIZONA_HPLPF3_1,
> + ARIZONA_LHPF3_MODE_SHIFT,
> + arizona_lhpf_mode_text);
> EXPORT_SYMBOL_GPL(arizona_lhpf3_mode);
>
> -const struct soc_enum arizona_lhpf4_mode =
> - SOC_ENUM_SINGLE(ARIZONA_HPLPF4_1, ARIZONA_LHPF4_MODE_SHIFT, 2,
> - arizona_lhpf_mode_text);
> +SOC_ENUM_SINGLE_DECL(arizona_lhpf4_mode,
> + ARIZONA_HPLPF4_1,
> + ARIZONA_LHPF4_MODE_SHIFT,
> + arizona_lhpf_mode_text);
> EXPORT_SYMBOL_GPL(arizona_lhpf4_mode);
>
> static const char *arizona_ng_hold_text[] = {
> "30ms", "120ms", "250ms", "500ms",
> };
>
> -const struct soc_enum arizona_ng_hold =
> - SOC_ENUM_SINGLE(ARIZONA_NOISE_GATE_CONTROL, ARIZONA_NGATE_HOLD_SHIFT,
> - 4, arizona_ng_hold_text);
> +SOC_ENUM_SINGLE_DECL(arizona_ng_hold,
> + ARIZONA_NOISE_GATE_CONTROL,
> + ARIZONA_NGATE_HOLD_SHIFT,
> + arizona_ng_hold_text);
> EXPORT_SYMBOL_GPL(arizona_ng_hold);
>
> static const char * const arizona_in_hpf_cut_text[] = {
> "2.5Hz", "5Hz", "10Hz", "20Hz", "40Hz"
> };
>
> -const struct soc_enum arizona_in_hpf_cut_enum =
> - SOC_ENUM_SINGLE(ARIZONA_HPF_CONTROL, ARIZONA_IN_HPF_CUT_SHIFT,
> - ARRAY_SIZE(arizona_in_hpf_cut_text),
> - arizona_in_hpf_cut_text);
> +SOC_ENUM_SINGLE_DECL(arizona_in_hpf_cut_enum,
> + ARIZONA_HPF_CONTROL,
> + ARIZONA_IN_HPF_CUT_SHIFT,
> + arizona_in_hpf_cut_text);
> EXPORT_SYMBOL_GPL(arizona_in_hpf_cut_enum);
>
> static const char * const arizona_in_dmic_osr_text[] = {
> --
> 1.8.5.2
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
next prev parent reply other threads:[~2014-02-18 11:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-18 11:36 [PATCH 000/102 - chunk#3] Actually fix wrong enum items Takashi Iwai
2014-02-18 11:36 ` [PATCH 017/102] ASoC: sta32x: Fix array access overflow Takashi Iwai
2014-02-19 16:46 ` Mark Brown
2014-02-18 11:36 ` [PATCH 018/102] ASoC: ad1980: Fix wrong number of items for capture source Takashi Iwai
2014-02-19 16:50 ` Mark Brown
2014-02-18 11:36 ` [PATCH 019/102] ASoC: arizona: Fix wrong number of items in enum ctls Takashi Iwai
2014-02-18 11:54 ` Takashi Iwai [this message]
2014-02-20 1:58 ` Mark Brown
2014-02-18 11:36 ` [PATCH 020/102] ASoC: isabelle: Fix the " Takashi Iwai
2014-02-19 16:53 ` Mark Brown
2014-02-18 11:36 ` [PATCH 021/102] ASoC: ssm2602: Omit superfluous elements in input select array Takashi Iwai
2014-02-18 11:59 ` Lars-Peter Clausen
2014-02-18 13:23 ` Liam Girdwood
2014-02-18 13:29 ` Takashi Iwai
2014-02-18 15:35 ` Liam Girdwood
2014-02-20 1:20 ` Mark Brown
2014-02-18 11:36 ` [PATCH 022/102] ASoC: wm8400: Fix the wrong number of enum items Takashi Iwai
2014-02-20 1:21 ` Mark Brown
2014-02-18 11:36 ` [PATCH 023/102] ASoC: wm8770: Fix " Takashi Iwai
2014-02-20 1:24 ` Mark Brown
2014-02-18 11:36 ` [PATCH 024/102] ASoC: wm8900: Fix the " Takashi Iwai
2014-02-20 1:28 ` Mark Brown
2014-02-18 11:37 ` [PATCH 025/102] ASoC: wm8990: " Takashi Iwai
2014-02-20 1:30 ` Mark Brown
2014-02-18 11:37 ` [PATCH 026/102] ASoC: wm8991: " Takashi Iwai
2014-02-20 1:32 ` Mark Brown
2014-02-18 11:37 ` [PATCH 027/102] ASoC: wm8994: " Takashi Iwai
2014-02-20 1:33 ` Mark Brown
2014-02-20 2:05 ` [PATCH 000/102 - chunk#3] Actually fix wrong " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hr470y6te.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox