diff options
Diffstat (limited to 'sound/soc/omap/am3517evm.c')
-rw-r--r-- | sound/soc/omap/am3517evm.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/sound/soc/omap/am3517evm.c b/sound/soc/omap/am3517evm.c index 135901b2ea11..979dd508305f 100644 --- a/sound/soc/omap/am3517evm.c +++ b/sound/soc/omap/am3517evm.c | |||
@@ -40,8 +40,8 @@ static int am3517evm_hw_params(struct snd_pcm_substream *substream, | |||
40 | struct snd_pcm_hw_params *params) | 40 | struct snd_pcm_hw_params *params) |
41 | { | 41 | { |
42 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 42 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
43 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 43 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
44 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 44 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
45 | int ret; | 45 | int ret; |
46 | 46 | ||
47 | /* Set codec DAI configuration */ | 47 | /* Set codec DAI configuration */ |
@@ -111,8 +111,10 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
111 | {"MICIN", NULL, "Mic In"}, | 111 | {"MICIN", NULL, "Mic In"}, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static int am3517evm_aic23_init(struct snd_soc_codec *codec) | 114 | static int am3517evm_aic23_init(struct snd_soc_pcm_runtime *rtd) |
115 | { | 115 | { |
116 | struct snd_soc_codec *codec = rtd->codec; | ||
117 | |||
116 | /* Add am3517-evm specific widgets */ | 118 | /* Add am3517-evm specific widgets */ |
117 | snd_soc_dapm_new_controls(codec, tlv320aic23_dapm_widgets, | 119 | snd_soc_dapm_new_controls(codec, tlv320aic23_dapm_widgets, |
118 | ARRAY_SIZE(tlv320aic23_dapm_widgets)); | 120 | ARRAY_SIZE(tlv320aic23_dapm_widgets)); |
@@ -134,8 +136,10 @@ static int am3517evm_aic23_init(struct snd_soc_codec *codec) | |||
134 | static struct snd_soc_dai_link am3517evm_dai = { | 136 | static struct snd_soc_dai_link am3517evm_dai = { |
135 | .name = "TLV320AIC23", | 137 | .name = "TLV320AIC23", |
136 | .stream_name = "AIC23", | 138 | .stream_name = "AIC23", |
137 | .cpu_dai = &omap_mcbsp_dai[0], | 139 | .cpu_dai_name ="omap-mcbsp-dai.0", |
138 | .codec_dai = &tlv320aic23_dai, | 140 | .codec_dai_name = "tlv320aic23-hifi", |
141 | .platform_name = "omap-pcm-audio", | ||
142 | .codec_name = "tlv320aic23-codec", | ||
139 | .init = am3517evm_aic23_init, | 143 | .init = am3517evm_aic23_init, |
140 | .ops = &am3517evm_ops, | 144 | .ops = &am3517evm_ops, |
141 | }; | 145 | }; |
@@ -143,27 +147,18 @@ static struct snd_soc_dai_link am3517evm_dai = { | |||
143 | /* Audio machine driver */ | 147 | /* Audio machine driver */ |
144 | static struct snd_soc_card snd_soc_am3517evm = { | 148 | static struct snd_soc_card snd_soc_am3517evm = { |
145 | .name = "am3517evm", | 149 | .name = "am3517evm", |
146 | .platform = &omap_soc_platform, | ||
147 | .dai_link = &am3517evm_dai, | 150 | .dai_link = &am3517evm_dai, |
148 | .num_links = 1, | 151 | .num_links = 1, |
149 | }; | 152 | }; |
150 | 153 | ||
151 | /* Audio subsystem */ | ||
152 | static struct snd_soc_device am3517evm_snd_devdata = { | ||
153 | .card = &snd_soc_am3517evm, | ||
154 | .codec_dev = &soc_codec_dev_tlv320aic23, | ||
155 | }; | ||
156 | |||
157 | static struct platform_device *am3517evm_snd_device; | 154 | static struct platform_device *am3517evm_snd_device; |
158 | 155 | ||
159 | static int __init am3517evm_soc_init(void) | 156 | static int __init am3517evm_soc_init(void) |
160 | { | 157 | { |
161 | int ret; | 158 | int ret; |
162 | 159 | ||
163 | if (!machine_is_omap3517evm()) { | 160 | if (!machine_is_omap3517evm()) |
164 | pr_err("Not OMAP3517 / AM3517 EVM!\n"); | ||
165 | return -ENODEV; | 161 | return -ENODEV; |
166 | } | ||
167 | pr_info("OMAP3517 / AM3517 EVM SoC init\n"); | 162 | pr_info("OMAP3517 / AM3517 EVM SoC init\n"); |
168 | 163 | ||
169 | am3517evm_snd_device = platform_device_alloc("soc-audio", -1); | 164 | am3517evm_snd_device = platform_device_alloc("soc-audio", -1); |
@@ -172,9 +167,7 @@ static int __init am3517evm_soc_init(void) | |||
172 | return -ENOMEM; | 167 | return -ENOMEM; |
173 | } | 168 | } |
174 | 169 | ||
175 | platform_set_drvdata(am3517evm_snd_device, &am3517evm_snd_devdata); | 170 | platform_set_drvdata(am3517evm_snd_device, &snd_soc_am3517evm); |
176 | am3517evm_snd_devdata.dev = &am3517evm_snd_device->dev; | ||
177 | *(unsigned int *)am3517evm_dai.cpu_dai->private_data = 0; /* McBSP1 */ | ||
178 | 171 | ||
179 | ret = platform_device_add(am3517evm_snd_device); | 172 | ret = platform_device_add(am3517evm_snd_device); |
180 | if (ret) | 173 | if (ret) |