aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/tosa.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/tosa.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/tosa.c')
-rw-r--r--sound/soc/pxa/tosa.c14
1 files changed, 4 insertions, 10 deletions
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;