diff options
Diffstat (limited to 'sound/soc/pxa/poodle.c')
-rw-r--r-- | sound/soc/pxa/poodle.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index c5f36e0eab58..af84ee9c5e11 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <mach/audio.h> | 31 | #include <mach/audio.h> |
32 | 32 | ||
33 | #include "../codecs/wm8731.h" | 33 | #include "../codecs/wm8731.h" |
34 | #include "pxa2xx-pcm.h" | ||
35 | #include "pxa2xx-i2s.h" | 34 | #include "pxa2xx-i2s.h" |
36 | 35 | ||
37 | #define POODLE_HP 1 | 36 | #define POODLE_HP 1 |
@@ -76,7 +75,7 @@ static void poodle_ext_control(struct snd_soc_codec *codec) | |||
76 | static int poodle_startup(struct snd_pcm_substream *substream) | 75 | static int poodle_startup(struct snd_pcm_substream *substream) |
77 | { | 76 | { |
78 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 77 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
79 | struct snd_soc_codec *codec = rtd->socdev->card->codec; | 78 | struct snd_soc_codec *codec = rtd->codec; |
80 | 79 | ||
81 | /* check the jack status at stream startup */ | 80 | /* check the jack status at stream startup */ |
82 | poodle_ext_control(codec); | 81 | poodle_ext_control(codec); |
@@ -97,8 +96,8 @@ static int poodle_hw_params(struct snd_pcm_substream *substream, | |||
97 | struct snd_pcm_hw_params *params) | 96 | struct snd_pcm_hw_params *params) |
98 | { | 97 | { |
99 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 98 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
100 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 99 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
101 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 100 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
102 | unsigned int clk = 0; | 101 | unsigned int clk = 0; |
103 | int ret = 0; | 102 | int ret = 0; |
104 | 103 | ||
@@ -129,7 +128,7 @@ static int poodle_hw_params(struct snd_pcm_substream *substream, | |||
129 | return ret; | 128 | return ret; |
130 | 129 | ||
131 | /* set the codec system clock for DAC and ADC */ | 130 | /* set the codec system clock for DAC and ADC */ |
132 | ret = snd_soc_dai_set_sysclk(codec_dai, WM8731_SYSCLK, clk, | 131 | ret = snd_soc_dai_set_sysclk(codec_dai, WM8731_SYSCLK_XTAL, clk, |
133 | SND_SOC_CLOCK_IN); | 132 | SND_SOC_CLOCK_IN); |
134 | if (ret < 0) | 133 | if (ret < 0) |
135 | return ret; | 134 | return ret; |
@@ -237,8 +236,9 @@ static const struct snd_kcontrol_new wm8731_poodle_controls[] = { | |||
237 | /* | 236 | /* |
238 | * Logic for a wm8731 as connected on a Sharp SL-C7x0 Device | 237 | * Logic for a wm8731 as connected on a Sharp SL-C7x0 Device |
239 | */ | 238 | */ |
240 | static int poodle_wm8731_init(struct snd_soc_codec *codec) | 239 | static int poodle_wm8731_init(struct snd_soc_pcm_runtime *rtd) |
241 | { | 240 | { |
241 | struct snd_soc_codec *codec = rtd->codec; | ||
242 | int err; | 242 | int err; |
243 | 243 | ||
244 | snd_soc_dapm_nc_pin(codec, "LLINEIN"); | 244 | snd_soc_dapm_nc_pin(codec, "LLINEIN"); |
@@ -266,8 +266,10 @@ static int poodle_wm8731_init(struct snd_soc_codec *codec) | |||
266 | static struct snd_soc_dai_link poodle_dai = { | 266 | static struct snd_soc_dai_link poodle_dai = { |
267 | .name = "WM8731", | 267 | .name = "WM8731", |
268 | .stream_name = "WM8731", | 268 | .stream_name = "WM8731", |
269 | .cpu_dai = &pxa_i2s_dai, | 269 | .cpu_dai_name = "pxa2xx-i2s", |
270 | .codec_dai = &wm8731_dai, | 270 | .codec_dai_name = "wm8731-hifi", |
271 | .platform_name = "pxa-pcm-audio", | ||
272 | .codec_name = "wm8731-codec.0-001a", | ||
271 | .init = poodle_wm8731_init, | 273 | .init = poodle_wm8731_init, |
272 | .ops = &poodle_ops, | 274 | .ops = &poodle_ops, |
273 | }; | 275 | }; |
@@ -275,15 +277,9 @@ static struct snd_soc_dai_link poodle_dai = { | |||
275 | /* poodle audio machine driver */ | 277 | /* poodle audio machine driver */ |
276 | static struct snd_soc_card snd_soc_poodle = { | 278 | static struct snd_soc_card snd_soc_poodle = { |
277 | .name = "Poodle", | 279 | .name = "Poodle", |
278 | .platform = &pxa2xx_soc_platform, | ||
279 | .dai_link = &poodle_dai, | 280 | .dai_link = &poodle_dai, |
280 | .num_links = 1, | 281 | .num_links = 1, |
281 | }; | 282 | .owner = THIS_MODULE, |
282 | |||
283 | /* poodle audio subsystem */ | ||
284 | static struct snd_soc_device poodle_snd_devdata = { | ||
285 | .card = &snd_soc_poodle, | ||
286 | .codec_dev = &soc_codec_dev_wm8731, | ||
287 | }; | 283 | }; |
288 | 284 | ||
289 | static struct platform_device *poodle_snd_device; | 285 | static struct platform_device *poodle_snd_device; |
@@ -307,8 +303,7 @@ static int __init poodle_init(void) | |||
307 | if (!poodle_snd_device) | 303 | if (!poodle_snd_device) |
308 | return -ENOMEM; | 304 | return -ENOMEM; |
309 | 305 | ||
310 | platform_set_drvdata(poodle_snd_device, &poodle_snd_devdata); | 306 | platform_set_drvdata(poodle_snd_device, &snd_soc_poodle); |
311 | poodle_snd_devdata.dev = &poodle_snd_device->dev; | ||
312 | ret = platform_device_add(poodle_snd_device); | 307 | ret = platform_device_add(poodle_snd_device); |
313 | 308 | ||
314 | if (ret) | 309 | if (ret) |