aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx/jive_wm8750.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/s3c24xx/jive_wm8750.c')
-rw-r--r--sound/soc/s3c24xx/jive_wm8750.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/sound/soc/s3c24xx/jive_wm8750.c b/sound/soc/s3c24xx/jive_wm8750.c
index 8c108b121c10..49605cd83947 100644
--- a/sound/soc/s3c24xx/jive_wm8750.c
+++ b/sound/soc/s3c24xx/jive_wm8750.c
@@ -49,8 +49,8 @@ static int jive_hw_params(struct snd_pcm_substream *substream,
49 struct snd_pcm_hw_params *params) 49 struct snd_pcm_hw_params *params)
50{ 50{
51 struct snd_soc_pcm_runtime *rtd = substream->private_data; 51 struct snd_soc_pcm_runtime *rtd = substream->private_data;
52 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 52 struct snd_soc_dai *codec_dai = rtd->codec_dai;
53 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 53 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
54 struct s3c_i2sv2_rate_calc div; 54 struct s3c_i2sv2_rate_calc div;
55 unsigned int clk = 0; 55 unsigned int clk = 0;
56 int ret = 0; 56 int ret = 0;
@@ -108,8 +108,9 @@ static struct snd_soc_ops jive_ops = {
108 .hw_params = jive_hw_params, 108 .hw_params = jive_hw_params,
109}; 109};
110 110
111static int jive_wm8750_init(struct snd_soc_codec *codec) 111static int jive_wm8750_init(struct snd_soc_pcm_runtime *rtd)
112{ 112{
113 struct snd_soc_codec *codec = rtd->codec;
113 int err; 114 int err;
114 115
115 /* These endpoints are not being used. */ 116 /* These endpoints are not being used. */
@@ -138,8 +139,10 @@ static int jive_wm8750_init(struct snd_soc_codec *codec)
138static struct snd_soc_dai_link jive_dai = { 139static struct snd_soc_dai_link jive_dai = {
139 .name = "wm8750", 140 .name = "wm8750",
140 .stream_name = "WM8750", 141 .stream_name = "WM8750",
141 .cpu_dai = &s3c2412_i2s_dai, 142 .cpu_dai_name = "s3c2412-i2s",
142 .codec_dai = &wm8750_dai, 143 .codec_dai_name = "wm8750-hifi",
144 .platform_name = "s3c24xx-pcm-audio",
145 .codec_name = "wm8750-codec.0-0x1a",
143 .init = jive_wm8750_init, 146 .init = jive_wm8750_init,
144 .ops = &jive_ops, 147 .ops = &jive_ops,
145}; 148};
@@ -147,17 +150,10 @@ static struct snd_soc_dai_link jive_dai = {
147/* jive audio machine driver */ 150/* jive audio machine driver */
148static struct snd_soc_card snd_soc_machine_jive = { 151static struct snd_soc_card snd_soc_machine_jive = {
149 .name = "Jive", 152 .name = "Jive",
150 .platform = &s3c24xx_soc_platform,
151 .dai_link = &jive_dai, 153 .dai_link = &jive_dai,
152 .num_links = 1, 154 .num_links = 1,
153}; 155};
154 156
155/* jive audio subsystem */
156static struct snd_soc_device jive_snd_devdata = {
157 .card = &snd_soc_machine_jive,
158 .codec_dev = &soc_codec_dev_wm8750,
159};
160
161static struct platform_device *jive_snd_device; 157static struct platform_device *jive_snd_device;
162 158
163static int __init jive_init(void) 159static int __init jive_init(void)
@@ -173,8 +169,7 @@ static int __init jive_init(void)
173 if (!jive_snd_device) 169 if (!jive_snd_device)
174 return -ENOMEM; 170 return -ENOMEM;
175 171
176 platform_set_drvdata(jive_snd_device, &jive_snd_devdata); 172 platform_set_drvdata(jive_snd_device, &snd_soc_machine_jive);
177 jive_snd_devdata.dev = &jive_snd_device->dev;
178 ret = platform_device_add(jive_snd_device); 173 ret = platform_device_add(jive_snd_device);
179 174
180 if (ret) 175 if (ret)