summaryrefslogtreecommitdiff
path: root/sound/soc/samsung/odroid.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-08-10 08:32:58 +0200
committerMark Brown <broonie@kernel.org>2023-08-16 14:47:19 +0100
commit2dc8c0366599cb4dfd939e6eafd94010f3aff233 (patch)
treedc7a5a19ab7a6c320419e24a53dd1efb7a55edfd /sound/soc/samsung/odroid.c
parentc91e67145bc6d03f94416f7fbe566c6f6751cd47 (diff)
downloadlwn-2dc8c0366599cb4dfd939e6eafd94010f3aff233.tar.gz
lwn-2dc8c0366599cb4dfd939e6eafd94010f3aff233.zip
ASoC: samsung: odroid: parse audio-routing
Parse generic sound card "audio-routing" property and fallback to "samsung,audio-routing" if it is missing. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230810063300.20151-10-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/samsung/odroid.c')
-rw-r--r--sound/soc/samsung/odroid.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c
index 1743bd55ba1a..c93cb5a86426 100644
--- a/sound/soc/samsung/odroid.c
+++ b/sound/soc/samsung/odroid.c
@@ -230,12 +230,13 @@ static int odroid_audio_probe(struct platform_device *pdev)
return ret;
}
- if (of_property_present(dev->of_node, "samsung,audio-routing")) {
- ret = snd_soc_of_parse_audio_routing(card,
- "samsung,audio-routing");
- if (ret < 0)
- return ret;
- }
+ ret = 0;
+ if (of_property_present(dev->of_node, "audio-routing"))
+ ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
+ else if (of_property_present(dev->of_node, "samsung,audio-routing"))
+ ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing");
+ if (ret < 0)
+ return ret;
card->dai_link = odroid_card_dais;
card->num_links = ARRAY_SIZE(odroid_card_dais);