ASoC: samsung: tm2_wm5110: parse audio-routing
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 10 Aug 2023 06:32:59 +0000 (08:32 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 16 Aug 2023 13:47:20 +0000 (14:47 +0100)
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-11-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/samsung/tm2_wm5110.c

index d611ec9..5ebf17f 100644 (file)
@@ -523,10 +523,14 @@ static int tm2_probe(struct platform_device *pdev)
                return ret;
        }
 
-       ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing");
+       ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
        if (ret < 0) {
-               dev_err(dev, "Audio routing is not specified or invalid\n");
-               return ret;
+               /* Backwards compatible way */
+               ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing");
+               if (ret < 0) {
+                       dev_err(dev, "Audio routing is not specified or invalid\n");
+                       return ret;
+               }
        }
 
        card->aux_dev[0].dlc.of_node = of_parse_phandle(dev->of_node,