Commit 51e6a841 authored by Mark Brown's avatar Mark Brown Committed by Jaroslav Kysela

[ALSA] soc - eti_b1_wm8731 - Convert to use bulk DAPM control registration

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Frank Mandarino <fmandarino@endrelia.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 25191c45
...@@ -191,7 +191,7 @@ static const struct snd_soc_dapm_widget eti_b1_dapm_widgets[] = { ...@@ -191,7 +191,7 @@ static const struct snd_soc_dapm_widget eti_b1_dapm_widgets[] = {
SND_SOC_DAPM_SPK("Ext Spk", NULL), SND_SOC_DAPM_SPK("Ext Spk", NULL),
}; };
static const char *intercon[][3] = { static const struct snd_soc_dapm_route intercon[] = {
/* speaker connected to LHPOUT */ /* speaker connected to LHPOUT */
{"Ext Spk", NULL, "LHPOUT"}, {"Ext Spk", NULL, "LHPOUT"},
...@@ -199,9 +199,6 @@ static const char *intercon[][3] = { ...@@ -199,9 +199,6 @@ static const char *intercon[][3] = {
/* mic is connected to Mic Jack, with WM8731 Mic Bias */ /* mic is connected to Mic Jack, with WM8731 Mic Bias */
{"MICIN", NULL, "Mic Bias"}, {"MICIN", NULL, "Mic Bias"},
{"Mic Bias", NULL, "Int Mic"}, {"Mic Bias", NULL, "Int Mic"},
/* terminator */
{NULL, NULL, NULL},
}; };
/* /*
...@@ -209,20 +206,14 @@ static const char *intercon[][3] = { ...@@ -209,20 +206,14 @@ static const char *intercon[][3] = {
*/ */
static int eti_b1_wm8731_init(struct snd_soc_codec *codec) static int eti_b1_wm8731_init(struct snd_soc_codec *codec)
{ {
int i;
DBG("eti_b1_wm8731_init() called\n"); DBG("eti_b1_wm8731_init() called\n");
/* Add specific widgets */ /* Add specific widgets */
for(i = 0; i < ARRAY_SIZE(eti_b1_dapm_widgets); i++) { snd_soc_dapm_new_controls(codec, eti_b1_dapm_widgets,
snd_soc_dapm_new_control(codec, &eti_b1_dapm_widgets[i]); ARRAY_SIZE(eti_b1_dapm_widgets));
}
/* Set up specific audio path interconnects */ /* Set up specific audio path interconnects */
for(i = 0; intercon[i][0] != NULL; i++) { snd_soc_dapm_add_route(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_connect_input(codec, intercon[i][0],
intercon[i][1], intercon[i][2]);
}
/* not connected */ /* not connected */
snd_soc_dapm_set_endpoint(codec, "RLINEIN", 0); snd_soc_dapm_set_endpoint(codec, "RLINEIN", 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment