aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-05-13 08:58:30 -0400
committerJaroslav Kysela <perex@perex.cz>2008-05-19 07:19:19 -0400
commitacf497f996aa08f03c62a3150abd7939ae23de4c (patch)
treebb393c0854285145319684a19c43a812fd210e00 /sound/soc/davinci
parent8f3112d7a847c2933a42ce29f17899f585d09106 (diff)
[ALSA] soc - davinci-evm - Update for bulk DAPM registration APIs
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/davinci')
-rw-r--r--sound/soc/davinci/davinci-evm.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index fcd165240333..4c70a0ed3397 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -71,7 +71,7 @@ static const struct snd_soc_dapm_widget aic3x_dapm_widgets[] = {
71}; 71};
72 72
73/* davinci-evm machine audio_mapnections to the codec pins */ 73/* davinci-evm machine audio_mapnections to the codec pins */
74static const char *audio_map[][3] = { 74static const struct snd_soc_dapm_route audio_map[] = {
75 /* Headphone connected to HPLOUT, HPROUT */ 75 /* Headphone connected to HPLOUT, HPROUT */
76 {"Headphone Jack", NULL, "HPLOUT"}, 76 {"Headphone Jack", NULL, "HPLOUT"},
77 {"Headphone Jack", NULL, "HPROUT"}, 77 {"Headphone Jack", NULL, "HPROUT"},
@@ -90,23 +90,17 @@ static const char *audio_map[][3] = {
90 {"LINE2L", NULL, "Line In"}, 90 {"LINE2L", NULL, "Line In"},
91 {"LINE1R", NULL, "Line In"}, 91 {"LINE1R", NULL, "Line In"},
92 {"LINE2R", NULL, "Line In"}, 92 {"LINE2R", NULL, "Line In"},
93
94 {NULL, NULL, NULL},
95}; 93};
96 94
97/* Logic for a aic3x as connected on a davinci-evm */ 95/* Logic for a aic3x as connected on a davinci-evm */
98static int evm_aic3x_init(struct snd_soc_codec *codec) 96static int evm_aic3x_init(struct snd_soc_codec *codec)
99{ 97{
100 int i;
101
102 /* Add davinci-evm specific widgets */ 98 /* Add davinci-evm specific widgets */
103 for (i = 0; i < ARRAY_SIZE(aic3x_dapm_widgets); i++) 99 snd_soc_dapm_new_controls(codec, aic3x_dapm_widgets,
104 snd_soc_dapm_new_control(codec, &aic3x_dapm_widgets[i]); 100 ARRAY_SIZE(aic3x_dapm_widgets));
105 101
106 /* Set up davinci-evm specific audio path audio_map */ 102 /* Set up davinci-evm specific audio path audio_map */
107 for (i = 0; audio_map[i][0] != NULL; i++) 103 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
108 snd_soc_dapm_connect_input(codec, audio_map[i][0],
109 audio_map[i][1], audio_map[i][2]);
110 104
111 /* not connected */ 105 /* not connected */
112 snd_soc_dapm_set_endpoint(codec, "MONO_LOUT", 0); 106 snd_soc_dapm_set_endpoint(codec, "MONO_LOUT", 0);