[ALSA] soc - neo1973_wm8753 - Convert to bulk DAPM registration APIs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Graeme Gregory <graeme@openmoko.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
51e6a8411a
commit
8f3112d7a8
|
@ -425,8 +425,7 @@ static const struct snd_soc_dapm_widget wm8753_dapm_widgets[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* example machine audio_mapnections */
|
static const struct snd_soc_dapm_route dapm_routes[] = {
|
||||||
static const char *audio_map[][3] = {
|
|
||||||
|
|
||||||
/* Connections to the lm4857 amp */
|
/* Connections to the lm4857 amp */
|
||||||
{"Audio Out", NULL, "LOUT1"},
|
{"Audio Out", NULL, "LOUT1"},
|
||||||
|
@ -449,8 +448,6 @@ static const char *audio_map[][3] = {
|
||||||
|
|
||||||
/* Connect the ALC pins */
|
/* Connect the ALC pins */
|
||||||
{"ACIN", NULL, "ACOP"},
|
{"ACIN", NULL, "ACOP"},
|
||||||
|
|
||||||
{NULL, NULL, NULL},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *lm4857_mode[] = {
|
static const char *lm4857_mode[] = {
|
||||||
|
@ -526,8 +523,8 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
|
||||||
set_scenario_endpoints(codec, NEO_AUDIO_OFF);
|
set_scenario_endpoints(codec, NEO_AUDIO_OFF);
|
||||||
|
|
||||||
/* Add neo1973 specific widgets */
|
/* Add neo1973 specific widgets */
|
||||||
for (i = 0; i < ARRAY_SIZE(wm8753_dapm_widgets); i++)
|
snd_soc_dapm_new_controls(codec, wm8753_dapm_widgets,
|
||||||
snd_soc_dapm_new_control(codec, &wm8753_dapm_widgets[i]);
|
ARRAY_SIZE(wm8753_dapm_widgets));
|
||||||
|
|
||||||
/* add neo1973 specific controls */
|
/* add neo1973 specific controls */
|
||||||
for (i = 0; i < ARRAY_SIZE(wm8753_neo1973_controls); i++) {
|
for (i = 0; i < ARRAY_SIZE(wm8753_neo1973_controls); i++) {
|
||||||
|
@ -538,11 +535,9 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set up neo1973 specific audio path audio_mapnects */
|
/* set up neo1973 specific audio routes */
|
||||||
for (i = 0; audio_map[i][0] != NULL; i++) {
|
err = snd_soc_dapm_add_routes(codec, dapm_routes,
|
||||||
snd_soc_dapm_connect_input(codec, audio_map[i][0],
|
ARRAY_SIZE(dapm_routes));
|
||||||
audio_map[i][1], audio_map[i][2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
snd_soc_dapm_sync_endpoints(codec);
|
snd_soc_dapm_sync_endpoints(codec);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue