diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-05-13 08:54:43 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-05-19 11:32:08 -0400 |
commit | a65f0568f6cc8433877fb71dd7d36b551854b0bc (patch) | |
tree | 6bf1077f5381b3f3de8c75cb9c6dbefe5e4d3c70 /sound/soc/codecs/wm8731.c | |
parent | 3ff3f64ba04b3e5a86dce5239b10268798f68ad7 (diff) |
[ALSA] soc - Convert Wolfson codec drivers to use bulk DAPM registration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r-- | sound/soc/codecs/wm8731.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 0f28aa4bcccb..5acf43ab104e 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -193,7 +193,7 @@ SND_SOC_DAPM_INPUT("RLINEIN"), | |||
193 | SND_SOC_DAPM_INPUT("LLINEIN"), | 193 | SND_SOC_DAPM_INPUT("LLINEIN"), |
194 | }; | 194 | }; |
195 | 195 | ||
196 | static const char *intercon[][3] = { | 196 | static const struct snd_soc_dapm_route intercon[] = { |
197 | /* output mixer */ | 197 | /* output mixer */ |
198 | {"Output Mixer", "Line Bypass Switch", "Line Input"}, | 198 | {"Output Mixer", "Line Bypass Switch", "Line Input"}, |
199 | {"Output Mixer", "HiFi Playback Switch", "DAC"}, | 199 | {"Output Mixer", "HiFi Playback Switch", "DAC"}, |
@@ -214,22 +214,14 @@ static const char *intercon[][3] = { | |||
214 | {"Line Input", NULL, "LLINEIN"}, | 214 | {"Line Input", NULL, "LLINEIN"}, |
215 | {"Line Input", NULL, "RLINEIN"}, | 215 | {"Line Input", NULL, "RLINEIN"}, |
216 | {"Mic Bias", NULL, "MICIN"}, | 216 | {"Mic Bias", NULL, "MICIN"}, |
217 | |||
218 | /* terminator */ | ||
219 | {NULL, NULL, NULL}, | ||
220 | }; | 217 | }; |
221 | 218 | ||
222 | static int wm8731_add_widgets(struct snd_soc_codec *codec) | 219 | static int wm8731_add_widgets(struct snd_soc_codec *codec) |
223 | { | 220 | { |
224 | int i; | 221 | snd_soc_dapm_new_controls(codec, wm8731_dapm_widgets, |
225 | 222 | ARRAY_SIZE(wm8731_dapm_widgets)); | |
226 | for (i = 0; i < ARRAY_SIZE(wm8731_dapm_widgets); i++) | ||
227 | snd_soc_dapm_new_control(codec, &wm8731_dapm_widgets[i]); | ||
228 | 223 | ||
229 | /* set up audio path interconnects */ | 224 | snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); |
230 | for (i = 0; intercon[i][0] != NULL; i++) | ||
231 | snd_soc_dapm_connect_input(codec, intercon[i][0], | ||
232 | intercon[i][1], intercon[i][2]); | ||
233 | 225 | ||
234 | snd_soc_dapm_new_widgets(codec); | 226 | snd_soc_dapm_new_widgets(codec); |
235 | return 0; | 227 | return 0; |