devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
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 <srinivas.kandagatla@linaro.org>
Subject: [PATCH v5 4/5] ASoC: qcom: apq8016-sbc: Add support to multi codec.
Date: Thu,  8 Sep 2016 14:04:55 +0100	[thread overview]
Message-ID: <1473339896-9409-5-git-send-email-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <1473339896-9409-1-git-send-email-srinivas.kandagatla@linaro.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 <srinivas.kandagatla@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt |  4 ++--
 sound/soc/qcom/apq8016_sbc.c                                 | 11 +++--------
 2 files changed, 5 insertions(+), 10 deletions(-)

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);
 		}
-- 
2.7.4

  parent reply	other threads:[~2016-09-08 13:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 13:04 [PATCH v5 0/5] ASoC: Add support to Qualcomm msm8916-wcd multi codec Srinivas Kandagatla
2016-09-08 13:04 ` [PATCH v5 1/5] ASoC: codecs: Add msm8916-wcd analog codec Srinivas Kandagatla
2016-09-16 15:41   ` Rob Herring
2016-09-19 11:00     ` Srinivas Kandagatla
     [not found]   ` <1473339896-9409-2-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-09-16 15:43     ` Rob Herring
     [not found] ` <1473339896-9409-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-09-08 13:04   ` [PATCH v5 2/5] ASoC: codecs: Add msm8916-wcd digital codec Srinivas Kandagatla
     [not found]     ` <1473339896-9409-3-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-09-16 15:45       ` Rob Herring
2016-09-19 11:00         ` Srinivas Kandagatla
2016-09-08 13:04   ` [PATCH v5 3/5] ASoC: apq8016-sbc: dt bindings: remove incorrect property Srinivas Kandagatla
2016-09-16 15:45     ` Rob Herring
2016-10-24 18:04     ` Applied "ASoC: apq8016-sbc: dt bindings: remove incorrect property" to the asoc tree Mark Brown
2016-09-08 13:04   ` [PATCH v5 5/5] arm64: dts: apq8016-sbc: add analog audio support with multicodec Srinivas Kandagatla
2016-09-08 13:04 ` Srinivas Kandagatla [this message]
2016-09-16 19:12   ` [PATCH v5 4/5] ASoC: qcom: apq8016-sbc: Add support to multi codec Rob Herring
2016-10-24 18:04   ` Applied "ASoC: qcom: apq8016-sbc: Add support to multi codec." to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473339896-9409-5-git-send-email-srinivas.kandagatla@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kwestfie@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).