diff options
Diffstat (limited to 'sound/soc/omap')
-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-dmic.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcpdm.c | 9 | ||||
-rw-r--r-- | sound/soc/omap/zoom2.c | 5 |
5 files changed, 37 insertions, 46 deletions
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c index dc0ee7626626..d8e96b2cd03e 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 4a73ef3ae12f..a57a4e68dcc6 100644 --- a/sound/soc/omap/omap-abe-twl6040.c +++ b/sound/soc/omap/omap-abe-twl6040.c | |||
@@ -216,7 +216,7 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd) | |||
216 | twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk"); | 216 | twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk"); |
217 | twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk"); | 217 | twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk"); |
218 | twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out"); | 218 | twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out"); |
219 | twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vinrator"); | 219 | twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vibrator"); |
220 | twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic"); | 220 | twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic"); |
221 | twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic"); | 221 | twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic"); |
222 | twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic"); | 222 | twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic"); |
diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c index 68f2cd1a9206..5a6aeaf552a8 100644 --- a/sound/soc/omap/omap-dmic.c +++ b/sound/soc/omap/omap-dmic.c | |||
@@ -464,9 +464,9 @@ static __devinit int asoc_dmic_probe(struct platform_device *pdev) | |||
464 | 464 | ||
465 | mutex_init(&dmic->mutex); | 465 | mutex_init(&dmic->mutex); |
466 | 466 | ||
467 | dmic->fclk = clk_get(dmic->dev, "dmic_fck"); | 467 | dmic->fclk = clk_get(dmic->dev, "fck"); |
468 | if (IS_ERR(dmic->fclk)) { | 468 | if (IS_ERR(dmic->fclk)) { |
469 | dev_err(dmic->dev, "cant get dmic_fck\n"); | 469 | dev_err(dmic->dev, "cant get fck\n"); |
470 | return -ENODEV; | 470 | return -ENODEV; |
471 | } | 471 | } |
472 | 472 | ||
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c index c02b001ee4b5..56965bb3275c 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 | ||
@@ -260,13 +259,9 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream, | |||
260 | mutex_lock(&mcpdm->mutex); | 259 | mutex_lock(&mcpdm->mutex); |
261 | 260 | ||
262 | if (!dai->active) { | 261 | if (!dai->active) { |
263 | /* Enable watch dog for ES above ES 1.0 to avoid saturation */ | 262 | u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL); |
264 | if (omap_rev() != OMAP4430_REV_ES1_0) { | ||
265 | u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL); | ||
266 | 263 | ||
267 | omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, | 264 | omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, ctrl | MCPDM_WD_EN); |
268 | ctrl | MCPDM_WD_EN); | ||
269 | } | ||
270 | omap_mcpdm_open_streams(mcpdm); | 265 | omap_mcpdm_open_streams(mcpdm); |
271 | } | 266 | } |
272 | mutex_unlock(&mcpdm->mutex); | 267 | mutex_unlock(&mcpdm->mutex); |
diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c index 677b567935f8..1ff6bb9ade5c 100644 --- a/sound/soc/omap/zoom2.c +++ b/sound/soc/omap/zoom2.c | |||
@@ -21,15 +21,14 @@ | |||
21 | 21 | ||
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/gpio.h> | ||
24 | #include <sound/core.h> | 25 | #include <sound/core.h> |
25 | #include <sound/pcm.h> | 26 | #include <sound/pcm.h> |
26 | #include <sound/soc.h> | 27 | #include <sound/soc.h> |
27 | 28 | ||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <mach/hardware.h> | ||
30 | #include <mach/gpio.h> | ||
31 | #include <mach/board-zoom.h> | ||
32 | #include <linux/platform_data/asoc-ti-mcbsp.h> | 30 | #include <linux/platform_data/asoc-ti-mcbsp.h> |
31 | #include <linux/platform_data/gpio-omap.h> | ||
33 | 32 | ||
34 | /* Register descriptions for twl4030 codec part */ | 33 | /* Register descriptions for twl4030 codec part */ |
35 | #include <linux/mfd/twl4030-audio.h> | 34 | #include <linux/mfd/twl4030-audio.h> |