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@linaro.org
Subject: [PATCH v6 4/5] ASoC: qcom: apq8016-sbc: Add support to multi codec.
Date: Thu, 20 Oct 2016 15:20:48 +0100 [thread overview]
Message-ID: <1476973249-14547-5-git-send-email-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <1476973249-14547-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>
Acked-by: Rob Herring <robh@kernel.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.9.2
next prev parent reply other threads:[~2016-10-20 14:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 14:20 [PATCH v6 0/5] ASoC: Add support to Qualcomm msm8916-wcd multi codec Srinivas Kandagatla
2016-10-20 14:20 ` [PATCH v6 1/5] ASoC: codecs: Add msm8916-wcd analog codec Srinivas Kandagatla
[not found] ` <1476973249-14547-2-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-10-24 17:00 ` Mark Brown
2016-10-24 18:04 ` Applied "ASoC: codecs: Add msm8916-wcd analog codec" to the asoc tree Mark Brown
2016-10-20 14:20 ` Srinivas Kandagatla [this message]
[not found] ` <1476973249-14547-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-10-20 14:20 ` [PATCH v6 2/5] ASoC: codecs: Add msm8916-wcd digital codec Srinivas Kandagatla
[not found] ` <1476973249-14547-3-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-10-24 18:04 ` Applied "ASoC: codecs: Add msm8916-wcd digital codec" to the asoc tree Mark Brown
2016-10-20 14:20 ` [PATCH v6 3/5] ASoC: apq8016-sbc: dt bindings: remove incorrect property Srinivas Kandagatla
2016-10-20 14:20 ` [PATCH v6 5/5] arm64: dts: apq8016-sbc: add analog audio support with multicodec Srinivas Kandagatla
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=1476973249-14547-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).