summaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/palm27x.c
diff options
context:
space:
mode:
authorMike Dunn <mikedunn@newsguy.com>2012-12-29 10:53:17 -0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-02 13:07:00 +0000
commit016fb39c98a71539d9abd5ee66cc1103a32fbb34 (patch)
treecf4bc69c5c104ee4f5ec9676a339ce65237a2b06 /sound/soc/pxa/palm27x.c
parenta49f0d1ea3ec94fc7cf33a7c36a16343b74bd565 (diff)
downloadlinux-016fb39c98a71539d9abd5ee66cc1103a32fbb34.tar.bz2
ASoC: palm27x: fix widgets and routes in dai_link init
ASoC core code now handles creation of controls and routing based on contents of struct snd_soc_card, so remove calls to snd_soc_dapm_new_controls() and snd_soc_dapm_add_routes() from the snd_soc_dai_link init function, and add widget and route definitions to struct snd_soc_card. Signed-off-by: Mike Dunn <mikedunn@newsguy.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/pxa/palm27x.c')
-rw-r--r--sound/soc/pxa/palm27x.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c
index 2074e2daf9c6..bb062e6b9db5 100644
--- a/sound/soc/pxa/palm27x.c
+++ b/sound/soc/pxa/palm27x.c
@@ -79,17 +79,6 @@ static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd)
struct snd_soc_dapm_context *dapm = &codec->dapm;
int err;
- /* add palm27x specific widgets */
- err = snd_soc_dapm_new_controls(dapm, palm27x_dapm_widgets,
- ARRAY_SIZE(palm27x_dapm_widgets));
- if (err)
- return err;
-
- /* set up palm27x specific audio path audio_map */
- err = snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
- if (err)
- return err;
-
/* connected pins */
if (machine_is_palmld())
snd_soc_dapm_enable_pin(dapm, "MIC1");
@@ -149,6 +138,10 @@ static struct snd_soc_card palm27x_asoc = {
.owner = THIS_MODULE,
.dai_link = palm27x_dai,
.num_links = ARRAY_SIZE(palm27x_dai),
+ .dapm_widgets = palm27x_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(palm27x_dapm_widgets),
+ .dapm_routes = audio_map,
+ .num_dapm_routes = ARRAY_SIZE(audio_map)
};
static struct platform_device *palm27x_snd_device;