aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/e750_wm9705.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/pxa/e750_wm9705.c')
-rw-r--r--sound/soc/pxa/e750_wm9705.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/sound/soc/pxa/e750_wm9705.c b/sound/soc/pxa/e750_wm9705.c
index 8dceccc5e059..4c143803a75e 100644
--- a/sound/soc/pxa/e750_wm9705.c
+++ b/sound/soc/pxa/e750_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
30static int e750_spk_amp_event(struct snd_soc_dapm_widget *w, 29static int e750_spk_amp_event(struct snd_soc_dapm_widget *w,
@@ -72,8 +71,10 @@ static const struct snd_soc_dapm_route audio_map[] = {
72 {"MIC1", NULL, "Mic (Internal)"}, 71 {"MIC1", NULL, "Mic (Internal)"},
73}; 72};
74 73
75static int e750_ac97_init(struct snd_soc_codec *codec) 74static int e750_ac97_init(struct snd_soc_pcm_runtime *rtd)
76{ 75{
76 struct snd_soc_codec *codec = rtd->codec;
77
77 snd_soc_dapm_nc_pin(codec, "LOUT"); 78 snd_soc_dapm_nc_pin(codec, "LOUT");
78 snd_soc_dapm_nc_pin(codec, "ROUT"); 79 snd_soc_dapm_nc_pin(codec, "ROUT");
79 snd_soc_dapm_nc_pin(codec, "PHONE"); 80 snd_soc_dapm_nc_pin(codec, "PHONE");
@@ -98,31 +99,29 @@ static struct snd_soc_dai_link e750_dai[] = {
98 { 99 {
99 .name = "AC97", 100 .name = "AC97",
100 .stream_name = "AC97 HiFi", 101 .stream_name = "AC97 HiFi",
101 .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_HIFI], 102 .cpu_dai_name = "pxa-ac97.0",
102 .codec_dai = &wm9705_dai[WM9705_DAI_AC97_HIFI], 103 .codec_dai_name = "wm9705-hifi",
104 .platform_name = "pxa-pcm-audio",
105 .codec_name = "wm9705-codec",
103 .init = e750_ac97_init, 106 .init = e750_ac97_init,
104 /* use ops to check startup state */ 107 /* use ops to check startup state */
105 }, 108 },
106 { 109 {
107 .name = "AC97 Aux", 110 .name = "AC97 Aux",
108 .stream_name = "AC97 Aux", 111 .stream_name = "AC97 Aux",
109 .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_AUX], 112 .cpu_dai_name = "pxa-ac97.1",
110 .codec_dai = &wm9705_dai[WM9705_DAI_AC97_AUX], 113 .codec_dai_name ="wm9705-aux",
114 .platform_name = "pxa-pcm-audio",
115 .codec_name = "wm9705-codec",
111 }, 116 },
112}; 117};
113 118
114static struct snd_soc_card e750 = { 119static struct snd_soc_card e750 = {
115 .name = "Toshiba e750", 120 .name = "Toshiba e750",
116 .platform = &pxa2xx_soc_platform,
117 .dai_link = e750_dai, 121 .dai_link = e750_dai,
118 .num_links = ARRAY_SIZE(e750_dai), 122 .num_links = ARRAY_SIZE(e750_dai),
119}; 123};
120 124
121static struct snd_soc_device e750_snd_devdata = {
122 .card = &e750,
123 .codec_dev = &soc_codec_dev_wm9705,
124};
125
126static struct platform_device *e750_snd_device; 125static struct platform_device *e750_snd_device;
127 126
128static int __init e750_init(void) 127static int __init e750_init(void)
@@ -154,8 +153,7 @@ static int __init e750_init(void)
154 goto free_spk_amp_gpio; 153 goto free_spk_amp_gpio;
155 } 154 }
156 155
157 platform_set_drvdata(e750_snd_device, &e750_snd_devdata); 156 platform_set_drvdata(e750_snd_device, &e750);
158 e750_snd_devdata.dev = &e750_snd_device->dev;
159 ret = platform_device_add(e750_snd_device); 157 ret = platform_device_add(e750_snd_device);
160 158
161 if (!ret) 159 if (!ret)