Commit 4c03cb6f authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown

ASoC: rt5640: Remove superfluous const

As SOC_ENUM_SINGLE_DECL() itself contains const modifier now, we can
reduce const from its users.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Acked-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent f843cdf2
...@@ -361,24 +361,23 @@ static unsigned int bst_tlv[] = { ...@@ -361,24 +361,23 @@ static unsigned int bst_tlv[] = {
static const char * const rt5640_data_select[] = { static const char * const rt5640_data_select[] = {
"Normal", "left copy to right", "right copy to left", "Swap"}; "Normal", "left copy to right", "right copy to left", "Swap"};
static const SOC_ENUM_SINGLE_DECL(rt5640_if1_dac_enum, RT5640_DIG_INF_DATA, static SOC_ENUM_SINGLE_DECL(rt5640_if1_dac_enum, RT5640_DIG_INF_DATA,
RT5640_IF1_DAC_SEL_SFT, rt5640_data_select); RT5640_IF1_DAC_SEL_SFT, rt5640_data_select);
static const SOC_ENUM_SINGLE_DECL(rt5640_if1_adc_enum, RT5640_DIG_INF_DATA, static SOC_ENUM_SINGLE_DECL(rt5640_if1_adc_enum, RT5640_DIG_INF_DATA,
RT5640_IF1_ADC_SEL_SFT, rt5640_data_select); RT5640_IF1_ADC_SEL_SFT, rt5640_data_select);
static const SOC_ENUM_SINGLE_DECL(rt5640_if2_dac_enum, RT5640_DIG_INF_DATA, static SOC_ENUM_SINGLE_DECL(rt5640_if2_dac_enum, RT5640_DIG_INF_DATA,
RT5640_IF2_DAC_SEL_SFT, rt5640_data_select); RT5640_IF2_DAC_SEL_SFT, rt5640_data_select);
static const SOC_ENUM_SINGLE_DECL(rt5640_if2_adc_enum, RT5640_DIG_INF_DATA, static SOC_ENUM_SINGLE_DECL(rt5640_if2_adc_enum, RT5640_DIG_INF_DATA,
RT5640_IF2_ADC_SEL_SFT, rt5640_data_select); RT5640_IF2_ADC_SEL_SFT, rt5640_data_select);
/* Class D speaker gain ratio */ /* Class D speaker gain ratio */
static const char * const rt5640_clsd_spk_ratio[] = {"1.66x", "1.83x", "1.94x", 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"}; "2x", "2.11x", "2.22x", "2.33x", "2.44x", "2.55x", "2.66x", "2.77x"};
static const SOC_ENUM_SINGLE_DECL( static SOC_ENUM_SINGLE_DECL(rt5640_clsd_spk_ratio_enum, RT5640_CLS_D_OUT,
rt5640_clsd_spk_ratio_enum, RT5640_CLS_D_OUT,
RT5640_CLSD_RATIO_SFT, rt5640_clsd_spk_ratio); RT5640_CLSD_RATIO_SFT, rt5640_clsd_spk_ratio);
static const struct snd_kcontrol_new rt5640_snd_controls[] = { static const struct snd_kcontrol_new rt5640_snd_controls[] = {
...@@ -753,8 +752,7 @@ static const char * const rt5640_stereo_adc1_src[] = { ...@@ -753,8 +752,7 @@ static const char * const rt5640_stereo_adc1_src[] = {
"DIG MIX", "ADC" "DIG MIX", "ADC"
}; };
static const SOC_ENUM_SINGLE_DECL( static SOC_ENUM_SINGLE_DECL(rt5640_stereo_adc1_enum, RT5640_STO_ADC_MIXER,
rt5640_stereo_adc1_enum, RT5640_STO_ADC_MIXER,
RT5640_ADC_1_SRC_SFT, rt5640_stereo_adc1_src); RT5640_ADC_1_SRC_SFT, rt5640_stereo_adc1_src);
static const struct snd_kcontrol_new rt5640_sto_adc_1_mux = static const struct snd_kcontrol_new rt5640_sto_adc_1_mux =
...@@ -764,8 +762,7 @@ static const char * const rt5640_stereo_adc2_src[] = { ...@@ -764,8 +762,7 @@ static const char * const rt5640_stereo_adc2_src[] = {
"DMIC1", "DMIC2", "DIG MIX" "DMIC1", "DMIC2", "DIG MIX"
}; };
static const SOC_ENUM_SINGLE_DECL( static SOC_ENUM_SINGLE_DECL(rt5640_stereo_adc2_enum, RT5640_STO_ADC_MIXER,
rt5640_stereo_adc2_enum, RT5640_STO_ADC_MIXER,
RT5640_ADC_2_SRC_SFT, rt5640_stereo_adc2_src); RT5640_ADC_2_SRC_SFT, rt5640_stereo_adc2_src);
static const struct snd_kcontrol_new rt5640_sto_adc_2_mux = static const struct snd_kcontrol_new rt5640_sto_adc_2_mux =
...@@ -776,8 +773,7 @@ static const char * const rt5640_mono_adc_l1_src[] = { ...@@ -776,8 +773,7 @@ static const char * const rt5640_mono_adc_l1_src[] = {
"Mono DAC MIXL", "ADCL" "Mono DAC MIXL", "ADCL"
}; };
static const SOC_ENUM_SINGLE_DECL( static SOC_ENUM_SINGLE_DECL(rt5640_mono_adc_l1_enum, RT5640_MONO_ADC_MIXER,
rt5640_mono_adc_l1_enum, RT5640_MONO_ADC_MIXER,
RT5640_MONO_ADC_L1_SRC_SFT, rt5640_mono_adc_l1_src); RT5640_MONO_ADC_L1_SRC_SFT, rt5640_mono_adc_l1_src);
static const struct snd_kcontrol_new rt5640_mono_adc_l1_mux = static const struct snd_kcontrol_new rt5640_mono_adc_l1_mux =
...@@ -787,8 +783,7 @@ static const char * const rt5640_mono_adc_l2_src[] = { ...@@ -787,8 +783,7 @@ static const char * const rt5640_mono_adc_l2_src[] = {
"DMIC L1", "DMIC L2", "Mono DAC MIXL" "DMIC L1", "DMIC L2", "Mono DAC MIXL"
}; };
static const SOC_ENUM_SINGLE_DECL( static SOC_ENUM_SINGLE_DECL(rt5640_mono_adc_l2_enum, RT5640_MONO_ADC_MIXER,
rt5640_mono_adc_l2_enum, RT5640_MONO_ADC_MIXER,
RT5640_MONO_ADC_L2_SRC_SFT, rt5640_mono_adc_l2_src); RT5640_MONO_ADC_L2_SRC_SFT, rt5640_mono_adc_l2_src);
static const struct snd_kcontrol_new rt5640_mono_adc_l2_mux = static const struct snd_kcontrol_new rt5640_mono_adc_l2_mux =
...@@ -798,8 +793,7 @@ static const char * const rt5640_mono_adc_r1_src[] = { ...@@ -798,8 +793,7 @@ static const char * const rt5640_mono_adc_r1_src[] = {
"Mono DAC MIXR", "ADCR" "Mono DAC MIXR", "ADCR"
}; };
static const SOC_ENUM_SINGLE_DECL( static SOC_ENUM_SINGLE_DECL(rt5640_mono_adc_r1_enum, RT5640_MONO_ADC_MIXER,
rt5640_mono_adc_r1_enum, RT5640_MONO_ADC_MIXER,
RT5640_MONO_ADC_R1_SRC_SFT, rt5640_mono_adc_r1_src); RT5640_MONO_ADC_R1_SRC_SFT, rt5640_mono_adc_r1_src);
static const struct snd_kcontrol_new rt5640_mono_adc_r1_mux = static const struct snd_kcontrol_new rt5640_mono_adc_r1_mux =
...@@ -809,8 +803,7 @@ static const char * const rt5640_mono_adc_r2_src[] = { ...@@ -809,8 +803,7 @@ static const char * const rt5640_mono_adc_r2_src[] = {
"DMIC R1", "DMIC R2", "Mono DAC MIXR" "DMIC R1", "DMIC R2", "Mono DAC MIXR"
}; };
static const SOC_ENUM_SINGLE_DECL( static SOC_ENUM_SINGLE_DECL(rt5640_mono_adc_r2_enum, RT5640_MONO_ADC_MIXER,
rt5640_mono_adc_r2_enum, RT5640_MONO_ADC_MIXER,
RT5640_MONO_ADC_R2_SRC_SFT, rt5640_mono_adc_r2_src); RT5640_MONO_ADC_R2_SRC_SFT, rt5640_mono_adc_r2_src);
static const struct snd_kcontrol_new rt5640_mono_adc_r2_mux = static const struct snd_kcontrol_new rt5640_mono_adc_r2_mux =
...@@ -826,8 +819,8 @@ static int rt5640_dac_l2_values[] = { ...@@ -826,8 +819,8 @@ static int rt5640_dac_l2_values[] = {
3, 3,
}; };
static const SOC_VALUE_ENUM_SINGLE_DECL( static SOC_VALUE_ENUM_SINGLE_DECL(rt5640_dac_l2_enum,
rt5640_dac_l2_enum, RT5640_DSP_PATH2, RT5640_DAC_L2_SEL_SFT, RT5640_DSP_PATH2, RT5640_DAC_L2_SEL_SFT,
0x3, rt5640_dac_l2_src, rt5640_dac_l2_values); 0x3, rt5640_dac_l2_src, rt5640_dac_l2_values);
static const struct snd_kcontrol_new rt5640_dac_l2_mux = static const struct snd_kcontrol_new rt5640_dac_l2_mux =
...@@ -841,8 +834,8 @@ static int rt5640_dac_r2_values[] = { ...@@ -841,8 +834,8 @@ static int rt5640_dac_r2_values[] = {
0, 0,
}; };
static const SOC_VALUE_ENUM_SINGLE_DECL( static SOC_VALUE_ENUM_SINGLE_DECL(rt5640_dac_r2_enum,
rt5640_dac_r2_enum, RT5640_DSP_PATH2, RT5640_DAC_R2_SEL_SFT, RT5640_DSP_PATH2, RT5640_DAC_R2_SEL_SFT,
0x3, rt5640_dac_r2_src, rt5640_dac_r2_values); 0x3, rt5640_dac_r2_src, rt5640_dac_r2_values);
static const struct snd_kcontrol_new rt5640_dac_r2_mux = static const struct snd_kcontrol_new rt5640_dac_r2_mux =
...@@ -860,9 +853,10 @@ static int rt5640_dai_iis_map_values[] = { ...@@ -860,9 +853,10 @@ static int rt5640_dai_iis_map_values[] = {
7, 7,
}; };
static const SOC_VALUE_ENUM_SINGLE_DECL( static SOC_VALUE_ENUM_SINGLE_DECL(rt5640_dai_iis_map_enum,
rt5640_dai_iis_map_enum, RT5640_I2S1_SDP, RT5640_I2S_IF_SFT, RT5640_I2S1_SDP, RT5640_I2S_IF_SFT,
0x7, rt5640_dai_iis_map, rt5640_dai_iis_map_values); 0x7, rt5640_dai_iis_map,
rt5640_dai_iis_map_values);
static const struct snd_kcontrol_new rt5640_dai_mux = static const struct snd_kcontrol_new rt5640_dai_mux =
SOC_DAPM_VALUE_ENUM("DAI select", rt5640_dai_iis_map_enum); SOC_DAPM_VALUE_ENUM("DAI select", rt5640_dai_iis_map_enum);
...@@ -872,8 +866,7 @@ static const char * const rt5640_sdi_sel[] = { ...@@ -872,8 +866,7 @@ static const char * const rt5640_sdi_sel[] = {
"IF1", "IF2" "IF1", "IF2"
}; };
static const SOC_ENUM_SINGLE_DECL( static SOC_ENUM_SINGLE_DECL(rt5640_sdi_sel_enum, RT5640_I2S2_SDP,
rt5640_sdi_sel_enum, RT5640_I2S2_SDP,
RT5640_I2S2_SDI_SFT, rt5640_sdi_sel); RT5640_I2S2_SDI_SFT, rt5640_sdi_sel);
static const struct snd_kcontrol_new rt5640_sdi_mux = static const struct snd_kcontrol_new rt5640_sdi_mux =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment