aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung
diff options
context:
space:
mode:
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 c3014e821570..a08237acc53b 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -40,6 +40,7 @@ config SND_SOC_SAMSUNG_NEO1973_WM8753
40 select SND_S3C24XX_I2S 40 select SND_S3C24XX_I2S
41 select SND_SOC_WM8753 41 select SND_SOC_WM8753
42 select SND_SOC_LM4857 if MACH_NEO1973_GTA01 42 select SND_SOC_LM4857 if MACH_NEO1973_GTA01
43 select SND_SOC_DFBMCS320
43 help 44 help
44 Say Y here to enable audio support for the Openmoko Neo1973 45 Say Y here to enable audio support for the Openmoko Neo1973
45 Smartphones. 46 Smartphones.
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
index 37cfbb8ca39f..78bfdb3f5d7e 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)
418static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm) { return 0; }; 418static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm) { return 0; };
419#endif 419#endif
420 420
421/*
422 * BT Codec DAI
423 */
424static struct snd_soc_dai_driver bt_dai = {
425 .name = "bluetooth-dai",
426 .playback = {
427 .channels_min = 1,
428 .channels_max = 1,
429 .rates = SNDRV_PCM_RATE_8000,
430 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
431 .capture = {
432 .channels_min = 1,
433 .channels_max = 1,
434 .rates = SNDRV_PCM_RATE_8000,
435 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
436};
437
438static struct snd_soc_dai_link neo1973_dai[] = { 421static struct snd_soc_dai_link neo1973_dai[] = {
439{ /* Hifi Playback - for similatious use with voice below */ 422{ /* Hifi Playback - for similatious use with voice below */
440 .name = "WM8753", 423 .name = "WM8753",
@@ -450,7 +433,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
450 .name = "Bluetooth", 433 .name = "Bluetooth",
451 .stream_name = "Voice", 434 .stream_name = "Voice",
452 .platform_name = "samsung-audio", 435 .platform_name = "samsung-audio",
453 .cpu_dai_name = "bluetooth-dai", 436 .cpu_dai_name = "dfbmcs320-pcm",
454 .codec_dai_name = "wm8753-voice", 437 .codec_dai_name = "wm8753-voice",
455 .codec_name = "wm8753-codec.0-001a", 438 .codec_name = "wm8753-codec.0-001a",
456 .ops = &neo1973_voice_ops, 439 .ops = &neo1973_voice_ops,
@@ -459,6 +442,10 @@ static struct snd_soc_dai_link neo1973_dai[] = {
459 442
460static struct snd_soc_aux_dev neo1973_aux_devs[] = { 443static struct snd_soc_aux_dev neo1973_aux_devs[] = {
461 { 444 {
445 .name = "dfbmcs320",
446 .codec_name = "dfbmcs320.0",
447 },
448 {
462 .name = "lm4857", 449 .name = "lm4857",
463 .codec_name = "lm4857.0-007c", 450 .codec_name = "lm4857.0-007c",
464 .init = neo1973_lm4857_init, 451 .init = neo1973_lm4857_init,
@@ -502,7 +489,7 @@ static int __init neo1973_init(void)
502 489
503 if (machine_is_neo1973_gta02()) { 490 if (machine_is_neo1973_gta02()) {
504 neo1973.name = "neo1973gta02"; 491 neo1973.name = "neo1973gta02";
505 neo1973.num_aux_devs = 0; 492 neo1973.num_aux_devs = 1;
506 493
507 ret = gpio_request_array(neo1973_gta02_gpios, 494 ret = gpio_request_array(neo1973_gta02_gpios,
508 ARRAY_SIZE(neo1973_gta02_gpios)); 495 ARRAY_SIZE(neo1973_gta02_gpios));
@@ -516,21 +503,14 @@ static int __init neo1973_init(void)
516 goto err_gpio_free; 503 goto err_gpio_free;
517 } 504 }
518 505
519 /* register bluetooth DAI here */
520 ret = snd_soc_register_dai(&neo1973_snd_device->dev, &bt_dai);
521 if (ret)
522 goto err_put_device;
523
524 platform_set_drvdata(neo1973_snd_device, &neo1973); 506 platform_set_drvdata(neo1973_snd_device, &neo1973);
525 ret = platform_device_add(neo1973_snd_device); 507 ret = platform_device_add(neo1973_snd_device);
526 508
527 if (ret) 509 if (ret)
528 goto err_unregister_dai; 510 goto err_put_device;
529 511
530 return 0; 512 return 0;
531 513
532err_unregister_dai:
533 snd_soc_unregister_dai(&neo1973_snd_device->dev);
534err_put_device: 514err_put_device:
535 platform_device_put(neo1973_snd_device); 515 platform_device_put(neo1973_snd_device);
536err_gpio_free: 516err_gpio_free:
@@ -544,7 +524,6 @@ module_init(neo1973_init);
544 524
545static void __exit neo1973_exit(void) 525static void __exit neo1973_exit(void)
546{ 526{
547 snd_soc_unregister_dai(&neo1973_snd_device->dev);
548 platform_device_unregister(neo1973_snd_device); 527 platform_device_unregister(neo1973_snd_device);
549 528
550 if (machine_is_neo1973_gta02()) { 529 if (machine_is_neo1973_gta02()) {