aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-04-09 00:18:58 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-13 06:29:26 -0400
commitfa063b48046c1f30cb06898559bb34935ade74e1 (patch)
treed31f991aa32ef81353399cb7714b28de3203fa2c
parentaf8a2fe12fae1b59178dc96e396e5665bcbea7da (diff)
ASoC: sh: fsi: use simple-card instead of fsi-hdmi
This patch uses simple-card driver instead of fsi-hdmi on each board. This patch removes fsi-hdmi driver which is no longer needed Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c20
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c20
-rw-r--r--sound/soc/sh/Kconfig7
-rw-r--r--sound/soc/sh/Makefile2
-rw-r--r--sound/soc/sh/fsi-hdmi.c118
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 b39751244da..8302265977a 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
912static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
913 .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM,
914};
915
916static 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
912static struct platform_device fsi_hdmi_device = { 926static 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
916static struct gpio_led ap4evb_leds[] = { 934static struct gpio_led ap4evb_leds[] = {
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 4a461384d27..1bf1b2b8f8e 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
506static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
507 .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM,
508};
509
510static 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
506static struct platform_device fsi_hdmi_device = { 520static 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
510static void __init hdmi_init_pm_clock(void) 528static void __init hdmi_init_pm_clock(void)
diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig
index c68b90b2995..9ef49c89a00 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
57config 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
64config SND_SIU_MIGOR 57config 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 01808cd0e6f..f37fc3a2259 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
16snd-soc-sh7760-ac97-objs := sh7760-ac97.o 16snd-soc-sh7760-ac97-objs := sh7760-ac97.o
17snd-soc-fsi-da7210-objs := fsi-da7210.o 17snd-soc-fsi-da7210-objs := fsi-da7210.o
18snd-soc-fsi-hdmi-objs := fsi-hdmi.o
19snd-soc-migor-objs := migor.o 18snd-soc-migor-objs := migor.o
20 19
21obj-$(CONFIG_SND_SH7760_AC97) += snd-soc-sh7760-ac97.o 20obj-$(CONFIG_SND_SH7760_AC97) += snd-soc-sh7760-ac97.o
22obj-$(CONFIG_SND_FSI_DA7210) += snd-soc-fsi-da7210.o 21obj-$(CONFIG_SND_FSI_DA7210) += snd-soc-fsi-da7210.o
23obj-$(CONFIG_SND_FSI_HDMI) += snd-soc-fsi-hdmi.o
24obj-$(CONFIG_SND_SIU_MIGOR) += snd-soc-migor.o 22obj-$(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 6e41908323e..00000000000
--- 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
16struct fsi_hdmi_data {
17 const char *cpu_dai;
18 const char *card;
19 int id;
20};
21
22static 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
32static 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
41static struct snd_soc_card fsi_soc_card = {
42 .owner = THIS_MODULE,
43 .dai_link = &fsi_dai_link,
44 .num_links = 1,
45};
46
47static struct platform_device *fsi_snd_device;
48
49static 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
76out:
77 return ret;
78}
79
80static int fsi_hdmi_remove(struct platform_device *pdev)
81{
82 platform_device_unregister(fsi_snd_device);
83 return 0;
84}
85
86static struct fsi_hdmi_data fsi2_a_hdmi = {
87 .cpu_dai = "fsia-dai",
88 .card = "FSI2A-HDMI",
89 .id = FSI_PORT_A,
90};
91
92static struct fsi_hdmi_data fsi2_b_hdmi = {
93 .cpu_dai = "fsib-dai",
94 .card = "FSI2B-HDMI",
95 .id = FSI_PORT_B,
96};
97
98static 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
105static 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
114module_platform_driver(fsi_hdmi);
115
116MODULE_LICENSE("GPL");
117MODULE_DESCRIPTION("Generic SH4 FSI-HDMI sound card");
118MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");