diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 20 | ||||
-rw-r--r-- | sound/soc/sh/Kconfig | 7 | ||||
-rw-r--r-- | sound/soc/sh/Makefile | 2 | ||||
-rw-r--r-- | sound/soc/sh/fsi-hdmi.c | 118 |
5 files changed, 38 insertions, 129 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index b39751244daa..8302265977a8 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -909,8 +909,26 @@ static struct platform_device lcdc1_device = { | |||
909 | }, | 909 | }, |
910 | }; | 910 | }; |
911 | 911 | ||
912 | static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = { | ||
913 | .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM, | ||
914 | }; | ||
915 | |||
916 | static struct asoc_simple_card_info fsi2_hdmi_info = { | ||
917 | .name = "HDMI", | ||
918 | .card = "FSI2B-HDMI", | ||
919 | .cpu_dai = "fsib-dai", | ||
920 | .codec = "sh-mobile-hdmi", | ||
921 | .platform = "sh_fsi2", | ||
922 | .codec_dai = "sh_mobile_hdmi-hifi", | ||
923 | .init = &fsi2_hdmi_init_info, | ||
924 | }; | ||
925 | |||
912 | static struct platform_device fsi_hdmi_device = { | 926 | static struct platform_device fsi_hdmi_device = { |
913 | .name = "sh_fsi2_b_hdmi", | 927 | .name = "asoc-simple-card", |
928 | .id = 1, | ||
929 | .dev = { | ||
930 | .platform_data = &fsi2_hdmi_info, | ||
931 | }, | ||
914 | }; | 932 | }; |
915 | 933 | ||
916 | static struct gpio_led ap4evb_leds[] = { | 934 | static struct gpio_led ap4evb_leds[] = { |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 4a461384d27c..1bf1b2b8f8e9 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -503,8 +503,26 @@ static struct platform_device hdmi_lcdc_device = { | |||
503 | }, | 503 | }, |
504 | }; | 504 | }; |
505 | 505 | ||
506 | static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = { | ||
507 | .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM, | ||
508 | }; | ||
509 | |||
510 | static struct asoc_simple_card_info fsi2_hdmi_info = { | ||
511 | .name = "HDMI", | ||
512 | .card = "FSI2B-HDMI", | ||
513 | .cpu_dai = "fsib-dai", | ||
514 | .codec = "sh-mobile-hdmi", | ||
515 | .platform = "sh_fsi2", | ||
516 | .codec_dai = "sh_mobile_hdmi-hifi", | ||
517 | .init = &fsi2_hdmi_init_info, | ||
518 | }; | ||
519 | |||
506 | static struct platform_device fsi_hdmi_device = { | 520 | static struct platform_device fsi_hdmi_device = { |
507 | .name = "sh_fsi2_b_hdmi", | 521 | .name = "asoc-simple-card", |
522 | .id = 1, | ||
523 | .dev = { | ||
524 | .platform_data = &fsi2_hdmi_info, | ||
525 | }, | ||
508 | }; | 526 | }; |
509 | 527 | ||
510 | static void __init hdmi_init_pm_clock(void) | 528 | static void __init hdmi_init_pm_clock(void) |
diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig index c68b90b29959..9ef49c89a001 100644 --- a/sound/soc/sh/Kconfig +++ b/sound/soc/sh/Kconfig | |||
@@ -54,13 +54,6 @@ config SND_FSI_DA7210 | |||
54 | This option enables generic sound support for the | 54 | This option enables generic sound support for the |
55 | FSI - DA7210 unit | 55 | FSI - DA7210 unit |
56 | 56 | ||
57 | config SND_FSI_HDMI | ||
58 | tristate "FSI-HDMI sound support" | ||
59 | depends on SND_SOC_SH4_FSI && FB_SH_MOBILE_HDMI | ||
60 | help | ||
61 | This option enables generic sound support for the | ||
62 | FSI - HDMI unit | ||
63 | |||
64 | config SND_SIU_MIGOR | 57 | config SND_SIU_MIGOR |
65 | tristate "SIU sound support on Migo-R" | 58 | tristate "SIU sound support on Migo-R" |
66 | depends on SH_MIGOR | 59 | depends on SH_MIGOR |
diff --git a/sound/soc/sh/Makefile b/sound/soc/sh/Makefile index 01808cd0e6f6..f37fc3a22590 100644 --- a/sound/soc/sh/Makefile +++ b/sound/soc/sh/Makefile | |||
@@ -15,10 +15,8 @@ obj-$(CONFIG_SND_SOC_SH4_SIU) += snd-soc-siu.o | |||
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 | 17 | snd-soc-fsi-da7210-objs := fsi-da7210.o |
18 | snd-soc-fsi-hdmi-objs := fsi-hdmi.o | ||
19 | snd-soc-migor-objs := migor.o | 18 | snd-soc-migor-objs := migor.o |
20 | 19 | ||
21 | obj-$(CONFIG_SND_SH7760_AC97) += snd-soc-sh7760-ac97.o | 20 | obj-$(CONFIG_SND_SH7760_AC97) += snd-soc-sh7760-ac97.o |
22 | obj-$(CONFIG_SND_FSI_DA7210) += snd-soc-fsi-da7210.o | 21 | obj-$(CONFIG_SND_FSI_DA7210) += snd-soc-fsi-da7210.o |
23 | obj-$(CONFIG_SND_FSI_HDMI) += snd-soc-fsi-hdmi.o | ||
24 | obj-$(CONFIG_SND_SIU_MIGOR) += snd-soc-migor.o | 22 | obj-$(CONFIG_SND_SIU_MIGOR) += snd-soc-migor.o |
diff --git a/sound/soc/sh/fsi-hdmi.c b/sound/soc/sh/fsi-hdmi.c deleted file mode 100644 index 6e41908323e8..000000000000 --- a/sound/soc/sh/fsi-hdmi.c +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | /* | ||
2 | * FSI - HDMI sound support | ||
3 | * | ||
4 | * Copyright (C) 2010 Renesas Solutions Corp. | ||
5 | * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | ||
6 | * | ||
7 | * This file is subject to the terms and conditions of the GNU General Public | ||
8 | * License. See the file "COPYING" in the main directory of this archive | ||
9 | * for more details. | ||
10 | */ | ||
11 | |||
12 | #include <linux/platform_device.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <sound/sh_fsi.h> | ||
15 | |||
16 | struct fsi_hdmi_data { | ||
17 | const char *cpu_dai; | ||
18 | const char *card; | ||
19 | int id; | ||
20 | }; | ||
21 | |||
22 | static int fsi_hdmi_dai_init(struct snd_soc_pcm_runtime *rtd) | ||
23 | { | ||
24 | struct snd_soc_dai *cpu = rtd->cpu_dai; | ||
25 | int ret; | ||
26 | |||
27 | ret = snd_soc_dai_set_fmt(cpu, SND_SOC_DAIFMT_CBM_CFM); | ||
28 | |||
29 | return ret; | ||
30 | } | ||
31 | |||
32 | static struct snd_soc_dai_link fsi_dai_link = { | ||
33 | .name = "HDMI", | ||
34 | .stream_name = "HDMI", | ||
35 | .codec_dai_name = "sh_mobile_hdmi-hifi", | ||
36 | .platform_name = "sh_fsi2", | ||
37 | .codec_name = "sh-mobile-hdmi", | ||
38 | .init = fsi_hdmi_dai_init, | ||
39 | }; | ||
40 | |||
41 | static struct snd_soc_card fsi_soc_card = { | ||
42 | .owner = THIS_MODULE, | ||
43 | .dai_link = &fsi_dai_link, | ||
44 | .num_links = 1, | ||
45 | }; | ||
46 | |||
47 | static struct platform_device *fsi_snd_device; | ||
48 | |||
49 | static int fsi_hdmi_probe(struct platform_device *pdev) | ||
50 | { | ||
51 | int ret = -ENOMEM; | ||
52 | const struct platform_device_id *id_entry; | ||
53 | struct fsi_hdmi_data *pdata; | ||
54 | |||
55 | id_entry = pdev->id_entry; | ||
56 | if (!id_entry) { | ||
57 | dev_err(&pdev->dev, "unknown fsi hdmi\n"); | ||
58 | return -ENODEV; | ||
59 | } | ||
60 | |||
61 | pdata = (struct fsi_hdmi_data *)id_entry->driver_data; | ||
62 | |||
63 | fsi_snd_device = platform_device_alloc("soc-audio", pdata->id); | ||
64 | if (!fsi_snd_device) | ||
65 | goto out; | ||
66 | |||
67 | fsi_dai_link.cpu_dai_name = pdata->cpu_dai; | ||
68 | fsi_soc_card.name = pdata->card; | ||
69 | |||
70 | platform_set_drvdata(fsi_snd_device, &fsi_soc_card); | ||
71 | ret = platform_device_add(fsi_snd_device); | ||
72 | |||
73 | if (ret) | ||
74 | platform_device_put(fsi_snd_device); | ||
75 | |||
76 | out: | ||
77 | return ret; | ||
78 | } | ||
79 | |||
80 | static int fsi_hdmi_remove(struct platform_device *pdev) | ||
81 | { | ||
82 | platform_device_unregister(fsi_snd_device); | ||
83 | return 0; | ||
84 | } | ||
85 | |||
86 | static struct fsi_hdmi_data fsi2_a_hdmi = { | ||
87 | .cpu_dai = "fsia-dai", | ||
88 | .card = "FSI2A-HDMI", | ||
89 | .id = FSI_PORT_A, | ||
90 | }; | ||
91 | |||
92 | static struct fsi_hdmi_data fsi2_b_hdmi = { | ||
93 | .cpu_dai = "fsib-dai", | ||
94 | .card = "FSI2B-HDMI", | ||
95 | .id = FSI_PORT_B, | ||
96 | }; | ||
97 | |||
98 | static struct platform_device_id fsi_id_table[] = { | ||
99 | /* FSI 2 */ | ||
100 | { "sh_fsi2_a_hdmi", (kernel_ulong_t)&fsi2_a_hdmi }, | ||
101 | { "sh_fsi2_b_hdmi", (kernel_ulong_t)&fsi2_b_hdmi }, | ||
102 | {}, | ||
103 | }; | ||
104 | |||
105 | static struct platform_driver fsi_hdmi = { | ||
106 | .driver = { | ||
107 | .name = "fsi-hdmi-audio", | ||
108 | }, | ||
109 | .probe = fsi_hdmi_probe, | ||
110 | .remove = fsi_hdmi_remove, | ||
111 | .id_table = fsi_id_table, | ||
112 | }; | ||
113 | |||
114 | module_platform_driver(fsi_hdmi); | ||
115 | |||
116 | MODULE_LICENSE("GPL"); | ||
117 | MODULE_DESCRIPTION("Generic SH4 FSI-HDMI sound card"); | ||
118 | MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>"); | ||