ASoC: wm8993: Use SOC_ENUM_SINGLE_DECL()
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>
This commit is contained in:
parent
88b5bdfda8
commit
2d075611c6
|
@ -646,8 +646,8 @@ static const char *dac_deemph_text[] = {
|
||||||
"48kHz",
|
"48kHz",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum dac_deemph =
|
static SOC_ENUM_SINGLE_DECL(dac_deemph,
|
||||||
SOC_ENUM_SINGLE(WM8993_DAC_CTRL, 4, 4, dac_deemph_text);
|
WM8993_DAC_CTRL, 4, dac_deemph_text);
|
||||||
|
|
||||||
static const char *adc_hpf_text[] = {
|
static const char *adc_hpf_text[] = {
|
||||||
"Hi-Fi",
|
"Hi-Fi",
|
||||||
|
@ -656,16 +656,16 @@ static const char *adc_hpf_text[] = {
|
||||||
"Voice 3",
|
"Voice 3",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum adc_hpf =
|
static SOC_ENUM_SINGLE_DECL(adc_hpf,
|
||||||
SOC_ENUM_SINGLE(WM8993_ADC_CTRL, 5, 4, adc_hpf_text);
|
WM8993_ADC_CTRL, 5, adc_hpf_text);
|
||||||
|
|
||||||
static const char *drc_path_text[] = {
|
static const char *drc_path_text[] = {
|
||||||
"ADC",
|
"ADC",
|
||||||
"DAC"
|
"DAC"
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum drc_path =
|
static SOC_ENUM_SINGLE_DECL(drc_path,
|
||||||
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_1, 14, 2, drc_path_text);
|
WM8993_DRC_CONTROL_1, 14, drc_path_text);
|
||||||
|
|
||||||
static const char *drc_r0_text[] = {
|
static const char *drc_r0_text[] = {
|
||||||
"1",
|
"1",
|
||||||
|
@ -676,8 +676,8 @@ static const char *drc_r0_text[] = {
|
||||||
"0",
|
"0",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum drc_r0 =
|
static SOC_ENUM_SINGLE_DECL(drc_r0,
|
||||||
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_3, 8, 6, drc_r0_text);
|
WM8993_DRC_CONTROL_3, 8, drc_r0_text);
|
||||||
|
|
||||||
static const char *drc_r1_text[] = {
|
static const char *drc_r1_text[] = {
|
||||||
"1",
|
"1",
|
||||||
|
@ -687,8 +687,8 @@ static const char *drc_r1_text[] = {
|
||||||
"0",
|
"0",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum drc_r1 =
|
static SOC_ENUM_SINGLE_DECL(drc_r1,
|
||||||
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_4, 13, 5, drc_r1_text);
|
WM8993_DRC_CONTROL_4, 13, drc_r1_text);
|
||||||
|
|
||||||
static const char *drc_attack_text[] = {
|
static const char *drc_attack_text[] = {
|
||||||
"Reserved",
|
"Reserved",
|
||||||
|
@ -705,8 +705,8 @@ static const char *drc_attack_text[] = {
|
||||||
"185.6ms",
|
"185.6ms",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum drc_attack =
|
static SOC_ENUM_SINGLE_DECL(drc_attack,
|
||||||
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_2, 12, 12, drc_attack_text);
|
WM8993_DRC_CONTROL_2, 12, drc_attack_text);
|
||||||
|
|
||||||
static const char *drc_decay_text[] = {
|
static const char *drc_decay_text[] = {
|
||||||
"186ms",
|
"186ms",
|
||||||
|
@ -720,16 +720,16 @@ static const char *drc_decay_text[] = {
|
||||||
"47.56ms",
|
"47.56ms",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum drc_decay =
|
static SOC_ENUM_SINGLE_DECL(drc_decay,
|
||||||
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_2, 8, 9, drc_decay_text);
|
WM8993_DRC_CONTROL_2, 8, drc_decay_text);
|
||||||
|
|
||||||
static const char *drc_ff_text[] = {
|
static const char *drc_ff_text[] = {
|
||||||
"5 samples",
|
"5 samples",
|
||||||
"9 samples",
|
"9 samples",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum drc_ff =
|
static SOC_ENUM_SINGLE_DECL(drc_ff,
|
||||||
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_3, 7, 2, drc_ff_text);
|
WM8993_DRC_CONTROL_3, 7, drc_ff_text);
|
||||||
|
|
||||||
static const char *drc_qr_rate_text[] = {
|
static const char *drc_qr_rate_text[] = {
|
||||||
"0.725ms",
|
"0.725ms",
|
||||||
|
@ -737,8 +737,8 @@ static const char *drc_qr_rate_text[] = {
|
||||||
"5.8ms",
|
"5.8ms",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum drc_qr_rate =
|
static SOC_ENUM_SINGLE_DECL(drc_qr_rate,
|
||||||
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_3, 0, 3, drc_qr_rate_text);
|
WM8993_DRC_CONTROL_3, 0, drc_qr_rate_text);
|
||||||
|
|
||||||
static const char *drc_smooth_text[] = {
|
static const char *drc_smooth_text[] = {
|
||||||
"Low",
|
"Low",
|
||||||
|
@ -746,8 +746,8 @@ static const char *drc_smooth_text[] = {
|
||||||
"High",
|
"High",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum drc_smooth =
|
static SOC_ENUM_SINGLE_DECL(drc_smooth,
|
||||||
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_1, 4, 3, drc_smooth_text);
|
WM8993_DRC_CONTROL_1, 4, drc_smooth_text);
|
||||||
|
|
||||||
static const struct snd_kcontrol_new wm8993_snd_controls[] = {
|
static const struct snd_kcontrol_new wm8993_snd_controls[] = {
|
||||||
SOC_DOUBLE_TLV("Digital Sidetone Volume", WM8993_DIGITAL_SIDE_TONE,
|
SOC_DOUBLE_TLV("Digital Sidetone Volume", WM8993_DIGITAL_SIDE_TONE,
|
||||||
|
@ -841,26 +841,26 @@ static const char *aif_text[] = {
|
||||||
"Left", "Right"
|
"Left", "Right"
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum aifoutl_enum =
|
static SOC_ENUM_SINGLE_DECL(aifoutl_enum,
|
||||||
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_1, 15, 2, aif_text);
|
WM8993_AUDIO_INTERFACE_1, 15, 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,
|
||||||
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_1, 14, 2, aif_text);
|
WM8993_AUDIO_INTERFACE_1, 14, 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,
|
||||||
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_2, 15, 2, aif_text);
|
WM8993_AUDIO_INTERFACE_2, 15, 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,
|
||||||
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_2, 14, 2, aif_text);
|
WM8993_AUDIO_INTERFACE_2, 14, 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);
|
||||||
|
@ -869,14 +869,14 @@ static const char *sidetone_text[] = {
|
||||||
"None", "Left", "Right"
|
"None", "Left", "Right"
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct soc_enum sidetonel_enum =
|
static SOC_ENUM_SINGLE_DECL(sidetonel_enum,
|
||||||
SOC_ENUM_SINGLE(WM8993_DIGITAL_SIDE_TONE, 2, 3, sidetone_text);
|
WM8993_DIGITAL_SIDE_TONE, 2, sidetone_text);
|
||||||
|
|
||||||
static const struct snd_kcontrol_new sidetonel_mux =
|
static const struct snd_kcontrol_new sidetonel_mux =
|
||||||
SOC_DAPM_ENUM("Left Sidetone", sidetonel_enum);
|
SOC_DAPM_ENUM("Left Sidetone", sidetonel_enum);
|
||||||
|
|
||||||
static const struct soc_enum sidetoner_enum =
|
static SOC_ENUM_SINGLE_DECL(sidetoner_enum,
|
||||||
SOC_ENUM_SINGLE(WM8993_DIGITAL_SIDE_TONE, 0, 3, sidetone_text);
|
WM8993_DIGITAL_SIDE_TONE, 0, sidetone_text);
|
||||||
|
|
||||||
static const struct snd_kcontrol_new sidetoner_mux =
|
static const struct snd_kcontrol_new sidetoner_mux =
|
||||||
SOC_DAPM_ENUM("Right Sidetone", sidetoner_enum);
|
SOC_DAPM_ENUM("Right Sidetone", sidetoner_enum);
|
||||||
|
|
Loading…
Reference in New Issue