ASoC: fsl-asoc-card: Add snd_soc_of_parse_audio_routing()
authorNicolin Chen <nicoleotsuka@gmail.com>
Sun, 15 Feb 2015 01:22:50 +0000 (17:22 -0800)
committerMark Brown <broonie@kernel.org>
Tue, 24 Feb 2015 14:46:13 +0000 (23:46 +0900)
This patch adds snd_soc_of_parse_audio_routing() to get dapm routes
configurations via Device Tree.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl-asoc-card.c

index 3f6959c8e2f71b44cf054445b85553960e8c94d9..de438871040bd43f8b1e6a05e4a479261e5ea4bd 100644 (file)
@@ -512,6 +512,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
        memcpy(priv->dai_link, fsl_asoc_card_dai,
               sizeof(struct snd_soc_dai_link) * ARRAY_SIZE(priv->dai_link));
 
+       ret = snd_soc_of_parse_audio_routing(&priv->card, "audio-routing");
+       if (ret) {
+               dev_err(&pdev->dev, "failed to parse audio-routing: %d\n", ret);
+               goto asrc_fail;
+       }
+
        /* Normal DAI Link */
        priv->dai_link[0].cpu_of_node = cpu_np;
        priv->dai_link[0].codec_of_node = codec_np;