Commit ae0727ab authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: audio-graph: use simple_props_to_xxx() macro

We shouldn't use dai_props->cpus/codecs directly,
because these are array now to supporting multi CPU/Codec/Platform.
This patch uses simple_props_to_xxx() macro for it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0p5zs97.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7ed59209
......@@ -246,7 +246,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,
dai_link->dynamic = 1;
dai_link->dpcm_merged_format = 1;
dai = dai_props->cpu_dai;
dai = simple_props_to_dai_cpu(dai_props, 0);
ret = asoc_simple_parse_dai(ep, cpus, &is_single_links);
if (ret)
......@@ -288,8 +288,8 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,
dai_link->no_pcm = 1;
dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup;
dai = dai_props->codec_dai;
cconf = dai_props->codec_conf;
dai = simple_props_to_dai_codec(dai_props, 0);
cconf = simple_props_to_codec_conf(dai_props, 0);
ret = asoc_simple_parse_dai(ep, codecs, NULL);
if (ret < 0)
......@@ -355,8 +355,8 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv,
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link);
struct device_node *top = dev->of_node;
struct asoc_simple_dai *cpu_dai = dai_props->cpu_dai;
struct asoc_simple_dai *codec_dai = dai_props->codec_dai;
struct asoc_simple_dai *cpu_dai = simple_props_to_dai_cpu(dai_props, 0);
struct asoc_simple_dai *codec_dai = simple_props_to_dai_codec(dai_props, 0);
struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0);
struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0);
struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment