Commit 17b9f438 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

ASoC: samsung: tm2_wm5110: parse audio-routing

Parse generic sound card "audio-routing" property and fallback to
"samsung,audio-routing" if it is missing.
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810063300.20151-11-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2dc8c036
...@@ -523,11 +523,15 @@ static int tm2_probe(struct platform_device *pdev) ...@@ -523,11 +523,15 @@ static int tm2_probe(struct platform_device *pdev)
return ret; return ret;
} }
ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
if (ret < 0) {
/* Backwards compatible way */
ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing"); ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing");
if (ret < 0) { if (ret < 0) {
dev_err(dev, "Audio routing is not specified or invalid\n"); dev_err(dev, "Audio routing is not specified or invalid\n");
return ret; return ret;
} }
}
card->aux_dev[0].dlc.of_node = of_parse_phandle(dev->of_node, card->aux_dev[0].dlc.of_node = of_parse_phandle(dev->of_node,
"audio-amplifier", 0); "audio-amplifier", 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment