summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-10-10 15:34:09 +0300
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-10 16:18:11 +0100
commitd2266025ea26b6f3f8f93da6fad129541c82bd7c (patch)
tree291e5da282143637142b6d841bfb14d45bc9ebb2 /sound/soc/omap
parentd8058469606bfd1b0d6fca830a997ba06f83e5dc (diff)
ASoC: am3517evm: Let core to deal with the DAPM widgets
Pass the DAPM widgets/routes via the snd_soc_card struct to core. With this change we do not need the init function since the remaining snd_soc_dapm_enable_pin calls are not needed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Anuj Aggarwal <anuj.aggarwal@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/am3517evm.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/sound/soc/omap/am3517evm.c b/sound/soc/omap/am3517evm.c
index f5a4d65b2f6..8da55e91645 100644
--- a/sound/soc/omap/am3517evm.c
+++ b/sound/soc/omap/am3517evm.c
@@ -90,26 +90,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"MICIN", NULL, "Mic In"},
};
-static int am3517evm_aic23_init(struct snd_soc_pcm_runtime *rtd)
-{
- struct snd_soc_codec *codec = rtd->codec;
- struct snd_soc_dapm_context *dapm = &codec->dapm;
-
- /* Add am3517-evm specific widgets */
- snd_soc_dapm_new_controls(dapm, tlv320aic23_dapm_widgets,
- ARRAY_SIZE(tlv320aic23_dapm_widgets));
-
- /* Set up davinci-evm specific audio path audio_map */
- snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
-
- /* always connected */
- snd_soc_dapm_enable_pin(dapm, "Line Out");
- snd_soc_dapm_enable_pin(dapm, "Line In");
- snd_soc_dapm_enable_pin(dapm, "Mic In");
-
- return 0;
-}
-
/* Digital audio interface glue - connects codec <--> CPU */
static struct snd_soc_dai_link am3517evm_dai = {
.name = "TLV320AIC23",
@@ -120,7 +100,6 @@ static struct snd_soc_dai_link am3517evm_dai = {
.codec_name = "tlv320aic23-codec.2-001a",
.dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBM_CFM,
- .init = am3517evm_aic23_init,
.ops = &am3517evm_ops,
};
@@ -129,6 +108,11 @@ static struct snd_soc_card snd_soc_am3517evm = {
.name = "am3517evm",
.dai_link = &am3517evm_dai,
.num_links = 1,
+
+ .dapm_widgets = tlv320aic23_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(tlv320aic23_dapm_widgets),
+ .dapm_routes = audio_map,
+ .num_dapm_routes = ARRAY_SIZE(audio_map),
};
static struct platform_device *am3517evm_snd_device;