diff options
author | Tzung-Bi Shih <tzungbi@google.com> | 2020-07-10 13:25:01 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-07-10 15:57:52 +0100 |
commit | f2024dc55fcb743469238aa11f9967e0752ac600 (patch) | |
tree | be483050ba0d15f5f5d3967102fa84e87576cd86 /sound/soc/mediatek | |
parent | cc07e14b149e4260075093c06b371bcb31574ccc (diff) | |
download | linux-next-f2024dc55fcb743469238aa11f9967e0752ac600.tar.gz |
ASoC: mediatek: mt8183: use hdmi-codec
Adds DAI link to use hdmi-codec.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200710052505.3664118-3-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek')
-rw-r--r-- | sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c index 964f2f821782..c375e9f91a34 100644 --- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c @@ -258,7 +258,7 @@ SND_SOC_DAILINK_DEFS(i2s5, SND_SOC_DAILINK_DEFS(tdm, DAILINK_COMP_ARRAY(COMP_CPU("TDM")), - DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "i2s-hifi")), DAILINK_COMP_ARRAY(COMP_EMPTY())); static int mt8183_mt6358_tdm_startup(struct snd_pcm_substream *substream) @@ -562,7 +562,7 @@ static int mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev) { struct snd_soc_card *card; - struct device_node *platform_node, *ec_codec; + struct device_node *platform_node, *ec_codec, *hdmi_codec; struct snd_soc_dai_link *dai_link; struct mt8183_mt6358_ts3a227_max98357_priv *priv; const struct of_device_id *match; @@ -583,6 +583,8 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev) card->dev = &pdev->dev; ec_codec = of_parse_phandle(pdev->dev.of_node, "mediatek,ec-codec", 0); + hdmi_codec = of_parse_phandle(pdev->dev.of_node, + "mediatek,hdmi-codec", 0); for_each_card_prelinks(card, i, dai_link) { if (ec_codec && strcmp(dai_link->name, "Wake on Voice") == 0) { @@ -626,6 +628,9 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev) } } + if (hdmi_codec && strcmp(dai_link->name, "TDM") == 0) + dai_link->codecs->of_node = hdmi_codec; + if (!dai_link->platforms->name) dai_link->platforms->of_node = platform_node; } |