diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-10-25 04:00:30 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-10-25 04:00:30 -0400 |
commit | aa5c14d5c0d3e4c587db4a1b220b9c86415c538f (patch) | |
tree | 0114637e8be2b38176e7e91e6cea3501b22cb66a /sound/soc/pxa/spitz.c | |
parent | 79fc84c7e0d2fe89c4e82f3a26fd8b0d13c31703 (diff) | |
parent | b11bdb5254ff17cb63e4ae5088b73fdcd2cc2602 (diff) |
Merge branch 'topic/asoc' into for-linus
Conflicts:
arch/powerpc/platforms/85xx/p1022_ds.c
Diffstat (limited to 'sound/soc/pxa/spitz.c')
-rw-r--r-- | sound/soc/pxa/spitz.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index d256f5f313b5..f470f360f4dd 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | #include <mach/spitz.h> | 29 | #include <mach/spitz.h> |
30 | #include "../codecs/wm8750.h" | 30 | #include "../codecs/wm8750.h" |
31 | #include "pxa2xx-pcm.h" | ||
32 | #include "pxa2xx-i2s.h" | 31 | #include "pxa2xx-i2s.h" |
33 | 32 | ||
34 | #define SPITZ_HP 0 | 33 | #define SPITZ_HP 0 |
@@ -107,7 +106,7 @@ static void spitz_ext_control(struct snd_soc_codec *codec) | |||
107 | static int spitz_startup(struct snd_pcm_substream *substream) | 106 | static int spitz_startup(struct snd_pcm_substream *substream) |
108 | { | 107 | { |
109 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 108 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
110 | struct snd_soc_codec *codec = rtd->socdev->card->codec; | 109 | struct snd_soc_codec *codec = rtd->codec; |
111 | 110 | ||
112 | /* check the jack status at stream startup */ | 111 | /* check the jack status at stream startup */ |
113 | spitz_ext_control(codec); | 112 | spitz_ext_control(codec); |
@@ -118,8 +117,8 @@ static int spitz_hw_params(struct snd_pcm_substream *substream, | |||
118 | struct snd_pcm_hw_params *params) | 117 | struct snd_pcm_hw_params *params) |
119 | { | 118 | { |
120 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 119 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
121 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 120 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
122 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 121 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
123 | unsigned int clk = 0; | 122 | unsigned int clk = 0; |
124 | int ret = 0; | 123 | int ret = 0; |
125 | 124 | ||
@@ -274,8 +273,9 @@ static const struct snd_kcontrol_new wm8750_spitz_controls[] = { | |||
274 | /* | 273 | /* |
275 | * Logic for a wm8750 as connected on a Sharp SL-Cxx00 Device | 274 | * Logic for a wm8750 as connected on a Sharp SL-Cxx00 Device |
276 | */ | 275 | */ |
277 | static int spitz_wm8750_init(struct snd_soc_codec *codec) | 276 | static int spitz_wm8750_init(struct snd_soc_pcm_runtime *rtd) |
278 | { | 277 | { |
278 | struct snd_soc_codec *codec = rtd->codec; | ||
279 | int err; | 279 | int err; |
280 | 280 | ||
281 | /* NC codec pins */ | 281 | /* NC codec pins */ |
@@ -308,8 +308,10 @@ static int spitz_wm8750_init(struct snd_soc_codec *codec) | |||
308 | static struct snd_soc_dai_link spitz_dai = { | 308 | static struct snd_soc_dai_link spitz_dai = { |
309 | .name = "wm8750", | 309 | .name = "wm8750", |
310 | .stream_name = "WM8750", | 310 | .stream_name = "WM8750", |
311 | .cpu_dai = &pxa_i2s_dai, | 311 | .cpu_dai_name = "pxa-is2", |
312 | .codec_dai = &wm8750_dai, | 312 | .codec_dai_name = "wm8750-hifi", |
313 | .platform_name = "pxa-pcm-audio", | ||
314 | .codec_name = "wm8750-codec.0-001a", | ||
313 | .init = spitz_wm8750_init, | 315 | .init = spitz_wm8750_init, |
314 | .ops = &spitz_ops, | 316 | .ops = &spitz_ops, |
315 | }; | 317 | }; |
@@ -317,17 +319,10 @@ static struct snd_soc_dai_link spitz_dai = { | |||
317 | /* spitz audio machine driver */ | 319 | /* spitz audio machine driver */ |
318 | static struct snd_soc_card snd_soc_spitz = { | 320 | static struct snd_soc_card snd_soc_spitz = { |
319 | .name = "Spitz", | 321 | .name = "Spitz", |
320 | .platform = &pxa2xx_soc_platform, | ||
321 | .dai_link = &spitz_dai, | 322 | .dai_link = &spitz_dai, |
322 | .num_links = 1, | 323 | .num_links = 1, |
323 | }; | 324 | }; |
324 | 325 | ||
325 | /* spitz audio subsystem */ | ||
326 | static struct snd_soc_device spitz_snd_devdata = { | ||
327 | .card = &snd_soc_spitz, | ||
328 | .codec_dev = &soc_codec_dev_wm8750, | ||
329 | }; | ||
330 | |||
331 | static struct platform_device *spitz_snd_device; | 326 | static struct platform_device *spitz_snd_device; |
332 | 327 | ||
333 | static int __init spitz_init(void) | 328 | static int __init spitz_init(void) |
@@ -341,8 +336,7 @@ static int __init spitz_init(void) | |||
341 | if (!spitz_snd_device) | 336 | if (!spitz_snd_device) |
342 | return -ENOMEM; | 337 | return -ENOMEM; |
343 | 338 | ||
344 | platform_set_drvdata(spitz_snd_device, &spitz_snd_devdata); | 339 | platform_set_drvdata(spitz_snd_device, &snd_soc_spitz); |
345 | spitz_snd_devdata.dev = &spitz_snd_device->dev; | ||
346 | ret = platform_device_add(spitz_snd_device); | 340 | ret = platform_device_add(spitz_snd_device); |
347 | 341 | ||
348 | if (ret) | 342 | if (ret) |