Message ID | 1473155865-13361-6-git-send-email-srinivas.kandagatla@linaro.org |
---|---|
State | New |
Headers | show |
On 06/09/16 12:27, Mark Brown wrote: > On Tue, Sep 06, 2016 at 10:57:44AM +0100, Srinivas Kandagatla wrote: >> This patch adds support to multi codec, as the msm8916 codec is now >> split into two codecs, Analog and Digital. > > Does this not break compatibility with existing machines (and require a > binding documentation update)? The bindings did not change here really, we still use "sound-dai" property to get handle to codec, previously the code was able to handle only one codec but with snd_soc_of_get_dai_link_codecs() it will now be able to handle multiple codecs. Infact I have tested this series with ADV7533 audio codec(single codec) along with this msm8916 multi codec on this card. I think a note in the bindings about the ability to handle multiple codecs be worth mentioning. thanks, srini > -- 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); }
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 <srinivas.kandagatla@linaro.org> --- 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