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
79 struct snd_soc_card *card = runtime->card; in mt8173_rt5650_rt5676_init()
80 struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; in mt8173_rt5650_rt5676_init()
81 struct snd_soc_component *component_sub = asoc_rtd_to_codec(runtime, 1)->component; in mt8173_rt5650_rt5676_init()
104 dev_err(card->dev, "Can't new Headset Jack %d\n", ret); in mt8173_rt5650_rt5676_init()
139 SND_SOC_DAILINK_DEFS(codec,
141 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5645-aif1"),
142 COMP_CODEC(NULL, "rt5677-aif1")),
147 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "i2s-hifi")),
152 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5677-aif2")),
155 /* Digital audio interface glue - connects codec <---> CPU */
185 .name = "Codec",
194 SND_SOC_DAILINK_REG(codec),
202 /* rt5676 <-> rt5650 intercodec link: Sets rt5676 I2S2 as master */
220 .name = "mtk-rt5650-rt5676",
241 platform_node = of_parse_phandle(pdev->dev.of_node, in mt8173_rt5650_rt5676_dev_probe()
244 dev_err(&pdev->dev, "Property 'platform' missing or invalid\n"); in mt8173_rt5650_rt5676_dev_probe()
245 return -EINVAL; in mt8173_rt5650_rt5676_dev_probe()
249 if (dai_link->platforms->name) in mt8173_rt5650_rt5676_dev_probe()
251 dai_link->platforms->of_node = platform_node; in mt8173_rt5650_rt5676_dev_probe()
255 of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 0); in mt8173_rt5650_rt5676_dev_probe()
257 dev_err(&pdev->dev, in mt8173_rt5650_rt5676_dev_probe()
258 "Property 'audio-codec' missing or invalid\n"); in mt8173_rt5650_rt5676_dev_probe()
259 ret = -EINVAL; in mt8173_rt5650_rt5676_dev_probe()
263 of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 1); in mt8173_rt5650_rt5676_dev_probe()
265 dev_err(&pdev->dev, in mt8173_rt5650_rt5676_dev_probe()
266 "Property 'audio-codec' missing or invalid\n"); in mt8173_rt5650_rt5676_dev_probe()
267 ret = -EINVAL; in mt8173_rt5650_rt5676_dev_probe()
273 mt8173_rt5650_rt5676_dais[DAI_LINK_INTERCODEC].codecs->of_node = in mt8173_rt5650_rt5676_dev_probe()
276 mt8173_rt5650_rt5676_dais[DAI_LINK_HDMI_I2S].codecs->of_node = in mt8173_rt5650_rt5676_dev_probe()
277 of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 2); in mt8173_rt5650_rt5676_dev_probe()
278 if (!mt8173_rt5650_rt5676_dais[DAI_LINK_HDMI_I2S].codecs->of_node) { in mt8173_rt5650_rt5676_dev_probe()
279 dev_err(&pdev->dev, in mt8173_rt5650_rt5676_dev_probe()
280 "Property 'audio-codec' missing or invalid\n"); in mt8173_rt5650_rt5676_dev_probe()
281 ret = -EINVAL; in mt8173_rt5650_rt5676_dev_probe()
285 card->dev = &pdev->dev; in mt8173_rt5650_rt5676_dev_probe()
287 ret = devm_snd_soc_register_card(&pdev->dev, card); in mt8173_rt5650_rt5676_dev_probe()
289 dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n", in mt8173_rt5650_rt5676_dev_probe()
298 { .compatible = "mediatek,mt8173-rt5650-rt5676", },
305 .name = "mtk-rt5650-rt5676",
320 MODULE_ALIAS("platform:mtk-rt5650-rt5676");