aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/zylonite.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/pxa/zylonite.c')
-rw-r--r--sound/soc/pxa/zylonite.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c
index dd678ae24398..d27e05af7759 100644
--- a/sound/soc/pxa/zylonite.c
+++ b/sound/soc/pxa/zylonite.c
@@ -23,7 +23,6 @@
23#include <sound/soc-dapm.h> 23#include <sound/soc-dapm.h>
24 24
25#include "../codecs/wm9713.h" 25#include "../codecs/wm9713.h"
26#include "pxa2xx-pcm.h"
27#include "pxa2xx-ac97.h" 26#include "pxa2xx-ac97.h"
28#include "pxa-ssp.h" 27#include "pxa-ssp.h"
29 28
@@ -71,10 +70,12 @@ static const struct snd_soc_dapm_route audio_map[] = {
71 { "Multiactor", NULL, "SPKR" }, 70 { "Multiactor", NULL, "SPKR" },
72}; 71};
73 72
74static int zylonite_wm9713_init(struct snd_soc_codec *codec) 73static int zylonite_wm9713_init(struct snd_soc_pcm_runtime *rtd)
75{ 74{
75 struct snd_soc_codec *codec = rtd->codec;
76
76 if (clk_pout) 77 if (clk_pout)
77 snd_soc_dai_set_pll(&codec->dai[0], 0, 0, 78 snd_soc_dai_set_pll(rtd->codec_dai, 0, 0,
78 clk_get_rate(pout), 0); 79 clk_get_rate(pout), 0);
79 80
80 snd_soc_dapm_new_controls(codec, zylonite_dapm_widgets, 81 snd_soc_dapm_new_controls(codec, zylonite_dapm_widgets,
@@ -94,8 +95,8 @@ static int zylonite_voice_hw_params(struct snd_pcm_substream *substream,
94 struct snd_pcm_hw_params *params) 95 struct snd_pcm_hw_params *params)
95{ 96{
96 struct snd_soc_pcm_runtime *rtd = substream->private_data; 97 struct snd_soc_pcm_runtime *rtd = substream->private_data;
97 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 98 struct snd_soc_dai *codec_dai = rtd->codec_dai;
98 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 99 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
99 unsigned int pll_out = 0; 100 unsigned int pll_out = 0;
100 unsigned int wm9713_div = 0; 101 unsigned int wm9713_div = 0;
101 int ret = 0; 102 int ret = 0;
@@ -163,21 +164,27 @@ static struct snd_soc_dai_link zylonite_dai[] = {
163{ 164{
164 .name = "AC97", 165 .name = "AC97",
165 .stream_name = "AC97 HiFi", 166 .stream_name = "AC97 HiFi",
166 .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_HIFI], 167 .codec_name = "wm9713-codec",
167 .codec_dai = &wm9713_dai[WM9713_DAI_AC97_HIFI], 168 .platform_name = "pxa-pcm-audio",
169 .cpu_dai_name = "pxa-ac97.0",
170 .codec_name = "wm9713-hifi",
168 .init = zylonite_wm9713_init, 171 .init = zylonite_wm9713_init,
169}, 172},
170{ 173{
171 .name = "AC97 Aux", 174 .name = "AC97 Aux",
172 .stream_name = "AC97 Aux", 175 .stream_name = "AC97 Aux",
173 .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_AUX], 176 .codec_name = "wm9713-codec",
174 .codec_dai = &wm9713_dai[WM9713_DAI_AC97_AUX], 177 .platform_name = "pxa-pcm-audio",
178 .cpu_dai_name = "pxa-ac97.1",
179 .codec_name = "wm9713-aux",
175}, 180},
176{ 181{
177 .name = "WM9713 Voice", 182 .name = "WM9713 Voice",
178 .stream_name = "WM9713 Voice", 183 .stream_name = "WM9713 Voice",
179 .cpu_dai = &pxa_ssp_dai[PXA_DAI_SSP3], 184 .codec_name = "wm9713-codec",
180 .codec_dai = &wm9713_dai[WM9713_DAI_PCM_VOICE], 185 .platform_name = "pxa-pcm-audio",
186 .cpu_dai_name = "pxa-ssp-dai.2",
187 .codec_name = "wm9713-voice",
181 .ops = &zylonite_voice_ops, 188 .ops = &zylonite_voice_ops,
182}, 189},
183}; 190};
@@ -248,14 +255,9 @@ static struct snd_soc_card zylonite = {
248 .remove = &zylonite_remove, 255 .remove = &zylonite_remove,
249 .suspend_post = &zylonite_suspend_post, 256 .suspend_post = &zylonite_suspend_post,
250 .resume_pre = &zylonite_resume_pre, 257 .resume_pre = &zylonite_resume_pre,
251 .platform = &pxa2xx_soc_platform,
252 .dai_link = zylonite_dai, 258 .dai_link = zylonite_dai,
253 .num_links = ARRAY_SIZE(zylonite_dai), 259 .num_links = ARRAY_SIZE(zylonite_dai),
254}; 260 .owner = THIS_MODULE,
255
256static struct snd_soc_device zylonite_snd_ac97_devdata = {
257 .card = &zylonite,
258 .codec_dev = &soc_codec_dev_wm9713,
259}; 261};
260 262
261static struct platform_device *zylonite_snd_ac97_device; 263static struct platform_device *zylonite_snd_ac97_device;
@@ -268,9 +270,7 @@ static int __init zylonite_init(void)
268 if (!zylonite_snd_ac97_device) 270 if (!zylonite_snd_ac97_device)
269 return -ENOMEM; 271 return -ENOMEM;
270 272
271 platform_set_drvdata(zylonite_snd_ac97_device, 273 platform_set_drvdata(zylonite_snd_ac97_device, &zylonite);
272 &zylonite_snd_ac97_devdata);
273 zylonite_snd_ac97_devdata.dev = &zylonite_snd_ac97_device->dev;
274 274
275 ret = platform_device_add(zylonite_snd_ac97_device); 275 ret = platform_device_add(zylonite_snd_ac97_device);
276 if (ret != 0) 276 if (ret != 0)