aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/Kconfig8
-rw-r--r--sound/soc/omap/Makefile1
-rw-r--r--sound/soc/omap/omap2evm.c139
3 files changed, 0 insertions, 148 deletions
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index b5922984eac..99054cf1f68 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -65,14 +65,6 @@ config SND_OMAP_SOC_OVERO
65 Say Y if you want to add support for SoC audio on the 65 Say Y if you want to add support for SoC audio on the
66 Gumstix Overo or CompuLab CM-T35 66 Gumstix Overo or CompuLab CM-T35
67 67
68config SND_OMAP_SOC_OMAP2EVM
69 tristate "SoC Audio support for OMAP2EVM board"
70 depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP2EVM
71 select SND_OMAP_SOC_MCBSP
72 select SND_SOC_TWL4030
73 help
74 Say Y if you want to add support for SoC audio on the omap2evm board.
75
76config SND_OMAP_SOC_OMAP3EVM 68config SND_OMAP_SOC_OMAP3EVM
77 tristate "SoC Audio support for OMAP3EVM board" 69 tristate "SoC Audio support for OMAP3EVM board"
78 depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3EVM 70 depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3EVM
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index ba9fc650db2..6c2c87eed5b 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -13,7 +13,6 @@ snd-soc-rx51-objs := rx51.o
13snd-soc-ams-delta-objs := ams-delta.o 13snd-soc-ams-delta-objs := ams-delta.o
14snd-soc-osk5912-objs := osk5912.o 14snd-soc-osk5912-objs := osk5912.o
15snd-soc-overo-objs := overo.o 15snd-soc-overo-objs := overo.o
16snd-soc-omap2evm-objs := omap2evm.o
17snd-soc-omap3evm-objs := omap3evm.o 16snd-soc-omap3evm-objs := omap3evm.o
18snd-soc-am3517evm-objs := am3517evm.o 17snd-soc-am3517evm-objs := am3517evm.o
19snd-soc-sdp3430-objs := sdp3430.o 18snd-soc-sdp3430-objs := sdp3430.o
diff --git a/sound/soc/omap/omap2evm.c b/sound/soc/omap/omap2evm.c
deleted file mode 100644
index 29b60d6796e..00000000000
--- a/sound/soc/omap/omap2evm.c
+++ /dev/null
@@ -1,139 +0,0 @@
1/*
2 * omap2evm.c -- SoC audio machine driver for omap2evm board
3 *
4 * Author: Arun KS <arunks@mistralsolutions.com>
5 *
6 * Based on sound/soc/omap/overo.c by Steve Sakoman
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23
24#include <linux/clk.h>
25#include <linux/platform_device.h>
26#include <sound/core.h>
27#include <sound/pcm.h>
28#include <sound/soc.h>
29
30#include <asm/mach-types.h>
31#include <mach/hardware.h>
32#include <mach/gpio.h>
33#include <plat/mcbsp.h>
34
35#include "omap-mcbsp.h"
36#include "omap-pcm.h"
37
38static int omap2evm_hw_params(struct snd_pcm_substream *substream,
39 struct snd_pcm_hw_params *params)
40{
41 struct snd_soc_pcm_runtime *rtd = substream->private_data;
42 struct snd_soc_dai *codec_dai = rtd->codec_dai;
43 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
44 int ret;
45
46 /* Set codec DAI configuration */
47 ret = snd_soc_dai_set_fmt(codec_dai,
48 SND_SOC_DAIFMT_I2S |
49 SND_SOC_DAIFMT_NB_NF |
50 SND_SOC_DAIFMT_CBM_CFM);
51 if (ret < 0) {
52 printk(KERN_ERR "can't set codec DAI configuration\n");
53 return ret;
54 }
55
56 /* Set cpu DAI configuration */
57 ret = snd_soc_dai_set_fmt(cpu_dai,
58 SND_SOC_DAIFMT_I2S |
59 SND_SOC_DAIFMT_NB_NF |
60 SND_SOC_DAIFMT_CBM_CFM);
61 if (ret < 0) {
62 printk(KERN_ERR "can't set cpu DAI configuration\n");
63 return ret;
64 }
65
66 /* Set the codec system clock for DAC and ADC */
67 ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
68 SND_SOC_CLOCK_IN);
69 if (ret < 0) {
70 printk(KERN_ERR "can't set codec system clock\n");
71 return ret;
72 }
73
74 return 0;
75}
76
77static struct snd_soc_ops omap2evm_ops = {
78 .hw_params = omap2evm_hw_params,
79};
80
81/* Digital audio interface glue - connects codec <--> CPU */
82static struct snd_soc_dai_link omap2evm_dai = {
83 .name = "TWL4030",
84 .stream_name = "TWL4030",
85 .cpu_dai_name = "omap-mcbsp-dai.1",
86 .codec_dai_name = "twl4030-hifi",
87 .platform_name = "omap-pcm-audio",
88 .codec_name = "twl4030-codec",
89 .ops = &omap2evm_ops,
90};
91
92/* Audio machine driver */
93static struct snd_soc_card snd_soc_omap2evm = {
94 .name = "omap2evm",
95 .dai_link = &omap2evm_dai,
96 .num_links = 1,
97};
98
99static struct platform_device *omap2evm_snd_device;
100
101static int __init omap2evm_soc_init(void)
102{
103 int ret;
104
105 if (!machine_is_omap2evm())
106 return -ENODEV;
107 printk(KERN_INFO "omap2evm SoC init\n");
108
109 omap2evm_snd_device = platform_device_alloc("soc-audio", -1);
110 if (!omap2evm_snd_device) {
111 printk(KERN_ERR "Platform device allocation failed\n");
112 return -ENOMEM;
113 }
114
115 platform_set_drvdata(omap2evm_snd_device, &snd_soc_omap2evm);
116
117 ret = platform_device_add(omap2evm_snd_device);
118 if (ret)
119 goto err1;
120
121 return 0;
122
123err1:
124 printk(KERN_ERR "Unable to add platform device\n");
125 platform_device_put(omap2evm_snd_device);
126
127 return ret;
128}
129module_init(omap2evm_soc_init);
130
131static void __exit omap2evm_soc_exit(void)
132{
133 platform_device_unregister(omap2evm_snd_device);
134}
135module_exit(omap2evm_soc_exit);
136
137MODULE_AUTHOR("Arun KS <arunks@mistralsolutions.com>");
138MODULE_DESCRIPTION("ALSA SoC omap2evm");
139MODULE_LICENSE("GPL");