diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-10-04 13:57:34 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-10-04 13:57:34 -0400 |
commit | 68d114e1c68c25b383e917d5b979e52f481ad4bb (patch) | |
tree | e5d4e5c0b5c00ce2d3b1949a36f0d1b032a1a28e /sound/soc | |
parent | 07ac2296fb24e40ba8271a08167b588f4bbbe90c (diff) | |
parent | b764de2d8bafff3a52aa6ee66cedf435486974f4 (diff) |
Merge branches 'asoc-twl6040' and 'asoc-omap' into for-3.7
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/omap/ams-delta.c | 63 | ||||
-rw-r--r-- | sound/soc/omap/omap-abe-twl6040.c | 2 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcpdm.c | 9 |
3 files changed, 33 insertions, 41 deletions
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c index 7d4fa8ed6699..7b18b748c177 100644 --- a/sound/soc/omap/ams-delta.c +++ b/sound/soc/omap/ams-delta.c | |||
@@ -575,56 +575,53 @@ static struct snd_soc_card ams_delta_audio_card = { | |||
575 | }; | 575 | }; |
576 | 576 | ||
577 | /* Module init/exit */ | 577 | /* Module init/exit */ |
578 | static struct platform_device *ams_delta_audio_platform_device; | 578 | static __devinit int ams_delta_probe(struct platform_device *pdev) |
579 | static struct platform_device *cx20442_platform_device; | ||
580 | |||
581 | static int __init ams_delta_module_init(void) | ||
582 | { | 579 | { |
580 | struct snd_soc_card *card = &ams_delta_audio_card; | ||
583 | int ret; | 581 | int ret; |
584 | 582 | ||
585 | if (!(machine_is_ams_delta())) | 583 | card->dev = &pdev->dev; |
586 | return -ENODEV; | ||
587 | |||
588 | ams_delta_audio_platform_device = | ||
589 | platform_device_alloc("soc-audio", -1); | ||
590 | if (!ams_delta_audio_platform_device) | ||
591 | return -ENOMEM; | ||
592 | 584 | ||
593 | platform_set_drvdata(ams_delta_audio_platform_device, | 585 | ret = snd_soc_register_card(card); |
594 | &ams_delta_audio_card); | 586 | if (ret) { |
595 | 587 | dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); | |
596 | ret = platform_device_add(ams_delta_audio_platform_device); | 588 | card->dev = NULL; |
597 | if (ret) | 589 | return ret; |
598 | goto err; | 590 | } |
599 | |||
600 | /* | ||
601 | * Codec platform device could be registered from elsewhere (board?), | ||
602 | * but I do it here as it makes sense only if used with the card. | ||
603 | */ | ||
604 | cx20442_platform_device = | ||
605 | platform_device_register_simple("cx20442-codec", -1, NULL, 0); | ||
606 | return 0; | 591 | return 0; |
607 | err: | ||
608 | platform_device_put(ams_delta_audio_platform_device); | ||
609 | return ret; | ||
610 | } | 592 | } |
611 | late_initcall(ams_delta_module_init); | ||
612 | 593 | ||
613 | static void __exit ams_delta_module_exit(void) | 594 | static int __devexit ams_delta_remove(struct platform_device *pdev) |
614 | { | 595 | { |
596 | struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
597 | |||
615 | if (tty_unregister_ldisc(N_V253) != 0) | 598 | if (tty_unregister_ldisc(N_V253) != 0) |
616 | dev_warn(&ams_delta_audio_platform_device->dev, | 599 | dev_warn(&pdev->dev, |
617 | "failed to unregister V253 line discipline\n"); | 600 | "failed to unregister V253 line discipline\n"); |
618 | 601 | ||
619 | snd_soc_jack_free_gpios(&ams_delta_hook_switch, | 602 | snd_soc_jack_free_gpios(&ams_delta_hook_switch, |
620 | ARRAY_SIZE(ams_delta_hook_switch_gpios), | 603 | ARRAY_SIZE(ams_delta_hook_switch_gpios), |
621 | ams_delta_hook_switch_gpios); | 604 | ams_delta_hook_switch_gpios); |
622 | 605 | ||
623 | platform_device_unregister(cx20442_platform_device); | 606 | snd_soc_unregister_card(card); |
624 | platform_device_unregister(ams_delta_audio_platform_device); | 607 | card->dev = NULL; |
608 | return 0; | ||
625 | } | 609 | } |
626 | module_exit(ams_delta_module_exit); | 610 | |
611 | #define DRV_NAME "ams-delta-audio" | ||
612 | |||
613 | static struct platform_driver ams_delta_driver = { | ||
614 | .driver = { | ||
615 | .name = DRV_NAME, | ||
616 | .owner = THIS_MODULE, | ||
617 | }, | ||
618 | .probe = ams_delta_probe, | ||
619 | .remove = __devexit_p(ams_delta_remove), | ||
620 | }; | ||
621 | |||
622 | module_platform_driver(ams_delta_driver); | ||
627 | 623 | ||
628 | MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>"); | 624 | MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>"); |
629 | MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone"); | 625 | MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone"); |
630 | MODULE_LICENSE("GPL"); | 626 | MODULE_LICENSE("GPL"); |
627 | MODULE_ALIAS("platform:" DRV_NAME); | ||
diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c index be525dfe9faa..750d595d01d7 100644 --- a/sound/soc/omap/omap-abe-twl6040.c +++ b/sound/soc/omap/omap-abe-twl6040.c | |||
@@ -220,7 +220,7 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd) | |||
220 | twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk"); | 220 | twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk"); |
221 | twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk"); | 221 | twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk"); |
222 | twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out"); | 222 | twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out"); |
223 | twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vinrator"); | 223 | twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vibrator"); |
224 | twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic"); | 224 | twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic"); |
225 | twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic"); | 225 | twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic"); |
226 | twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic"); | 226 | twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic"); |
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c index 775565032ce3..e134b271a70a 100644 --- a/sound/soc/omap/omap-mcpdm.c +++ b/sound/soc/omap/omap-mcpdm.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <sound/pcm_params.h> | 40 | #include <sound/pcm_params.h> |
41 | #include <sound/soc.h> | 41 | #include <sound/soc.h> |
42 | 42 | ||
43 | #include <plat/omap_hwmod.h> | ||
44 | #include "omap-mcpdm.h" | 43 | #include "omap-mcpdm.h" |
45 | #include "omap-pcm.h" | 44 | #include "omap-pcm.h" |
46 | 45 | ||
@@ -258,13 +257,9 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream, | |||
258 | mutex_lock(&mcpdm->mutex); | 257 | mutex_lock(&mcpdm->mutex); |
259 | 258 | ||
260 | if (!dai->active) { | 259 | if (!dai->active) { |
261 | /* Enable watch dog for ES above ES 1.0 to avoid saturation */ | 260 | u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL); |
262 | if (omap_rev() != OMAP4430_REV_ES1_0) { | ||
263 | u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL); | ||
264 | 261 | ||
265 | omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, | 262 | omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, ctrl | MCPDM_WD_EN); |
266 | ctrl | MCPDM_WD_EN); | ||
267 | } | ||
268 | omap_mcpdm_open_streams(mcpdm); | 263 | omap_mcpdm_open_streams(mcpdm); |
269 | } | 264 | } |
270 | mutex_unlock(&mcpdm->mutex); | 265 | mutex_unlock(&mcpdm->mutex); |