aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-04-09 00:18:28 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-13 06:29:26 -0400
commitaf8a2fe12fae1b59178dc96e396e5665bcbea7da (patch)
treefd8d1e36ff014148a16a34c501806d464c5cc0e8 /sound/soc/sh
parentf2390880ec0264a0ed26b32c23bc23435b4297da (diff)
ASoC: sh: fsi: use simple-card instead of fsi-ak4642
This patch uses simple-card driver instead of fsi-ak4642 on each board. To select AK4642 driver, each boards select it on Kconfig. This patch removes fsi-ak4642 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>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/Kconfig8
-rw-r--r--sound/soc/sh/Makefile2
-rw-r--r--sound/soc/sh/fsi-ak4642.c108
3 files changed, 0 insertions, 118 deletions
diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig
index d8e06a607a22..c68b90b29959 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
49config SND_FSI_AK4642
50 tristate "FSI-AK4642 sound support"
51 depends on SND_SOC_SH4_FSI && I2C
52 select SND_SOC_AK4642
53 help
54 This option enables generic sound support for the
55 FSI - AK4642 unit
56
57config SND_FSI_DA7210 49config SND_FSI_DA7210
58 tristate "FSI-DA7210 sound support" 50 tristate "FSI-DA7210 sound support"
59 depends on SND_SOC_SH4_FSI && I2C 51 depends on SND_SOC_SH4_FSI && I2C
diff --git a/sound/soc/sh/Makefile b/sound/soc/sh/Makefile
index 94476d4c0fd5..01808cd0e6f6 100644
--- a/sound/soc/sh/Makefile
+++ b/sound/soc/sh/Makefile
@@ -14,13 +14,11 @@ obj-$(CONFIG_SND_SOC_SH4_SIU) += snd-soc-siu.o
14 14
15## boards 15## boards
16snd-soc-sh7760-ac97-objs := sh7760-ac97.o 16snd-soc-sh7760-ac97-objs := sh7760-ac97.o
17snd-soc-fsi-ak4642-objs := fsi-ak4642.o
18snd-soc-fsi-da7210-objs := fsi-da7210.o 17snd-soc-fsi-da7210-objs := fsi-da7210.o
19snd-soc-fsi-hdmi-objs := fsi-hdmi.o 18snd-soc-fsi-hdmi-objs := fsi-hdmi.o
20snd-soc-migor-objs := migor.o 19snd-soc-migor-objs := migor.o
21 20
22obj-$(CONFIG_SND_SH7760_AC97) += snd-soc-sh7760-ac97.o 21obj-$(CONFIG_SND_SH7760_AC97) += snd-soc-sh7760-ac97.o
23obj-$(CONFIG_SND_FSI_AK4642) += snd-soc-fsi-ak4642.o
24obj-$(CONFIG_SND_FSI_DA7210) += snd-soc-fsi-da7210.o 22obj-$(CONFIG_SND_FSI_DA7210) += snd-soc-fsi-da7210.o
25obj-$(CONFIG_SND_FSI_HDMI) += snd-soc-fsi-hdmi.o 23obj-$(CONFIG_SND_FSI_HDMI) += snd-soc-fsi-hdmi.o
26obj-$(CONFIG_SND_SIU_MIGOR) += snd-soc-migor.o 24obj-$(CONFIG_SND_SIU_MIGOR) += snd-soc-migor.o
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c
deleted file mode 100644
index 97f540aabbdd..000000000000
--- a/sound/soc/sh/fsi-ak4642.c
+++ /dev/null
@@ -1,108 +0,0 @@
1/*
2 * FSI-AK464x sound support for ms7724se
3 *
4 * Copyright (C) 2009 Renesas Solutions Corp.
5 * Kuninori Morimoto <morimoto.kuninori@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_ak4642_data {
17 const char *name;
18 const char *card;
19 const char *cpu_dai;
20 const char *codec;
21 const char *platform;
22 int id;
23};
24
25static int fsi_ak4642_dai_init(struct snd_soc_pcm_runtime *rtd)
26{
27 struct snd_soc_dai *codec = rtd->codec_dai;
28 struct snd_soc_dai *cpu = rtd->cpu_dai;
29 int ret;
30
31 ret = snd_soc_dai_set_fmt(codec, SND_SOC_DAIFMT_LEFT_J |
32 SND_SOC_DAIFMT_CBM_CFM);
33 if (ret < 0)
34 return ret;
35
36 ret = snd_soc_dai_set_sysclk(codec, 0, 11289600, 0);
37 if (ret < 0)
38 return ret;
39
40 ret = snd_soc_dai_set_fmt(cpu, SND_SOC_DAIFMT_LEFT_J |
41 SND_SOC_DAIFMT_CBS_CFS);
42
43 return ret;
44}
45
46static struct snd_soc_dai_link fsi_dai_link = {
47 .codec_dai_name = "ak4642-hifi",
48 .init = fsi_ak4642_dai_init,
49};
50
51static struct snd_soc_card fsi_soc_card = {
52 .owner = THIS_MODULE,
53 .dai_link = &fsi_dai_link,
54 .num_links = 1,
55};
56
57static struct platform_device *fsi_snd_device;
58
59static int fsi_ak4642_probe(struct platform_device *pdev)
60{
61 int ret = -ENOMEM;
62 struct fsi_ak4642_info *pinfo = pdev->dev.platform_data;
63
64 if (!pinfo) {
65 dev_err(&pdev->dev, "no info for fsi ak4642\n");
66 goto out;
67 }
68
69 fsi_snd_device = platform_device_alloc("soc-audio", pinfo->id);
70 if (!fsi_snd_device)
71 goto out;
72
73 fsi_dai_link.name = pinfo->name;
74 fsi_dai_link.stream_name = pinfo->name;
75 fsi_dai_link.cpu_dai_name = pinfo->cpu_dai;
76 fsi_dai_link.platform_name = pinfo->platform;
77 fsi_dai_link.codec_name = pinfo->codec;
78 fsi_soc_card.name = pinfo->card;
79
80 platform_set_drvdata(fsi_snd_device, &fsi_soc_card);
81 ret = platform_device_add(fsi_snd_device);
82
83 if (ret)
84 platform_device_put(fsi_snd_device);
85
86out:
87 return ret;
88}
89
90static int fsi_ak4642_remove(struct platform_device *pdev)
91{
92 platform_device_unregister(fsi_snd_device);
93 return 0;
94}
95
96static struct platform_driver fsi_ak4642 = {
97 .driver = {
98 .name = "fsi-ak4642-audio",
99 },
100 .probe = fsi_ak4642_probe,
101 .remove = fsi_ak4642_remove,
102};
103
104module_platform_driver(fsi_ak4642);
105
106MODULE_LICENSE("GPL");
107MODULE_DESCRIPTION("Generic SH4 FSI-AK4642 sound card");
108MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>");