aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2011-03-07 08:04:59 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-07 12:20:01 +0000
commita077ff9034897232ab4208f55880221390bd6877 (patch)
tree04ff533fc1bd53c69252efc811523f67e2fc9a39 /sound/soc/samsung
parentf5c4ffbd65892829f7ec503a89ea24eb0fc952dc (diff)
downloadkernel_samsung_aries-a077ff9034897232ab4208f55880221390bd6877.zip
kernel_samsung_aries-a077ff9034897232ab4208f55880221390bd6877.tar.gz
kernel_samsung_aries-a077ff9034897232ab4208f55880221390bd6877.tar.bz2
ASoC: Add driver for the dfbmcs320 bluetooth module
This patch adds a codec driver for the dfbmcs320 bluetooth module, which is used on the neo1973 boards. The patch also modifies the neo1937_wm8753 sound board driver to use the new driver instead of registering the bluetooth DAI manually. Previously there was a name mismatch between the bluetooth DAI and the bluetooth DAI link and the sound card was not instantiated, with this patch the issue is no longer present and sound support works again. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/samsung')
-rw-r--r--sound/soc/samsung/Kconfig1
-rw-r--r--sound/soc/samsung/neo1973_wm8753.c35
2 files changed, 8 insertions, 28 deletions
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index c3014e8..a08237a 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -40,6 +40,7 @@ config SND_SOC_SAMSUNG_NEO1973_WM8753
select SND_S3C24XX_I2S
select SND_SOC_WM8753
select SND_SOC_LM4857 if MACH_NEO1973_GTA01
+ select SND_SOC_DFBMCS320
help
Say Y here to enable audio support for the Openmoko Neo1973
Smartphones.
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
index 37cfbb8..78bfdb3 100644
--- a/sound/soc/samsung/neo1973_wm8753.c
+++ b/sound/soc/samsung/neo1973_wm8753.c
@@ -418,23 +418,6 @@ static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm)
static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm) { return 0; };
#endif
-/*
- * BT Codec DAI
- */
-static struct snd_soc_dai_driver bt_dai = {
- .name = "bluetooth-dai",
- .playback = {
- .channels_min = 1,
- .channels_max = 1,
- .rates = SNDRV_PCM_RATE_8000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,},
- .capture = {
- .channels_min = 1,
- .channels_max = 1,
- .rates = SNDRV_PCM_RATE_8000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,},
-};
-
static struct snd_soc_dai_link neo1973_dai[] = {
{ /* Hifi Playback - for similatious use with voice below */
.name = "WM8753",
@@ -450,7 +433,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
.name = "Bluetooth",
.stream_name = "Voice",
.platform_name = "samsung-audio",
- .cpu_dai_name = "bluetooth-dai",
+ .cpu_dai_name = "dfbmcs320-pcm",
.codec_dai_name = "wm8753-voice",
.codec_name = "wm8753-codec.0-001a",
.ops = &neo1973_voice_ops,
@@ -459,6 +442,10 @@ static struct snd_soc_dai_link neo1973_dai[] = {
static struct snd_soc_aux_dev neo1973_aux_devs[] = {
{
+ .name = "dfbmcs320",
+ .codec_name = "dfbmcs320.0",
+ },
+ {
.name = "lm4857",
.codec_name = "lm4857.0-007c",
.init = neo1973_lm4857_init,
@@ -502,7 +489,7 @@ static int __init neo1973_init(void)
if (machine_is_neo1973_gta02()) {
neo1973.name = "neo1973gta02";
- neo1973.num_aux_devs = 0;
+ neo1973.num_aux_devs = 1;
ret = gpio_request_array(neo1973_gta02_gpios,
ARRAY_SIZE(neo1973_gta02_gpios));
@@ -516,21 +503,14 @@ static int __init neo1973_init(void)
goto err_gpio_free;
}
- /* register bluetooth DAI here */
- ret = snd_soc_register_dai(&neo1973_snd_device->dev, &bt_dai);
- if (ret)
- goto err_put_device;
-
platform_set_drvdata(neo1973_snd_device, &neo1973);
ret = platform_device_add(neo1973_snd_device);
if (ret)
- goto err_unregister_dai;
+ goto err_put_device;
return 0;
-err_unregister_dai:
- snd_soc_unregister_dai(&neo1973_snd_device->dev);
err_put_device:
platform_device_put(neo1973_snd_device);
err_gpio_free:
@@ -544,7 +524,6 @@ module_init(neo1973_init);
static void __exit neo1973_exit(void)
{
- snd_soc_unregister_dai(&neo1973_snd_device->dev);
platform_device_unregister(neo1973_snd_device);
if (machine_is_neo1973_gta02()) {