ASoC: pxa: magician: use modern dai_link style
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 6 Jun 2019 04:11:51 +0000 (13:11 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 6 Jun 2019 20:33:47 +0000 (21:33 +0100)
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>
sound/soc/pxa/magician.c

index 935a248e5bf68375540a0f26c439a7578316f45c..bf8084f2e6257f6123849bd9ecc50c9743aaecca 100644 (file)
@@ -290,24 +290,30 @@ static const struct snd_kcontrol_new uda1380_magician_controls[] = {
 };
 
 /* magician digital audio interface glue - connects codec <--> CPU */
+SND_SOC_DAILINK_DEFS(playback,
+       DAILINK_COMP_ARRAY(COMP_CPU("pxa-ssp-dai.0")),
+       DAILINK_COMP_ARRAY(COMP_CODEC("uda1380-codec.0-0018",
+                                     "uda1380-hifi-playback")),
+       DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio")));
+
+SND_SOC_DAILINK_DEFS(capture,
+       DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-i2s")),
+       DAILINK_COMP_ARRAY(COMP_CODEC("uda1380-codec.0-0018",
+                                     "uda1380-hifi-capture")),
+       DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio")));
+
 static struct snd_soc_dai_link magician_dai[] = {
 {
        .name = "uda1380",
        .stream_name = "UDA1380 Playback",
-       .cpu_dai_name = "pxa-ssp-dai.0",
-       .codec_dai_name = "uda1380-hifi-playback",
-       .platform_name = "pxa-pcm-audio",
-       .codec_name = "uda1380-codec.0-0018",
        .ops = &magician_playback_ops,
+       SND_SOC_DAILINK_REG(playback),
 },
 {
        .name = "uda1380",
        .stream_name = "UDA1380 Capture",
-       .cpu_dai_name = "pxa2xx-i2s",
-       .codec_dai_name = "uda1380-hifi-capture",
-       .platform_name = "pxa-pcm-audio",
-       .codec_name = "uda1380-codec.0-0018",
        .ops = &magician_capture_ops,
+       SND_SOC_DAILINK_REG(capture),
 }
 };