From patchwork Sun Feb 15 01:22:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 5829051 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D17EEBF440 for ; Sun, 15 Feb 2015 01:24:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 492F920254 for ; Sun, 15 Feb 2015 01:24:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 2465F2020F for ; Sun, 15 Feb 2015 01:23:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3C7442604AF; Sun, 15 Feb 2015 02:23:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 1B6DB26048D; Sun, 15 Feb 2015 02:23:30 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6CF412604A6; Sun, 15 Feb 2015 02:23:28 +0100 (CET) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by alsa0.perex.cz (Postfix) with ESMTP id 70CB526048D for ; Sun, 15 Feb 2015 02:23:17 +0100 (CET) Received: by pdbfp1 with SMTP id fp1so27221276pdb.9 for ; Sat, 14 Feb 2015 17:23:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=/6fJ61sTNIYItur6T5ueN5+WpLGgQNw91urjXMYj2oU=; b=VrnrZW32klU0UAmlgaidJk0WCeunQ0c7xLtXI9qd8EEiolhlZRH2ibOhkGjPOB/VHV bSESiXIb79KlqIhqrlc5Iv/qePR4lK19G9yGRLsNnD9wMqp7pQyG/KJijRqN2Qejvp3h nOiQnLV8xt8NB+qkD3aRRhNTxJjMluya8IRvHwok0Pt2bbir4BFaundXaLYvWd1JmnZr Q8uXjv1NCD/G1dUGmt5QyfmCwn5PYt5iNDoJnz+jzQfMWp9ZoNG+L5JlEdq8d4lKgkRI PDKRL5LPSxbpmzsdYAg9klnhAGygEfawIazN5ixAHoUf5ilVIOlNTN+V6So2OH/wYv/p GwyA== X-Received: by 10.70.140.107 with SMTP id rf11mr27458314pdb.53.1423963396264; Sat, 14 Feb 2015 17:23:16 -0800 (PST) Received: from Alpha.attlocal.net (99-189-113-45.lightspeed.sntcca.sbcglobal.net. [99.189.113.45]) by mx.google.com with ESMTPSA id uu10sm10536826pbc.52.2015.02.14.17.23.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Feb 2015 17:23:15 -0800 (PST) From: Nicolin Chen To: broonie@kernel.org Date: Sat, 14 Feb 2015 17:22:50 -0800 Message-Id: <5f668d5949ffb3237041cdd28304d5deb2331b15.1423963314.git.nicoleotsuka@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <15b0ecaefffcd48bb5f56fe76326d705c3467438.1423963314.git.nicoleotsuka@gmail.com> References: <15b0ecaefffcd48bb5f56fe76326d705c3467438.1423963314.git.nicoleotsuka@gmail.com> In-Reply-To: <15b0ecaefffcd48bb5f56fe76326d705c3467438.1423963314.git.nicoleotsuka@gmail.com> References: <15b0ecaefffcd48bb5f56fe76326d705c3467438.1423963314.git.nicoleotsuka@gmail.com> Cc: tiwai@suse.de, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, lgirdwood@gmail.com Subject: [alsa-devel] [PATCH 2/2] ASoC: fsl-asoc-card: Add snd_soc_of_parse_audio_routing() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds snd_soc_of_parse_audio_routing() to get dapm routes configurations via Device Tree. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl-asoc-card.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 3f6959c..de43887 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -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;