diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-06-06 00:13:15 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-06 16:37:12 -0400 |
commit | c3e2a4af64cb74ea66abca1c80aa38b0c9d15567 (patch) | |
tree | e3eb339365babe0135a966969e4dcb7841bd9222 | |
parent | d6db366a411c7e3ecc13096c58a290593be7a804 (diff) |
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: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/ti/rx51.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/sound/soc/ti/rx51.c b/sound/soc/ti/rx51.c index 57448bd5ad77..0684f961de76 100644 --- a/sound/soc/ti/rx51.c +++ b/sound/soc/ti/rx51.c | |||
@@ -312,18 +312,21 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) | |||
312 | } | 312 | } |
313 | 313 | ||
314 | /* Digital audio interface glue - connects codec <--> CPU */ | 314 | /* Digital audio interface glue - connects codec <--> CPU */ |
315 | SND_SOC_DAILINK_DEFS(aic34, | ||
316 | DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.2")), | ||
317 | DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.2-0018", | ||
318 | "tlv320aic3x-hifi")), | ||
319 | DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.2"))); | ||
320 | |||
315 | static struct snd_soc_dai_link rx51_dai[] = { | 321 | static struct snd_soc_dai_link rx51_dai[] = { |
316 | { | 322 | { |
317 | .name = "TLV320AIC34", | 323 | .name = "TLV320AIC34", |
318 | .stream_name = "AIC34", | 324 | .stream_name = "AIC34", |
319 | .cpu_dai_name = "omap-mcbsp.2", | ||
320 | .codec_dai_name = "tlv320aic3x-hifi", | ||
321 | .platform_name = "omap-mcbsp.2", | ||
322 | .codec_name = "tlv320aic3x-codec.2-0018", | ||
323 | .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | | 325 | .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | |
324 | SND_SOC_DAIFMT_CBM_CFM, | 326 | SND_SOC_DAIFMT_CBM_CFM, |
325 | .init = rx51_aic34_init, | 327 | .init = rx51_aic34_init, |
326 | .ops = &rx51_ops, | 328 | .ops = &rx51_ops, |
329 | SND_SOC_DAILINK_REG(aic34), | ||
327 | }, | 330 | }, |
328 | }; | 331 | }; |
329 | 332 | ||
@@ -389,18 +392,18 @@ static int rx51_soc_probe(struct platform_device *pdev) | |||
389 | dev_err(&pdev->dev, "McBSP node is not provided\n"); | 392 | dev_err(&pdev->dev, "McBSP node is not provided\n"); |
390 | return -EINVAL; | 393 | return -EINVAL; |
391 | } | 394 | } |
392 | rx51_dai[0].cpu_dai_name = NULL; | 395 | rx51_dai[0].cpus->dai_name = NULL; |
393 | rx51_dai[0].platform_name = NULL; | 396 | rx51_dai[0].platforms->name = NULL; |
394 | rx51_dai[0].cpu_of_node = dai_node; | 397 | rx51_dai[0].cpus->of_node = dai_node; |
395 | rx51_dai[0].platform_of_node = dai_node; | 398 | rx51_dai[0].platforms->of_node = dai_node; |
396 | 399 | ||
397 | dai_node = of_parse_phandle(np, "nokia,audio-codec", 0); | 400 | dai_node = of_parse_phandle(np, "nokia,audio-codec", 0); |
398 | if (!dai_node) { | 401 | if (!dai_node) { |
399 | dev_err(&pdev->dev, "Codec node is not provided\n"); | 402 | dev_err(&pdev->dev, "Codec node is not provided\n"); |
400 | return -EINVAL; | 403 | return -EINVAL; |
401 | } | 404 | } |
402 | rx51_dai[0].codec_name = NULL; | 405 | rx51_dai[0].codecs->name = NULL; |
403 | rx51_dai[0].codec_of_node = dai_node; | 406 | rx51_dai[0].codecs->of_node = dai_node; |
404 | 407 | ||
405 | dai_node = of_parse_phandle(np, "nokia,audio-codec", 1); | 408 | dai_node = of_parse_phandle(np, "nokia,audio-codec", 1); |
406 | if (!dai_node) { | 409 | if (!dai_node) { |