From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
To: Bard Liao <bardliao@realtek.com>
Cc: Takashi Iwai <tiwai@suse.de>,
alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 009/102] ASoC: rt5640: Remove superfluous const
Date: Tue, 18 Feb 2014 12:56:26 +0000 [thread overview]
Message-ID: <1392728186.2304.26.camel@loki> (raw)
In-Reply-To: <1392723148-12597-7-git-send-email-tiwai@suse.de>
Hi Bard,
Could you please make sure your new rt286 codec driver contains similar
changes prior to sending the latest revision upstream.
Thanks !
Liam
On Tue, 2014-02-18 at 12:32 +0100, Takashi Iwai wrote:
> As SOC_ENUM_SINGLE_DECL() itself contains const modifier now, we can
> reduce const from its users.
>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> sound/soc/codecs/rt5640.c | 75 +++++++++++++++++++++--------------------------
> 1 file changed, 34 insertions(+), 41 deletions(-)
>
> diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
> index 886924934aa5..1a1e1150237d 100644
> --- a/sound/soc/codecs/rt5640.c
> +++ b/sound/soc/codecs/rt5640.c
> @@ -361,25 +361,24 @@ static unsigned int bst_tlv[] = {
> static const char * const rt5640_data_select[] = {
> "Normal", "left copy to right", "right copy to left", "Swap"};
>
> -static const SOC_ENUM_SINGLE_DECL(rt5640_if1_dac_enum, RT5640_DIG_INF_DATA,
> - RT5640_IF1_DAC_SEL_SFT, rt5640_data_select);
> +static SOC_ENUM_SINGLE_DECL(rt5640_if1_dac_enum, RT5640_DIG_INF_DATA,
> + RT5640_IF1_DAC_SEL_SFT, rt5640_data_select);
>
> -static const SOC_ENUM_SINGLE_DECL(rt5640_if1_adc_enum, RT5640_DIG_INF_DATA,
> - RT5640_IF1_ADC_SEL_SFT, rt5640_data_select);
> +static SOC_ENUM_SINGLE_DECL(rt5640_if1_adc_enum, RT5640_DIG_INF_DATA,
> + RT5640_IF1_ADC_SEL_SFT, rt5640_data_select);
>
> -static const SOC_ENUM_SINGLE_DECL(rt5640_if2_dac_enum, RT5640_DIG_INF_DATA,
> - RT5640_IF2_DAC_SEL_SFT, rt5640_data_select);
> +static SOC_ENUM_SINGLE_DECL(rt5640_if2_dac_enum, RT5640_DIG_INF_DATA,
> + RT5640_IF2_DAC_SEL_SFT, rt5640_data_select);
>
> -static const SOC_ENUM_SINGLE_DECL(rt5640_if2_adc_enum, RT5640_DIG_INF_DATA,
> - RT5640_IF2_ADC_SEL_SFT, rt5640_data_select);
> +static SOC_ENUM_SINGLE_DECL(rt5640_if2_adc_enum, RT5640_DIG_INF_DATA,
> + RT5640_IF2_ADC_SEL_SFT, rt5640_data_select);
>
> /* Class D speaker gain ratio */
> static const char * const rt5640_clsd_spk_ratio[] = {"1.66x", "1.83x", "1.94x",
> "2x", "2.11x", "2.22x", "2.33x", "2.44x", "2.55x", "2.66x", "2.77x"};
>
> -static const SOC_ENUM_SINGLE_DECL(
> - rt5640_clsd_spk_ratio_enum, RT5640_CLS_D_OUT,
> - RT5640_CLSD_RATIO_SFT, rt5640_clsd_spk_ratio);
> +static SOC_ENUM_SINGLE_DECL(rt5640_clsd_spk_ratio_enum, RT5640_CLS_D_OUT,
> + RT5640_CLSD_RATIO_SFT, rt5640_clsd_spk_ratio);
>
> static const struct snd_kcontrol_new rt5640_snd_controls[] = {
> /* Speaker Output Volume */
> @@ -753,9 +752,8 @@ static const char * const rt5640_stereo_adc1_src[] = {
> "DIG MIX", "ADC"
> };
>
> -static const SOC_ENUM_SINGLE_DECL(
> - rt5640_stereo_adc1_enum, RT5640_STO_ADC_MIXER,
> - RT5640_ADC_1_SRC_SFT, rt5640_stereo_adc1_src);
> +static SOC_ENUM_SINGLE_DECL(rt5640_stereo_adc1_enum, RT5640_STO_ADC_MIXER,
> + RT5640_ADC_1_SRC_SFT, rt5640_stereo_adc1_src);
>
> static const struct snd_kcontrol_new rt5640_sto_adc_1_mux =
> SOC_DAPM_ENUM("Stereo ADC1 Mux", rt5640_stereo_adc1_enum);
> @@ -764,9 +762,8 @@ static const char * const rt5640_stereo_adc2_src[] = {
> "DMIC1", "DMIC2", "DIG MIX"
> };
>
> -static const SOC_ENUM_SINGLE_DECL(
> - rt5640_stereo_adc2_enum, RT5640_STO_ADC_MIXER,
> - RT5640_ADC_2_SRC_SFT, rt5640_stereo_adc2_src);
> +static SOC_ENUM_SINGLE_DECL(rt5640_stereo_adc2_enum, RT5640_STO_ADC_MIXER,
> + RT5640_ADC_2_SRC_SFT, rt5640_stereo_adc2_src);
>
> static const struct snd_kcontrol_new rt5640_sto_adc_2_mux =
> SOC_DAPM_ENUM("Stereo ADC2 Mux", rt5640_stereo_adc2_enum);
> @@ -776,9 +773,8 @@ static const char * const rt5640_mono_adc_l1_src[] = {
> "Mono DAC MIXL", "ADCL"
> };
>
> -static const SOC_ENUM_SINGLE_DECL(
> - rt5640_mono_adc_l1_enum, RT5640_MONO_ADC_MIXER,
> - RT5640_MONO_ADC_L1_SRC_SFT, rt5640_mono_adc_l1_src);
> +static SOC_ENUM_SINGLE_DECL(rt5640_mono_adc_l1_enum, RT5640_MONO_ADC_MIXER,
> + RT5640_MONO_ADC_L1_SRC_SFT, rt5640_mono_adc_l1_src);
>
> static const struct snd_kcontrol_new rt5640_mono_adc_l1_mux =
> SOC_DAPM_ENUM("Mono ADC1 left source", rt5640_mono_adc_l1_enum);
> @@ -787,9 +783,8 @@ static const char * const rt5640_mono_adc_l2_src[] = {
> "DMIC L1", "DMIC L2", "Mono DAC MIXL"
> };
>
> -static const SOC_ENUM_SINGLE_DECL(
> - rt5640_mono_adc_l2_enum, RT5640_MONO_ADC_MIXER,
> - RT5640_MONO_ADC_L2_SRC_SFT, rt5640_mono_adc_l2_src);
> +static SOC_ENUM_SINGLE_DECL(rt5640_mono_adc_l2_enum, RT5640_MONO_ADC_MIXER,
> + RT5640_MONO_ADC_L2_SRC_SFT, rt5640_mono_adc_l2_src);
>
> static const struct snd_kcontrol_new rt5640_mono_adc_l2_mux =
> SOC_DAPM_ENUM("Mono ADC2 left source", rt5640_mono_adc_l2_enum);
> @@ -798,9 +793,8 @@ static const char * const rt5640_mono_adc_r1_src[] = {
> "Mono DAC MIXR", "ADCR"
> };
>
> -static const SOC_ENUM_SINGLE_DECL(
> - rt5640_mono_adc_r1_enum, RT5640_MONO_ADC_MIXER,
> - RT5640_MONO_ADC_R1_SRC_SFT, rt5640_mono_adc_r1_src);
> +static SOC_ENUM_SINGLE_DECL(rt5640_mono_adc_r1_enum, RT5640_MONO_ADC_MIXER,
> + RT5640_MONO_ADC_R1_SRC_SFT, rt5640_mono_adc_r1_src);
>
> static const struct snd_kcontrol_new rt5640_mono_adc_r1_mux =
> SOC_DAPM_ENUM("Mono ADC1 right source", rt5640_mono_adc_r1_enum);
> @@ -809,9 +803,8 @@ static const char * const rt5640_mono_adc_r2_src[] = {
> "DMIC R1", "DMIC R2", "Mono DAC MIXR"
> };
>
> -static const SOC_ENUM_SINGLE_DECL(
> - rt5640_mono_adc_r2_enum, RT5640_MONO_ADC_MIXER,
> - RT5640_MONO_ADC_R2_SRC_SFT, rt5640_mono_adc_r2_src);
> +static SOC_ENUM_SINGLE_DECL(rt5640_mono_adc_r2_enum, RT5640_MONO_ADC_MIXER,
> + RT5640_MONO_ADC_R2_SRC_SFT, rt5640_mono_adc_r2_src);
>
> static const struct snd_kcontrol_new rt5640_mono_adc_r2_mux =
> SOC_DAPM_ENUM("Mono ADC2 right source", rt5640_mono_adc_r2_enum);
> @@ -826,9 +819,9 @@ static int rt5640_dac_l2_values[] = {
> 3,
> };
>
> -static const SOC_VALUE_ENUM_SINGLE_DECL(
> - rt5640_dac_l2_enum, RT5640_DSP_PATH2, RT5640_DAC_L2_SEL_SFT,
> - 0x3, rt5640_dac_l2_src, rt5640_dac_l2_values);
> +static SOC_VALUE_ENUM_SINGLE_DECL(rt5640_dac_l2_enum,
> + RT5640_DSP_PATH2, RT5640_DAC_L2_SEL_SFT,
> + 0x3, rt5640_dac_l2_src, rt5640_dac_l2_values);
>
> static const struct snd_kcontrol_new rt5640_dac_l2_mux =
> SOC_DAPM_VALUE_ENUM("DAC2 left channel source", rt5640_dac_l2_enum);
> @@ -841,9 +834,9 @@ static int rt5640_dac_r2_values[] = {
> 0,
> };
>
> -static const SOC_VALUE_ENUM_SINGLE_DECL(
> - rt5640_dac_r2_enum, RT5640_DSP_PATH2, RT5640_DAC_R2_SEL_SFT,
> - 0x3, rt5640_dac_r2_src, rt5640_dac_r2_values);
> +static SOC_VALUE_ENUM_SINGLE_DECL(rt5640_dac_r2_enum,
> + RT5640_DSP_PATH2, RT5640_DAC_R2_SEL_SFT,
> + 0x3, rt5640_dac_r2_src, rt5640_dac_r2_values);
>
> static const struct snd_kcontrol_new rt5640_dac_r2_mux =
> SOC_DAPM_ENUM("DAC2 right channel source", rt5640_dac_r2_enum);
> @@ -860,9 +853,10 @@ static int rt5640_dai_iis_map_values[] = {
> 7,
> };
>
> -static const SOC_VALUE_ENUM_SINGLE_DECL(
> - rt5640_dai_iis_map_enum, RT5640_I2S1_SDP, RT5640_I2S_IF_SFT,
> - 0x7, rt5640_dai_iis_map, rt5640_dai_iis_map_values);
> +static SOC_VALUE_ENUM_SINGLE_DECL(rt5640_dai_iis_map_enum,
> + RT5640_I2S1_SDP, RT5640_I2S_IF_SFT,
> + 0x7, rt5640_dai_iis_map,
> + rt5640_dai_iis_map_values);
>
> static const struct snd_kcontrol_new rt5640_dai_mux =
> SOC_DAPM_VALUE_ENUM("DAI select", rt5640_dai_iis_map_enum);
> @@ -872,9 +866,8 @@ static const char * const rt5640_sdi_sel[] = {
> "IF1", "IF2"
> };
>
> -static const SOC_ENUM_SINGLE_DECL(
> - rt5640_sdi_sel_enum, RT5640_I2S2_SDP,
> - RT5640_I2S2_SDI_SFT, rt5640_sdi_sel);
> +static SOC_ENUM_SINGLE_DECL(rt5640_sdi_sel_enum, RT5640_I2S2_SDP,
> + RT5640_I2S2_SDI_SFT, rt5640_sdi_sel);
>
> static const struct snd_kcontrol_new rt5640_sdi_mux =
> SOC_DAPM_ENUM("SDI select", rt5640_sdi_sel_enum);
next prev parent reply other threads:[~2014-02-18 12:56 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-18 11:32 [PATCH 000/102 - chunk#2] Add const to SOC_ENUM_*_DECL() macros Takashi Iwai
2014-02-18 11:32 ` [PATCH 004/102] ASoC: " Takashi Iwai
2014-02-20 1:55 ` Mark Brown
2014-02-18 11:32 ` [PATCH 005/102] ASoC: adau1373: Remove superfluous const Takashi Iwai
2014-02-20 1:55 ` Mark Brown
2014-02-18 11:32 ` [PATCH 006/102] ASoC: lm49453: " Takashi Iwai
2014-02-20 1:56 ` Mark Brown
2014-02-18 11:32 ` [PATCH 007/102] ASoC: mc13783: " Takashi Iwai
2014-02-20 1:56 ` Mark Brown
2014-02-18 11:32 ` [PATCH 008/102] ASoC: rt5631: " Takashi Iwai
2014-02-20 1:56 ` Mark Brown
2014-02-18 11:32 ` [PATCH 009/102] ASoC: rt5640: " Takashi Iwai
2014-02-18 12:56 ` Liam Girdwood [this message]
2014-02-18 13:20 ` [PATCH 009/102] ASoC: rt5640: Removesuperfluousconst Bard Liao
2014-02-20 1:56 ` [PATCH 009/102] ASoC: rt5640: Remove superfluous const Mark Brown
2014-02-18 11:32 ` [PATCH 010/102] ASoC: ssm2518: " Takashi Iwai
2014-02-20 1:57 ` Mark Brown
2014-02-18 11:32 ` [PATCH 011/102] ASoC: sta529: " Takashi Iwai
2014-02-20 1:57 ` Mark Brown
2014-02-18 11:32 ` [PATCH 012/102] ASoC: wm8804: " Takashi Iwai
2014-02-20 1:57 ` Mark Brown
2014-02-18 11:32 ` [PATCH 013/102] ASoC: wm8978: " Takashi Iwai
2014-02-20 1:57 ` Mark Brown
2014-02-18 11:32 ` [PATCH 014/102] ASoC: wm8983: " Takashi Iwai
2014-02-20 1:57 ` Mark Brown
2014-02-18 11:32 ` [PATCH 015/102] ASoC: wm8985: " Takashi Iwai
2014-02-20 1:58 ` Mark Brown
2014-02-18 11:32 ` [PATCH 016/102] ASoC: wm8995: " Takashi Iwai
2014-02-20 1:58 ` Mark Brown
2014-02-18 16:49 ` [PATCH 000/102 - chunk#2] Add const to SOC_ENUM_*_DECL() macros Brian Austin
2014-02-20 1:53 ` Mark Brown
2014-02-20 7:00 ` Takashi Iwai
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=1392728186.2304.26.camel@loki \
--to=liam.r.girdwood@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=tiwai@suse.de \
/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