aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/igep0020.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/igep0020.c')
-rw-r--r--sound/soc/omap/igep0020.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/sound/soc/omap/igep0020.c b/sound/soc/omap/igep0020.c
index 3583c429f9be..fd3a40f309c8 100644
--- a/sound/soc/omap/igep0020.c
+++ b/sound/soc/omap/igep0020.c
@@ -33,14 +33,13 @@
33 33
34#include "omap-mcbsp.h" 34#include "omap-mcbsp.h"
35#include "omap-pcm.h" 35#include "omap-pcm.h"
36#include "../codecs/twl4030.h"
37 36
38static int igep2_hw_params(struct snd_pcm_substream *substream, 37static int igep2_hw_params(struct snd_pcm_substream *substream,
39 struct snd_pcm_hw_params *params) 38 struct snd_pcm_hw_params *params)
40{ 39{
41 struct snd_soc_pcm_runtime *rtd = substream->private_data; 40 struct snd_soc_pcm_runtime *rtd = substream->private_data;
42 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 41 struct snd_soc_dai *codec_dai = rtd->codec_dai;
43 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 42 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
44 int ret; 43 int ret;
45 44
46 /* Set codec DAI configuration */ 45 /* Set codec DAI configuration */
@@ -82,35 +81,28 @@ static struct snd_soc_ops igep2_ops = {
82static struct snd_soc_dai_link igep2_dai = { 81static struct snd_soc_dai_link igep2_dai = {
83 .name = "TWL4030", 82 .name = "TWL4030",
84 .stream_name = "TWL4030", 83 .stream_name = "TWL4030",
85 .cpu_dai = &omap_mcbsp_dai[0], 84 .cpu_dai_name = "omap-mcbsp-dai.1",
86 .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI], 85 .codec_dai_name = "twl4030-hifi",
86 .platform_name = "omap-pcm-audio",
87 .codec_name = "twl4030-codec",
87 .ops = &igep2_ops, 88 .ops = &igep2_ops,
88}; 89};
89 90
90/* Audio machine driver */ 91/* Audio machine driver */
91static struct snd_soc_card snd_soc_card_igep2 = { 92static struct snd_soc_card snd_soc_card_igep2 = {
92 .name = "igep2", 93 .name = "igep2",
93 .platform = &omap_soc_platform,
94 .dai_link = &igep2_dai, 94 .dai_link = &igep2_dai,
95 .num_links = 1, 95 .num_links = 1,
96}; 96};
97 97
98/* Audio subsystem */
99static struct snd_soc_device igep2_snd_devdata = {
100 .card = &snd_soc_card_igep2,
101 .codec_dev = &soc_codec_dev_twl4030,
102};
103
104static struct platform_device *igep2_snd_device; 98static struct platform_device *igep2_snd_device;
105 99
106static int __init igep2_soc_init(void) 100static int __init igep2_soc_init(void)
107{ 101{
108 int ret; 102 int ret;
109 103
110 if (!machine_is_igep0020()) { 104 if (!machine_is_igep0020())
111 pr_debug("Not IGEP v2!\n");
112 return -ENODEV; 105 return -ENODEV;
113 }
114 printk(KERN_INFO "IGEP v2 SoC init\n"); 106 printk(KERN_INFO "IGEP v2 SoC init\n");
115 107
116 igep2_snd_device = platform_device_alloc("soc-audio", -1); 108 igep2_snd_device = platform_device_alloc("soc-audio", -1);
@@ -119,9 +111,7 @@ static int __init igep2_soc_init(void)
119 return -ENOMEM; 111 return -ENOMEM;
120 } 112 }
121 113
122 platform_set_drvdata(igep2_snd_device, &igep2_snd_devdata); 114 platform_set_drvdata(igep2_snd_device, &snd_soc_card_igep2);
123 igep2_snd_devdata.dev = &igep2_snd_device->dev;
124 *(unsigned int *)igep2_dai.cpu_dai->private_data = 1; /* McBSP2 */
125 115
126 ret = platform_device_add(igep2_snd_device); 116 ret = platform_device_add(igep2_snd_device);
127 if (ret) 117 if (ret)