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: 75490 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp459936qgf; Tue, 6 Sep 2016 02:58:19 -0700 (PDT) X-Received: by 10.66.148.202 with SMTP id tu10mr70381118pab.52.1473155892955; Tue, 06 Sep 2016 02:58:12 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15si34676952pfb.247.2016.09.06.02.58.12; Tue, 06 Sep 2016 02:58:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933325AbcIFJ6H (ORCPT + 8 others); Tue, 6 Sep 2016 05:58:07 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:36542 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933698AbcIFJ6F (ORCPT ); Tue, 6 Sep 2016 05:58:05 -0400 Received: by mail-wm0-f48.google.com with SMTP id b187so55033777wme.1 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=SsHveVdSzY/RCUp5yz3F3o/ovXpRtMw7qJSjx+YF9MJQJce+Pz4oRf/U6kw3xtDJF1 tUw7hnN7BapyDsno35ICFvNGN3lhsyCje7kzFBbkn/uudbJ7Z19h+dholOUXBkazjYxA zDnJ6JUGgcrMiJuNyLHdKjNSexlDoQJiVPas8bg/xfRRvVkKAhr4NhP3uBzuaYe/duzu /HBX/6mm0O1eOofg6QV89nM9SiCaQyyK7ijydMa0zNNpOE+TyKJse30z12+8Ji+METTu 4VIQuKccUDPr8JqltBovhiOh1ZTHRv6ukE4Gl190lVwkm3QcN3cYwY5Xv3/k0AfAkmp5 gsUw== X-Gm-Message-State: AE9vXwOktcEoTXwwfL9AMdqj0Kui/8e/v2NaZb/NIsOmP1qiH8i3tAXA4y0luC2O0FK0B5wZ 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 Cc: robh+dt@kernel.org, mark.rutland@arm.com, tiwai@suse.com, devicetree@vger.kernel.org, kwestfie@codeaurora.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v4 5/6] ASoC: qcom: apq8016-sbc: Add support to multi codec. 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> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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); }