Skip to content

Commit

Permalink
ASoC: palm27x: fix widgets and routes in dai_link init
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
mike-dunn authored and broonie committed Jan 2, 2013
1 parent a49f0d1 commit 016fb39
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions sound/soc/pxa/palm27x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 016fb39

Please sign in to comment.