提交 09065f8b 编写于 作者: S Srinivas Kandagatla 提交者: Mark Brown

ASoC: qcom: apq8016-sbc: Add support to multi codec.

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: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: NRob Herring <robh@kernel.org>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 393ac586
...@@ -44,7 +44,7 @@ Required dai-link subnodes: ...@@ -44,7 +44,7 @@ Required dai-link subnodes:
Required CPU/CODEC subnodes properties: Required CPU/CODEC subnodes properties:
-link-name : Name of the dai link. -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: Example:
...@@ -72,7 +72,7 @@ sound: sound { ...@@ -72,7 +72,7 @@ sound: sound {
sound-dai = <&lpass MI2S_PRIMARY>; sound-dai = <&lpass MI2S_PRIMARY>;
}; };
codec { codec {
sound-dai = <&wcd_codec 0>; sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
}; };
}; };
......
...@@ -123,20 +123,15 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) ...@@ -123,20 +123,15 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card)
return ERR_PTR(-EINVAL); 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); ret = snd_soc_of_get_dai_name(cpu, &link->cpu_dai_name);
if (ret) { if (ret) {
dev_err(card->dev, "error getting cpu dai name\n"); dev_err(card->dev, "error getting cpu dai name\n");
return ERR_PTR(ret); return ERR_PTR(ret);
} }
ret = snd_soc_of_get_dai_name(codec, &link->codec_dai_name); ret = snd_soc_of_get_dai_link_codecs(dev, codec, link);
if (ret) {
if (ret < 0) {
dev_err(card->dev, "error getting codec dai name\n"); dev_err(card->dev, "error getting codec dai name\n");
return ERR_PTR(ret); return ERR_PTR(ret);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册