Skip to content

Commit 17b9f43

Browse files
krzkbroonie
authored andcommitted
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: 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>
1 parent 2dc8c03 commit 17b9f43

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

sound/soc/samsung/tm2_wm5110.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,10 +523,14 @@ static int tm2_probe(struct platform_device *pdev)
523523
return ret;
524524
}
525525

526-
ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing");
526+
ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
527527
if (ret < 0) {
528-
dev_err(dev, "Audio routing is not specified or invalid\n");
529-
return ret;
528+
/* Backwards compatible way */
529+
ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing");
530+
if (ret < 0) {
531+
dev_err(dev, "Audio routing is not specified or invalid\n");
532+
return ret;
533+
}
530534
}
531535

532536
card->aux_dev[0].dlc.of_node = of_parse_phandle(dev->of_node,

0 commit comments

Comments
 (0)