summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-04-12 08:52:13 +0900
committerMark Brown <broonie@kernel.org>2021-04-13 12:32:48 +0100
commite25704f84ca2b586e8e65d1b2ab686205b3076fe (patch)
tree0e5bb674a28f198022e2f59656ebb214fc4044b2 /sound
parentfafc05aadd4b6ce5c161135de9d3a653fc054543 (diff)
downloadlinux-e25704f84ca2b586e8e65d1b2ab686205b3076fe.tar.bz2
ASoC: simple-card-utils: remove asoc_simple_parse_xxx()
ASoC is now supporting multi DAI, but, current simple-card / audio-graph are assuming fixed single DAI. Now, asoc_simple_parse_xxx() macro is assuming single DAI. To support multi-CPU/Codec, this patch unpack asoc_simple_parse_xxx() macro, and uses "&dai_link->cpus[i]" instead of "dai_link->cpus". Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pmz0wf9u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/generic/audio-graph-card.c16
-rw-r--r--sound/soc/generic/simple-card.c18
2 files changed, 17 insertions, 17 deletions
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 3a5bef2a91d3..145f8a19c9e8 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -247,11 +247,11 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,
dai = dai_props->cpu_dai;
- ret = asoc_simple_parse_cpu(ep, dai_link, &is_single_links);
+ ret = asoc_simple_parse_dai(ep, dai_link->cpus, &is_single_links);
if (ret)
goto out_put_node;
- ret = asoc_simple_parse_clk_cpu(dev, ep, dai_link, dai);
+ ret = asoc_simple_parse_clk(dev, ep, dai, dai_link->cpus);
if (ret < 0)
goto out_put_node;
@@ -290,11 +290,11 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,
dai = dai_props->codec_dai;
cconf = dai_props->codec_conf;
- ret = asoc_simple_parse_codec(ep, dai_link);
+ ret = asoc_simple_parse_dai(ep, dai_link->codecs, NULL);
if (ret < 0)
goto out_put_node;
- ret = asoc_simple_parse_clk_codec(dev, ep, dai_link, dai);
+ ret = asoc_simple_parse_clk(dev, ep, dai, dai_link->codecs);
if (ret < 0)
goto out_put_node;
@@ -371,11 +371,11 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv,
if (ret < 0)
return ret;
- ret = asoc_simple_parse_cpu(cpu_ep, dai_link, &single_cpu);
+ ret = asoc_simple_parse_dai(cpu_ep, dai_link->cpus, &single_cpu);
if (ret < 0)
return ret;
- ret = asoc_simple_parse_codec(codec_ep, dai_link);
+ ret = asoc_simple_parse_dai(codec_ep, dai_link->codecs, NULL);
if (ret < 0)
return ret;
@@ -387,11 +387,11 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv,
if (ret < 0)
return ret;
- ret = asoc_simple_parse_clk_cpu(dev, cpu_ep, dai_link, cpu_dai);
+ ret = asoc_simple_parse_clk(dev, cpu_ep, cpu_dai, dai_link->cpus);
if (ret < 0)
return ret;
- ret = asoc_simple_parse_clk_codec(dev, codec_ep, dai_link, codec_dai);
+ ret = asoc_simple_parse_clk(dev, codec_ep, codec_dai, dai_link->codecs);
if (ret < 0)
return ret;
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 7665bbf2a6c0..6a55b8672166 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -148,11 +148,11 @@ static int simple_dai_link_of_dpcm(struct asoc_simple_priv *priv,
dai = dai_props->cpu_dai;
- ret = asoc_simple_parse_cpu(np, dai_link, &is_single_links);
+ ret = asoc_simple_parse_dai(np, dai_link->cpus, &is_single_links);
if (ret)
goto out_put_node;
- ret = asoc_simple_parse_clk_cpu(dev, np, dai_link, dai);
+ ret = asoc_simple_parse_clk(dev, np, dai, dai_link->cpus);
if (ret < 0)
goto out_put_node;
@@ -176,11 +176,11 @@ static int simple_dai_link_of_dpcm(struct asoc_simple_priv *priv,
dai = dai_props->codec_dai;
cconf = dai_props->codec_conf;
- ret = asoc_simple_parse_codec(np, dai_link);
+ ret = asoc_simple_parse_dai(np, dai_link->codecs, NULL);
if (ret < 0)
goto out_put_node;
- ret = asoc_simple_parse_clk_codec(dev, np, dai_link, dai);
+ ret = asoc_simple_parse_clk(dev, np, dai, dai_link->codecs);
if (ret < 0)
goto out_put_node;
@@ -260,15 +260,15 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv,
simple_parse_mclk_fs(top, cpu, codec, dai_props, prefix);
- ret = asoc_simple_parse_cpu(cpu, dai_link, &single_cpu);
+ ret = asoc_simple_parse_dai(cpu, dai_link->cpus, &single_cpu);
if (ret < 0)
goto dai_link_of_err;
- ret = asoc_simple_parse_codec(codec, dai_link);
+ ret = asoc_simple_parse_dai(codec, dai_link->codecs, NULL);
if (ret < 0)
goto dai_link_of_err;
- ret = asoc_simple_parse_platform(plat, dai_link);
+ ret = asoc_simple_parse_dai(plat, dai_link->platforms, NULL);
if (ret < 0)
goto dai_link_of_err;
@@ -280,11 +280,11 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv,
if (ret < 0)
goto dai_link_of_err;
- ret = asoc_simple_parse_clk_cpu(dev, cpu, dai_link, cpu_dai);
+ ret = asoc_simple_parse_clk(dev, cpu, cpu_dai, dai_link->cpus);
if (ret < 0)
goto dai_link_of_err;
- ret = asoc_simple_parse_clk_codec(dev, codec, dai_link, codec_dai);
+ ret = asoc_simple_parse_clk(dev, codec, codec_dai, dai_link->codecs);
if (ret < 0)
goto dai_link_of_err;