diff options
-rw-r--r-- | arch/sh/boards/Kconfig | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 26 | ||||
-rw-r--r-- | sound/soc/sh/Kconfig | 8 | ||||
-rw-r--r-- | sound/soc/sh/Makefile | 2 | ||||
-rw-r--r-- | sound/soc/sh/fsi-da7210.c | 81 |
5 files changed, 27 insertions, 91 deletions
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig index 0da49f3b0f4f..c0241bd584f4 100644 --- a/arch/sh/boards/Kconfig +++ b/arch/sh/boards/Kconfig | |||
@@ -224,6 +224,7 @@ config SH_ECOVEC | |||
224 | bool "EcoVec" | 224 | bool "EcoVec" |
225 | depends on CPU_SUBTYPE_SH7724 | 225 | depends on CPU_SUBTYPE_SH7724 |
226 | select ARCH_REQUIRE_GPIOLIB | 226 | select ARCH_REQUIRE_GPIOLIB |
227 | select SND_SOC_DA7210 if SND_SIMPLE_CARD | ||
227 | help | 228 | help |
228 | Renesas "R0P7724LC0011/21RL (EcoVec)" support. | 229 | Renesas "R0P7724LC0011/21RL (EcoVec)" support. |
229 | 230 | ||
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index d12fe9ddf3da..299a40a44c92 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/videodev2.h> | 32 | #include <linux/videodev2.h> |
33 | #include <video/sh_mobile_lcdc.h> | 33 | #include <video/sh_mobile_lcdc.h> |
34 | #include <sound/sh_fsi.h> | 34 | #include <sound/sh_fsi.h> |
35 | #include <sound/simple_card.h> | ||
35 | #include <media/sh_mobile_ceu.h> | 36 | #include <media/sh_mobile_ceu.h> |
36 | #include <media/soc_camera.h> | 37 | #include <media/soc_camera.h> |
37 | #include <media/tw9910.h> | 38 | #include <media/tw9910.h> |
@@ -809,6 +810,30 @@ static struct platform_device fsi_device = { | |||
809 | }, | 810 | }, |
810 | }; | 811 | }; |
811 | 812 | ||
813 | static struct asoc_simple_dai_init_info fsi_da7210_init_info = { | ||
814 | .fmt = SND_SOC_DAIFMT_I2S, | ||
815 | .codec_daifmt = SND_SOC_DAIFMT_CBM_CFM, | ||
816 | .cpu_daifmt = SND_SOC_DAIFMT_CBS_CFS, | ||
817 | }; | ||
818 | |||
819 | static struct asoc_simple_card_info fsi_da7210_info = { | ||
820 | .name = "DA7210", | ||
821 | .card = "FSIB-DA7210", | ||
822 | .cpu_dai = "fsib-dai", | ||
823 | .codec = "da7210.0-001a", | ||
824 | .platform = "sh_fsi.0", | ||
825 | .codec_dai = "da7210-hifi", | ||
826 | .init = &fsi_da7210_init_info, | ||
827 | }; | ||
828 | |||
829 | static struct platform_device fsi_da7210_device = { | ||
830 | .name = "asoc-simple-card", | ||
831 | .dev = { | ||
832 | .platform_data = &fsi_da7210_info, | ||
833 | }, | ||
834 | }; | ||
835 | |||
836 | |||
812 | /* IrDA */ | 837 | /* IrDA */ |
813 | static struct resource irda_resources[] = { | 838 | static struct resource irda_resources[] = { |
814 | [0] = { | 839 | [0] = { |
@@ -945,6 +970,7 @@ static struct platform_device *ecovec_devices[] __initdata = { | |||
945 | &camera_devices[1], | 970 | &camera_devices[1], |
946 | &camera_devices[2], | 971 | &camera_devices[2], |
947 | &fsi_device, | 972 | &fsi_device, |
973 | &fsi_da7210_device, | ||
948 | &irda_device, | 974 | &irda_device, |
949 | &vou_device, | 975 | &vou_device, |
950 | #if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE) | 976 | #if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE) |
diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig index 9ef49c89a001..c9fdf63e7156 100644 --- a/sound/soc/sh/Kconfig +++ b/sound/soc/sh/Kconfig | |||
@@ -46,14 +46,6 @@ config SND_SH7760_AC97 | |||
46 | This option enables generic sound support for the first | 46 | This option enables generic sound support for the first |
47 | AC97 unit of the SH7760. | 47 | AC97 unit of the SH7760. |
48 | 48 | ||
49 | config SND_FSI_DA7210 | ||
50 | tristate "FSI-DA7210 sound support" | ||
51 | depends on SND_SOC_SH4_FSI && I2C | ||
52 | select SND_SOC_DA7210 | ||
53 | help | ||
54 | This option enables generic sound support for the | ||
55 | FSI - DA7210 unit | ||
56 | |||
57 | config SND_SIU_MIGOR | 49 | config SND_SIU_MIGOR |
58 | tristate "SIU sound support on Migo-R" | 50 | tristate "SIU sound support on Migo-R" |
59 | depends on SH_MIGOR | 51 | depends on SH_MIGOR |
diff --git a/sound/soc/sh/Makefile b/sound/soc/sh/Makefile index f37fc3a22590..849b387d17d9 100644 --- a/sound/soc/sh/Makefile +++ b/sound/soc/sh/Makefile | |||
@@ -14,9 +14,7 @@ obj-$(CONFIG_SND_SOC_SH4_SIU) += snd-soc-siu.o | |||
14 | 14 | ||
15 | ## boards | 15 | ## boards |
16 | snd-soc-sh7760-ac97-objs := sh7760-ac97.o | 16 | snd-soc-sh7760-ac97-objs := sh7760-ac97.o |
17 | snd-soc-fsi-da7210-objs := fsi-da7210.o | ||
18 | snd-soc-migor-objs := migor.o | 17 | snd-soc-migor-objs := migor.o |
19 | 18 | ||
20 | obj-$(CONFIG_SND_SH7760_AC97) += snd-soc-sh7760-ac97.o | 19 | obj-$(CONFIG_SND_SH7760_AC97) += snd-soc-sh7760-ac97.o |
21 | obj-$(CONFIG_SND_FSI_DA7210) += snd-soc-fsi-da7210.o | ||
22 | obj-$(CONFIG_SND_SIU_MIGOR) += snd-soc-migor.o | 20 | obj-$(CONFIG_SND_SIU_MIGOR) += snd-soc-migor.o |
diff --git a/sound/soc/sh/fsi-da7210.c b/sound/soc/sh/fsi-da7210.c deleted file mode 100644 index 1dd3354c7411..000000000000 --- a/sound/soc/sh/fsi-da7210.c +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * fsi-da7210.c | ||
3 | * | ||
4 | * Copyright (C) 2009 Renesas Solutions Corp. | ||
5 | * Kuninori Morimoto <morimoto.kuninori@renesas.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <sound/sh_fsi.h> | ||
16 | |||
17 | static int fsi_da7210_init(struct snd_soc_pcm_runtime *rtd) | ||
18 | { | ||
19 | struct snd_soc_dai *codec = rtd->codec_dai; | ||
20 | struct snd_soc_dai *cpu = rtd->cpu_dai; | ||
21 | int ret; | ||
22 | |||
23 | ret = snd_soc_dai_set_fmt(codec, | ||
24 | SND_SOC_DAIFMT_I2S | | ||
25 | SND_SOC_DAIFMT_CBM_CFM); | ||
26 | if (ret < 0) | ||
27 | return ret; | ||
28 | |||
29 | ret = snd_soc_dai_set_fmt(cpu, SND_SOC_DAIFMT_I2S | | ||
30 | SND_SOC_DAIFMT_CBS_CFS); | ||
31 | |||
32 | return ret; | ||
33 | } | ||
34 | |||
35 | static struct snd_soc_dai_link fsi_da7210_dai = { | ||
36 | .name = "DA7210", | ||
37 | .stream_name = "DA7210", | ||
38 | .cpu_dai_name = "fsib-dai", /* FSI B */ | ||
39 | .codec_dai_name = "da7210-hifi", | ||
40 | .platform_name = "sh_fsi.0", | ||
41 | .codec_name = "da7210-codec.0-001a", | ||
42 | .init = fsi_da7210_init, | ||
43 | }; | ||
44 | |||
45 | static struct snd_soc_card fsi_soc_card = { | ||
46 | .name = "FSI-DA7210", | ||
47 | .owner = THIS_MODULE, | ||
48 | .dai_link = &fsi_da7210_dai, | ||
49 | .num_links = 1, | ||
50 | }; | ||
51 | |||
52 | static struct platform_device *fsi_da7210_snd_device; | ||
53 | |||
54 | static int __init fsi_da7210_sound_init(void) | ||
55 | { | ||
56 | int ret; | ||
57 | |||
58 | fsi_da7210_snd_device = platform_device_alloc("soc-audio", FSI_PORT_B); | ||
59 | if (!fsi_da7210_snd_device) | ||
60 | return -ENOMEM; | ||
61 | |||
62 | platform_set_drvdata(fsi_da7210_snd_device, &fsi_soc_card); | ||
63 | ret = platform_device_add(fsi_da7210_snd_device); | ||
64 | if (ret) | ||
65 | platform_device_put(fsi_da7210_snd_device); | ||
66 | |||
67 | return ret; | ||
68 | } | ||
69 | |||
70 | static void __exit fsi_da7210_sound_exit(void) | ||
71 | { | ||
72 | platform_device_unregister(fsi_da7210_snd_device); | ||
73 | } | ||
74 | |||
75 | module_init(fsi_da7210_sound_init); | ||
76 | module_exit(fsi_da7210_sound_exit); | ||
77 | |||
78 | /* Module information */ | ||
79 | MODULE_DESCRIPTION("ALSA SoC FSI DA2710"); | ||
80 | MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>"); | ||
81 | MODULE_LICENSE("GPL"); | ||