diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/omap/omap-abe-twl6040.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c index 93bb8eee22b3..31ab6fee8943 100644 --- a/sound/soc/omap/omap-abe-twl6040.c +++ b/sound/soc/omap/omap-abe-twl6040.c | |||
@@ -235,7 +235,7 @@ static int omap_abe_dmic_init(struct snd_soc_pcm_runtime *rtd) | |||
235 | } | 235 | } |
236 | 236 | ||
237 | /* Digital audio interface glue - connects codec <--> CPU */ | 237 | /* Digital audio interface glue - connects codec <--> CPU */ |
238 | static struct snd_soc_dai_link twl6040_dmic_dai[] = { | 238 | static struct snd_soc_dai_link abe_twl6040_dai_links[] = { |
239 | { | 239 | { |
240 | .name = "TWL6040", | 240 | .name = "TWL6040", |
241 | .stream_name = "TWL6040", | 241 | .stream_name = "TWL6040", |
@@ -258,19 +258,6 @@ static struct snd_soc_dai_link twl6040_dmic_dai[] = { | |||
258 | }, | 258 | }, |
259 | }; | 259 | }; |
260 | 260 | ||
261 | static struct snd_soc_dai_link twl6040_only_dai[] = { | ||
262 | { | ||
263 | .name = "TWL6040", | ||
264 | .stream_name = "TWL6040", | ||
265 | .cpu_dai_name = "omap-mcpdm", | ||
266 | .codec_dai_name = "twl6040-legacy", | ||
267 | .platform_name = "omap-pcm-audio", | ||
268 | .codec_name = "twl6040-codec", | ||
269 | .init = omap_abe_twl6040_init, | ||
270 | .ops = &omap_abe_ops, | ||
271 | }, | ||
272 | }; | ||
273 | |||
274 | /* Audio machine driver */ | 261 | /* Audio machine driver */ |
275 | static struct snd_soc_card omap_abe_card = { | 262 | static struct snd_soc_card omap_abe_card = { |
276 | .owner = THIS_MODULE, | 263 | .owner = THIS_MODULE, |
@@ -285,6 +272,7 @@ static __devinit int omap_abe_probe(struct platform_device *pdev) | |||
285 | { | 272 | { |
286 | struct omap_abe_twl6040_data *pdata = dev_get_platdata(&pdev->dev); | 273 | struct omap_abe_twl6040_data *pdata = dev_get_platdata(&pdev->dev); |
287 | struct snd_soc_card *card = &omap_abe_card; | 274 | struct snd_soc_card *card = &omap_abe_card; |
275 | int num_links = 0; | ||
288 | int ret; | 276 | int ret; |
289 | 277 | ||
290 | card->dev = &pdev->dev; | 278 | card->dev = &pdev->dev; |
@@ -306,13 +294,13 @@ static __devinit int omap_abe_probe(struct platform_device *pdev) | |||
306 | return -ENODEV; | 294 | return -ENODEV; |
307 | } | 295 | } |
308 | 296 | ||
309 | if (pdata->has_dmic) { | 297 | if (pdata->has_dmic) |
310 | card->dai_link = twl6040_dmic_dai; | 298 | num_links = 2; |
311 | card->num_links = ARRAY_SIZE(twl6040_dmic_dai); | 299 | else |
312 | } else { | 300 | num_links = 1; |
313 | card->dai_link = twl6040_only_dai; | 301 | |
314 | card->num_links = ARRAY_SIZE(twl6040_only_dai); | 302 | card->dai_link = abe_twl6040_dai_links; |
315 | } | 303 | card->num_links = num_links; |
316 | 304 | ||
317 | ret = snd_soc_register_card(card); | 305 | ret = snd_soc_register_card(card); |
318 | if (ret) | 306 | if (ret) |