From patchwork Thu Sep 8 13:04:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 75795 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp833943qgf; Thu, 8 Sep 2016 06:05:38 -0700 (PDT) X-Received: by 10.66.8.169 with SMTP id s9mr23492564paa.58.1473339924182; Thu, 08 Sep 2016 06:05:24 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dy17si47023020pad.127.2016.09.08.06.05.23; Thu, 08 Sep 2016 06:05:23 -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 S932338AbcIHNFW (ORCPT + 8 others); Thu, 8 Sep 2016 09:05:22 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:37045 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932858AbcIHNFT (ORCPT ); Thu, 8 Sep 2016 09:05:19 -0400 Received: by mail-wm0-f54.google.com with SMTP id w12so87989494wmf.0 for ; Thu, 08 Sep 2016 06:05:19 -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=+q80tfCkrf8JjbuB8WPxJLlhb+oi+b245oYfIicRuD8=; b=BDtQPoNKoen/U2yd8vnx87L1oOo/MDvz9mtiJOH4tPRJo8YjYwhZ9G3O1NInMbr2kh NZauGBegEdpct22eLDsoE/ysn4wuDB8fqdCE1Mi2Ef+LPCdM2YCX8pb0p9vsg5z8v7Gn 4D2/ruGZ36c1753q/6P8VbBaCHgRG8M0FYIf8= 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=+q80tfCkrf8JjbuB8WPxJLlhb+oi+b245oYfIicRuD8=; b=Tfd+trobTfyvAA00LkOf1UAwKhGSnXj0yDg0c5aZ0R5zfGK1RZDwehWJo1Ep3OmhGK J7gCv6C5643NtUEY9CDKFQ+9a4Av9OaYbi9CDFPKQCRs2JnjBgVnBeA5+y698msk06In RuEu+b/gyLTx+wRyRRclrqMgiXEJwKj6dZl1N2y8cpN1TKiOnouQakJSO3zyEhGVy0TY PfB7dm2peG/l2gLbHya5EmpDrTLiW0O6OXJ+HW3YvJubVPdqKKNUf6ZaKpDzlQGMCcH8 GNfPfh42C4ErTaYNOjc6BwEkjAD8j60DKMc2nRn0WUN3Yg/O7XHVvsITFuE+6h/18NK9 sC7Q== X-Gm-Message-State: AE9vXwOwyHxGikUTrw7oItijC/SVYnsAmsD4vcQR/F83VJfqKE1h6r29dhmdue4IwAjGGG3+ X-Received: by 10.194.90.174 with SMTP id bx14mr36884107wjb.41.1473339918289; Thu, 08 Sep 2016 06:05:18 -0700 (PDT) Received: from localhost.localdomain (host-2-103-180-164.as13285.net. [2.103.180.164]) by smtp.gmail.com with ESMTPSA id o2sm44157582wjo.3.2016.09.08.06.05.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Sep 2016 06:05:17 -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 v5 4/5] ASoC: qcom: apq8016-sbc: Add support to multi codec. Date: Thu, 8 Sep 2016 14:04:55 +0100 Message-Id: <1473339896-9409-5-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473339896-9409-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1473339896-9409-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. Also update the bindings and example to show that the card supports multicodec. Signed-off-by: Srinivas Kandagatla --- Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt | 4 ++-- sound/soc/qcom/apq8016_sbc.c | 11 +++-------- 2 files changed, 5 insertions(+), 10 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/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt index 72c1928..6a4aadc 100644 --- a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt +++ b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt @@ -44,7 +44,7 @@ Required dai-link subnodes: Required CPU/CODEC subnodes properties: -link-name : Name of the dai link. --sound-dai : phandle and port of CPU/CODEC +-sound-dai : phandle/s and port of CPU/CODEC Example: @@ -72,7 +72,7 @@ sound: sound { sound-dai = <&lpass MI2S_PRIMARY>; }; codec { - sound-dai = <&wcd_codec 0>; + sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; }; }; 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); }