19 #include <linux/module.h>
20 #include <linux/device.h>
30 #include "../codecs/sgtl5000.h"
85 .hw_params = mxs_sgtl5000_hw_params,
91 .stream_name =
"HiFi Playback",
92 .codec_dai_name =
"sgtl5000",
93 .codec_name =
"sgtl5000.0-000a",
94 .cpu_dai_name =
"mxs-saif.0",
95 .platform_name =
"mxs-saif.0",
96 .ops = &mxs_sgtl5000_hifi_ops,
99 .stream_name =
"HiFi Capture",
100 .codec_dai_name =
"sgtl5000",
101 .codec_name =
"sgtl5000.0-000a",
102 .cpu_dai_name =
"mxs-saif.1",
103 .platform_name =
"mxs-saif.1",
104 .ops = &mxs_sgtl5000_hifi_ops,
109 .name =
"mxs_sgtl5000",
111 .dai_link = mxs_sgtl5000_dai,
127 if (!saif_np[0] || !saif_np[1] || !codec_np) {
128 dev_err(&pdev->
dev,
"phandle missing or invalid\n");
132 for (i = 0; i < 2; i++) {
141 of_node_put(codec_np);
142 of_node_put(saif_np[0]);
143 of_node_put(saif_np[1]);
153 ret = mxs_sgtl5000_probe_dt(pdev);
167 platform_set_drvdata(pdev, card);
171 dev_err(&pdev->
dev,
"snd_soc_register_card failed (%d)\n",
190 static const struct of_device_id mxs_sgtl5000_dt_ids[] = {
191 { .compatible =
"fsl,mxs-audio-sgtl5000", },
198 .name =
"mxs-sgtl5000",
200 .of_match_table = mxs_sgtl5000_dt_ids,
202 .probe = mxs_sgtl5000_probe,