diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-05-13 08:55:48 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-05-19 07:19:18 -0400 |
commit | 25191c45aec54cd01b53391bb0b0e1e60377a5fc (patch) | |
tree | c6fd9aea42da834df594711b426748a5be61e858 /sound/soc/pxa/poodle.c | |
parent | d0cc0d3a95cc3c022ee118072d243d3670ec1663 (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/poodle.c')
-rw-r--r-- | sound/soc/pxa/poodle.c | 14 |
1 files changed, 5 insertions, 9 deletions
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), | |||
215 | SND_SOC_DAPM_SPK("Ext Spk", poodle_amp_event), | 215 | SND_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 */ |
219 | static const char *audio_map[][3] = { | 219 | static 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 | ||
232 | static const char *jack_function[] = {"Off", "Headphone"}; | 230 | static 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; |