Lines Matching +full:codec +full:- +full:aif2

1 // SPDX-License-Identifier: GPL-2.0
3 * mt8173-rt5650-rt5676.c -- MT8173 machine driver with RT5650/5676 codecs
88 struct snd_soc_card *card = runtime->card; in mt8173_rt5650_rt5676_init()
89 struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; in mt8173_rt5650_rt5676_init()
90 struct snd_soc_component *component_sub = snd_soc_rtd_to_codec(runtime, 1)->component; in mt8173_rt5650_rt5676_init()
115 dev_err(card->dev, "Can't new Headset Jack %d\n", ret); in mt8173_rt5650_rt5676_init()
150 SND_SOC_DAILINK_DEFS(codec,
152 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5645-aif1"),
153 COMP_CODEC(NULL, "rt5677-aif1")),
158 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "i2s-hifi")),
163 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5677-aif2")),
166 /* Digital audio interface glue - connects codec <---> CPU */
196 .name = "Codec",
203 SND_SOC_DAILINK_REG(codec),
211 /* rt5676 <-> rt5650 intercodec link: Sets rt5676 I2S2 as master */
229 .name = "mtk-rt5650-rt5676",
250 platform_node = of_parse_phandle(pdev->dev.of_node, in mt8173_rt5650_rt5676_dev_probe()
253 dev_err(&pdev->dev, "Property 'platform' missing or invalid\n"); in mt8173_rt5650_rt5676_dev_probe()
254 return -EINVAL; in mt8173_rt5650_rt5676_dev_probe()
258 if (dai_link->platforms->name) in mt8173_rt5650_rt5676_dev_probe()
260 dai_link->platforms->of_node = platform_node; in mt8173_rt5650_rt5676_dev_probe()
264 of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 0); in mt8173_rt5650_rt5676_dev_probe()
266 dev_err(&pdev->dev, in mt8173_rt5650_rt5676_dev_probe()
267 "Property 'audio-codec' missing or invalid\n"); in mt8173_rt5650_rt5676_dev_probe()
268 ret = -EINVAL; in mt8173_rt5650_rt5676_dev_probe()
272 of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 1); in mt8173_rt5650_rt5676_dev_probe()
274 dev_err(&pdev->dev, in mt8173_rt5650_rt5676_dev_probe()
275 "Property 'audio-codec' missing or invalid\n"); in mt8173_rt5650_rt5676_dev_probe()
276 ret = -EINVAL; in mt8173_rt5650_rt5676_dev_probe()
282 mt8173_rt5650_rt5676_dais[DAI_LINK_INTERCODEC].codecs->of_node = in mt8173_rt5650_rt5676_dev_probe()
285 mt8173_rt5650_rt5676_dais[DAI_LINK_HDMI_I2S].codecs->of_node = in mt8173_rt5650_rt5676_dev_probe()
286 of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 2); in mt8173_rt5650_rt5676_dev_probe()
287 if (!mt8173_rt5650_rt5676_dais[DAI_LINK_HDMI_I2S].codecs->of_node) { in mt8173_rt5650_rt5676_dev_probe()
288 dev_err(&pdev->dev, in mt8173_rt5650_rt5676_dev_probe()
289 "Property 'audio-codec' missing or invalid\n"); in mt8173_rt5650_rt5676_dev_probe()
290 ret = -EINVAL; in mt8173_rt5650_rt5676_dev_probe()
294 card->dev = &pdev->dev; in mt8173_rt5650_rt5676_dev_probe()
296 ret = devm_snd_soc_register_card(&pdev->dev, card); in mt8173_rt5650_rt5676_dev_probe()
304 { .compatible = "mediatek,mt8173-rt5650-rt5676", },
311 .name = "mtk-rt5650-rt5676",
324 MODULE_ALIAS("platform:mtk-rt5650-rt5676");