Skip to content

Commit

Permalink
ASoC: wm8993: Use SOC_ENUM_SINGLE_DECL()
Browse files Browse the repository at this point in the history
Just replace with the helper macro.  No functional change at all.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Takashi Iwai authored and Mark Brown committed Feb 23, 2014
1 parent 88b5bdf commit 2d07561
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions sound/soc/codecs/wm8993.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,8 @@ static const char *dac_deemph_text[] = {
"48kHz",
};

static const struct soc_enum dac_deemph =
SOC_ENUM_SINGLE(WM8993_DAC_CTRL, 4, 4, dac_deemph_text);
static SOC_ENUM_SINGLE_DECL(dac_deemph,
WM8993_DAC_CTRL, 4, dac_deemph_text);

static const char *adc_hpf_text[] = {
"Hi-Fi",
Expand All @@ -656,16 +656,16 @@ static const char *adc_hpf_text[] = {
"Voice 3",
};

static const struct soc_enum adc_hpf =
SOC_ENUM_SINGLE(WM8993_ADC_CTRL, 5, 4, adc_hpf_text);
static SOC_ENUM_SINGLE_DECL(adc_hpf,
WM8993_ADC_CTRL, 5, adc_hpf_text);

static const char *drc_path_text[] = {
"ADC",
"DAC"
};

static const struct soc_enum drc_path =
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_1, 14, 2, drc_path_text);
static SOC_ENUM_SINGLE_DECL(drc_path,
WM8993_DRC_CONTROL_1, 14, drc_path_text);

static const char *drc_r0_text[] = {
"1",
Expand All @@ -676,8 +676,8 @@ static const char *drc_r0_text[] = {
"0",
};

static const struct soc_enum drc_r0 =
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_3, 8, 6, drc_r0_text);
static SOC_ENUM_SINGLE_DECL(drc_r0,
WM8993_DRC_CONTROL_3, 8, drc_r0_text);

static const char *drc_r1_text[] = {
"1",
Expand All @@ -687,8 +687,8 @@ static const char *drc_r1_text[] = {
"0",
};

static const struct soc_enum drc_r1 =
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_4, 13, 5, drc_r1_text);
static SOC_ENUM_SINGLE_DECL(drc_r1,
WM8993_DRC_CONTROL_4, 13, drc_r1_text);

static const char *drc_attack_text[] = {
"Reserved",
Expand All @@ -705,8 +705,8 @@ static const char *drc_attack_text[] = {
"185.6ms",
};

static const struct soc_enum drc_attack =
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_2, 12, 12, drc_attack_text);
static SOC_ENUM_SINGLE_DECL(drc_attack,
WM8993_DRC_CONTROL_2, 12, drc_attack_text);

static const char *drc_decay_text[] = {
"186ms",
Expand All @@ -720,34 +720,34 @@ static const char *drc_decay_text[] = {
"47.56ms",
};

static const struct soc_enum drc_decay =
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_2, 8, 9, drc_decay_text);
static SOC_ENUM_SINGLE_DECL(drc_decay,
WM8993_DRC_CONTROL_2, 8, drc_decay_text);

static const char *drc_ff_text[] = {
"5 samples",
"9 samples",
};

static const struct soc_enum drc_ff =
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_3, 7, 2, drc_ff_text);
static SOC_ENUM_SINGLE_DECL(drc_ff,
WM8993_DRC_CONTROL_3, 7, drc_ff_text);

static const char *drc_qr_rate_text[] = {
"0.725ms",
"1.45ms",
"5.8ms",
};

static const struct soc_enum drc_qr_rate =
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_3, 0, 3, drc_qr_rate_text);
static SOC_ENUM_SINGLE_DECL(drc_qr_rate,
WM8993_DRC_CONTROL_3, 0, drc_qr_rate_text);

static const char *drc_smooth_text[] = {
"Low",
"Medium",
"High",
};

static const struct soc_enum drc_smooth =
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_1, 4, 3, drc_smooth_text);
static SOC_ENUM_SINGLE_DECL(drc_smooth,
WM8993_DRC_CONTROL_1, 4, drc_smooth_text);

static const struct snd_kcontrol_new wm8993_snd_controls[] = {
SOC_DOUBLE_TLV("Digital Sidetone Volume", WM8993_DIGITAL_SIDE_TONE,
Expand Down Expand Up @@ -841,26 +841,26 @@ static const char *aif_text[] = {
"Left", "Right"
};

static const struct soc_enum aifoutl_enum =
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_1, 15, 2, aif_text);
static SOC_ENUM_SINGLE_DECL(aifoutl_enum,
WM8993_AUDIO_INTERFACE_1, 15, aif_text);

static const struct snd_kcontrol_new aifoutl_mux =
SOC_DAPM_ENUM("AIFOUTL Mux", aifoutl_enum);

static const struct soc_enum aifoutr_enum =
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_1, 14, 2, aif_text);
static SOC_ENUM_SINGLE_DECL(aifoutr_enum,
WM8993_AUDIO_INTERFACE_1, 14, aif_text);

static const struct snd_kcontrol_new aifoutr_mux =
SOC_DAPM_ENUM("AIFOUTR Mux", aifoutr_enum);

static const struct soc_enum aifinl_enum =
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_2, 15, 2, aif_text);
static SOC_ENUM_SINGLE_DECL(aifinl_enum,
WM8993_AUDIO_INTERFACE_2, 15, aif_text);

static const struct snd_kcontrol_new aifinl_mux =
SOC_DAPM_ENUM("AIFINL Mux", aifinl_enum);

static const struct soc_enum aifinr_enum =
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_2, 14, 2, aif_text);
static SOC_ENUM_SINGLE_DECL(aifinr_enum,
WM8993_AUDIO_INTERFACE_2, 14, aif_text);

static const struct snd_kcontrol_new aifinr_mux =
SOC_DAPM_ENUM("AIFINR Mux", aifinr_enum);
Expand All @@ -869,14 +869,14 @@ static const char *sidetone_text[] = {
"None", "Left", "Right"
};

static const struct soc_enum sidetonel_enum =
SOC_ENUM_SINGLE(WM8993_DIGITAL_SIDE_TONE, 2, 3, sidetone_text);
static SOC_ENUM_SINGLE_DECL(sidetonel_enum,
WM8993_DIGITAL_SIDE_TONE, 2, sidetone_text);

static const struct snd_kcontrol_new sidetonel_mux =
SOC_DAPM_ENUM("Left Sidetone", sidetonel_enum);

static const struct soc_enum sidetoner_enum =
SOC_ENUM_SINGLE(WM8993_DIGITAL_SIDE_TONE, 0, 3, sidetone_text);
static SOC_ENUM_SINGLE_DECL(sidetoner_enum,
WM8993_DIGITAL_SIDE_TONE, 0, sidetone_text);

static const struct snd_kcontrol_new sidetoner_mux =
SOC_DAPM_ENUM("Right Sidetone", sidetoner_enum);
Expand Down

0 comments on commit 2d07561

Please sign in to comment.