summaryrefslogtreecommitdiff
path: root/sound/soc/samsung
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-06-06 13:09:30 +0900
committerMark Brown <broonie@kernel.org>2019-06-06 21:28:26 +0100
commit930f74a171f5f3a5acc551568c6a1515344ceef1 (patch)
treefed4dffe70a8615335202c331870b37635ca0ade /sound/soc/samsung
parent88dd84a196ef69eb33baf555b74687de192f34a5 (diff)
ASoC: samsung: arndale_rt5631: 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/samsung')
-rw-r--r--sound/soc/samsung/arndale_rt5631.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/sound/soc/samsung/arndale_rt5631.c b/sound/soc/samsung/arndale_rt5631.c
index cc334e1866f6..c213913eb984 100644
--- a/sound/soc/samsung/arndale_rt5631.c
+++ b/sound/soc/samsung/arndale_rt5631.c
@@ -50,15 +50,20 @@ static struct snd_soc_ops arndale_ops = {
.hw_params = arndale_hw_params,
};
+SND_SOC_DAILINK_DEFS(rt5631_hifi,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5631-hifi")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
static struct snd_soc_dai_link arndale_rt5631_dai[] = {
{
.name = "RT5631 HiFi",
.stream_name = "Primary",
- .codec_dai_name = "rt5631-hifi",
.dai_fmt = SND_SOC_DAIFMT_I2S
| SND_SOC_DAIFMT_NB_NF
| SND_SOC_DAIFMT_CBS_CFS,
.ops = &arndale_ops,
+ SND_SOC_DAILINK_REG(rt5631_hifi),
},
};
@@ -78,24 +83,24 @@ static int arndale_audio_probe(struct platform_device *pdev)
card->dev = &pdev->dev;
for (n = 0; np && n < ARRAY_SIZE(arndale_rt5631_dai); n++) {
- if (!arndale_rt5631_dai[n].cpu_dai_name) {
- arndale_rt5631_dai[n].cpu_of_node = of_parse_phandle(np,
+ if (!arndale_rt5631_dai[n].cpus->dai_name) {
+ arndale_rt5631_dai[n].cpus->of_node = of_parse_phandle(np,
"samsung,audio-cpu", n);
- if (!arndale_rt5631_dai[n].cpu_of_node) {
+ if (!arndale_rt5631_dai[n].cpus->of_node) {
dev_err(&pdev->dev,
"Property 'samsung,audio-cpu' missing or invalid\n");
return -EINVAL;
}
}
- if (!arndale_rt5631_dai[n].platform_name)
- arndale_rt5631_dai[n].platform_of_node =
- arndale_rt5631_dai[n].cpu_of_node;
+ if (!arndale_rt5631_dai[n].platforms->name)
+ arndale_rt5631_dai[n].platforms->of_node =
+ arndale_rt5631_dai[n].cpus->of_node;
- arndale_rt5631_dai[n].codec_name = NULL;
- arndale_rt5631_dai[n].codec_of_node = of_parse_phandle(np,
+ arndale_rt5631_dai[n].codecs->name = NULL;
+ arndale_rt5631_dai[n].codecs->of_node = of_parse_phandle(np,
"samsung,audio-codec", n);
- if (!arndale_rt5631_dai[0].codec_of_node) {
+ if (!arndale_rt5631_dai[0].codecs->of_node) {
dev_err(&pdev->dev,
"Property 'samsung,audio-codec' missing or invalid\n");
return -EINVAL;