Commit c3e2a4af authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: ti: rx51: use modern dai_link style

ASoC is now supporting modern style dai_link
(= snd_soc_dai_link_component) for CPU/Codec/Platform.
This patch switches to use it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d6db366a
...@@ -312,18 +312,21 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) ...@@ -312,18 +312,21 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd)
} }
/* Digital audio interface glue - connects codec <--> CPU */ /* Digital audio interface glue - connects codec <--> CPU */
SND_SOC_DAILINK_DEFS(aic34,
DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.2")),
DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.2-0018",
"tlv320aic3x-hifi")),
DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.2")));
static struct snd_soc_dai_link rx51_dai[] = { static struct snd_soc_dai_link rx51_dai[] = {
{ {
.name = "TLV320AIC34", .name = "TLV320AIC34",
.stream_name = "AIC34", .stream_name = "AIC34",
.cpu_dai_name = "omap-mcbsp.2",
.codec_dai_name = "tlv320aic3x-hifi",
.platform_name = "omap-mcbsp.2",
.codec_name = "tlv320aic3x-codec.2-0018",
.dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF |
SND_SOC_DAIFMT_CBM_CFM, SND_SOC_DAIFMT_CBM_CFM,
.init = rx51_aic34_init, .init = rx51_aic34_init,
.ops = &rx51_ops, .ops = &rx51_ops,
SND_SOC_DAILINK_REG(aic34),
}, },
}; };
...@@ -389,18 +392,18 @@ static int rx51_soc_probe(struct platform_device *pdev) ...@@ -389,18 +392,18 @@ static int rx51_soc_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "McBSP node is not provided\n"); dev_err(&pdev->dev, "McBSP node is not provided\n");
return -EINVAL; return -EINVAL;
} }
rx51_dai[0].cpu_dai_name = NULL; rx51_dai[0].cpus->dai_name = NULL;
rx51_dai[0].platform_name = NULL; rx51_dai[0].platforms->name = NULL;
rx51_dai[0].cpu_of_node = dai_node; rx51_dai[0].cpus->of_node = dai_node;
rx51_dai[0].platform_of_node = dai_node; rx51_dai[0].platforms->of_node = dai_node;
dai_node = of_parse_phandle(np, "nokia,audio-codec", 0); dai_node = of_parse_phandle(np, "nokia,audio-codec", 0);
if (!dai_node) { if (!dai_node) {
dev_err(&pdev->dev, "Codec node is not provided\n"); dev_err(&pdev->dev, "Codec node is not provided\n");
return -EINVAL; return -EINVAL;
} }
rx51_dai[0].codec_name = NULL; rx51_dai[0].codecs->name = NULL;
rx51_dai[0].codec_of_node = dai_node; rx51_dai[0].codecs->of_node = dai_node;
dai_node = of_parse_phandle(np, "nokia,audio-codec", 1); dai_node = of_parse_phandle(np, "nokia,audio-codec", 1);
if (!dai_node) { if (!dai_node) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment