Skip to content

Commit 7eac1e2

Browse files
wenliangwubroonie
authored andcommitted
ASoC: mt8195: correct the dts parsing logic about DPTX and HDMITX
According to the description in dt-bindings, phandle assignment of HDMI TX and DP TX are not required properties, but driver regards them as required properties. In real use case, it's expected that DP TX and HDMI TX are optional features, so correct the behavior in driver. Fixes: 40d605d ("ASoC: mediatek: mt8195: add machine driver with mt6359, rt1019 and rt5682") Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210903060049.20764-1-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent b3dded7 commit 7eac1e2

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,27 +1018,25 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev)
10181018
of_parse_phandle(pdev->dev.of_node,
10191019
"mediatek,dptx-codec", 0);
10201020
if (!dai_link->codecs->of_node) {
1021-
dev_err(&pdev->dev, "Property 'dptx-codec' missing or invalid\n");
1022-
return -EINVAL;
1021+
dev_dbg(&pdev->dev, "No property 'dptx-codec'\n");
1022+
} else {
1023+
dai_link->codecs->name = NULL;
1024+
dai_link->codecs->dai_name = "i2s-hifi";
1025+
dai_link->init = mt8195_dptx_codec_init;
10231026
}
1024-
1025-
dai_link->codecs->name = NULL;
1026-
dai_link->codecs->dai_name = "i2s-hifi";
1027-
dai_link->init = mt8195_dptx_codec_init;
10281027
}
10291028

10301029
if (strcmp(dai_link->name, "ETDM3_OUT_BE") == 0) {
10311030
dai_link->codecs->of_node =
10321031
of_parse_phandle(pdev->dev.of_node,
10331032
"mediatek,hdmi-codec", 0);
10341033
if (!dai_link->codecs->of_node) {
1035-
dev_err(&pdev->dev, "Property 'hdmi-codec' missing or invalid\n");
1036-
return -EINVAL;
1034+
dev_dbg(&pdev->dev, "No property 'hdmi-codec'\n");
1035+
} else {
1036+
dai_link->codecs->name = NULL;
1037+
dai_link->codecs->dai_name = "i2s-hifi";
1038+
dai_link->init = mt8195_hdmi_codec_init;
10371039
}
1038-
1039-
dai_link->codecs->name = NULL;
1040-
dai_link->codecs->dai_name = "i2s-hifi";
1041-
dai_link->init = mt8195_hdmi_codec_init;
10421040
}
10431041
}
10441042

0 commit comments

Comments
 (0)