Skip to content

Commit c91e671

Browse files
krzkbroonie
authored andcommitted
ASoC: samsung: midas_wm1811: 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-9-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 55ebfaf commit c91e671

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

sound/soc/samsung/midas_wm1811.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,14 @@ static int midas_probe(struct platform_device *pdev)
476476
return ret;
477477
}
478478

479-
ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing");
479+
ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
480480
if (ret < 0) {
481-
dev_err(dev, "Audio routing invalid/unspecified\n");
482-
return ret;
481+
/* Backwards compatible way */
482+
ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing");
483+
if (ret < 0) {
484+
dev_err(dev, "Audio routing invalid/unspecified\n");
485+
return ret;
486+
}
483487
}
484488

485489
cpu = of_get_child_by_name(dev->of_node, "cpu");

0 commit comments

Comments
 (0)