diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-03-01 09:48:14 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-02 21:01:48 -0500 |
commit | 23d8f2253c5ebe975465a61dd416a35b5ebda4b0 (patch) | |
tree | 7ea340e6583045450354c9627b001b581efa628c | |
parent | e14de47ac95fb25818294325cd77d520c90c6ced (diff) |
ASoC: pxa: e740_wm9705: Convert to table based DAPM setup
Use table based setup to register the DAPM widgets and routes. This on one hand
makes the code a bit cleaner and on the other hand the board level DAPM elements
get registered in the card's DAPM context rather than in the CODEC's DAPM
context.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/pxa/e740_wm9705.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/pxa/e740_wm9705.c b/sound/soc/pxa/e740_wm9705.c index 44b5c09d296b..c29fedab2f49 100644 --- a/sound/soc/pxa/e740_wm9705.c +++ b/sound/soc/pxa/e740_wm9705.c | |||
@@ -103,11 +103,6 @@ static int e740_ac97_init(struct snd_soc_pcm_runtime *rtd) | |||
103 | snd_soc_dapm_nc_pin(dapm, "PCBEEP"); | 103 | snd_soc_dapm_nc_pin(dapm, "PCBEEP"); |
104 | snd_soc_dapm_nc_pin(dapm, "MIC2"); | 104 | snd_soc_dapm_nc_pin(dapm, "MIC2"); |
105 | 105 | ||
106 | snd_soc_dapm_new_controls(dapm, e740_dapm_widgets, | ||
107 | ARRAY_SIZE(e740_dapm_widgets)); | ||
108 | |||
109 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
110 | |||
111 | return 0; | 106 | return 0; |
112 | } | 107 | } |
113 | 108 | ||
@@ -136,6 +131,11 @@ static struct snd_soc_card e740 = { | |||
136 | .owner = THIS_MODULE, | 131 | .owner = THIS_MODULE, |
137 | .dai_link = e740_dai, | 132 | .dai_link = e740_dai, |
138 | .num_links = ARRAY_SIZE(e740_dai), | 133 | .num_links = ARRAY_SIZE(e740_dai), |
134 | |||
135 | .dapm_widgets = e740_dapm_widgets, | ||
136 | .num_dapm_widgets = ARRAY_SIZE(e740_dapm_widgets), | ||
137 | .dapm_routes = audio_map, | ||
138 | .num_dapm_routes = ARRAY_SIZE(audio_map), | ||
139 | }; | 139 | }; |
140 | 140 | ||
141 | static struct gpio e740_audio_gpios[] = { | 141 | static struct gpio e740_audio_gpios[] = { |