Commit d12bfd62 authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown

ASoC: wm8904: Use SOC_ENUM_SINGLE_DECL()

Just replace with the helper macro.  No functional change at all.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Acked-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 38dbfb59
...@@ -552,18 +552,20 @@ static const char *input_mode_text[] = { ...@@ -552,18 +552,20 @@ static const char *input_mode_text[] = {
"Single-Ended", "Differential Line", "Differential Mic" "Single-Ended", "Differential Line", "Differential Mic"
}; };
static const struct soc_enum lin_mode = static SOC_ENUM_SINGLE_DECL(lin_mode,
SOC_ENUM_SINGLE(WM8904_ANALOGUE_LEFT_INPUT_1, 0, 3, input_mode_text); WM8904_ANALOGUE_LEFT_INPUT_1, 0,
input_mode_text);
static const struct soc_enum rin_mode = static SOC_ENUM_SINGLE_DECL(rin_mode,
SOC_ENUM_SINGLE(WM8904_ANALOGUE_RIGHT_INPUT_1, 0, 3, input_mode_text); WM8904_ANALOGUE_RIGHT_INPUT_1, 0,
input_mode_text);
static const char *hpf_mode_text[] = { static const char *hpf_mode_text[] = {
"Hi-fi", "Voice 1", "Voice 2", "Voice 3" "Hi-fi", "Voice 1", "Voice 2", "Voice 3"
}; };
static const struct soc_enum hpf_mode = static SOC_ENUM_SINGLE_DECL(hpf_mode, WM8904_ADC_DIGITAL_0, 5,
SOC_ENUM_SINGLE(WM8904_ADC_DIGITAL_0, 5, 4, hpf_mode_text); hpf_mode_text);
static int wm8904_adc_osr_put(struct snd_kcontrol *kcontrol, static int wm8904_adc_osr_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) struct snd_ctl_elem_value *ucontrol)
...@@ -611,8 +613,7 @@ static const char *drc_path_text[] = { ...@@ -611,8 +613,7 @@ static const char *drc_path_text[] = {
"ADC", "DAC" "ADC", "DAC"
}; };
static const struct soc_enum drc_path = static SOC_ENUM_SINGLE_DECL(drc_path, WM8904_DRC_0, 14, drc_path_text);
SOC_ENUM_SINGLE(WM8904_DRC_0, 14, 2, drc_path_text);
static const struct snd_kcontrol_new wm8904_dac_snd_controls[] = { static const struct snd_kcontrol_new wm8904_dac_snd_controls[] = {
SOC_SINGLE_TLV("Digital Playback Boost Volume", SOC_SINGLE_TLV("Digital Playback Boost Volume",
...@@ -858,14 +859,14 @@ static const char *lin_text[] = { ...@@ -858,14 +859,14 @@ static const char *lin_text[] = {
"IN1L", "IN2L", "IN3L" "IN1L", "IN2L", "IN3L"
}; };
static const struct soc_enum lin_enum = static SOC_ENUM_SINGLE_DECL(lin_enum, WM8904_ANALOGUE_LEFT_INPUT_1, 2,
SOC_ENUM_SINGLE(WM8904_ANALOGUE_LEFT_INPUT_1, 2, 3, lin_text); lin_text);
static const struct snd_kcontrol_new lin_mux = static const struct snd_kcontrol_new lin_mux =
SOC_DAPM_ENUM("Left Capture Mux", lin_enum); SOC_DAPM_ENUM("Left Capture Mux", lin_enum);
static const struct soc_enum lin_inv_enum = static SOC_ENUM_SINGLE_DECL(lin_inv_enum, WM8904_ANALOGUE_LEFT_INPUT_1, 4,
SOC_ENUM_SINGLE(WM8904_ANALOGUE_LEFT_INPUT_1, 4, 3, lin_text); lin_text);
static const struct snd_kcontrol_new lin_inv_mux = static const struct snd_kcontrol_new lin_inv_mux =
SOC_DAPM_ENUM("Left Capture Inveting Mux", lin_inv_enum); SOC_DAPM_ENUM("Left Capture Inveting Mux", lin_inv_enum);
...@@ -874,14 +875,14 @@ static const char *rin_text[] = { ...@@ -874,14 +875,14 @@ static const char *rin_text[] = {
"IN1R", "IN2R", "IN3R" "IN1R", "IN2R", "IN3R"
}; };
static const struct soc_enum rin_enum = static SOC_ENUM_SINGLE_DECL(rin_enum, WM8904_ANALOGUE_RIGHT_INPUT_1, 2,
SOC_ENUM_SINGLE(WM8904_ANALOGUE_RIGHT_INPUT_1, 2, 3, rin_text); rin_text);
static const struct snd_kcontrol_new rin_mux = static const struct snd_kcontrol_new rin_mux =
SOC_DAPM_ENUM("Right Capture Mux", rin_enum); SOC_DAPM_ENUM("Right Capture Mux", rin_enum);
static const struct soc_enum rin_inv_enum = static SOC_ENUM_SINGLE_DECL(rin_inv_enum, WM8904_ANALOGUE_RIGHT_INPUT_1, 4,
SOC_ENUM_SINGLE(WM8904_ANALOGUE_RIGHT_INPUT_1, 4, 3, rin_text); rin_text);
static const struct snd_kcontrol_new rin_inv_mux = static const struct snd_kcontrol_new rin_inv_mux =
SOC_DAPM_ENUM("Right Capture Inveting Mux", rin_inv_enum); SOC_DAPM_ENUM("Right Capture Inveting Mux", rin_inv_enum);
...@@ -890,26 +891,26 @@ static const char *aif_text[] = { ...@@ -890,26 +891,26 @@ static const char *aif_text[] = {
"Left", "Right" "Left", "Right"
}; };
static const struct soc_enum aifoutl_enum = static SOC_ENUM_SINGLE_DECL(aifoutl_enum, WM8904_AUDIO_INTERFACE_0, 7,
SOC_ENUM_SINGLE(WM8904_AUDIO_INTERFACE_0, 7, 2, aif_text); aif_text);
static const struct snd_kcontrol_new aifoutl_mux = static const struct snd_kcontrol_new aifoutl_mux =
SOC_DAPM_ENUM("AIFOUTL Mux", aifoutl_enum); SOC_DAPM_ENUM("AIFOUTL Mux", aifoutl_enum);
static const struct soc_enum aifoutr_enum = static SOC_ENUM_SINGLE_DECL(aifoutr_enum, WM8904_AUDIO_INTERFACE_0, 6,
SOC_ENUM_SINGLE(WM8904_AUDIO_INTERFACE_0, 6, 2, aif_text); aif_text);
static const struct snd_kcontrol_new aifoutr_mux = static const struct snd_kcontrol_new aifoutr_mux =
SOC_DAPM_ENUM("AIFOUTR Mux", aifoutr_enum); SOC_DAPM_ENUM("AIFOUTR Mux", aifoutr_enum);
static const struct soc_enum aifinl_enum = static SOC_ENUM_SINGLE_DECL(aifinl_enum, WM8904_AUDIO_INTERFACE_0, 5,
SOC_ENUM_SINGLE(WM8904_AUDIO_INTERFACE_0, 5, 2, aif_text); aif_text);
static const struct snd_kcontrol_new aifinl_mux = static const struct snd_kcontrol_new aifinl_mux =
SOC_DAPM_ENUM("AIFINL Mux", aifinl_enum); SOC_DAPM_ENUM("AIFINL Mux", aifinl_enum);
static const struct soc_enum aifinr_enum = static SOC_ENUM_SINGLE_DECL(aifinr_enum, WM8904_AUDIO_INTERFACE_0, 4,
SOC_ENUM_SINGLE(WM8904_AUDIO_INTERFACE_0, 4, 2, aif_text); aif_text);
static const struct snd_kcontrol_new aifinr_mux = static const struct snd_kcontrol_new aifinr_mux =
SOC_DAPM_ENUM("AIFINR Mux", aifinr_enum); SOC_DAPM_ENUM("AIFINR Mux", aifinr_enum);
...@@ -991,26 +992,26 @@ static const char *out_mux_text[] = { ...@@ -991,26 +992,26 @@ static const char *out_mux_text[] = {
"DAC", "Bypass" "DAC", "Bypass"
}; };
static const struct soc_enum hpl_enum = static SOC_ENUM_SINGLE_DECL(hpl_enum, WM8904_ANALOGUE_OUT12_ZC, 3,
SOC_ENUM_SINGLE(WM8904_ANALOGUE_OUT12_ZC, 3, 2, out_mux_text); out_mux_text);
static const struct snd_kcontrol_new hpl_mux = static const struct snd_kcontrol_new hpl_mux =
SOC_DAPM_ENUM("HPL Mux", hpl_enum); SOC_DAPM_ENUM("HPL Mux", hpl_enum);
static const struct soc_enum hpr_enum = static SOC_ENUM_SINGLE_DECL(hpr_enum, WM8904_ANALOGUE_OUT12_ZC, 2,
SOC_ENUM_SINGLE(WM8904_ANALOGUE_OUT12_ZC, 2, 2, out_mux_text); out_mux_text);
static const struct snd_kcontrol_new hpr_mux = static const struct snd_kcontrol_new hpr_mux =
SOC_DAPM_ENUM("HPR Mux", hpr_enum); SOC_DAPM_ENUM("HPR Mux", hpr_enum);
static const struct soc_enum linel_enum = static SOC_ENUM_SINGLE_DECL(linel_enum, WM8904_ANALOGUE_OUT12_ZC, 1,
SOC_ENUM_SINGLE(WM8904_ANALOGUE_OUT12_ZC, 1, 2, out_mux_text); out_mux_text);
static const struct snd_kcontrol_new linel_mux = static const struct snd_kcontrol_new linel_mux =
SOC_DAPM_ENUM("LINEL Mux", linel_enum); SOC_DAPM_ENUM("LINEL Mux", linel_enum);
static const struct soc_enum liner_enum = static SOC_ENUM_SINGLE_DECL(liner_enum, WM8904_ANALOGUE_OUT12_ZC, 0,
SOC_ENUM_SINGLE(WM8904_ANALOGUE_OUT12_ZC, 0, 2, out_mux_text); out_mux_text);
static const struct snd_kcontrol_new liner_mux = static const struct snd_kcontrol_new liner_mux =
SOC_DAPM_ENUM("LINER Mux", liner_enum); SOC_DAPM_ENUM("LINER Mux", liner_enum);
...@@ -1019,14 +1020,14 @@ static const char *sidetone_text[] = { ...@@ -1019,14 +1020,14 @@ static const char *sidetone_text[] = {
"None", "Left", "Right" "None", "Left", "Right"
}; };
static const struct soc_enum dacl_sidetone_enum = static SOC_ENUM_SINGLE_DECL(dacl_sidetone_enum, WM8904_DAC_DIGITAL_0, 2,
SOC_ENUM_SINGLE(WM8904_DAC_DIGITAL_0, 2, 3, sidetone_text); sidetone_text);
static const struct snd_kcontrol_new dacl_sidetone_mux = static const struct snd_kcontrol_new dacl_sidetone_mux =
SOC_DAPM_ENUM("Left Sidetone Mux", dacl_sidetone_enum); SOC_DAPM_ENUM("Left Sidetone Mux", dacl_sidetone_enum);
static const struct soc_enum dacr_sidetone_enum = static SOC_ENUM_SINGLE_DECL(dacr_sidetone_enum, WM8904_DAC_DIGITAL_0, 0,
SOC_ENUM_SINGLE(WM8904_DAC_DIGITAL_0, 0, 3, sidetone_text); sidetone_text);
static const struct snd_kcontrol_new dacr_sidetone_mux = static const struct snd_kcontrol_new dacr_sidetone_mux =
SOC_DAPM_ENUM("Right Sidetone Mux", dacr_sidetone_enum); SOC_DAPM_ENUM("Right Sidetone Mux", dacr_sidetone_enum);
......
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