diff options
Diffstat (limited to 'sound/soc/samsung/rx1950_uda1380.c')
-rw-r--r-- | sound/soc/samsung/rx1950_uda1380.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c index bc8c1676459f..aea7f1b24e6b 100644 --- a/sound/soc/samsung/rx1950_uda1380.c +++ b/sound/soc/samsung/rx1950_uda1380.c | |||
@@ -90,12 +90,6 @@ static struct snd_soc_dai_link rx1950_uda1380_dai[] = { | |||
90 | }, | 90 | }, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | static struct snd_soc_card rx1950_asoc = { | ||
94 | .name = "rx1950", | ||
95 | .dai_link = rx1950_uda1380_dai, | ||
96 | .num_links = ARRAY_SIZE(rx1950_uda1380_dai), | ||
97 | }; | ||
98 | |||
99 | /* rx1950 machine dapm widgets */ | 93 | /* rx1950 machine dapm widgets */ |
100 | static const struct snd_soc_dapm_widget uda1380_dapm_widgets[] = { | 94 | static const struct snd_soc_dapm_widget uda1380_dapm_widgets[] = { |
101 | SND_SOC_DAPM_HP("Headphone Jack", NULL), | 95 | SND_SOC_DAPM_HP("Headphone Jack", NULL), |
@@ -117,6 +111,17 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
117 | {"VINM", NULL, "Mic Jack"}, | 111 | {"VINM", NULL, "Mic Jack"}, |
118 | }; | 112 | }; |
119 | 113 | ||
114 | static struct snd_soc_card rx1950_asoc = { | ||
115 | .name = "rx1950", | ||
116 | .dai_link = rx1950_uda1380_dai, | ||
117 | .num_links = ARRAY_SIZE(rx1950_uda1380_dai), | ||
118 | |||
119 | .dapm_widgets = uda1380_dapm_widgets, | ||
120 | .num_dapm_widgets = ARRAY_SIZE(uda1380_dapm_widgets), | ||
121 | .dapm_routes = audio_map, | ||
122 | .num_dapm_routes = ARRAY_SIZE(audio_map), | ||
123 | }; | ||
124 | |||
120 | static struct platform_device *s3c24xx_snd_device; | 125 | static struct platform_device *s3c24xx_snd_device; |
121 | 126 | ||
122 | static int rx1950_startup(struct snd_pcm_substream *substream) | 127 | static int rx1950_startup(struct snd_pcm_substream *substream) |
@@ -220,26 +225,10 @@ static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd) | |||
220 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 225 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
221 | int err; | 226 | int err; |
222 | 227 | ||
223 | /* Add rx1950 specific widgets */ | ||
224 | err = snd_soc_dapm_new_controls(dapm, uda1380_dapm_widgets, | ||
225 | ARRAY_SIZE(uda1380_dapm_widgets)); | ||
226 | |||
227 | if (err) | ||
228 | return err; | ||
229 | |||
230 | /* Set up rx1950 specific audio path audio_mapnects */ | ||
231 | err = snd_soc_dapm_add_routes(dapm, audio_map, | ||
232 | ARRAY_SIZE(audio_map)); | ||
233 | |||
234 | if (err) | ||
235 | return err; | ||
236 | |||
237 | snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); | 228 | snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); |
238 | snd_soc_dapm_enable_pin(dapm, "Speaker"); | 229 | snd_soc_dapm_enable_pin(dapm, "Speaker"); |
239 | snd_soc_dapm_enable_pin(dapm, "Mic Jack"); | 230 | snd_soc_dapm_enable_pin(dapm, "Mic Jack"); |
240 | 231 | ||
241 | snd_soc_dapm_sync(dapm); | ||
242 | |||
243 | snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE, | 232 | snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE, |
244 | &hp_jack); | 233 | &hp_jack); |
245 | 234 | ||