aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/ams-delta.c14
-rw-r--r--sound/soc/omap/omap-twl4030.c28
-rw-r--r--sound/soc/omap/rx51.c18
3 files changed, 33 insertions, 27 deletions
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c
index bb243c663e6b..1f41951d8b7f 100644
--- a/sound/soc/omap/ams-delta.c
+++ b/sound/soc/omap/ams-delta.c
@@ -527,6 +527,15 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd)
527 return 0; 527 return 0;
528} 528}
529 529
530static int ams_delta_card_remove(struct snd_soc_pcm_runtime *rtd)
531{
532 snd_soc_jack_free_gpios(&ams_delta_hook_switch,
533 ARRAY_SIZE(ams_delta_hook_switch_gpios),
534 ams_delta_hook_switch_gpios);
535
536 return 0;
537}
538
530/* DAI glue - connects codec <--> CPU */ 539/* DAI glue - connects codec <--> CPU */
531static struct snd_soc_dai_link ams_delta_dai_link = { 540static struct snd_soc_dai_link ams_delta_dai_link = {
532 .name = "CX20442", 541 .name = "CX20442",
@@ -543,6 +552,7 @@ static struct snd_soc_dai_link ams_delta_dai_link = {
543static struct snd_soc_card ams_delta_audio_card = { 552static struct snd_soc_card ams_delta_audio_card = {
544 .name = "AMS_DELTA", 553 .name = "AMS_DELTA",
545 .owner = THIS_MODULE, 554 .owner = THIS_MODULE,
555 .remove = ams_delta_card_remove,
546 .dai_link = &ams_delta_dai_link, 556 .dai_link = &ams_delta_dai_link,
547 .num_links = 1, 557 .num_links = 1,
548 558
@@ -579,10 +589,6 @@ static int ams_delta_remove(struct platform_device *pdev)
579 dev_warn(&pdev->dev, 589 dev_warn(&pdev->dev,
580 "failed to unregister V253 line discipline\n"); 590 "failed to unregister V253 line discipline\n");
581 591
582 snd_soc_jack_free_gpios(&ams_delta_hook_switch,
583 ARRAY_SIZE(ams_delta_hook_switch_gpios),
584 ams_delta_hook_switch_gpios);
585
586 snd_soc_unregister_card(card); 592 snd_soc_unregister_card(card);
587 card->dev = NULL; 593 card->dev = NULL;
588 return 0; 594 return 0;
diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c
index 64141db311b2..b4e282871658 100644
--- a/sound/soc/omap/omap-twl4030.c
+++ b/sound/soc/omap/omap-twl4030.c
@@ -231,6 +231,19 @@ static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd)
231 return ret; 231 return ret;
232} 232}
233 233
234static int omap_twl4030_card_remove(struct snd_soc_pcm_runtime *rtd)
235{
236 struct snd_soc_card *card = rtd->card;
237 struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card);
238
239 if (priv->jack_detect > 0)
240 snd_soc_jack_free_gpios(&priv->hs_jack,
241 ARRAY_SIZE(hs_jack_gpios),
242 hs_jack_gpios);
243
244 return 0;
245}
246
234/* Digital audio interface glue - connects codec <--> CPU */ 247/* Digital audio interface glue - connects codec <--> CPU */
235static struct snd_soc_dai_link omap_twl4030_dai_links[] = { 248static struct snd_soc_dai_link omap_twl4030_dai_links[] = {
236 { 249 {
@@ -258,6 +271,7 @@ static struct snd_soc_dai_link omap_twl4030_dai_links[] = {
258/* Audio machine driver */ 271/* Audio machine driver */
259static struct snd_soc_card omap_twl4030_card = { 272static struct snd_soc_card omap_twl4030_card = {
260 .owner = THIS_MODULE, 273 .owner = THIS_MODULE,
274 .remove = omap_twl4030_card_remove,
261 .dai_link = omap_twl4030_dai_links, 275 .dai_link = omap_twl4030_dai_links,
262 .num_links = ARRAY_SIZE(omap_twl4030_dai_links), 276 .num_links = ARRAY_SIZE(omap_twl4030_dai_links),
263 277
@@ -353,19 +367,6 @@ static int omap_twl4030_probe(struct platform_device *pdev)
353 return 0; 367 return 0;
354} 368}
355 369
356static int omap_twl4030_remove(struct platform_device *pdev)
357{
358 struct snd_soc_card *card = platform_get_drvdata(pdev);
359 struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card);
360
361 if (priv->jack_detect > 0)
362 snd_soc_jack_free_gpios(&priv->hs_jack,
363 ARRAY_SIZE(hs_jack_gpios),
364 hs_jack_gpios);
365
366 return 0;
367}
368
369static const struct of_device_id omap_twl4030_of_match[] = { 370static const struct of_device_id omap_twl4030_of_match[] = {
370 {.compatible = "ti,omap-twl4030", }, 371 {.compatible = "ti,omap-twl4030", },
371 { }, 372 { },
@@ -380,7 +381,6 @@ static struct platform_driver omap_twl4030_driver = {
380 .of_match_table = omap_twl4030_of_match, 381 .of_match_table = omap_twl4030_of_match,
381 }, 382 },
382 .probe = omap_twl4030_probe, 383 .probe = omap_twl4030_probe,
383 .remove = omap_twl4030_remove,
384}; 384};
385 385
386module_platform_driver(omap_twl4030_driver); 386module_platform_driver(omap_twl4030_driver);
diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c
index 6951dc812055..47a10290535b 100644
--- a/sound/soc/omap/rx51.c
+++ b/sound/soc/omap/rx51.c
@@ -334,6 +334,14 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd)
334 return err; 334 return err;
335} 335}
336 336
337static int rx51_card_remove(struct snd_soc_pcm_runtime *rtd)
338{
339 snd_soc_jack_free_gpios(&rx51_av_jack, ARRAY_SIZE(rx51_av_jack_gpios),
340 rx51_av_jack_gpios);
341
342 return 0;
343}
344
337/* Digital audio interface glue - connects codec <--> CPU */ 345/* Digital audio interface glue - connects codec <--> CPU */
338static struct snd_soc_dai_link rx51_dai[] = { 346static struct snd_soc_dai_link rx51_dai[] = {
339 { 347 {
@@ -368,6 +376,7 @@ static struct snd_soc_codec_conf rx51_codec_conf[] = {
368static struct snd_soc_card rx51_sound_card = { 376static struct snd_soc_card rx51_sound_card = {
369 .name = "RX-51", 377 .name = "RX-51",
370 .owner = THIS_MODULE, 378 .owner = THIS_MODULE,
379 .remove = rx51_card_remove,
371 .dai_link = rx51_dai, 380 .dai_link = rx51_dai,
372 .num_links = ARRAY_SIZE(rx51_dai), 381 .num_links = ARRAY_SIZE(rx51_dai),
373 .aux_dev = rx51_aux_dev, 382 .aux_dev = rx51_aux_dev,
@@ -499,14 +508,6 @@ static int rx51_soc_probe(struct platform_device *pdev)
499 return 0; 508 return 0;
500} 509}
501 510
502static int rx51_soc_remove(struct platform_device *pdev)
503{
504 snd_soc_jack_free_gpios(&rx51_av_jack, ARRAY_SIZE(rx51_av_jack_gpios),
505 rx51_av_jack_gpios);
506
507 return 0;
508}
509
510#if defined(CONFIG_OF) 511#if defined(CONFIG_OF)
511static const struct of_device_id rx51_audio_of_match[] = { 512static const struct of_device_id rx51_audio_of_match[] = {
512 { .compatible = "nokia,n900-audio", }, 513 { .compatible = "nokia,n900-audio", },
@@ -522,7 +523,6 @@ static struct platform_driver rx51_soc_driver = {
522 .of_match_table = of_match_ptr(rx51_audio_of_match), 523 .of_match_table = of_match_ptr(rx51_audio_of_match),
523 }, 524 },
524 .probe = rx51_soc_probe, 525 .probe = rx51_soc_probe,
525 .remove = rx51_soc_remove,
526}; 526};
527 527
528module_platform_driver(rx51_soc_driver); 528module_platform_driver(rx51_soc_driver);