aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/wm5100.c24
-rw-r--r--sound/soc/codecs/wm8523.c4
-rw-r--r--sound/soc/codecs/wm8731.c4
-rw-r--r--sound/soc/codecs/wm8737.c50
-rw-r--r--sound/soc/codecs/wm8741.c34
-rw-r--r--sound/soc/codecs/wm8753.c1
-rw-r--r--sound/soc/codecs/wm8903.c108
-rw-r--r--sound/soc/codecs/wm8904.c73
-rw-r--r--sound/soc/codecs/wm8940.c20
-rw-r--r--sound/soc/codecs/wm8955.c11
10 files changed, 164 insertions, 165 deletions
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 492fe846ae68..d3fa65fd9e85 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -506,21 +506,21 @@ static const char *wm5100_lhpf_mode_text[] = {
506 "Low-pass", "High-pass" 506 "Low-pass", "High-pass"
507}; 507};
508 508
509static const struct soc_enum wm5100_lhpf1_mode = 509static SOC_ENUM_SINGLE_DECL(wm5100_lhpf1_mode,
510 SOC_ENUM_SINGLE(WM5100_HPLPF1_1, WM5100_LHPF1_MODE_SHIFT, 2, 510 WM5100_HPLPF1_1, WM5100_LHPF1_MODE_SHIFT,
511 wm5100_lhpf_mode_text); 511 wm5100_lhpf_mode_text);
512 512
513static const struct soc_enum wm5100_lhpf2_mode = 513static SOC_ENUM_SINGLE_DECL(wm5100_lhpf2_mode,
514 SOC_ENUM_SINGLE(WM5100_HPLPF2_1, WM5100_LHPF2_MODE_SHIFT, 2, 514 WM5100_HPLPF2_1, WM5100_LHPF2_MODE_SHIFT,
515 wm5100_lhpf_mode_text); 515 wm5100_lhpf_mode_text);
516 516
517static const struct soc_enum wm5100_lhpf3_mode = 517static SOC_ENUM_SINGLE_DECL(wm5100_lhpf3_mode,
518 SOC_ENUM_SINGLE(WM5100_HPLPF3_1, WM5100_LHPF3_MODE_SHIFT, 2, 518 WM5100_HPLPF3_1, WM5100_LHPF3_MODE_SHIFT,
519 wm5100_lhpf_mode_text); 519 wm5100_lhpf_mode_text);
520 520
521static const struct soc_enum wm5100_lhpf4_mode = 521static SOC_ENUM_SINGLE_DECL(wm5100_lhpf4_mode,
522 SOC_ENUM_SINGLE(WM5100_HPLPF4_1, WM5100_LHPF4_MODE_SHIFT, 2, 522 WM5100_HPLPF4_1, WM5100_LHPF4_MODE_SHIFT,
523 wm5100_lhpf_mode_text); 523 wm5100_lhpf_mode_text);
524 524
525static const struct snd_kcontrol_new wm5100_snd_controls[] = { 525static const struct snd_kcontrol_new wm5100_snd_controls[] = {
526SOC_SINGLE("IN1 High Performance Switch", WM5100_IN1L_CONTROL, 526SOC_SINGLE("IN1 High Performance Switch", WM5100_IN1L_CONTROL,
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
index 74d106dc7667..5dfd571b1a03 100644
--- a/sound/soc/codecs/wm8523.c
+++ b/sound/soc/codecs/wm8523.c
@@ -75,8 +75,8 @@ static const char *wm8523_zd_count_text[] = {
75 "2048", 75 "2048",
76}; 76};
77 77
78static const struct soc_enum wm8523_zc_count = 78static SOC_ENUM_SINGLE_DECL(wm8523_zc_count, WM8523_ZERO_DETECT, 0,
79 SOC_ENUM_SINGLE(WM8523_ZERO_DETECT, 0, 2, wm8523_zd_count_text); 79 wm8523_zd_count_text);
80 80
81static const struct snd_kcontrol_new wm8523_controls[] = { 81static const struct snd_kcontrol_new wm8523_controls[] = {
82SOC_DOUBLE_R_TLV("Playback Volume", WM8523_DAC_GAINL, WM8523_DAC_GAINR, 82SOC_DOUBLE_R_TLV("Playback Volume", WM8523_DAC_GAINL, WM8523_DAC_GAINR,
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 029720366ff8..d9655f981df1 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -83,8 +83,8 @@ static bool wm8731_writeable(struct device *dev, unsigned int reg)
83 83
84static const char *wm8731_input_select[] = {"Line In", "Mic"}; 84static const char *wm8731_input_select[] = {"Line In", "Mic"};
85 85
86static const struct soc_enum wm8731_insel_enum = 86static SOC_ENUM_SINGLE_DECL(wm8731_insel_enum,
87 SOC_ENUM_SINGLE(WM8731_APANA, 2, 2, wm8731_input_select); 87 WM8731_APANA, 2, wm8731_input_select);
88 88
89static int wm8731_deemph[] = { 0, 32000, 44100, 48000 }; 89static int wm8731_deemph[] = { 0, 32000, 44100, 48000 };
90 90
diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c
index 2f167a8ca01b..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
102static const struct soc_enum micbias_enum = 102static 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
105static const char *low_cutoff_text[] = { 105static const char *low_cutoff_text[] = {
106 "Low", "High" 106 "Low", "High"
107}; 107};
108 108
109static const struct soc_enum low_3d = 109static 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
112static const char *high_cutoff_text[] = { 112static const char *high_cutoff_text[] = {
113 "High", "Low" 113 "High", "Low"
114}; 114};
115 115
116static const struct soc_enum high_3d = 116static 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
119static const char *alc_fn_text[] = { 119static const char *alc_fn_text[] = {
120 "Disabled", "Right", "Left", "Stereo" 120 "Disabled", "Right", "Left", "Stereo"
121}; 121};
122 122
123static const struct soc_enum alc_fn = 123static 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
126static const char *alc_hold_text[] = { 126static 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
132static const struct soc_enum alc_hold = 132static 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
135static const char *alc_atk_text[] = { 135static 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
140static const struct soc_enum alc_atk = 140static 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
143static const char *alc_dcy_text[] = { 143static 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
148static const struct soc_enum alc_dcy = 148static 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
151static const struct snd_kcontrol_new wm8737_snd_controls[] = { 151static const struct snd_kcontrol_new wm8737_snd_controls[] = {
152SOC_DOUBLE_R_TLV("Mic Boost Volume", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R, 152SOC_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
194static const struct soc_enum linsel_enum = 194static 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
197static const struct snd_kcontrol_new linsel_mux = 197static 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
205static const struct soc_enum rinsel_enum = 205static 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
208static const struct snd_kcontrol_new rinsel_mux = 208static 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
215static const struct soc_enum lbypass_enum = 215static 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
218static const struct snd_kcontrol_new lbypass_mux = 218static 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
222static const struct soc_enum rbypass_enum = 222static 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
225static const struct snd_kcontrol_new rbypass_mux = 225static const struct snd_kcontrol_new rbypass_mux =
226 SOC_DAPM_ENUM("Left Bypass", rbypass_enum); 226 SOC_DAPM_ENUM("Left Bypass", rbypass_enum);
@@ -644,7 +644,7 @@ static const struct regmap_config wm8737_regmap = {
644 .volatile_reg = wm8737_volatile, 644 .volatile_reg = wm8737_volatile,
645}; 645};
646 646
647#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 647#if IS_ENABLED(CONFIG_I2C)
648static int wm8737_i2c_probe(struct i2c_client *i2c, 648static int wm8737_i2c_probe(struct i2c_client *i2c,
649 const struct i2c_device_id *id) 649 const struct i2c_device_id *id)
650{ 650{
@@ -758,7 +758,7 @@ static struct spi_driver wm8737_spi_driver = {
758static int __init wm8737_modinit(void) 758static int __init wm8737_modinit(void)
759{ 759{
760 int ret; 760 int ret;
761#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 761#if IS_ENABLED(CONFIG_I2C)
762 ret = i2c_add_driver(&wm8737_i2c_driver); 762 ret = i2c_add_driver(&wm8737_i2c_driver);
763 if (ret != 0) { 763 if (ret != 0) {
764 printk(KERN_ERR "Failed to register WM8737 I2C driver: %d\n", 764 printk(KERN_ERR "Failed to register WM8737 I2C driver: %d\n",
@@ -781,7 +781,7 @@ static void __exit wm8737_exit(void)
781#if defined(CONFIG_SPI_MASTER) 781#if defined(CONFIG_SPI_MASTER)
782 spi_unregister_driver(&wm8737_spi_driver); 782 spi_unregister_driver(&wm8737_spi_driver);
783#endif 783#endif
784#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 784#if IS_ENABLED(CONFIG_I2C)
785 i2c_del_driver(&wm8737_i2c_driver); 785 i2c_del_driver(&wm8737_i2c_driver);
786#endif 786#endif
787} 787}
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 2895c8d3b5e4..dd02ebf88015 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -44,7 +44,7 @@ struct wm8741_priv {
44 struct regmap *regmap; 44 struct regmap *regmap;
45 struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES]; 45 struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
46 unsigned int sysclk; 46 unsigned int sysclk;
47 struct snd_pcm_hw_constraint_list *sysclk_constraints; 47 const struct snd_pcm_hw_constraint_list *sysclk_constraints;
48}; 48};
49 49
50static const struct reg_default wm8741_reg_defaults[] = { 50static const struct reg_default wm8741_reg_defaults[] = {
@@ -122,74 +122,74 @@ static struct {
122 { 6, 768 }, 122 { 6, 768 },
123}; 123};
124 124
125static unsigned int rates_11289[] = { 125static const unsigned int rates_11289[] = {
126 44100, 88235, 126 44100, 88235,
127}; 127};
128 128
129static struct snd_pcm_hw_constraint_list constraints_11289 = { 129static const struct snd_pcm_hw_constraint_list constraints_11289 = {
130 .count = ARRAY_SIZE(rates_11289), 130 .count = ARRAY_SIZE(rates_11289),
131 .list = rates_11289, 131 .list = rates_11289,
132}; 132};
133 133
134static unsigned int rates_12288[] = { 134static const unsigned int rates_12288[] = {
135 32000, 48000, 96000, 135 32000, 48000, 96000,
136}; 136};
137 137
138static struct snd_pcm_hw_constraint_list constraints_12288 = { 138static const struct snd_pcm_hw_constraint_list constraints_12288 = {
139 .count = ARRAY_SIZE(rates_12288), 139 .count = ARRAY_SIZE(rates_12288),
140 .list = rates_12288, 140 .list = rates_12288,
141}; 141};
142 142
143static unsigned int rates_16384[] = { 143static const unsigned int rates_16384[] = {
144 32000, 144 32000,
145}; 145};
146 146
147static struct snd_pcm_hw_constraint_list constraints_16384 = { 147static const struct snd_pcm_hw_constraint_list constraints_16384 = {
148 .count = ARRAY_SIZE(rates_16384), 148 .count = ARRAY_SIZE(rates_16384),
149 .list = rates_16384, 149 .list = rates_16384,
150}; 150};
151 151
152static unsigned int rates_16934[] = { 152static const unsigned int rates_16934[] = {
153 44100, 88235, 153 44100, 88235,
154}; 154};
155 155
156static struct snd_pcm_hw_constraint_list constraints_16934 = { 156static const struct snd_pcm_hw_constraint_list constraints_16934 = {
157 .count = ARRAY_SIZE(rates_16934), 157 .count = ARRAY_SIZE(rates_16934),
158 .list = rates_16934, 158 .list = rates_16934,
159}; 159};
160 160
161static unsigned int rates_18432[] = { 161static const unsigned int rates_18432[] = {
162 48000, 96000, 162 48000, 96000,
163}; 163};
164 164
165static struct snd_pcm_hw_constraint_list constraints_18432 = { 165static const struct snd_pcm_hw_constraint_list constraints_18432 = {
166 .count = ARRAY_SIZE(rates_18432), 166 .count = ARRAY_SIZE(rates_18432),
167 .list = rates_18432, 167 .list = rates_18432,
168}; 168};
169 169
170static unsigned int rates_22579[] = { 170static const unsigned int rates_22579[] = {
171 44100, 88235, 1764000 171 44100, 88235, 1764000
172}; 172};
173 173
174static struct snd_pcm_hw_constraint_list constraints_22579 = { 174static const struct snd_pcm_hw_constraint_list constraints_22579 = {
175 .count = ARRAY_SIZE(rates_22579), 175 .count = ARRAY_SIZE(rates_22579),
176 .list = rates_22579, 176 .list = rates_22579,
177}; 177};
178 178
179static unsigned int rates_24576[] = { 179static const unsigned int rates_24576[] = {
180 32000, 48000, 96000, 192000 180 32000, 48000, 96000, 192000
181}; 181};
182 182
183static struct snd_pcm_hw_constraint_list constraints_24576 = { 183static const struct snd_pcm_hw_constraint_list constraints_24576 = {
184 .count = ARRAY_SIZE(rates_24576), 184 .count = ARRAY_SIZE(rates_24576),
185 .list = rates_24576, 185 .list = rates_24576,
186}; 186};
187 187
188static unsigned int rates_36864[] = { 188static const unsigned int rates_36864[] = {
189 48000, 96000, 19200 189 48000, 96000, 19200
190}; 190};
191 191
192static struct snd_pcm_hw_constraint_list constraints_36864 = { 192static const struct snd_pcm_hw_constraint_list constraints_36864 = {
193 .count = ARRAY_SIZE(rates_36864), 193 .count = ARRAY_SIZE(rates_36864),
194 .list = rates_36864, 194 .list = rates_36864,
195}; 195};
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 5cf4bebc5d89..6a6855d8b8ea 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1440,7 +1440,6 @@ static void wm8753_work(struct work_struct *work)
1440static int wm8753_suspend(struct snd_soc_codec *codec) 1440static int wm8753_suspend(struct snd_soc_codec *codec)
1441{ 1441{
1442 wm8753_set_bias_level(codec, SND_SOC_BIAS_OFF); 1442 wm8753_set_bias_level(codec, SND_SOC_BIAS_OFF);
1443 codec->cache_sync = 1;
1444 return 0; 1443 return 0;
1445} 1444}
1446 1445
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index eebcb1da3b7b..b82b70a3b3d3 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -489,28 +489,28 @@ static const char *hpf_mode_text[] = {
489 "Hi-fi", "Voice 1", "Voice 2", "Voice 3" 489 "Hi-fi", "Voice 1", "Voice 2", "Voice 3"
490}; 490};
491 491
492static const struct soc_enum hpf_mode = 492static SOC_ENUM_SINGLE_DECL(hpf_mode,
493 SOC_ENUM_SINGLE(WM8903_ADC_DIGITAL_0, 5, 4, hpf_mode_text); 493 WM8903_ADC_DIGITAL_0, 5, hpf_mode_text);
494 494
495static const char *osr_text[] = { 495static const char *osr_text[] = {
496 "Low power", "High performance" 496 "Low power", "High performance"
497}; 497};
498 498
499static const struct soc_enum adc_osr = 499static SOC_ENUM_SINGLE_DECL(adc_osr,
500 SOC_ENUM_SINGLE(WM8903_ANALOGUE_ADC_0, 0, 2, osr_text); 500 WM8903_ANALOGUE_ADC_0, 0, osr_text);
501 501
502static const struct soc_enum dac_osr = 502static SOC_ENUM_SINGLE_DECL(dac_osr,
503 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_1, 0, 2, osr_text); 503 WM8903_DAC_DIGITAL_1, 0, osr_text);
504 504
505static const char *drc_slope_text[] = { 505static const char *drc_slope_text[] = {
506 "1", "1/2", "1/4", "1/8", "1/16", "0" 506 "1", "1/2", "1/4", "1/8", "1/16", "0"
507}; 507};
508 508
509static const struct soc_enum drc_slope_r0 = 509static SOC_ENUM_SINGLE_DECL(drc_slope_r0,
510 SOC_ENUM_SINGLE(WM8903_DRC_2, 3, 6, drc_slope_text); 510 WM8903_DRC_2, 3, drc_slope_text);
511 511
512static const struct soc_enum drc_slope_r1 = 512static SOC_ENUM_SINGLE_DECL(drc_slope_r1,
513 SOC_ENUM_SINGLE(WM8903_DRC_2, 0, 6, drc_slope_text); 513 WM8903_DRC_2, 0, drc_slope_text);
514 514
515static const char *drc_attack_text[] = { 515static const char *drc_attack_text[] = {
516 "instantaneous", 516 "instantaneous",
@@ -518,125 +518,125 @@ static const char *drc_attack_text[] = {
518 "46.4ms", "92.8ms", "185.6ms" 518 "46.4ms", "92.8ms", "185.6ms"
519}; 519};
520 520
521static const struct soc_enum drc_attack = 521static SOC_ENUM_SINGLE_DECL(drc_attack,
522 SOC_ENUM_SINGLE(WM8903_DRC_1, 12, 11, drc_attack_text); 522 WM8903_DRC_1, 12, drc_attack_text);
523 523
524static const char *drc_decay_text[] = { 524static const char *drc_decay_text[] = {
525 "186ms", "372ms", "743ms", "1.49s", "2.97s", "5.94s", "11.89s", 525 "186ms", "372ms", "743ms", "1.49s", "2.97s", "5.94s", "11.89s",
526 "23.87s", "47.56s" 526 "23.87s", "47.56s"
527}; 527};
528 528
529static const struct soc_enum drc_decay = 529static SOC_ENUM_SINGLE_DECL(drc_decay,
530 SOC_ENUM_SINGLE(WM8903_DRC_1, 8, 9, drc_decay_text); 530 WM8903_DRC_1, 8, drc_decay_text);
531 531
532static const char *drc_ff_delay_text[] = { 532static const char *drc_ff_delay_text[] = {
533 "5 samples", "9 samples" 533 "5 samples", "9 samples"
534}; 534};
535 535
536static const struct soc_enum drc_ff_delay = 536static SOC_ENUM_SINGLE_DECL(drc_ff_delay,
537 SOC_ENUM_SINGLE(WM8903_DRC_0, 5, 2, drc_ff_delay_text); 537 WM8903_DRC_0, 5, drc_ff_delay_text);
538 538
539static const char *drc_qr_decay_text[] = { 539static const char *drc_qr_decay_text[] = {
540 "0.725ms", "1.45ms", "5.8ms" 540 "0.725ms", "1.45ms", "5.8ms"
541}; 541};
542 542
543static const struct soc_enum drc_qr_decay = 543static SOC_ENUM_SINGLE_DECL(drc_qr_decay,
544 SOC_ENUM_SINGLE(WM8903_DRC_1, 4, 3, drc_qr_decay_text); 544 WM8903_DRC_1, 4, drc_qr_decay_text);
545 545
546static const char *drc_smoothing_text[] = { 546static const char *drc_smoothing_text[] = {
547 "Low", "Medium", "High" 547 "Low", "Medium", "High"
548}; 548};
549 549
550static const struct soc_enum drc_smoothing = 550static SOC_ENUM_SINGLE_DECL(drc_smoothing,
551 SOC_ENUM_SINGLE(WM8903_DRC_0, 11, 3, drc_smoothing_text); 551 WM8903_DRC_0, 11, drc_smoothing_text);
552 552
553static const char *soft_mute_text[] = { 553static const char *soft_mute_text[] = {
554 "Fast (fs/2)", "Slow (fs/32)" 554 "Fast (fs/2)", "Slow (fs/32)"
555}; 555};
556 556
557static const struct soc_enum soft_mute = 557static SOC_ENUM_SINGLE_DECL(soft_mute,
558 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_1, 10, 2, soft_mute_text); 558 WM8903_DAC_DIGITAL_1, 10, soft_mute_text);
559 559
560static const char *mute_mode_text[] = { 560static const char *mute_mode_text[] = {
561 "Hard", "Soft" 561 "Hard", "Soft"
562}; 562};
563 563
564static const struct soc_enum mute_mode = 564static SOC_ENUM_SINGLE_DECL(mute_mode,
565 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_1, 9, 2, mute_mode_text); 565 WM8903_DAC_DIGITAL_1, 9, mute_mode_text);
566 566
567static const char *companding_text[] = { 567static const char *companding_text[] = {
568 "ulaw", "alaw" 568 "ulaw", "alaw"
569}; 569};
570 570
571static const struct soc_enum dac_companding = 571static SOC_ENUM_SINGLE_DECL(dac_companding,
572 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 0, 2, companding_text); 572 WM8903_AUDIO_INTERFACE_0, 0, companding_text);
573 573
574static const struct soc_enum adc_companding = 574static SOC_ENUM_SINGLE_DECL(adc_companding,
575 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 2, 2, companding_text); 575 WM8903_AUDIO_INTERFACE_0, 2, companding_text);
576 576
577static const char *input_mode_text[] = { 577static const char *input_mode_text[] = {
578 "Single-Ended", "Differential Line", "Differential Mic" 578 "Single-Ended", "Differential Line", "Differential Mic"
579}; 579};
580 580
581static const struct soc_enum linput_mode_enum = 581static SOC_ENUM_SINGLE_DECL(linput_mode_enum,
582 SOC_ENUM_SINGLE(WM8903_ANALOGUE_LEFT_INPUT_1, 0, 3, input_mode_text); 582 WM8903_ANALOGUE_LEFT_INPUT_1, 0, input_mode_text);
583 583
584static const struct soc_enum rinput_mode_enum = 584static SOC_ENUM_SINGLE_DECL(rinput_mode_enum,
585 SOC_ENUM_SINGLE(WM8903_ANALOGUE_RIGHT_INPUT_1, 0, 3, input_mode_text); 585 WM8903_ANALOGUE_RIGHT_INPUT_1, 0, input_mode_text);
586 586
587static const char *linput_mux_text[] = { 587static const char *linput_mux_text[] = {
588 "IN1L", "IN2L", "IN3L" 588 "IN1L", "IN2L", "IN3L"
589}; 589};
590 590
591static const struct soc_enum linput_enum = 591static SOC_ENUM_SINGLE_DECL(linput_enum,
592 SOC_ENUM_SINGLE(WM8903_ANALOGUE_LEFT_INPUT_1, 2, 3, linput_mux_text); 592 WM8903_ANALOGUE_LEFT_INPUT_1, 2, linput_mux_text);
593 593
594static const struct soc_enum linput_inv_enum = 594static SOC_ENUM_SINGLE_DECL(linput_inv_enum,
595 SOC_ENUM_SINGLE(WM8903_ANALOGUE_LEFT_INPUT_1, 4, 3, linput_mux_text); 595 WM8903_ANALOGUE_LEFT_INPUT_1, 4, linput_mux_text);
596 596
597static const char *rinput_mux_text[] = { 597static const char *rinput_mux_text[] = {
598 "IN1R", "IN2R", "IN3R" 598 "IN1R", "IN2R", "IN3R"
599}; 599};
600 600
601static const struct soc_enum rinput_enum = 601static SOC_ENUM_SINGLE_DECL(rinput_enum,
602 SOC_ENUM_SINGLE(WM8903_ANALOGUE_RIGHT_INPUT_1, 2, 3, rinput_mux_text); 602 WM8903_ANALOGUE_RIGHT_INPUT_1, 2, rinput_mux_text);
603 603
604static const struct soc_enum rinput_inv_enum = 604static SOC_ENUM_SINGLE_DECL(rinput_inv_enum,
605 SOC_ENUM_SINGLE(WM8903_ANALOGUE_RIGHT_INPUT_1, 4, 3, rinput_mux_text); 605 WM8903_ANALOGUE_RIGHT_INPUT_1, 4, rinput_mux_text);
606 606
607 607
608static const char *sidetone_text[] = { 608static const char *sidetone_text[] = {
609 "None", "Left", "Right" 609 "None", "Left", "Right"
610}; 610};
611 611
612static const struct soc_enum lsidetone_enum = 612static SOC_ENUM_SINGLE_DECL(lsidetone_enum,
613 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_0, 2, 3, sidetone_text); 613 WM8903_DAC_DIGITAL_0, 2, sidetone_text);
614 614
615static const struct soc_enum rsidetone_enum = 615static SOC_ENUM_SINGLE_DECL(rsidetone_enum,
616 SOC_ENUM_SINGLE(WM8903_DAC_DIGITAL_0, 0, 3, sidetone_text); 616 WM8903_DAC_DIGITAL_0, 0, sidetone_text);
617 617
618static const char *adcinput_text[] = { 618static const char *adcinput_text[] = {
619 "ADC", "DMIC" 619 "ADC", "DMIC"
620}; 620};
621 621
622static const struct soc_enum adcinput_enum = 622static SOC_ENUM_SINGLE_DECL(adcinput_enum,
623 SOC_ENUM_SINGLE(WM8903_CLOCK_RATE_TEST_4, 9, 2, adcinput_text); 623 WM8903_CLOCK_RATE_TEST_4, 9, adcinput_text);
624 624
625static const char *aif_text[] = { 625static const char *aif_text[] = {
626 "Left", "Right" 626 "Left", "Right"
627}; 627};
628 628
629static const struct soc_enum lcapture_enum = 629static SOC_ENUM_SINGLE_DECL(lcapture_enum,
630 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 7, 2, aif_text); 630 WM8903_AUDIO_INTERFACE_0, 7, aif_text);
631 631
632static const struct soc_enum rcapture_enum = 632static SOC_ENUM_SINGLE_DECL(rcapture_enum,
633 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 6, 2, aif_text); 633 WM8903_AUDIO_INTERFACE_0, 6, aif_text);
634 634
635static const struct soc_enum lplay_enum = 635static SOC_ENUM_SINGLE_DECL(lplay_enum,
636 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 5, 2, aif_text); 636 WM8903_AUDIO_INTERFACE_0, 5, aif_text);
637 637
638static const struct soc_enum rplay_enum = 638static SOC_ENUM_SINGLE_DECL(rplay_enum,
639 SOC_ENUM_SINGLE(WM8903_AUDIO_INTERFACE_0, 4, 2, aif_text); 639 WM8903_AUDIO_INTERFACE_0, 4, aif_text);
640 640
641static const struct snd_kcontrol_new wm8903_snd_controls[] = { 641static const struct snd_kcontrol_new wm8903_snd_controls[] = {
642 642
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index b2664ec901b9..27299cda0e99 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -552,18 +552,20 @@ static const char *input_mode_text[] = {
552 "Single-Ended", "Differential Line", "Differential Mic" 552 "Single-Ended", "Differential Line", "Differential Mic"
553}; 553};
554 554
555static const struct soc_enum lin_mode = 555static SOC_ENUM_SINGLE_DECL(lin_mode,
556 SOC_ENUM_SINGLE(WM8904_ANALOGUE_LEFT_INPUT_1, 0, 3, input_mode_text); 556 WM8904_ANALOGUE_LEFT_INPUT_1, 0,
557 input_mode_text);
557 558
558static const struct soc_enum rin_mode = 559static SOC_ENUM_SINGLE_DECL(rin_mode,
559 SOC_ENUM_SINGLE(WM8904_ANALOGUE_RIGHT_INPUT_1, 0, 3, input_mode_text); 560 WM8904_ANALOGUE_RIGHT_INPUT_1, 0,
561 input_mode_text);
560 562
561static const char *hpf_mode_text[] = { 563static const char *hpf_mode_text[] = {
562 "Hi-fi", "Voice 1", "Voice 2", "Voice 3" 564 "Hi-fi", "Voice 1", "Voice 2", "Voice 3"
563}; 565};
564 566
565static const struct soc_enum hpf_mode = 567static SOC_ENUM_SINGLE_DECL(hpf_mode, WM8904_ADC_DIGITAL_0, 5,
566 SOC_ENUM_SINGLE(WM8904_ADC_DIGITAL_0, 5, 4, hpf_mode_text); 568 hpf_mode_text);
567 569
568static int wm8904_adc_osr_put(struct snd_kcontrol *kcontrol, 570static int wm8904_adc_osr_put(struct snd_kcontrol *kcontrol,
569 struct snd_ctl_elem_value *ucontrol) 571 struct snd_ctl_elem_value *ucontrol)
@@ -611,8 +613,7 @@ static const char *drc_path_text[] = {
611 "ADC", "DAC" 613 "ADC", "DAC"
612}; 614};
613 615
614static const struct soc_enum drc_path = 616static SOC_ENUM_SINGLE_DECL(drc_path, WM8904_DRC_0, 14, drc_path_text);
615 SOC_ENUM_SINGLE(WM8904_DRC_0, 14, 2, drc_path_text);
616 617
617static const struct snd_kcontrol_new wm8904_dac_snd_controls[] = { 618static const struct snd_kcontrol_new wm8904_dac_snd_controls[] = {
618SOC_SINGLE_TLV("Digital Playback Boost Volume", 619SOC_SINGLE_TLV("Digital Playback Boost Volume",
@@ -858,14 +859,14 @@ static const char *lin_text[] = {
858 "IN1L", "IN2L", "IN3L" 859 "IN1L", "IN2L", "IN3L"
859}; 860};
860 861
861static const struct soc_enum lin_enum = 862static SOC_ENUM_SINGLE_DECL(lin_enum, WM8904_ANALOGUE_LEFT_INPUT_1, 2,
862 SOC_ENUM_SINGLE(WM8904_ANALOGUE_LEFT_INPUT_1, 2, 3, lin_text); 863 lin_text);
863 864
864static const struct snd_kcontrol_new lin_mux = 865static const struct snd_kcontrol_new lin_mux =
865 SOC_DAPM_ENUM("Left Capture Mux", lin_enum); 866 SOC_DAPM_ENUM("Left Capture Mux", lin_enum);
866 867
867static const struct soc_enum lin_inv_enum = 868static SOC_ENUM_SINGLE_DECL(lin_inv_enum, WM8904_ANALOGUE_LEFT_INPUT_1, 4,
868 SOC_ENUM_SINGLE(WM8904_ANALOGUE_LEFT_INPUT_1, 4, 3, lin_text); 869 lin_text);
869 870
870static const struct snd_kcontrol_new lin_inv_mux = 871static const struct snd_kcontrol_new lin_inv_mux =
871 SOC_DAPM_ENUM("Left Capture Inveting Mux", lin_inv_enum); 872 SOC_DAPM_ENUM("Left Capture Inveting Mux", lin_inv_enum);
@@ -874,14 +875,14 @@ static const char *rin_text[] = {
874 "IN1R", "IN2R", "IN3R" 875 "IN1R", "IN2R", "IN3R"
875}; 876};
876 877
877static const struct soc_enum rin_enum = 878static SOC_ENUM_SINGLE_DECL(rin_enum, WM8904_ANALOGUE_RIGHT_INPUT_1, 2,
878 SOC_ENUM_SINGLE(WM8904_ANALOGUE_RIGHT_INPUT_1, 2, 3, rin_text); 879 rin_text);
879 880
880static const struct snd_kcontrol_new rin_mux = 881static const struct snd_kcontrol_new rin_mux =
881 SOC_DAPM_ENUM("Right Capture Mux", rin_enum); 882 SOC_DAPM_ENUM("Right Capture Mux", rin_enum);
882 883
883static const struct soc_enum rin_inv_enum = 884static SOC_ENUM_SINGLE_DECL(rin_inv_enum, WM8904_ANALOGUE_RIGHT_INPUT_1, 4,
884 SOC_ENUM_SINGLE(WM8904_ANALOGUE_RIGHT_INPUT_1, 4, 3, rin_text); 885 rin_text);
885 886
886static const struct snd_kcontrol_new rin_inv_mux = 887static const struct snd_kcontrol_new rin_inv_mux =
887 SOC_DAPM_ENUM("Right Capture Inveting Mux", rin_inv_enum); 888 SOC_DAPM_ENUM("Right Capture Inveting Mux", rin_inv_enum);
@@ -890,26 +891,26 @@ static const char *aif_text[] = {
890 "Left", "Right" 891 "Left", "Right"
891}; 892};
892 893
893static const struct soc_enum aifoutl_enum = 894static SOC_ENUM_SINGLE_DECL(aifoutl_enum, WM8904_AUDIO_INTERFACE_0, 7,
894 SOC_ENUM_SINGLE(WM8904_AUDIO_INTERFACE_0, 7, 2, aif_text); 895 aif_text);
895 896
896static const struct snd_kcontrol_new aifoutl_mux = 897static const struct snd_kcontrol_new aifoutl_mux =
897 SOC_DAPM_ENUM("AIFOUTL Mux", aifoutl_enum); 898 SOC_DAPM_ENUM("AIFOUTL Mux", aifoutl_enum);
898 899
899static const struct soc_enum aifoutr_enum = 900static SOC_ENUM_SINGLE_DECL(aifoutr_enum, WM8904_AUDIO_INTERFACE_0, 6,
900 SOC_ENUM_SINGLE(WM8904_AUDIO_INTERFACE_0, 6, 2, aif_text); 901 aif_text);
901 902
902static const struct snd_kcontrol_new aifoutr_mux = 903static const struct snd_kcontrol_new aifoutr_mux =
903 SOC_DAPM_ENUM("AIFOUTR Mux", aifoutr_enum); 904 SOC_DAPM_ENUM("AIFOUTR Mux", aifoutr_enum);
904 905
905static const struct soc_enum aifinl_enum = 906static SOC_ENUM_SINGLE_DECL(aifinl_enum, WM8904_AUDIO_INTERFACE_0, 5,
906 SOC_ENUM_SINGLE(WM8904_AUDIO_INTERFACE_0, 5, 2, aif_text); 907 aif_text);
907 908
908static const struct snd_kcontrol_new aifinl_mux = 909static const struct snd_kcontrol_new aifinl_mux =
909 SOC_DAPM_ENUM("AIFINL Mux", aifinl_enum); 910 SOC_DAPM_ENUM("AIFINL Mux", aifinl_enum);
910 911
911static const struct soc_enum aifinr_enum = 912static SOC_ENUM_SINGLE_DECL(aifinr_enum, WM8904_AUDIO_INTERFACE_0, 4,
912 SOC_ENUM_SINGLE(WM8904_AUDIO_INTERFACE_0, 4, 2, aif_text); 913 aif_text);
913 914
914static const struct snd_kcontrol_new aifinr_mux = 915static const struct snd_kcontrol_new aifinr_mux =
915 SOC_DAPM_ENUM("AIFINR Mux", aifinr_enum); 916 SOC_DAPM_ENUM("AIFINR Mux", aifinr_enum);
@@ -991,26 +992,26 @@ static const char *out_mux_text[] = {
991 "DAC", "Bypass" 992 "DAC", "Bypass"
992}; 993};
993 994
994static const struct soc_enum hpl_enum = 995static SOC_ENUM_SINGLE_DECL(hpl_enum, WM8904_ANALOGUE_OUT12_ZC, 3,
995 SOC_ENUM_SINGLE(WM8904_ANALOGUE_OUT12_ZC, 3, 2, out_mux_text); 996 out_mux_text);
996 997
997static const struct snd_kcontrol_new hpl_mux = 998static const struct snd_kcontrol_new hpl_mux =
998 SOC_DAPM_ENUM("HPL Mux", hpl_enum); 999 SOC_DAPM_ENUM("HPL Mux", hpl_enum);
999 1000
1000static const struct soc_enum hpr_enum = 1001static SOC_ENUM_SINGLE_DECL(hpr_enum, WM8904_ANALOGUE_OUT12_ZC, 2,
1001 SOC_ENUM_SINGLE(WM8904_ANALOGUE_OUT12_ZC, 2, 2, out_mux_text); 1002 out_mux_text);
1002 1003
1003static const struct snd_kcontrol_new hpr_mux = 1004static const struct snd_kcontrol_new hpr_mux =
1004 SOC_DAPM_ENUM("HPR Mux", hpr_enum); 1005 SOC_DAPM_ENUM("HPR Mux", hpr_enum);
1005 1006
1006static const struct soc_enum linel_enum = 1007static SOC_ENUM_SINGLE_DECL(linel_enum, WM8904_ANALOGUE_OUT12_ZC, 1,
1007 SOC_ENUM_SINGLE(WM8904_ANALOGUE_OUT12_ZC, 1, 2, out_mux_text); 1008 out_mux_text);
1008 1009
1009static const struct snd_kcontrol_new linel_mux = 1010static const struct snd_kcontrol_new linel_mux =
1010 SOC_DAPM_ENUM("LINEL Mux", linel_enum); 1011 SOC_DAPM_ENUM("LINEL Mux", linel_enum);
1011 1012
1012static const struct soc_enum liner_enum = 1013static SOC_ENUM_SINGLE_DECL(liner_enum, WM8904_ANALOGUE_OUT12_ZC, 0,
1013 SOC_ENUM_SINGLE(WM8904_ANALOGUE_OUT12_ZC, 0, 2, out_mux_text); 1014 out_mux_text);
1014 1015
1015static const struct snd_kcontrol_new liner_mux = 1016static const struct snd_kcontrol_new liner_mux =
1016 SOC_DAPM_ENUM("LINER Mux", liner_enum); 1017 SOC_DAPM_ENUM("LINER Mux", liner_enum);
@@ -1019,14 +1020,14 @@ static const char *sidetone_text[] = {
1019 "None", "Left", "Right" 1020 "None", "Left", "Right"
1020}; 1021};
1021 1022
1022static const struct soc_enum dacl_sidetone_enum = 1023static SOC_ENUM_SINGLE_DECL(dacl_sidetone_enum, WM8904_DAC_DIGITAL_0, 2,
1023 SOC_ENUM_SINGLE(WM8904_DAC_DIGITAL_0, 2, 3, sidetone_text); 1024 sidetone_text);
1024 1025
1025static const struct snd_kcontrol_new dacl_sidetone_mux = 1026static const struct snd_kcontrol_new dacl_sidetone_mux =
1026 SOC_DAPM_ENUM("Left Sidetone Mux", dacl_sidetone_enum); 1027 SOC_DAPM_ENUM("Left Sidetone Mux", dacl_sidetone_enum);
1027 1028
1028static const struct soc_enum dacr_sidetone_enum = 1029static SOC_ENUM_SINGLE_DECL(dacr_sidetone_enum, WM8904_DAC_DIGITAL_0, 0,
1029 SOC_ENUM_SINGLE(WM8904_DAC_DIGITAL_0, 0, 3, sidetone_text); 1030 sidetone_text);
1030 1031
1031static const struct snd_kcontrol_new dacr_sidetone_mux = 1032static const struct snd_kcontrol_new dacr_sidetone_mux =
1032 SOC_DAPM_ENUM("Right Sidetone Mux", dacr_sidetone_enum); 1033 SOC_DAPM_ENUM("Right Sidetone Mux", dacr_sidetone_enum);
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index b404c26c1753..87f032d0d19f 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -154,22 +154,22 @@ static const struct reg_default wm8940_reg_defaults[] = {
154}; 154};
155 155
156static const char *wm8940_companding[] = { "Off", "NC", "u-law", "A-law" }; 156static const char *wm8940_companding[] = { "Off", "NC", "u-law", "A-law" };
157static const struct soc_enum wm8940_adc_companding_enum 157static SOC_ENUM_SINGLE_DECL(wm8940_adc_companding_enum,
158= SOC_ENUM_SINGLE(WM8940_COMPANDINGCTL, 1, 4, wm8940_companding); 158 WM8940_COMPANDINGCTL, 1, wm8940_companding);
159static const struct soc_enum wm8940_dac_companding_enum 159static SOC_ENUM_SINGLE_DECL(wm8940_dac_companding_enum,
160= SOC_ENUM_SINGLE(WM8940_COMPANDINGCTL, 3, 4, wm8940_companding); 160 WM8940_COMPANDINGCTL, 3, wm8940_companding);
161 161
162static const char *wm8940_alc_mode_text[] = {"ALC", "Limiter"}; 162static const char *wm8940_alc_mode_text[] = {"ALC", "Limiter"};
163static const struct soc_enum wm8940_alc_mode_enum 163static SOC_ENUM_SINGLE_DECL(wm8940_alc_mode_enum,
164= SOC_ENUM_SINGLE(WM8940_ALC3, 8, 2, wm8940_alc_mode_text); 164 WM8940_ALC3, 8, wm8940_alc_mode_text);
165 165
166static const char *wm8940_mic_bias_level_text[] = {"0.9", "0.65"}; 166static const char *wm8940_mic_bias_level_text[] = {"0.9", "0.65"};
167static const struct soc_enum wm8940_mic_bias_level_enum 167static SOC_ENUM_SINGLE_DECL(wm8940_mic_bias_level_enum,
168= SOC_ENUM_SINGLE(WM8940_INPUTCTL, 8, 2, wm8940_mic_bias_level_text); 168 WM8940_INPUTCTL, 8, wm8940_mic_bias_level_text);
169 169
170static const char *wm8940_filter_mode_text[] = {"Audio", "Application"}; 170static const char *wm8940_filter_mode_text[] = {"Audio", "Application"};
171static const struct soc_enum wm8940_filter_mode_enum 171static SOC_ENUM_SINGLE_DECL(wm8940_filter_mode_enum,
172= SOC_ENUM_SINGLE(WM8940_ADC, 7, 2, wm8940_filter_mode_text); 172 WM8940_ADC, 7, wm8940_filter_mode_text);
173 173
174static DECLARE_TLV_DB_SCALE(wm8940_spk_vol_tlv, -5700, 100, 1); 174static DECLARE_TLV_DB_SCALE(wm8940_spk_vol_tlv, -5700, 100, 1);
175static DECLARE_TLV_DB_SCALE(wm8940_att_tlv, -1000, 1000, 0); 175static DECLARE_TLV_DB_SCALE(wm8940_att_tlv, -1000, 1000, 0);
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
index 82c8ba975720..d4dcaecc8a5f 100644
--- a/sound/soc/codecs/wm8955.c
+++ b/sound/soc/codecs/wm8955.c
@@ -416,22 +416,21 @@ static const char *bass_mode_text[] = {
416 "Linear", "Adaptive", 416 "Linear", "Adaptive",
417}; 417};
418 418
419static const struct soc_enum bass_mode = 419static SOC_ENUM_SINGLE_DECL(bass_mode, WM8955_BASS_CONTROL, 7, bass_mode_text);
420 SOC_ENUM_SINGLE(WM8955_BASS_CONTROL, 7, 2, bass_mode_text);
421 420
422static const char *bass_cutoff_text[] = { 421static const char *bass_cutoff_text[] = {
423 "Low", "High" 422 "Low", "High"
424}; 423};
425 424
426static const struct soc_enum bass_cutoff = 425static SOC_ENUM_SINGLE_DECL(bass_cutoff, WM8955_BASS_CONTROL, 6,
427 SOC_ENUM_SINGLE(WM8955_BASS_CONTROL, 6, 2, bass_cutoff_text); 426 bass_cutoff_text);
428 427
429static const char *treble_cutoff_text[] = { 428static const char *treble_cutoff_text[] = {
430 "High", "Low" 429 "High", "Low"
431}; 430};
432 431
433static const struct soc_enum treble_cutoff = 432static SOC_ENUM_SINGLE_DECL(treble_cutoff, WM8955_TREBLE_CONTROL, 2,
434 SOC_ENUM_SINGLE(WM8955_TREBLE_CONTROL, 6, 2, treble_cutoff_text); 433 treble_cutoff_text);
435 434
436static const DECLARE_TLV_DB_SCALE(digital_tlv, -12750, 50, 1); 435static const DECLARE_TLV_DB_SCALE(digital_tlv, -12750, 50, 1);
437static const DECLARE_TLV_DB_SCALE(atten_tlv, -600, 600, 0); 436static const DECLARE_TLV_DB_SCALE(atten_tlv, -600, 600, 0);