aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/e740_wm9705.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/pxa/e740_wm9705.c')
-rw-r--r--sound/soc/pxa/e740_wm9705.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/sound/soc/pxa/e740_wm9705.c b/sound/soc/pxa/e740_wm9705.c
index 7cd2f89d7b1..f614607b205 100644
--- a/sound/soc/pxa/e740_wm9705.c
+++ b/sound/soc/pxa/e740_wm9705.c
@@ -24,7 +24,6 @@
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25 25
26#include "../codecs/wm9705.h" 26#include "../codecs/wm9705.h"
27#include "pxa2xx-pcm.h"
28#include "pxa2xx-ac97.h" 27#include "pxa2xx-ac97.h"
29 28
30 29
@@ -90,8 +89,10 @@ static const struct snd_soc_dapm_route audio_map[] = {
90 {"Mic Amp", NULL, "Mic (Internal)"}, 89 {"Mic Amp", NULL, "Mic (Internal)"},
91}; 90};
92 91
93static int e740_ac97_init(struct snd_soc_codec *codec) 92static int e740_ac97_init(struct snd_soc_pcm_runtime *rtd)
94{ 93{
94 struct snd_soc_codec *codec = rtd->codec;
95
95 snd_soc_dapm_nc_pin(codec, "HPOUTL"); 96 snd_soc_dapm_nc_pin(codec, "HPOUTL");
96 snd_soc_dapm_nc_pin(codec, "HPOUTR"); 97 snd_soc_dapm_nc_pin(codec, "HPOUTR");
97 snd_soc_dapm_nc_pin(codec, "PHONE"); 98 snd_soc_dapm_nc_pin(codec, "PHONE");
@@ -116,30 +117,28 @@ static struct snd_soc_dai_link e740_dai[] = {
116 { 117 {
117 .name = "AC97", 118 .name = "AC97",
118 .stream_name = "AC97 HiFi", 119 .stream_name = "AC97 HiFi",
119 .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_HIFI], 120 .cpu_dai_name = "pxa-ac97.0",
120 .codec_dai = &wm9705_dai[WM9705_DAI_AC97_HIFI], 121 .codec_dai_name = "wm9705-hifi",
122 .platform_name = "pxa-pcm-audio",
123 .codec_name = "wm9705-codec",
121 .init = e740_ac97_init, 124 .init = e740_ac97_init,
122 }, 125 },
123 { 126 {
124 .name = "AC97 Aux", 127 .name = "AC97 Aux",
125 .stream_name = "AC97 Aux", 128 .stream_name = "AC97 Aux",
126 .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_AUX], 129 .cpu_dai_name = "pxa-ac97.1",
127 .codec_dai = &wm9705_dai[WM9705_DAI_AC97_AUX], 130 .codec_dai_name = "wm9705-aux",
131 .platform_name = "pxa-pcm-audio",
132 .codec_name = "wm9705-codec",
128 }, 133 },
129}; 134};
130 135
131static struct snd_soc_card e740 = { 136static struct snd_soc_card e740 = {
132 .name = "Toshiba e740", 137 .name = "Toshiba e740",
133 .platform = &pxa2xx_soc_platform,
134 .dai_link = e740_dai, 138 .dai_link = e740_dai,
135 .num_links = ARRAY_SIZE(e740_dai), 139 .num_links = ARRAY_SIZE(e740_dai),
136}; 140};
137 141
138static struct snd_soc_device e740_snd_devdata = {
139 .card = &e740,
140 .codec_dev = &soc_codec_dev_wm9705,
141};
142
143static struct platform_device *e740_snd_device; 142static struct platform_device *e740_snd_device;
144 143
145static int __init e740_init(void) 144static int __init e740_init(void)
@@ -178,8 +177,7 @@ static int __init e740_init(void)
178 goto free_apwr_gpio; 177 goto free_apwr_gpio;
179 } 178 }
180 179
181 platform_set_drvdata(e740_snd_device, &e740_snd_devdata); 180 platform_set_drvdata(e740_snd_device, &e740);
182 e740_snd_devdata.dev = &e740_snd_device->dev;
183 ret = platform_device_add(e740_snd_device); 181 ret = platform_device_add(e740_snd_device);
184 182
185 if (!ret) 183 if (!ret)