aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-05-13 08:55:22 -0400
committerJaroslav Kysela <perex@perex.cz>2008-05-19 07:19:18 -0400
commitd0cc0d3a95cc3c022ee118072d243d3670ec1663 (patch)
treeeb2b0ee839062da0e9484e347904fe69515a330c /sound/soc/codecs
parent105f1c28442301237d20b05a3d52d9987614016f (diff)
[ALSA] soc - tlv320aic3x - Convert to use bulk registration APIs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/tlv320aic3x.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 957996e0eba2..cb8365ac0c02 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -497,7 +497,7 @@ static const struct snd_soc_dapm_widget aic3x_dapm_widgets[] = {
497 SND_SOC_DAPM_INPUT("LINE2R"), 497 SND_SOC_DAPM_INPUT("LINE2R"),
498}; 498};
499 499
500static const char *intercon[][3] = { 500static const struct snd_soc_dapm_route intercon[] = {
501 /* Left Output */ 501 /* Left Output */
502 {"Left DAC Mux", "DAC_L1", "Left DAC"}, 502 {"Left DAC Mux", "DAC_L1", "Left DAC"},
503 {"Left DAC Mux", "DAC_L2", "Left DAC"}, 503 {"Left DAC Mux", "DAC_L2", "Left DAC"},
@@ -641,22 +641,15 @@ static const char *intercon[][3] = {
641 {"Right Line Out", NULL, "Right Line2 Bypass Mixer"}, 641 {"Right Line Out", NULL, "Right Line2 Bypass Mixer"},
642 {"Mono Out", NULL, "Right Line2 Bypass Mixer"}, 642 {"Mono Out", NULL, "Right Line2 Bypass Mixer"},
643 {"Right HP Out", NULL, "Right Line2 Bypass Mixer"}, 643 {"Right HP Out", NULL, "Right Line2 Bypass Mixer"},
644
645 /* terminator */
646 {NULL, NULL, NULL},
647}; 644};
648 645
649static int aic3x_add_widgets(struct snd_soc_codec *codec) 646static int aic3x_add_widgets(struct snd_soc_codec *codec)
650{ 647{
651 int i; 648 snd_soc_dapm_new_controls(codec, aic3x_dapm_widgets,
652 649 ARRAY_SIZE(aic3x_dapm_widgets));
653 for (i = 0; i < ARRAY_SIZE(aic3x_dapm_widgets); i++)
654 snd_soc_dapm_new_control(codec, &aic3x_dapm_widgets[i]);
655 650
656 /* set up audio path interconnects */ 651 /* set up audio path interconnects */
657 for (i = 0; intercon[i][0] != NULL; i++) 652 snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
658 snd_soc_dapm_connect_input(codec, intercon[i][0],
659 intercon[i][1], intercon[i][2]);
660 653
661 snd_soc_dapm_new_widgets(codec); 654 snd_soc_dapm_new_widgets(codec);
662 return 0; 655 return 0;