12 #include <linux/module.h>
17 #include <linux/i2c.h>
29 #define AUDIO_FORMAT (SND_SOC_DAIFMT_DSP_B | \
30 SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF)
41 if (machine_is_davinci_dm355_evm() || machine_is_davinci_dm6467_evm() ||
42 machine_is_davinci_dm365_evm())
49 else if (machine_is_davinci_evm())
52 else if (machine_is_davinci_da830_evm() ||
53 machine_is_davinci_da850_evm())
88 .hw_params = evm_hw_params,
92 .hw_params = evm_spdif_hw_params,
106 {
"Headphone Jack",
NULL,
"HPLOUT"},
107 {
"Headphone Jack",
NULL,
"HPROUT"},
110 {
"Line Out",
NULL,
"LLOUT"},
111 {
"Line Out",
NULL,
"RLOUT"},
114 {
"MIC3L",
NULL,
"Mic Bias 2V"},
115 {
"MIC3R",
NULL,
"Mic Bias 2V"},
116 {
"Mic Bias 2V",
NULL,
"Mic Jack"},
119 {
"LINE1L",
NULL,
"Line In"},
120 {
"LINE2L",
NULL,
"Line In"},
121 {
"LINE1R",
NULL,
"Line In"},
122 {
"LINE2R",
NULL,
"Line In"},
154 .name =
"TLV320AIC3X",
155 .stream_name =
"AIC3X",
156 .cpu_dai_name =
"davinci-mcbsp",
157 .codec_dai_name =
"tlv320aic3x-hifi",
158 .codec_name =
"tlv320aic3x-codec.1-001b",
159 .platform_name =
"davinci-mcbsp",
160 .init = evm_aic3x_init,
165 .name =
"TLV320AIC3X",
166 .stream_name =
"AIC3X",
167 .cpu_dai_name =
"davinci-mcbsp.1",
168 .codec_dai_name =
"tlv320aic3x-hifi",
169 .codec_name =
"tlv320aic3x-codec.1-001b",
170 .platform_name =
"davinci-mcbsp.1",
171 .init = evm_aic3x_init,
176 #ifdef CONFIG_SND_DM365_AIC3X_CODEC
177 .name =
"TLV320AIC3X",
178 .stream_name =
"AIC3X",
179 .cpu_dai_name =
"davinci-mcbsp",
180 .codec_dai_name =
"tlv320aic3x-hifi",
181 .init = evm_aic3x_init,
182 .codec_name =
"tlv320aic3x-codec.1-0018",
184 .platform_name =
"davinci-mcbsp",
185 #elif defined(CONFIG_SND_DM365_VOICE_CODEC)
186 .name =
"Voice Codec - CQ93VC",
187 .stream_name =
"CQ93",
188 .cpu_dai_name =
"davinci-vcif",
189 .codec_dai_name =
"cq93vc-hifi",
190 .codec_name =
"cq93vc-codec",
191 .platform_name =
"davinci-vcif",
197 .name =
"TLV320AIC3X",
198 .stream_name =
"AIC3X",
199 .cpu_dai_name=
"davinci-mcasp.0",
200 .codec_dai_name =
"tlv320aic3x-hifi",
201 .platform_name =
"davinci-mcasp.0",
202 .codec_name =
"tlv320aic3x-codec.0-001a",
203 .init = evm_aic3x_init,
208 .stream_name =
"spdif",
209 .cpu_dai_name=
"davinci-mcasp.1",
210 .codec_dai_name =
"dit-hifi",
211 .codec_name =
"spdif_dit",
212 .platform_name =
"davinci-mcasp.1",
213 .ops = &evm_spdif_ops,
218 .name =
"TLV320AIC3X",
219 .stream_name =
"AIC3X",
220 .cpu_dai_name =
"davinci-mcasp.1",
221 .codec_dai_name =
"tlv320aic3x-hifi",
222 .codec_name =
"tlv320aic3x-codec.1-0018",
223 .platform_name =
"davinci-mcasp.1",
224 .init = evm_aic3x_init,
229 .name =
"TLV320AIC3X",
230 .stream_name =
"AIC3X",
231 .cpu_dai_name=
"davinci-mcasp.0",
232 .codec_dai_name =
"tlv320aic3x-hifi",
233 .codec_name =
"tlv320aic3x-codec.1-0018",
234 .platform_name =
"davinci-mcasp.0",
235 .init = evm_aic3x_init,
241 .name =
"DaVinci DM6446 EVM",
243 .dai_link = &dm6446_evm_dai,
249 .name =
"DaVinci DM355 EVM",
251 .dai_link = &dm355_evm_dai,
257 .name =
"DaVinci DM365 EVM",
259 .dai_link = &dm365_evm_dai,
265 .name =
"DaVinci DM6467 EVM",
267 .dai_link = dm6467_evm_dai,
272 .name =
"DA830/OMAP-L137 EVM",
274 .dai_link = &da830_evm_dai,
279 .name =
"DA850/OMAP-L138 EVM",
281 .dai_link = &da850_evm_dai,
287 static int __init evm_init(
void)
293 if (machine_is_davinci_evm()) {
294 evm_snd_dev_data = &dm6446_snd_soc_card_evm;
296 }
else if (machine_is_davinci_dm355_evm()) {
297 evm_snd_dev_data = &dm355_snd_soc_card_evm;
299 }
else if (machine_is_davinci_dm365_evm()) {
300 evm_snd_dev_data = &dm365_snd_soc_card_evm;
302 }
else if (machine_is_davinci_dm6467_evm()) {
303 evm_snd_dev_data = &dm6467_snd_soc_card_evm;
305 }
else if (machine_is_davinci_da830_evm()) {
306 evm_snd_dev_data = &da830_snd_soc_card;
308 }
else if (machine_is_davinci_da850_evm()) {
309 evm_snd_dev_data = &da850_snd_soc_card;
318 platform_set_drvdata(evm_snd_device, evm_snd_dev_data);
326 static void __exit evm_exit(
void)