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

ASoC: wm8737: 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 1037d567
...@@ -99,29 +99,29 @@ static const char *micbias_enum_text[] = { ...@@ -99,29 +99,29 @@ static const char *micbias_enum_text[] = {
"100%", "100%",
}; };
static const struct soc_enum micbias_enum = static SOC_ENUM_SINGLE_DECL(micbias_enum,
SOC_ENUM_SINGLE(WM8737_MIC_PREAMP_CONTROL, 0, 4, micbias_enum_text); WM8737_MIC_PREAMP_CONTROL, 0, micbias_enum_text);
static const char *low_cutoff_text[] = { static const char *low_cutoff_text[] = {
"Low", "High" "Low", "High"
}; };
static const struct soc_enum low_3d = static SOC_ENUM_SINGLE_DECL(low_3d,
SOC_ENUM_SINGLE(WM8737_3D_ENHANCE, 6, 2, low_cutoff_text); WM8737_3D_ENHANCE, 6, low_cutoff_text);
static const char *high_cutoff_text[] = { static const char *high_cutoff_text[] = {
"High", "Low" "High", "Low"
}; };
static const struct soc_enum high_3d = static SOC_ENUM_SINGLE_DECL(high_3d,
SOC_ENUM_SINGLE(WM8737_3D_ENHANCE, 5, 2, high_cutoff_text); WM8737_3D_ENHANCE, 5, high_cutoff_text);
static const char *alc_fn_text[] = { static const char *alc_fn_text[] = {
"Disabled", "Right", "Left", "Stereo" "Disabled", "Right", "Left", "Stereo"
}; };
static const struct soc_enum alc_fn = static SOC_ENUM_SINGLE_DECL(alc_fn,
SOC_ENUM_SINGLE(WM8737_ALC1, 7, 4, alc_fn_text); WM8737_ALC1, 7, alc_fn_text);
static const char *alc_hold_text[] = { static const char *alc_hold_text[] = {
"0", "2.67ms", "5.33ms", "10.66ms", "21.32ms", "42.64ms", "85.28ms", "0", "2.67ms", "5.33ms", "10.66ms", "21.32ms", "42.64ms", "85.28ms",
...@@ -129,24 +129,24 @@ static const char *alc_hold_text[] = { ...@@ -129,24 +129,24 @@ static const char *alc_hold_text[] = {
"10.916s", "21.832s", "43.691s" "10.916s", "21.832s", "43.691s"
}; };
static const struct soc_enum alc_hold = static SOC_ENUM_SINGLE_DECL(alc_hold,
SOC_ENUM_SINGLE(WM8737_ALC2, 0, 16, alc_hold_text); WM8737_ALC2, 0, alc_hold_text);
static const char *alc_atk_text[] = { static const char *alc_atk_text[] = {
"8.4ms", "16.8ms", "33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms", "8.4ms", "16.8ms", "33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms",
"1.075s", "2.15s", "4.3s", "8.6s" "1.075s", "2.15s", "4.3s", "8.6s"
}; };
static const struct soc_enum alc_atk = static SOC_ENUM_SINGLE_DECL(alc_atk,
SOC_ENUM_SINGLE(WM8737_ALC3, 0, 11, alc_atk_text); WM8737_ALC3, 0, alc_atk_text);
static const char *alc_dcy_text[] = { static const char *alc_dcy_text[] = {
"33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms", "1.075s", "2.15s", "33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms", "1.075s", "2.15s",
"4.3s", "8.6s", "17.2s", "34.41s" "4.3s", "8.6s", "17.2s", "34.41s"
}; };
static const struct soc_enum alc_dcy = static SOC_ENUM_SINGLE_DECL(alc_dcy,
SOC_ENUM_SINGLE(WM8737_ALC3, 4, 11, alc_dcy_text); WM8737_ALC3, 4, alc_dcy_text);
static const struct snd_kcontrol_new wm8737_snd_controls[] = { static const struct snd_kcontrol_new wm8737_snd_controls[] = {
SOC_DOUBLE_R_TLV("Mic Boost Volume", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R, SOC_DOUBLE_R_TLV("Mic Boost Volume", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R,
...@@ -191,8 +191,8 @@ static const char *linsel_text[] = { ...@@ -191,8 +191,8 @@ static const char *linsel_text[] = {
"LINPUT1", "LINPUT2", "LINPUT3", "LINPUT1 DC", "LINPUT1", "LINPUT2", "LINPUT3", "LINPUT1 DC",
}; };
static const struct soc_enum linsel_enum = static SOC_ENUM_SINGLE_DECL(linsel_enum,
SOC_ENUM_SINGLE(WM8737_AUDIO_PATH_L, 7, 4, linsel_text); WM8737_AUDIO_PATH_L, 7, linsel_text);
static const struct snd_kcontrol_new linsel_mux = static const struct snd_kcontrol_new linsel_mux =
SOC_DAPM_ENUM("LINSEL", linsel_enum); SOC_DAPM_ENUM("LINSEL", linsel_enum);
...@@ -202,8 +202,8 @@ static const char *rinsel_text[] = { ...@@ -202,8 +202,8 @@ static const char *rinsel_text[] = {
"RINPUT1", "RINPUT2", "RINPUT3", "RINPUT1 DC", "RINPUT1", "RINPUT2", "RINPUT3", "RINPUT1 DC",
}; };
static const struct soc_enum rinsel_enum = static SOC_ENUM_SINGLE_DECL(rinsel_enum,
SOC_ENUM_SINGLE(WM8737_AUDIO_PATH_R, 7, 4, rinsel_text); WM8737_AUDIO_PATH_R, 7, rinsel_text);
static const struct snd_kcontrol_new rinsel_mux = static const struct snd_kcontrol_new rinsel_mux =
SOC_DAPM_ENUM("RINSEL", rinsel_enum); SOC_DAPM_ENUM("RINSEL", rinsel_enum);
...@@ -212,15 +212,15 @@ static const char *bypass_text[] = { ...@@ -212,15 +212,15 @@ static const char *bypass_text[] = {
"Direct", "Preamp" "Direct", "Preamp"
}; };
static const struct soc_enum lbypass_enum = static SOC_ENUM_SINGLE_DECL(lbypass_enum,
SOC_ENUM_SINGLE(WM8737_MIC_PREAMP_CONTROL, 2, 2, bypass_text); WM8737_MIC_PREAMP_CONTROL, 2, bypass_text);
static const struct snd_kcontrol_new lbypass_mux = static const struct snd_kcontrol_new lbypass_mux =
SOC_DAPM_ENUM("Left Bypass", lbypass_enum); SOC_DAPM_ENUM("Left Bypass", lbypass_enum);
static const struct soc_enum rbypass_enum = static SOC_ENUM_SINGLE_DECL(rbypass_enum,
SOC_ENUM_SINGLE(WM8737_MIC_PREAMP_CONTROL, 3, 2, bypass_text); WM8737_MIC_PREAMP_CONTROL, 3, bypass_text);
static const struct snd_kcontrol_new rbypass_mux = static const struct snd_kcontrol_new rbypass_mux =
SOC_DAPM_ENUM("Left Bypass", rbypass_enum); SOC_DAPM_ENUM("Left Bypass", rbypass_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