mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 07:34:12 +08:00
ASoC: mediatek: mt8183-da7219: 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-6-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
5653841d1e
commit
5bdbe97711
@ -354,7 +354,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 struct snd_soc_dai_link mt8183_da7219_dai_links[] = {
|
||||
@ -627,7 +627,7 @@ static struct snd_soc_card mt8183_da7219_rt1015_card = {
|
||||
static int mt8183_da7219_max98357_dev_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_soc_card *card;
|
||||
struct device_node *platform_node;
|
||||
struct device_node *platform_node, *hdmi_codec;
|
||||
struct snd_soc_dai_link *dai_link;
|
||||
struct mt8183_da7219_max98357_priv *priv;
|
||||
struct pinctrl *pinctrl;
|
||||
@ -648,6 +648,9 @@ static int mt8183_da7219_max98357_dev_probe(struct platform_device *pdev)
|
||||
card = (struct snd_soc_card *)match->data;
|
||||
card->dev = &pdev->dev;
|
||||
|
||||
hdmi_codec = of_parse_phandle(pdev->dev.of_node,
|
||||
"mediatek,hdmi-codec", 0);
|
||||
|
||||
for_each_card_prelinks(card, i, dai_link) {
|
||||
if (strcmp(dai_link->name, "I2S3") == 0) {
|
||||
if (card == &mt8183_da7219_max98357_card) {
|
||||
@ -679,6 +682,9 @@ static int mt8183_da7219_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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user