diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-05-13 08:57:37 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-05-19 07:19:18 -0400 |
commit | 51e6a8411a9440f0fdba6cdd7d779e74f89debc4 (patch) | |
tree | 75ee5446cc7d91c59aca9e0fa0b894b08d031aa8 /sound/soc | |
parent | 25191c45aec54cd01b53391bb0b0e1e60377a5fc (diff) |
[ALSA] soc - eti_b1_wm8731 - Convert to use bulk DAPM control registration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Frank Mandarino <fmandarino@endrelia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/at91/eti_b1_wm8731.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/sound/soc/at91/eti_b1_wm8731.c b/sound/soc/at91/eti_b1_wm8731.c index 1347dcf3f80b..4a383a4a0ff1 100644 --- a/sound/soc/at91/eti_b1_wm8731.c +++ b/sound/soc/at91/eti_b1_wm8731.c | |||
@@ -191,7 +191,7 @@ static const struct snd_soc_dapm_widget eti_b1_dapm_widgets[] = { | |||
191 | SND_SOC_DAPM_SPK("Ext Spk", NULL), | 191 | SND_SOC_DAPM_SPK("Ext Spk", NULL), |
192 | }; | 192 | }; |
193 | 193 | ||
194 | static const char *intercon[][3] = { | 194 | static const struct snd_soc_dapm_route intercon[] = { |
195 | 195 | ||
196 | /* speaker connected to LHPOUT */ | 196 | /* speaker connected to LHPOUT */ |
197 | {"Ext Spk", NULL, "LHPOUT"}, | 197 | {"Ext Spk", NULL, "LHPOUT"}, |
@@ -199,9 +199,6 @@ static const char *intercon[][3] = { | |||
199 | /* mic is connected to Mic Jack, with WM8731 Mic Bias */ | 199 | /* mic is connected to Mic Jack, with WM8731 Mic Bias */ |
200 | {"MICIN", NULL, "Mic Bias"}, | 200 | {"MICIN", NULL, "Mic Bias"}, |
201 | {"Mic Bias", NULL, "Int Mic"}, | 201 | {"Mic Bias", NULL, "Int Mic"}, |
202 | |||
203 | /* terminator */ | ||
204 | {NULL, NULL, NULL}, | ||
205 | }; | 202 | }; |
206 | 203 | ||
207 | /* | 204 | /* |
@@ -209,20 +206,14 @@ static const char *intercon[][3] = { | |||
209 | */ | 206 | */ |
210 | static int eti_b1_wm8731_init(struct snd_soc_codec *codec) | 207 | static int eti_b1_wm8731_init(struct snd_soc_codec *codec) |
211 | { | 208 | { |
212 | int i; | ||
213 | |||
214 | DBG("eti_b1_wm8731_init() called\n"); | 209 | DBG("eti_b1_wm8731_init() called\n"); |
215 | 210 | ||
216 | /* Add specific widgets */ | 211 | /* Add specific widgets */ |
217 | for(i = 0; i < ARRAY_SIZE(eti_b1_dapm_widgets); i++) { | 212 | snd_soc_dapm_new_controls(codec, eti_b1_dapm_widgets, |
218 | snd_soc_dapm_new_control(codec, &eti_b1_dapm_widgets[i]); | 213 | ARRAY_SIZE(eti_b1_dapm_widgets)); |
219 | } | ||
220 | 214 | ||
221 | /* Set up specific audio path interconnects */ | 215 | /* Set up specific audio path interconnects */ |
222 | for(i = 0; intercon[i][0] != NULL; i++) { | 216 | snd_soc_dapm_add_route(codec, intercon, ARRAY_SIZE(intercon)); |
223 | snd_soc_dapm_connect_input(codec, intercon[i][0], | ||
224 | intercon[i][1], intercon[i][2]); | ||
225 | } | ||
226 | 217 | ||
227 | /* not connected */ | 218 | /* not connected */ |
228 | snd_soc_dapm_set_endpoint(codec, "RLINEIN", 0); | 219 | snd_soc_dapm_set_endpoint(codec, "RLINEIN", 0); |