aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/spitz.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-05-13 08:55:48 -0400
committerJaroslav Kysela <perex@perex.cz>2008-05-19 07:19:18 -0400
commit25191c45aec54cd01b53391bb0b0e1e60377a5fc (patch)
treec6fd9aea42da834df594711b426748a5be61e858 /sound/soc/pxa/spitz.c
parentd0cc0d3a95cc3c022ee118072d243d3670ec1663 (diff)
[ALSA] soc - Zaurus - Convert to bulk DAPM registration APIs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/pxa/spitz.c')
-rw-r--r--sound/soc/pxa/spitz.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index d8b8372db00e..73a6df8709e1 100644
--- a/sound/soc/pxa/spitz.c
+++ b/sound/soc/pxa/spitz.c
@@ -250,7 +250,7 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = {
250}; 250};
251 251
252/* Spitz machine audio_map */ 252/* Spitz machine audio_map */
253static const char *audio_map[][3] = { 253static const struct snd_soc_dapm_route audio_map[] = {
254 254
255 /* headphone connected to LOUT1, ROUT1 */ 255 /* headphone connected to LOUT1, ROUT1 */
256 {"Headphone Jack", NULL, "LOUT1"}, 256 {"Headphone Jack", NULL, "LOUT1"},
@@ -269,8 +269,6 @@ static const char *audio_map[][3] = {
269 269
270 /* line is connected to input 1 - no bias */ 270 /* line is connected to input 1 - no bias */
271 {"LINPUT1", NULL, "Line Jack"}, 271 {"LINPUT1", NULL, "Line Jack"},
272
273 {NULL, NULL, NULL},
274}; 272};
275 273
276static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset", 274static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset",
@@ -313,13 +311,11 @@ static int spitz_wm8750_init(struct snd_soc_codec *codec)
313 } 311 }
314 312
315 /* Add spitz specific widgets */ 313 /* Add spitz specific widgets */
316 for (i = 0; i < ARRAY_SIZE(wm8750_dapm_widgets); i++) 314 snd_soc_dapm_new_controls(codec, wm8750_dapm_widgets,
317 snd_soc_dapm_new_control(codec, &wm8750_dapm_widgets[i]); 315 ARRAY_SIZE(wm8750_dapm_widgets));
318 316
319 /* Set up spitz specific audio path audio_map */ 317 /* Set up spitz specific audio paths */
320 for (i = 0; audio_map[i][0] != NULL; i++) 318 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
321 snd_soc_dapm_connect_input(codec, audio_map[i][0],
322 audio_map[i][1], audio_map[i][2]);
323 319
324 snd_soc_dapm_sync_endpoints(codec); 320 snd_soc_dapm_sync_endpoints(codec);
325 return 0; 321 return 0;