Lines Matching +full:hdmi +full:- +full:codec
1 // SPDX-License-Identifier: GPL-2.0-only
5 * ehl_rt5660 - ASOC Machine driver for Elkhart Lake platforms
6 * with rt5660 codec
21 #include <sound/soc-acpi.h>
76 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); in hdmi_init()
80 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in hdmi_init()
82 return -ENOMEM; in hdmi_init()
85 pcm->device = rtd->dai_link->id; in hdmi_init()
86 pcm->codec_dai = dai; in hdmi_init()
88 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in hdmi_init()
98 if (list_empty(&ctx->hdmi_pcm_list)) in card_late_probe()
99 return -ENOENT; in card_late_probe()
101 if (!ctx->idisp_codec) in card_late_probe()
104 pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm, head); in card_late_probe()
106 return hda_dsp_hdmi_build_controls(card, pcm->codec_dai->component); in card_late_probe()
121 dev_err(rtd->dev, "snd_soc_dai_set_sysclk err = %d\n", ret); in rt5660_hw_params()
130 dev_err(codec_dai->dev, "can't set codec pll: %d\n", ret); in rt5660_hw_params()
143 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5660:00", "rt5660-aif1")));
151 DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
158 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1")));
163 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2")));
168 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3")));
173 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi4")));
178 .name = "SSP0-Codec",
238 .name = "ehl-rt5660",
252 /* If hdmi codec is not supported, switch to use dummy codec */
260 if (mach->mach_params.common_hdmi_codec_drv && in hdmi_link_init()
261 (mach->mach_params.codec_mask & IDISP_CODEC_MASK)) { in hdmi_link_init()
262 ctx->idisp_codec = true; in hdmi_link_init()
267 * if HDMI is not enabled in kernel config, or in hdmi_link_init()
268 * hdmi codec is not supported in hdmi_link_init()
271 link = &card->dai_link[i]; in hdmi_link_init()
272 link->codecs[0].name = "snd-soc-dummy"; in hdmi_link_init()
273 link->codecs[0].dai_name = "snd-soc-dummy-dai"; in hdmi_link_init()
284 card->dev = &pdev->dev; in snd_ehl_rt5660_probe()
286 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in snd_ehl_rt5660_probe()
288 return -ENOMEM; in snd_ehl_rt5660_probe()
289 INIT_LIST_HEAD(&ctx->hdmi_pcm_list); in snd_ehl_rt5660_probe()
292 mach = pdev->dev.platform_data; in snd_ehl_rt5660_probe()
294 mach->mach_params.platform); in snd_ehl_rt5660_probe()
300 return devm_snd_soc_register_card(&pdev->dev, card); in snd_ehl_rt5660_probe()