diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-29 03:52:51 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-01 16:52:54 -0500 |
commit | bc6c117ef0d8c09d643ab3da8b4976e32e2fcdab (patch) | |
tree | 8d10ba5321933e07ff4c4825d0f30e3240841efe | |
parent | 5813db970d7db40db5979f2f74f42935450e8e9c (diff) |
ASoC: Convert afeb9260 to table based DAPM init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/atmel/snd-soc-afeb9260.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/atmel/snd-soc-afeb9260.c b/sound/soc/atmel/snd-soc-afeb9260.c index cb0130cf8f13..f65f08beac31 100644 --- a/sound/soc/atmel/snd-soc-afeb9260.c +++ b/sound/soc/atmel/snd-soc-afeb9260.c | |||
@@ -70,7 +70,7 @@ static const struct snd_soc_dapm_widget tlv320aic23_dapm_widgets[] = { | |||
70 | SND_SOC_DAPM_MIC("Mic Jack", NULL), | 70 | SND_SOC_DAPM_MIC("Mic Jack", NULL), |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static const struct snd_soc_dapm_route audio_map[] = { | 73 | static const struct snd_soc_dapm_route afeb9260_audio_map[] = { |
74 | {"Headphone Jack", NULL, "LHPOUT"}, | 74 | {"Headphone Jack", NULL, "LHPOUT"}, |
75 | {"Headphone Jack", NULL, "RHPOUT"}, | 75 | {"Headphone Jack", NULL, "RHPOUT"}, |
76 | 76 | ||
@@ -85,13 +85,6 @@ static int afeb9260_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) | |||
85 | struct snd_soc_codec *codec = rtd->codec; | 85 | struct snd_soc_codec *codec = rtd->codec; |
86 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 86 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
87 | 87 | ||
88 | /* Add afeb9260 specific widgets */ | ||
89 | snd_soc_dapm_new_controls(dapm, tlv320aic23_dapm_widgets, | ||
90 | ARRAY_SIZE(tlv320aic23_dapm_widgets)); | ||
91 | |||
92 | /* Set up afeb9260 specific audio path audio_map */ | ||
93 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
94 | |||
95 | snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); | 88 | snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); |
96 | snd_soc_dapm_enable_pin(dapm, "Line In"); | 89 | snd_soc_dapm_enable_pin(dapm, "Line In"); |
97 | snd_soc_dapm_enable_pin(dapm, "Mic Jack"); | 90 | snd_soc_dapm_enable_pin(dapm, "Mic Jack"); |
@@ -119,6 +112,11 @@ static struct snd_soc_card snd_soc_machine_afeb9260 = { | |||
119 | .owner = THIS_MODULE, | 112 | .owner = THIS_MODULE, |
120 | .dai_link = &afeb9260_dai, | 113 | .dai_link = &afeb9260_dai, |
121 | .num_links = 1, | 114 | .num_links = 1, |
115 | |||
116 | .dapm_widgets = tlv320aic23_dapm_widgets, | ||
117 | .num_dapm_widgets = ARRAY_SIZE(tlv320aic23_dapm_widgets), | ||
118 | .dapm_routes = afeb9260_audio_map, | ||
119 | .num_dapm_routes = ARRAY_SIZE(afeb9260_audio_map), | ||
122 | }; | 120 | }; |
123 | 121 | ||
124 | static struct platform_device *afeb9260_snd_device; | 122 | static struct platform_device *afeb9260_snd_device; |