From patchwork Tue Sep 6 09:57:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 9316307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 89D63607D3 for ; Tue, 6 Sep 2016 10:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DE7E28C22 for ; Tue, 6 Sep 2016 10:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7259728C2D; Tue, 6 Sep 2016 10:01:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B951628C22 for ; Tue, 6 Sep 2016 10:01:22 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0C44E266BFC; Tue, 6 Sep 2016 12:01:14 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1577226697B; Tue, 6 Sep 2016 11:58:54 +0200 (CEST) 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 5CF8F266967; Tue, 6 Sep 2016 11:58:52 +0200 (CEST) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by alsa0.perex.cz (Postfix) with ESMTP id 1B60426695F for ; Tue, 6 Sep 2016 11:58:04 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id w12so81741315wmf.0 for ; Tue, 06 Sep 2016 02:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nqSZmefwjZQQ+hOsC5n3JobRWNmhf0/9UjaoLVaiqz4=; b=XDV8T6tXgTUd/0vb6mnOwrAazFGAa/SBgRGaL5ZemLh727is25iHWgmPeSQlMfARaL F+8kfqppCVln60AwLvofUPF8hVLMW2M3WQZ34K3oPrX8FC3OtrESQIkJwRVj08H6WsnJ FsUIWiyb1cx2HfDRyidiPIKbO659gYwdrWDo8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nqSZmefwjZQQ+hOsC5n3JobRWNmhf0/9UjaoLVaiqz4=; b=HNg7+ZgKzm3sUZunzwQAyMm+bWrvQlfoqKvNITG6iAqOcKOKqS0tiv82oKtgeKp8dF 8gra4imJ/nzv2nkwXtddBKa2PVGxaUPKki/ChOrvAIRn+aOEgfKTC2hHw9CvZyWzrwc4 93yzrMRSROgf6lKi1P3nNLBqMyX8EwUepdieznnmNOpww1rYab1gETGVmPNkSR1smDLe vdEwAy5T3u1qKe4wlWevOIdWPupuUvAovZp9UOWNmLKa+LhwqpgDIN7LDv0+/ITRX1pg ziHQjTajt5o4zyedroBn6XPJjGjxhfZpB69IAv0zX8rE/rgyF/PG0aljyifSRczgv5Gu Y7mw== X-Gm-Message-State: AE9vXwPLUQ8bpiqEzcY4oy/74aKQ/8QqLHSRBxoyXPuqwtoejuD4P89nqLwx/tt3N58oW08F X-Received: by 10.194.142.110 with SMTP id rv14mr8398108wjb.137.1473155883734; Tue, 06 Sep 2016 02:58:03 -0700 (PDT) Received: from localhost.localdomain (host-2-103-180-164.as13285.net. [2.103.180.164]) by smtp.gmail.com with ESMTPSA id pm1sm32415679wjb.40.2016.09.06.02.58.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Sep 2016 02:58:03 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, alsa-devel@alsa-project.org Date: Tue, 6 Sep 2016 10:57:44 +0100 Message-Id: <1473155865-13361-6-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473155865-13361-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1473155865-13361-1-git-send-email-srinivas.kandagatla@linaro.org> Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, kwestfie@codeaurora.org, linux-arm-msm@vger.kernel.org, tiwai@suse.com, robh+dt@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH v4 5/6] ASoC: qcom: apq8016-sbc: Add support to multi codec. 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 support to multi codec, as the msm8916 codec is now split into two codecs, Analog and Digital. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/apq8016_sbc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index 07f91e9..d084d74 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -123,20 +123,15 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) return ERR_PTR(-EINVAL); } - link->codec_of_node = of_parse_phandle(codec, "sound-dai", 0); - if (!link->codec_of_node) { - dev_err(card->dev, "error getting codec phandle\n"); - return ERR_PTR(-EINVAL); - } - ret = snd_soc_of_get_dai_name(cpu, &link->cpu_dai_name); if (ret) { dev_err(card->dev, "error getting cpu dai name\n"); return ERR_PTR(ret); } - ret = snd_soc_of_get_dai_name(codec, &link->codec_dai_name); - if (ret) { + ret = snd_soc_of_get_dai_link_codecs(dev, codec, link); + + if (ret < 0) { dev_err(card->dev, "error getting codec dai name\n"); return ERR_PTR(ret); }