Lines Matching +full:hdmi +full:- +full:codec

1 // SPDX-License-Identifier: GPL-2.0
3 * mt8173-rt5650.c -- MT8173 machine driver with RT5650 codecs
105 struct snd_soc_card *card = runtime->card; in mt8173_rt5650_init()
106 struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; in mt8173_rt5650_init()
107 const char *codec_capture_dai = asoc_rtd_to_codec(runtime, 1)->name; in mt8173_rt5650_init()
114 if (!strcmp(codec_capture_dai, "rt5645-aif1")) { in mt8173_rt5650_init()
118 } else if (!strcmp(codec_capture_dai, "rt5645-aif2")) { in mt8173_rt5650_init()
123 dev_warn(card->dev, in mt8173_rt5650_init()
124 "Only one dai codec found in DTS, enabled rt5645 AD filter\n"); in mt8173_rt5650_init()
137 dev_err(card->dev, "Can't new Headset Jack %d\n", ret); in mt8173_rt5650_init()
151 ret = snd_soc_card_jack_new(rtd->card, "HDMI Jack", SND_JACK_LINEOUT, in mt8173_rt5650_hdmi_init()
156 return snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, in mt8173_rt5650_hdmi_init()
179 DAILINK_COMP_ARRAY(COMP_CPU("HDMI")),
183 SND_SOC_DAILINK_DEFS(codec,
185 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5645-aif1"), /* Playback */
186 COMP_CODEC(NULL, "rt5645-aif1")),/* Capture */
191 DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "i2s-hifi")),
194 /* Digital audio interface glue - connects codec <---> CPU */
214 .name = "HDMI",
215 .stream_name = "HDMI PCM",
223 .name = "Codec",
232 SND_SOC_DAILINK_REG(codec),
235 .name = "HDMI BE",
244 .name = "mtk-rt5650",
265 platform_node = of_parse_phandle(pdev->dev.of_node, in mt8173_rt5650_dev_probe()
268 dev_err(&pdev->dev, "Property 'platform' missing or invalid\n"); in mt8173_rt5650_dev_probe()
269 return -EINVAL; in mt8173_rt5650_dev_probe()
273 if (dai_link->platforms->name) in mt8173_rt5650_dev_probe()
275 dai_link->platforms->of_node = platform_node; in mt8173_rt5650_dev_probe()
279 of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 0); in mt8173_rt5650_dev_probe()
281 dev_err(&pdev->dev, in mt8173_rt5650_dev_probe()
282 "Property 'audio-codec' missing or invalid\n"); in mt8173_rt5650_dev_probe()
283 ret = -EINVAL; in mt8173_rt5650_dev_probe()
289 np = of_get_child_by_name(pdev->dev.of_node, "codec-capture"); in mt8173_rt5650_dev_probe()
294 dev_err(&pdev->dev, in mt8173_rt5650_dev_probe()
303 if (device_property_present(&pdev->dev, "mediatek,mclk")) { in mt8173_rt5650_dev_probe()
304 ret = device_property_read_u32(&pdev->dev, in mt8173_rt5650_dev_probe()
308 dev_err(&pdev->dev, in mt8173_rt5650_dev_probe()
314 mt8173_rt5650_dais[DAI_LINK_HDMI_I2S].codecs->of_node = in mt8173_rt5650_dev_probe()
315 of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 1); in mt8173_rt5650_dev_probe()
316 if (!mt8173_rt5650_dais[DAI_LINK_HDMI_I2S].codecs->of_node) { in mt8173_rt5650_dev_probe()
317 dev_err(&pdev->dev, in mt8173_rt5650_dev_probe()
318 "Property 'audio-codec' missing or invalid\n"); in mt8173_rt5650_dev_probe()
319 ret = -EINVAL; in mt8173_rt5650_dev_probe()
322 card->dev = &pdev->dev; in mt8173_rt5650_dev_probe()
324 ret = devm_snd_soc_register_card(&pdev->dev, card); in mt8173_rt5650_dev_probe()
332 { .compatible = "mediatek,mt8173-rt5650", },
339 .name = "mtk-rt5650",
352 MODULE_ALIAS("platform:mtk-rt5650");