aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
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
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')
-rw-r--r--sound/soc/pxa/corgi.c12
-rw-r--r--sound/soc/pxa/poodle.c14
-rw-r--r--sound/soc/pxa/spitz.c14
-rw-r--r--sound/soc/pxa/tosa.c14
4 files changed, 18 insertions, 36 deletions
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c
index 7f32a1167572..852f16d963a1 100644
--- a/sound/soc/pxa/corgi.c
+++ b/sound/soc/pxa/corgi.c
@@ -247,7 +247,7 @@ SND_SOC_DAPM_HP("Headset Jack", NULL),
247}; 247};
248 248
249/* Corgi machine audio map (connections to the codec pins) */ 249/* Corgi machine audio map (connections to the codec pins) */
250static const char *audio_map[][3] = { 250static const struct snd_soc_dapm_route audio_map[] = {
251 251
252 /* headset Jack - in = micin, out = LHPOUT*/ 252 /* headset Jack - in = micin, out = LHPOUT*/
253 {"Headset Jack", NULL, "LHPOUT"}, 253 {"Headset Jack", NULL, "LHPOUT"},
@@ -265,8 +265,6 @@ static const char *audio_map[][3] = {
265 265
266 /* Same as the above but no mic bias for line signals */ 266 /* Same as the above but no mic bias for line signals */
267 {"MICIN", NULL, "Line Jack"}, 267 {"MICIN", NULL, "Line Jack"},
268
269 {NULL, NULL, NULL},
270}; 268};
271 269
272static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset", 270static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset",
@@ -303,13 +301,11 @@ static int corgi_wm8731_init(struct snd_soc_codec *codec)
303 } 301 }
304 302
305 /* Add corgi specific widgets */ 303 /* Add corgi specific widgets */
306 for (i = 0; i < ARRAY_SIZE(wm8731_dapm_widgets); i++) 304 snd_soc_dapm_new_controls(codec, wm8731_dapm_widgets,
307 snd_soc_dapm_new_control(codec, &wm8731_dapm_widgets[i]); 305 ARRAY_SIZE(wm8731_dapm_widgets));
308 306
309 /* Set up corgi specific audio path audio_map */ 307 /* Set up corgi specific audio path audio_map */
310 for (i = 0; audio_map[i][0] != NULL; i++) 308 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
311 snd_soc_dapm_connect_input(codec, audio_map[i][0],
312 audio_map[i][1], audio_map[i][2]);
313 309
314 snd_soc_dapm_sync_endpoints(codec); 310 snd_soc_dapm_sync_endpoints(codec);
315 return 0; 311 return 0;
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c
index 7e830b218943..810f1fe158ab 100644
--- a/sound/soc/pxa/poodle.c
+++ b/sound/soc/pxa/poodle.c
@@ -215,8 +215,8 @@ SND_SOC_DAPM_HP("Headphone Jack", NULL),
215SND_SOC_DAPM_SPK("Ext Spk", poodle_amp_event), 215SND_SOC_DAPM_SPK("Ext Spk", poodle_amp_event),
216}; 216};
217 217
218/* Corgi machine audio_mapnections to the codec pins */ 218/* Corgi machine connections to the codec pins */
219static const char *audio_map[][3] = { 219static const struct snd_soc_dapm_route audio_map[] = {
220 220
221 /* headphone connected to LHPOUT1, RHPOUT1 */ 221 /* headphone connected to LHPOUT1, RHPOUT1 */
222 {"Headphone Jack", NULL, "LHPOUT"}, 222 {"Headphone Jack", NULL, "LHPOUT"},
@@ -225,8 +225,6 @@ static const char *audio_map[][3] = {
225 /* speaker connected to LOUT, ROUT */ 225 /* speaker connected to LOUT, ROUT */
226 {"Ext Spk", NULL, "ROUT"}, 226 {"Ext Spk", NULL, "ROUT"},
227 {"Ext Spk", NULL, "LOUT"}, 227 {"Ext Spk", NULL, "LOUT"},
228
229 {NULL, NULL, NULL},
230}; 228};
231 229
232static const char *jack_function[] = {"Off", "Headphone"}; 230static const char *jack_function[] = {"Off", "Headphone"};
@@ -263,13 +261,11 @@ static int poodle_wm8731_init(struct snd_soc_codec *codec)
263 } 261 }
264 262
265 /* Add poodle specific widgets */ 263 /* Add poodle specific widgets */
266 for (i = 0; i < ARRAY_SIZE(wm8731_dapm_widgets); i++) 264 snd_soc_dapm_new_controls(codec, wm8731_dapm_widgets,
267 snd_soc_dapm_new_control(codec, &wm8731_dapm_widgets[i]); 265 ARRAY_SIZE(wm8731_dapm_widgets));
268 266
269 /* Set up poodle specific audio path audio_map */ 267 /* Set up poodle specific audio path audio_map */
270 for (i = 0; audio_map[i][0] != NULL; i++) 268 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
271 snd_soc_dapm_connect_input(codec, audio_map[i][0],
272 audio_map[i][1], audio_map[i][2]);
273 269
274 snd_soc_dapm_sync_endpoints(codec); 270 snd_soc_dapm_sync_endpoints(codec);
275 return 0; 271 return 0;
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;
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index 7346d7e5d066..fda2aa056d53 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -154,7 +154,7 @@ SND_SOC_DAPM_SPK("Speaker", NULL),
154}; 154};
155 155
156/* tosa audio map */ 156/* tosa audio map */
157static const char *audio_map[][3] = { 157static const snd_soc_dapm_route audio_map[] = {
158 158
159 /* headphone connected to HPOUTL, HPOUTR */ 159 /* headphone connected to HPOUTL, HPOUTR */
160 {"Headphone Jack", NULL, "HPOUTL"}, 160 {"Headphone Jack", NULL, "HPOUTL"},
@@ -173,8 +173,6 @@ static const char *audio_map[][3] = {
173 {"Headset Jack", NULL, "HPOUTR"}, 173 {"Headset Jack", NULL, "HPOUTR"},
174 {"LINEINR", NULL, "Mic Bias"}, 174 {"LINEINR", NULL, "Mic Bias"},
175 {"Mic Bias", NULL, "Headset Jack"}, 175 {"Mic Bias", NULL, "Headset Jack"},
176
177 {NULL, NULL, NULL},
178}; 176};
179 177
180static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset", 178static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset",
@@ -208,15 +206,11 @@ static int tosa_ac97_init(struct snd_soc_codec *codec)
208 } 206 }
209 207
210 /* add tosa specific widgets */ 208 /* add tosa specific widgets */
211 for (i = 0; i < ARRAY_SIZE(tosa_dapm_widgets); i++) { 209 snd_soc_dapm_new_controls(codec, &tosa_dapm_widgets,
212 snd_soc_dapm_new_control(codec, &tosa_dapm_widgets[i]); 210 ARRAY_SIZE(tosa_dapm_widgets));
213 }
214 211
215 /* set up tosa specific audio path audio_map */ 212 /* set up tosa specific audio path audio_map */
216 for (i = 0; audio_map[i][0] != NULL; i++) { 213 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
217 snd_soc_dapm_connect_input(codec, audio_map[i][0],
218 audio_map[i][1], audio_map[i][2]);
219 }
220 214
221 snd_soc_dapm_sync_endpoints(codec); 215 snd_soc_dapm_sync_endpoints(codec);
222 return 0; 216 return 0;