From 05f9033f74798aa27569ad7866b952ff51f83c26 Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Tue, 6 Sep 2016 10:57:43 +0100 Subject: ASoC: qcom: apq8016-sbc: add support to routing via DT This patch adds support to allow audio routing via Device Tree. This is mostly used to specify MICBIAS and other power supplies relation. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown --- sound/soc/qcom/apq8016_sbc.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sound') diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index 5c3ccf3f8fdf..07f91e918b23 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -85,6 +85,15 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) return ERR_PTR(ret); } + /* DAPM routes */ + if (of_property_read_bool(node, "qcom,audio-routing")) { + ret = snd_soc_of_parse_audio_routing(card, + "qcom,audio-routing"); + if (ret) + return ERR_PTR(ret); + } + + /* Populate links */ num_links = of_get_child_count(node); -- cgit v1.2.3