提交 1a250598 编写于 作者: M Mark Brown 提交者: Jaroslav Kysela

[ALSA] soc - n810 - Update for bulk DAPM registration APIs

Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@perex.cz>
上级 acf497f9
...@@ -177,7 +177,7 @@ static const struct snd_soc_dapm_widget aic33_dapm_widgets[] = { ...@@ -177,7 +177,7 @@ static const struct snd_soc_dapm_widget aic33_dapm_widgets[] = {
SND_SOC_DAPM_HP("Headphone Jack", n810_jack_event), SND_SOC_DAPM_HP("Headphone Jack", n810_jack_event),
}; };
static const char *audio_map[][3] = { static const struct snd_soc_dapm_route audio_map[] = {
{"Headphone Jack", NULL, "HPLOUT"}, {"Headphone Jack", NULL, "HPLOUT"},
{"Headphone Jack", NULL, "HPROUT"}, {"Headphone Jack", NULL, "HPROUT"},
...@@ -217,13 +217,11 @@ static int n810_aic33_init(struct snd_soc_codec *codec) ...@@ -217,13 +217,11 @@ static int n810_aic33_init(struct snd_soc_codec *codec)
} }
/* Add N810 specific widgets */ /* Add N810 specific widgets */
for (i = 0; i < ARRAY_SIZE(aic33_dapm_widgets); i++) snd_soc_dapm_new_controls(codec, aic33_dapm_widgets,
snd_soc_dapm_new_control(codec, &aic33_dapm_widgets[i]); ARRAY_SIZE(aic33_dapm_widgets));
/* Set up N810 specific audio path audio_map */ /* Set up N810 specific audio path audio_map */
for (i = 0; i < ARRAY_SIZE(audio_map); i++) snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_connect_input(codec, audio_map[i][0],
audio_map[i][1], audio_map[i][2]);
snd_soc_dapm_sync_endpoints(codec); snd_soc_dapm_sync_endpoints(codec);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册