diff options
Diffstat (limited to 'sound/soc/pxa/e800_wm9712.c')
-rw-r--r-- | sound/soc/pxa/e800_wm9712.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c index bc019cdce429..d42e5fe832c5 100644 --- a/sound/soc/pxa/e800_wm9712.c +++ b/sound/soc/pxa/e800_wm9712.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <mach/eseries-gpio.h> | 23 | #include <mach/eseries-gpio.h> |
24 | 24 | ||
25 | #include "../codecs/wm9712.h" | 25 | #include "../codecs/wm9712.h" |
26 | #include "pxa2xx-pcm.h" | ||
27 | #include "pxa2xx-ac97.h" | 26 | #include "pxa2xx-ac97.h" |
28 | 27 | ||
29 | static int e800_spk_amp_event(struct snd_soc_dapm_widget *w, | 28 | static int e800_spk_amp_event(struct snd_soc_dapm_widget *w, |
@@ -73,8 +72,10 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
73 | {"MIC2", NULL, "Mic (Internal2)"}, | 72 | {"MIC2", NULL, "Mic (Internal2)"}, |
74 | }; | 73 | }; |
75 | 74 | ||
76 | static int e800_ac97_init(struct snd_soc_codec *codec) | 75 | static int e800_ac97_init(struct snd_soc_pcm_runtime *rtd) |
77 | { | 76 | { |
77 | struct snd_soc_codec *codec = rtd->codec; | ||
78 | |||
78 | snd_soc_dapm_new_controls(codec, e800_dapm_widgets, | 79 | snd_soc_dapm_new_controls(codec, e800_dapm_widgets, |
79 | ARRAY_SIZE(e800_dapm_widgets)); | 80 | ARRAY_SIZE(e800_dapm_widgets)); |
80 | 81 | ||
@@ -88,30 +89,28 @@ static struct snd_soc_dai_link e800_dai[] = { | |||
88 | { | 89 | { |
89 | .name = "AC97", | 90 | .name = "AC97", |
90 | .stream_name = "AC97 HiFi", | 91 | .stream_name = "AC97 HiFi", |
91 | .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_HIFI], | 92 | .cpu_dai_name = "pxa-ac97.0", |
92 | .codec_dai = &wm9712_dai[WM9712_DAI_AC97_HIFI], | 93 | .codec_dai_name = "wm9712-hifi", |
94 | .platform_name = "pxa-pcm-audio", | ||
95 | .codec_name = "wm9712-codec", | ||
93 | .init = e800_ac97_init, | 96 | .init = e800_ac97_init, |
94 | }, | 97 | }, |
95 | { | 98 | { |
96 | .name = "AC97 Aux", | 99 | .name = "AC97 Aux", |
97 | .stream_name = "AC97 Aux", | 100 | .stream_name = "AC97 Aux", |
98 | .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_AUX], | 101 | .cpu_dai_name = "pxa-ac97.1", |
99 | .codec_dai = &wm9712_dai[WM9712_DAI_AC97_AUX], | 102 | .codec_dai_name ="wm9712-aux", |
103 | .platform_name = "pxa-pcm-audio", | ||
104 | .codec_name = "wm9712-codec", | ||
100 | }, | 105 | }, |
101 | }; | 106 | }; |
102 | 107 | ||
103 | static struct snd_soc_card e800 = { | 108 | static struct snd_soc_card e800 = { |
104 | .name = "Toshiba e800", | 109 | .name = "Toshiba e800", |
105 | .platform = &pxa2xx_soc_platform, | ||
106 | .dai_link = e800_dai, | 110 | .dai_link = e800_dai, |
107 | .num_links = ARRAY_SIZE(e800_dai), | 111 | .num_links = ARRAY_SIZE(e800_dai), |
108 | }; | 112 | }; |
109 | 113 | ||
110 | static struct snd_soc_device e800_snd_devdata = { | ||
111 | .card = &e800, | ||
112 | .codec_dev = &soc_codec_dev_wm9712, | ||
113 | }; | ||
114 | |||
115 | static struct platform_device *e800_snd_device; | 114 | static struct platform_device *e800_snd_device; |
116 | 115 | ||
117 | static int __init e800_init(void) | 116 | static int __init e800_init(void) |
@@ -141,8 +140,7 @@ static int __init e800_init(void) | |||
141 | if (!e800_snd_device) | 140 | if (!e800_snd_device) |
142 | return -ENOMEM; | 141 | return -ENOMEM; |
143 | 142 | ||
144 | platform_set_drvdata(e800_snd_device, &e800_snd_devdata); | 143 | platform_set_drvdata(e800_snd_device, &e800); |
145 | e800_snd_devdata.dev = &e800_snd_device->dev; | ||
146 | ret = platform_device_add(e800_snd_device); | 144 | ret = platform_device_add(e800_snd_device); |
147 | 145 | ||
148 | if (!ret) | 146 | if (!ret) |