All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH 5/5] ASoC: audio-graph: use simple_props_to_xxx() macro
Date: 14 Apr 2021 08:20:20 +0900	[thread overview]
Message-ID: <87k0p5zs97.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87r1jdzsaj.wl-kuninori.morimoto.gx@renesas.com>


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/audio-graph-card.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 55384f1415b3..36b2ad7dd283 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -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);
-- 
2.25.1


  parent reply	other threads:[~2021-04-13 23:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 23:19 [PATCH 0/5] ASoC: simple-card/audio-graph: adjust to multi CPU/Codec Kuninori Morimoto
2021-04-13 23:19 ` [PATCH 1/5] ASoC: simple-card: remove unused variable from simple_parse_of() Kuninori Morimoto
2021-04-13 23:20 ` [PATCH 2/5] ASoC: simple-card: use asoc_link_to_xxx() macro Kuninori Morimoto
2021-04-13 23:20 ` [PATCH 3/5] ASoC: simple-card: use simple_props_to_xxx() macro Kuninori Morimoto
2021-04-13 23:20 ` [PATCH 4/5] ASoC: audio-graph: use asoc_link_to_xxx() macro Kuninori Morimoto
2021-04-13 23:20 ` Kuninori Morimoto [this message]
2021-04-15 18:33 ` [PATCH 0/5] ASoC: simple-card/audio-graph: adjust to multi CPU/Codec Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0p5zs97.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.