aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/palm27x.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/pxa/palm27x.c')
-rw-r--r--sound/soc/pxa/palm27x.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c
index 1f96e3227be5..13f6d485d571 100644
--- a/sound/soc/pxa/palm27x.c
+++ b/sound/soc/pxa/palm27x.c
@@ -29,7 +29,6 @@
29#include <mach/palmasoc.h> 29#include <mach/palmasoc.h>
30 30
31#include "../codecs/wm9712.h" 31#include "../codecs/wm9712.h"
32#include "pxa2xx-pcm.h"
33#include "pxa2xx-ac97.h" 32#include "pxa2xx-ac97.h"
34 33
35static struct snd_soc_jack hs_jack; 34static struct snd_soc_jack hs_jack;
@@ -75,8 +74,9 @@ static const struct snd_soc_dapm_route audio_map[] = {
75 74
76static struct snd_soc_card palm27x_asoc; 75static struct snd_soc_card palm27x_asoc;
77 76
78static int palm27x_ac97_init(struct snd_soc_codec *codec) 77static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd)
79{ 78{
79 struct snd_soc_codec *codec = rtd->codec;
80 int err; 80 int err;
81 81
82 /* add palm27x specific widgets */ 82 /* add palm27x specific widgets */
@@ -112,7 +112,7 @@ static int palm27x_ac97_init(struct snd_soc_codec *codec)
112 return err; 112 return err;
113 113
114 /* Jack detection API stuff */ 114 /* Jack detection API stuff */
115 err = snd_soc_jack_new(&palm27x_asoc, "Headphone Jack", 115 err = snd_soc_jack_new(codec, "Headphone Jack",
116 SND_JACK_HEADPHONE, &hs_jack); 116 SND_JACK_HEADPHONE, &hs_jack);
117 if (err) 117 if (err)
118 return err; 118 return err;
@@ -132,30 +132,28 @@ static struct snd_soc_dai_link palm27x_dai[] = {
132{ 132{
133 .name = "AC97 HiFi", 133 .name = "AC97 HiFi",
134 .stream_name = "AC97 HiFi", 134 .stream_name = "AC97 HiFi",
135 .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_HIFI], 135 .cpu_dai_name = "pxa-ac97.0",
136 .codec_dai = &wm9712_dai[WM9712_DAI_AC97_HIFI], 136 .codec_dai_name = "wm9712-hifi",
137 .codec_name = "wm9712-codec",
138 .platform_name = "pxa-pcm-audio",
137 .init = palm27x_ac97_init, 139 .init = palm27x_ac97_init,
138}, 140},
139{ 141{
140 .name = "AC97 Aux", 142 .name = "AC97 Aux",
141 .stream_name = "AC97 Aux", 143 .stream_name = "AC97 Aux",
142 .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_AUX], 144 .cpu_dai_name = "pxa-ac97.1",
143 .codec_dai = &wm9712_dai[WM9712_DAI_AC97_AUX], 145 .codec_dai_name = "wm9712-aux",
146 .codec_name = "wm9712-codec",
147 .platform_name = "pxa-pcm-audio",
144}, 148},
145}; 149};
146 150
147static struct snd_soc_card palm27x_asoc = { 151static struct snd_soc_card palm27x_asoc = {
148 .name = "Palm/PXA27x", 152 .name = "Palm/PXA27x",
149 .platform = &pxa2xx_soc_platform,
150 .dai_link = palm27x_dai, 153 .dai_link = palm27x_dai,
151 .num_links = ARRAY_SIZE(palm27x_dai), 154 .num_links = ARRAY_SIZE(palm27x_dai),
152}; 155};
153 156
154static struct snd_soc_device palm27x_snd_devdata = {
155 .card = &palm27x_asoc,
156 .codec_dev = &soc_codec_dev_wm9712,
157};
158
159static struct platform_device *palm27x_snd_device; 157static struct platform_device *palm27x_snd_device;
160 158
161static int palm27x_asoc_probe(struct platform_device *pdev) 159static int palm27x_asoc_probe(struct platform_device *pdev)
@@ -178,8 +176,7 @@ static int palm27x_asoc_probe(struct platform_device *pdev)
178 if (!palm27x_snd_device) 176 if (!palm27x_snd_device)
179 return -ENOMEM; 177 return -ENOMEM;
180 178
181 platform_set_drvdata(palm27x_snd_device, &palm27x_snd_devdata); 179 platform_set_drvdata(palm27x_snd_device, &palm27x_asoc);
182 palm27x_snd_devdata.dev = &palm27x_snd_device->dev;
183 ret = platform_device_add(palm27x_snd_device); 180 ret = platform_device_add(palm27x_snd_device);
184 181
185 if (ret != 0) 182 if (ret != 0)