diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-18 04:37:14 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-22 21:35:46 -0500 |
commit | ca275811fd2eef7e0121fefbc46cc5b47d680b10 (patch) | |
tree | 643792ad22a62b2e255ea111f1646974a3b3c2de /sound/soc/codecs | |
parent | 1037d567fdfc7ab9d3e2328e27bdc1300d3fdb1e (diff) |
ASoC: wm8737: 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>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/wm8737.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c index 22de2420bec8..ecc4e8725d5b 100644 --- a/sound/soc/codecs/wm8737.c +++ b/sound/soc/codecs/wm8737.c | |||
@@ -99,29 +99,29 @@ static const char *micbias_enum_text[] = { | |||
99 | "100%", | 99 | "100%", |
100 | }; | 100 | }; |
101 | 101 | ||
102 | static const struct soc_enum micbias_enum = | 102 | static SOC_ENUM_SINGLE_DECL(micbias_enum, |
103 | SOC_ENUM_SINGLE(WM8737_MIC_PREAMP_CONTROL, 0, 4, micbias_enum_text); | 103 | WM8737_MIC_PREAMP_CONTROL, 0, micbias_enum_text); |
104 | 104 | ||
105 | static const char *low_cutoff_text[] = { | 105 | static const char *low_cutoff_text[] = { |
106 | "Low", "High" | 106 | "Low", "High" |
107 | }; | 107 | }; |
108 | 108 | ||
109 | static const struct soc_enum low_3d = | 109 | static SOC_ENUM_SINGLE_DECL(low_3d, |
110 | SOC_ENUM_SINGLE(WM8737_3D_ENHANCE, 6, 2, low_cutoff_text); | 110 | WM8737_3D_ENHANCE, 6, low_cutoff_text); |
111 | 111 | ||
112 | static const char *high_cutoff_text[] = { | 112 | static const char *high_cutoff_text[] = { |
113 | "High", "Low" | 113 | "High", "Low" |
114 | }; | 114 | }; |
115 | 115 | ||
116 | static const struct soc_enum high_3d = | 116 | static SOC_ENUM_SINGLE_DECL(high_3d, |
117 | SOC_ENUM_SINGLE(WM8737_3D_ENHANCE, 5, 2, high_cutoff_text); | 117 | WM8737_3D_ENHANCE, 5, high_cutoff_text); |
118 | 118 | ||
119 | static const char *alc_fn_text[] = { | 119 | static const char *alc_fn_text[] = { |
120 | "Disabled", "Right", "Left", "Stereo" | 120 | "Disabled", "Right", "Left", "Stereo" |
121 | }; | 121 | }; |
122 | 122 | ||
123 | static const struct soc_enum alc_fn = | 123 | static SOC_ENUM_SINGLE_DECL(alc_fn, |
124 | SOC_ENUM_SINGLE(WM8737_ALC1, 7, 4, alc_fn_text); | 124 | WM8737_ALC1, 7, alc_fn_text); |
125 | 125 | ||
126 | static const char *alc_hold_text[] = { | 126 | static const char *alc_hold_text[] = { |
127 | "0", "2.67ms", "5.33ms", "10.66ms", "21.32ms", "42.64ms", "85.28ms", | 127 | "0", "2.67ms", "5.33ms", "10.66ms", "21.32ms", "42.64ms", "85.28ms", |
@@ -129,24 +129,24 @@ static const char *alc_hold_text[] = { | |||
129 | "10.916s", "21.832s", "43.691s" | 129 | "10.916s", "21.832s", "43.691s" |
130 | }; | 130 | }; |
131 | 131 | ||
132 | static const struct soc_enum alc_hold = | 132 | static SOC_ENUM_SINGLE_DECL(alc_hold, |
133 | SOC_ENUM_SINGLE(WM8737_ALC2, 0, 16, alc_hold_text); | 133 | WM8737_ALC2, 0, alc_hold_text); |
134 | 134 | ||
135 | static const char *alc_atk_text[] = { | 135 | static const char *alc_atk_text[] = { |
136 | "8.4ms", "16.8ms", "33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms", | 136 | "8.4ms", "16.8ms", "33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms", |
137 | "1.075s", "2.15s", "4.3s", "8.6s" | 137 | "1.075s", "2.15s", "4.3s", "8.6s" |
138 | }; | 138 | }; |
139 | 139 | ||
140 | static const struct soc_enum alc_atk = | 140 | static SOC_ENUM_SINGLE_DECL(alc_atk, |
141 | SOC_ENUM_SINGLE(WM8737_ALC3, 0, 11, alc_atk_text); | 141 | WM8737_ALC3, 0, alc_atk_text); |
142 | 142 | ||
143 | static const char *alc_dcy_text[] = { | 143 | static const char *alc_dcy_text[] = { |
144 | "33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms", "1.075s", "2.15s", | 144 | "33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms", "1.075s", "2.15s", |
145 | "4.3s", "8.6s", "17.2s", "34.41s" | 145 | "4.3s", "8.6s", "17.2s", "34.41s" |
146 | }; | 146 | }; |
147 | 147 | ||
148 | static const struct soc_enum alc_dcy = | 148 | static SOC_ENUM_SINGLE_DECL(alc_dcy, |
149 | SOC_ENUM_SINGLE(WM8737_ALC3, 4, 11, alc_dcy_text); | 149 | WM8737_ALC3, 4, alc_dcy_text); |
150 | 150 | ||
151 | static const struct snd_kcontrol_new wm8737_snd_controls[] = { | 151 | static const struct snd_kcontrol_new wm8737_snd_controls[] = { |
152 | SOC_DOUBLE_R_TLV("Mic Boost Volume", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R, | 152 | 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 | "LINPUT1", "LINPUT2", "LINPUT3", "LINPUT1 DC", | 191 | "LINPUT1", "LINPUT2", "LINPUT3", "LINPUT1 DC", |
192 | }; | 192 | }; |
193 | 193 | ||
194 | static const struct soc_enum linsel_enum = | 194 | static SOC_ENUM_SINGLE_DECL(linsel_enum, |
195 | SOC_ENUM_SINGLE(WM8737_AUDIO_PATH_L, 7, 4, linsel_text); | 195 | WM8737_AUDIO_PATH_L, 7, linsel_text); |
196 | 196 | ||
197 | static const struct snd_kcontrol_new linsel_mux = | 197 | static const struct snd_kcontrol_new linsel_mux = |
198 | SOC_DAPM_ENUM("LINSEL", linsel_enum); | 198 | SOC_DAPM_ENUM("LINSEL", linsel_enum); |
@@ -202,8 +202,8 @@ static const char *rinsel_text[] = { | |||
202 | "RINPUT1", "RINPUT2", "RINPUT3", "RINPUT1 DC", | 202 | "RINPUT1", "RINPUT2", "RINPUT3", "RINPUT1 DC", |
203 | }; | 203 | }; |
204 | 204 | ||
205 | static const struct soc_enum rinsel_enum = | 205 | static SOC_ENUM_SINGLE_DECL(rinsel_enum, |
206 | SOC_ENUM_SINGLE(WM8737_AUDIO_PATH_R, 7, 4, rinsel_text); | 206 | WM8737_AUDIO_PATH_R, 7, rinsel_text); |
207 | 207 | ||
208 | static const struct snd_kcontrol_new rinsel_mux = | 208 | static const struct snd_kcontrol_new rinsel_mux = |
209 | SOC_DAPM_ENUM("RINSEL", rinsel_enum); | 209 | SOC_DAPM_ENUM("RINSEL", rinsel_enum); |
@@ -212,15 +212,15 @@ static const char *bypass_text[] = { | |||
212 | "Direct", "Preamp" | 212 | "Direct", "Preamp" |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static const struct soc_enum lbypass_enum = | 215 | static SOC_ENUM_SINGLE_DECL(lbypass_enum, |
216 | SOC_ENUM_SINGLE(WM8737_MIC_PREAMP_CONTROL, 2, 2, bypass_text); | 216 | WM8737_MIC_PREAMP_CONTROL, 2, bypass_text); |
217 | 217 | ||
218 | static const struct snd_kcontrol_new lbypass_mux = | 218 | static const struct snd_kcontrol_new lbypass_mux = |
219 | SOC_DAPM_ENUM("Left Bypass", lbypass_enum); | 219 | SOC_DAPM_ENUM("Left Bypass", lbypass_enum); |
220 | 220 | ||
221 | 221 | ||
222 | static const struct soc_enum rbypass_enum = | 222 | static SOC_ENUM_SINGLE_DECL(rbypass_enum, |
223 | SOC_ENUM_SINGLE(WM8737_MIC_PREAMP_CONTROL, 3, 2, bypass_text); | 223 | WM8737_MIC_PREAMP_CONTROL, 3, bypass_text); |
224 | 224 | ||
225 | static const struct snd_kcontrol_new rbypass_mux = | 225 | static const struct snd_kcontrol_new rbypass_mux = |
226 | SOC_DAPM_ENUM("Left Bypass", rbypass_enum); | 226 | SOC_DAPM_ENUM("Left Bypass", rbypass_enum); |