Commit 68d114e1 authored by Mark Brown's avatar Mark Brown

Merge branches 'asoc-twl6040' and 'asoc-omap' into for-3.7

parents 07ac2296 b764de2d
...@@ -444,16 +444,28 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = { ...@@ -444,16 +444,28 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
.lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */
}; };
static struct platform_device ams_delta_audio_device = {
.name = "ams-delta-audio",
.id = -1,
};
static struct platform_device cx20442_codec_device = {
.name = "cx20442-codec",
.id = -1,
};
static struct platform_device *ams_delta_devices[] __initdata = { static struct platform_device *ams_delta_devices[] __initdata = {
&latch1_gpio_device, &latch1_gpio_device,
&latch2_gpio_device, &latch2_gpio_device,
&ams_delta_kp_device, &ams_delta_kp_device,
&ams_delta_camera_device, &ams_delta_camera_device,
&ams_delta_audio_device,
}; };
static struct platform_device *late_devices[] __initdata = { static struct platform_device *late_devices[] __initdata = {
&ams_delta_nand_device, &ams_delta_nand_device,
&ams_delta_lcd_device, &ams_delta_lcd_device,
&cx20442_codec_device,
}; };
static void __init ams_delta_init(void) static void __init ams_delta_init(void)
......
...@@ -575,56 +575,53 @@ static struct snd_soc_card ams_delta_audio_card = { ...@@ -575,56 +575,53 @@ static struct snd_soc_card ams_delta_audio_card = {
}; };
/* Module init/exit */ /* Module init/exit */
static struct platform_device *ams_delta_audio_platform_device; static __devinit int ams_delta_probe(struct platform_device *pdev)
static struct platform_device *cx20442_platform_device;
static int __init ams_delta_module_init(void)
{ {
struct snd_soc_card *card = &ams_delta_audio_card;
int ret; int ret;
if (!(machine_is_ams_delta())) card->dev = &pdev->dev;
return -ENODEV;
ams_delta_audio_platform_device =
platform_device_alloc("soc-audio", -1);
if (!ams_delta_audio_platform_device)
return -ENOMEM;
platform_set_drvdata(ams_delta_audio_platform_device,
&ams_delta_audio_card);
ret = platform_device_add(ams_delta_audio_platform_device);
if (ret)
goto err;
/* ret = snd_soc_register_card(card);
* Codec platform device could be registered from elsewhere (board?), if (ret) {
* but I do it here as it makes sense only if used with the card. dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
*/ card->dev = NULL;
cx20442_platform_device =
platform_device_register_simple("cx20442-codec", -1, NULL, 0);
return 0;
err:
platform_device_put(ams_delta_audio_platform_device);
return ret; return ret;
}
return 0;
} }
late_initcall(ams_delta_module_init);
static void __exit ams_delta_module_exit(void) static int __devexit ams_delta_remove(struct platform_device *pdev)
{ {
struct snd_soc_card *card = platform_get_drvdata(pdev);
if (tty_unregister_ldisc(N_V253) != 0) if (tty_unregister_ldisc(N_V253) != 0)
dev_warn(&ams_delta_audio_platform_device->dev, dev_warn(&pdev->dev,
"failed to unregister V253 line discipline\n"); "failed to unregister V253 line discipline\n");
snd_soc_jack_free_gpios(&ams_delta_hook_switch, snd_soc_jack_free_gpios(&ams_delta_hook_switch,
ARRAY_SIZE(ams_delta_hook_switch_gpios), ARRAY_SIZE(ams_delta_hook_switch_gpios),
ams_delta_hook_switch_gpios); ams_delta_hook_switch_gpios);
platform_device_unregister(cx20442_platform_device); snd_soc_unregister_card(card);
platform_device_unregister(ams_delta_audio_platform_device); card->dev = NULL;
return 0;
} }
module_exit(ams_delta_module_exit);
#define DRV_NAME "ams-delta-audio"
static struct platform_driver ams_delta_driver = {
.driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,
},
.probe = ams_delta_probe,
.remove = __devexit_p(ams_delta_remove),
};
module_platform_driver(ams_delta_driver);
MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>"); MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>");
MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone"); MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" DRV_NAME);
...@@ -220,7 +220,7 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd) ...@@ -220,7 +220,7 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd)
twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk"); twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk");
twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk"); twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk");
twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out"); twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out");
twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vinrator"); twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vibrator");
twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic"); twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic");
twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic"); twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic");
twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic"); twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic");
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include <sound/pcm_params.h> #include <sound/pcm_params.h>
#include <sound/soc.h> #include <sound/soc.h>
#include <plat/omap_hwmod.h>
#include "omap-mcpdm.h" #include "omap-mcpdm.h"
#include "omap-pcm.h" #include "omap-pcm.h"
...@@ -258,13 +257,9 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream, ...@@ -258,13 +257,9 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream,
mutex_lock(&mcpdm->mutex); mutex_lock(&mcpdm->mutex);
if (!dai->active) { if (!dai->active) {
/* Enable watch dog for ES above ES 1.0 to avoid saturation */
if (omap_rev() != OMAP4430_REV_ES1_0) {
u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL); u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL);
omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, ctrl | MCPDM_WD_EN);
ctrl | MCPDM_WD_EN);
}
omap_mcpdm_open_streams(mcpdm); omap_mcpdm_open_streams(mcpdm);
} }
mutex_unlock(&mcpdm->mutex); mutex_unlock(&mcpdm->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment