1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright (c) 2020 Intel Corporation
5 * sof_sdw_hdmi - Helpers to handle HDMI from generic machine driver
8 #include <linux/device.h>
9 #include <linux/errno.h>
10 #include <linux/kernel.h>
11 #include <linux/list.h>
12 #include <sound/soc.h>
13 #include <sound/soc-acpi.h>
14 #include <sound/jack.h>
15 #include "sof_sdw_common.h"
16 #include "hda_dsp_common.h"
18 int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd)
20 struct mc_private *ctx = snd_soc_card_get_drvdata(rtd->card);
21 struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0);
23 ctx->hdmi.hdmi_comp = dai->component;
28 int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card)
30 struct mc_private *ctx = snd_soc_card_get_drvdata(card);
32 if (!ctx->hdmi.idisp_codec)
35 if (!ctx->hdmi.hdmi_comp)
38 return hda_dsp_hdmi_build_controls(card, ctx->hdmi.hdmi_comp);