summaryrefslogtreecommitdiff
path: root/sound/soc/ux500
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-06-06 07:18:14 +0300
committerMark Brown <broonie@kernel.org>2019-06-07 00:07:20 +0300
commit8ad8d81a0ff66f48a28a6fc795524085ce999111 (patch)
treefcbf3460af5b4881c0c08be7b3ca6d26b8eaa63b /sound/soc/ux500
parenta39bb1b740c95d8f0029b280266744897453e8ee (diff)
downloadlinux-8ad8d81a0ff66f48a28a6fc795524085ce999111.tar.xz
ASoC: ux500: mop500: 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>
Diffstat (limited to 'sound/soc/ux500')
-rw-r--r--sound/soc/ux500/mop500.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c
index c60a57797640..20552e9d9217 100644
--- a/sound/soc/ux500/mop500.c
+++ b/sound/soc/ux500/mop500.c
@@ -27,26 +27,30 @@
#include "mop500_ab8500.h"
/* Define the whole MOP500 soundcard, linking platform to the codec-drivers */
+SND_SOC_DAILINK_DEFS(link1,
+ DAILINK_COMP_ARRAY(COMP_CPU("ux500-msp-i2s.1")),
+ DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.0")),
+ DAILINK_COMP_ARRAY(COMP_PLATFORM("ux500-msp-i2s.1")));
+
+SND_SOC_DAILINK_DEFS(link2,
+ DAILINK_COMP_ARRAY(COMP_CPU("ux500-msp-i2s.3")),
+ DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.1")),
+ DAILINK_COMP_ARRAY(COMP_PLATFORM("ux500-msp-i2s.3")));
+
static struct snd_soc_dai_link mop500_dai_links[] = {
{
.name = "ab8500_0",
.stream_name = "ab8500_0",
- .cpu_dai_name = "ux500-msp-i2s.1",
- .codec_dai_name = "ab8500-codec-dai.0",
- .platform_name = "ux500-msp-i2s.1",
- .codec_name = "ab8500-codec.0",
.init = mop500_ab8500_machine_init,
.ops = mop500_ab8500_ops,
+ SND_SOC_DAILINK_REG(link1),
},
{
.name = "ab8500_1",
.stream_name = "ab8500_1",
- .cpu_dai_name = "ux500-msp-i2s.3",
- .codec_dai_name = "ab8500-codec-dai.1",
- .platform_name = "ux500-msp-i2s.3",
- .codec_name = "ab8500-codec.0",
.init = NULL,
.ops = mop500_ab8500_ops,
+ SND_SOC_DAILINK_REG(link2),
},
};
@@ -63,8 +67,8 @@ static void mop500_of_node_put(void)
int i;
for (i = 0; i < 2; i++) {
- of_node_put(mop500_dai_links[i].cpu_of_node);
- of_node_put(mop500_dai_links[i].codec_of_node);
+ of_node_put(mop500_dai_links[i].cpus->of_node);
+ of_node_put(mop500_dai_links[i].codecs->of_node);
}
}
@@ -85,12 +89,12 @@ static int mop500_of_probe(struct platform_device *pdev,
}
for (i = 0; i < 2; i++) {
- mop500_dai_links[i].cpu_of_node = msp_np[i];
- mop500_dai_links[i].cpu_dai_name = NULL;
- mop500_dai_links[i].platform_of_node = msp_np[i];
- mop500_dai_links[i].platform_name = NULL;
- mop500_dai_links[i].codec_of_node = codec_np;
- mop500_dai_links[i].codec_name = NULL;
+ mop500_dai_links[i].cpus->of_node = msp_np[i];
+ mop500_dai_links[i].cpus->dai_name = NULL;
+ mop500_dai_links[i].platforms->of_node = msp_np[i];
+ mop500_dai_links[i].platforms->name = NULL;
+ mop500_dai_links[i].codecs->of_node = codec_np;
+ mop500_dai_links[i].codecs->name = NULL;
}
snd_soc_of_parse_card_name(&mop500_card, "stericsson,card-name");