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

ASoC: isabelle: Fix the wrong number of items in enum ctls

isabelle 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: 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 38dbfb59
...@@ -140,13 +140,17 @@ static const char *isabelle_rx1_texts[] = {"VRX1", "ARX1"}; ...@@ -140,13 +140,17 @@ static const char *isabelle_rx1_texts[] = {"VRX1", "ARX1"};
static const char *isabelle_rx2_texts[] = {"VRX2", "ARX2"}; static const char *isabelle_rx2_texts[] = {"VRX2", "ARX2"};
static const struct soc_enum isabelle_rx1_enum[] = { static const struct soc_enum isabelle_rx1_enum[] = {
SOC_ENUM_SINGLE(ISABELLE_VOICE_HPF_CFG_REG, 3, 1, isabelle_rx1_texts), SOC_ENUM_SINGLE(ISABELLE_VOICE_HPF_CFG_REG, 3,
SOC_ENUM_SINGLE(ISABELLE_AUDIO_HPF_CFG_REG, 5, 1, isabelle_rx1_texts), ARRAY_SIZE(isabelle_rx1_texts), isabelle_rx1_texts),
SOC_ENUM_SINGLE(ISABELLE_AUDIO_HPF_CFG_REG, 5,
ARRAY_SIZE(isabelle_rx1_texts), isabelle_rx1_texts),
}; };
static const struct soc_enum isabelle_rx2_enum[] = { static const struct soc_enum isabelle_rx2_enum[] = {
SOC_ENUM_SINGLE(ISABELLE_VOICE_HPF_CFG_REG, 2, 1, isabelle_rx2_texts), SOC_ENUM_SINGLE(ISABELLE_VOICE_HPF_CFG_REG, 2,
SOC_ENUM_SINGLE(ISABELLE_AUDIO_HPF_CFG_REG, 4, 1, isabelle_rx2_texts), ARRAY_SIZE(isabelle_rx2_texts), isabelle_rx2_texts),
SOC_ENUM_SINGLE(ISABELLE_AUDIO_HPF_CFG_REG, 4,
ARRAY_SIZE(isabelle_rx2_texts), isabelle_rx2_texts),
}; };
/* Headset DAC playback switches */ /* Headset DAC playback switches */
...@@ -161,13 +165,17 @@ static const char *isabelle_atx_texts[] = {"AMIC1", "DMIC"}; ...@@ -161,13 +165,17 @@ static const char *isabelle_atx_texts[] = {"AMIC1", "DMIC"};
static const char *isabelle_vtx_texts[] = {"AMIC2", "DMIC"}; static const char *isabelle_vtx_texts[] = {"AMIC2", "DMIC"};
static const struct soc_enum isabelle_atx_enum[] = { static const struct soc_enum isabelle_atx_enum[] = {
SOC_ENUM_SINGLE(ISABELLE_AMIC_CFG_REG, 7, 1, isabelle_atx_texts), SOC_ENUM_SINGLE(ISABELLE_AMIC_CFG_REG, 7,
SOC_ENUM_SINGLE(ISABELLE_DMIC_CFG_REG, 0, 1, isabelle_atx_texts), ARRAY_SIZE(isabelle_atx_texts), isabelle_atx_texts),
SOC_ENUM_SINGLE(ISABELLE_DMIC_CFG_REG, 0,
ARRAY_SIZE(isabelle_atx_texts), isabelle_atx_texts),
}; };
static const struct soc_enum isabelle_vtx_enum[] = { static const struct soc_enum isabelle_vtx_enum[] = {
SOC_ENUM_SINGLE(ISABELLE_AMIC_CFG_REG, 6, 1, isabelle_vtx_texts), SOC_ENUM_SINGLE(ISABELLE_AMIC_CFG_REG, 6,
SOC_ENUM_SINGLE(ISABELLE_DMIC_CFG_REG, 0, 1, isabelle_vtx_texts), ARRAY_SIZE(isabelle_vtx_texts), isabelle_vtx_texts),
SOC_ENUM_SINGLE(ISABELLE_DMIC_CFG_REG, 0,
ARRAY_SIZE(isabelle_vtx_texts), isabelle_vtx_texts),
}; };
static const struct snd_kcontrol_new atx_mux_controls = static const struct snd_kcontrol_new atx_mux_controls =
...@@ -183,17 +191,13 @@ static const char *isabelle_amic1_texts[] = { ...@@ -183,17 +191,13 @@ static const char *isabelle_amic1_texts[] = {
/* Left analog microphone selection */ /* Left analog microphone selection */
static const char *isabelle_amic2_texts[] = {"Sub Mic", "Aux/FM Right"}; static const char *isabelle_amic2_texts[] = {"Sub Mic", "Aux/FM Right"};
static const struct soc_enum isabelle_amic1_enum[] = { static SOC_ENUM_SINGLE_DECL(isabelle_amic1_enum,
SOC_ENUM_SINGLE(ISABELLE_AMIC_CFG_REG, 5, ISABELLE_AMIC_CFG_REG, 5,
ARRAY_SIZE(isabelle_amic1_texts), isabelle_amic1_texts);
isabelle_amic1_texts),
};
static const struct soc_enum isabelle_amic2_enum[] = { static SOC_ENUM_SINGLE_DECL(isabelle_amic2_enum,
SOC_ENUM_SINGLE(ISABELLE_AMIC_CFG_REG, 4, ISABELLE_AMIC_CFG_REG, 4,
ARRAY_SIZE(isabelle_amic2_texts), isabelle_amic2_texts);
isabelle_amic2_texts),
};
static const struct snd_kcontrol_new amic1_control = static const struct snd_kcontrol_new amic1_control =
SOC_DAPM_ENUM("Route", isabelle_amic1_enum); SOC_DAPM_ENUM("Route", isabelle_amic1_enum);
...@@ -206,16 +210,20 @@ static const char *isabelle_st_audio_texts[] = {"ATX1", "ATX2"}; ...@@ -206,16 +210,20 @@ static const char *isabelle_st_audio_texts[] = {"ATX1", "ATX2"};
static const char *isabelle_st_voice_texts[] = {"VTX1", "VTX2"}; static const char *isabelle_st_voice_texts[] = {"VTX1", "VTX2"};
static const struct soc_enum isabelle_st_audio_enum[] = { static const struct soc_enum isabelle_st_audio_enum[] = {
SOC_ENUM_SINGLE(ISABELLE_ATX_STPGA1_CFG_REG, 7, 1, SOC_ENUM_SINGLE(ISABELLE_ATX_STPGA1_CFG_REG, 7,
ARRAY_SIZE(isabelle_st_audio_texts),
isabelle_st_audio_texts), isabelle_st_audio_texts),
SOC_ENUM_SINGLE(ISABELLE_ATX_STPGA2_CFG_REG, 7, 1, SOC_ENUM_SINGLE(ISABELLE_ATX_STPGA2_CFG_REG, 7,
ARRAY_SIZE(isabelle_st_audio_texts),
isabelle_st_audio_texts), isabelle_st_audio_texts),
}; };
static const struct soc_enum isabelle_st_voice_enum[] = { static const struct soc_enum isabelle_st_voice_enum[] = {
SOC_ENUM_SINGLE(ISABELLE_VTX_STPGA1_CFG_REG, 7, 1, SOC_ENUM_SINGLE(ISABELLE_VTX_STPGA1_CFG_REG, 7,
ARRAY_SIZE(isabelle_st_voice_texts),
isabelle_st_voice_texts), isabelle_st_voice_texts),
SOC_ENUM_SINGLE(ISABELLE_VTX2_STPGA2_CFG_REG, 7, 1, SOC_ENUM_SINGLE(ISABELLE_VTX2_STPGA2_CFG_REG, 7,
ARRAY_SIZE(isabelle_st_voice_texts),
isabelle_st_voice_texts), isabelle_st_voice_texts),
}; };
......
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