27 #include <linux/module.h>
38 #include "../codecs/twl6040.h"
77 .hw_params = omap_abe_hw_params,
103 .hw_params = omap_abe_dmic_hw_params,
112 .pin =
"Headset Mic",
116 .pin =
"Headset Stereophone",
142 {
"Headset Stereophone",
NULL,
"HSOL"},
143 {
"Headset Stereophone",
NULL,
"HSOR"},
145 {
"Earphone Spk",
NULL,
"EP"},
147 {
"Ext Spk",
NULL,
"HFL"},
148 {
"Ext Spk",
NULL,
"HFR"},
150 {
"Line Out",
NULL,
"AUXL"},
151 {
"Line Out",
NULL,
"AUXR"},
153 {
"Vibrator",
NULL,
"VIBRAL"},
154 {
"Vibrator",
NULL,
"VIBRAR"},
157 {
"HSMIC",
NULL,
"Headset Mic"},
158 {
"Headset Mic",
NULL,
"Headset Mic Bias"},
160 {
"MAINMIC",
NULL,
"Main Handset Mic"},
161 {
"Main Handset Mic",
NULL,
"Main Mic Bias"},
163 {
"SUBMIC",
NULL,
"Sub Handset Mic"},
164 {
"Sub Handset Mic",
NULL,
"Main Mic Bias"},
166 {
"AFML",
NULL,
"Line In"},
167 {
"AFMR",
NULL,
"Line In"},
215 twl6040_disconnect_pin(dapm, pdata->
has_hs,
"Headset Stereophone");
216 twl6040_disconnect_pin(dapm, pdata->
has_hf,
"Ext Spk");
217 twl6040_disconnect_pin(dapm, pdata->
has_ep,
"Earphone Spk");
218 twl6040_disconnect_pin(dapm, pdata->
has_aux,
"Line Out");
219 twl6040_disconnect_pin(dapm, pdata->
has_vibra,
"Vibrator");
220 twl6040_disconnect_pin(dapm, pdata->
has_hsmic,
"Headset Mic");
221 twl6040_disconnect_pin(dapm, pdata->
has_mainmic,
"Main Handset Mic");
222 twl6040_disconnect_pin(dapm, pdata->
has_submic,
"Sub Handset Mic");
223 twl6040_disconnect_pin(dapm, pdata->
has_afm,
"Line In");
229 {
"DMic",
NULL,
"Digital Mic"},
230 {
"Digital Mic",
NULL,
"Digital Mic1 Bias"},
246 .stream_name =
"TWL6040",
247 .cpu_dai_name =
"omap-mcpdm",
248 .codec_dai_name =
"twl6040-legacy",
249 .platform_name =
"omap-pcm-audio",
250 .codec_name =
"twl6040-codec",
251 .init = omap_abe_twl6040_init,
252 .ops = &omap_abe_ops,
256 .stream_name =
"DMIC Capture",
257 .cpu_dai_name =
"omap-dmic",
258 .codec_dai_name =
"dmic-hifi",
259 .platform_name =
"omap-pcm-audio",
260 .codec_name =
"dmic-codec",
261 .init = omap_abe_dmic_init,
262 .ops = &omap_abe_dmic_ops,
270 .dapm_widgets = twl6040_dapm_widgets,
271 .num_dapm_widgets =
ARRAY_SIZE(twl6040_dapm_widgets),
272 .dapm_routes = audio_map,
297 dev_err(&pdev->
dev,
"Card name is not provided\n");
305 "Error while parsing DAPM routing\n");
311 dev_err(&pdev->
dev,
"McPDM node is not provided\n");
324 "dmic-codec", -1,
NULL, 0);
327 "Can't instantiate dmic-codec\n");
334 of_property_read_u32(node,
"ti,jack-detection",
336 of_property_read_u32(node,
"ti,mclk-freq",
339 dev_err(&pdev->
dev,
"MCLK frequency not provided\n");
349 dev_err(&pdev->
dev,
"Card name is not provided\n");
367 dev_err(&pdev->
dev,
"MCLK frequency missing\n");
372 card->
dai_link = abe_twl6040_dai_links;
375 snd_soc_card_set_drvdata(card, priv);
379 dev_err(&pdev->
dev,
"snd_soc_register_card() failed: %d\n",
396 struct abe_twl6040 *priv = snd_soc_card_get_drvdata(card);
406 static const struct of_device_id omap_abe_of_match[] = {
407 {.compatible =
"ti,abe-twl6040", },
414 .name =
"omap-abe-twl6040",
417 .of_match_table = omap_abe_of_match,
419 .probe = omap_abe_probe,