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 1/9] ASoC: soc.h: add for_each_rtd_codecs/cpus_dai() macro
Date: 09 Mar 2020 13:07:29 +0900	[thread overview]
Message-ID: <8736aii326.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <874kuyi33c.wl-kuninori.morimoto.gx@renesas.com>


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

We are using plural form for for_each_xxx() macro.
But, for_each_rtd_codec/cpu_dai() are out of this rule.
This patch adds plural form macro.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/soc.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 9543d9246ca4..09bc45b8bf00 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1177,6 +1177,20 @@ struct snd_soc_pcm_runtime {
 #define for_each_rtd_cpu_dai_rollback(rtd, i, dai)		\
 	for (; (--(i) >= 0) && ((dai) = rtd->cpu_dais[i]);)
 
+#define for_each_rtd_cpu_dais(rtd, i, dai)				\
+	for ((i) = 0;							\
+	     ((i) < rtd->num_cpus) && ((dai) = rtd->cpu_dais[i]);	\
+	     (i)++)
+#define for_each_rtd_cpu_dais_rollback(rtd, i, dai)		\
+	for (; (--(i) >= 0) && ((dai) = rtd->cpu_dais[i]);)
+#define for_each_rtd_codec_dais(rtd, i, dai)				\
+	for ((i) = 0;							\
+	     ((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]);	\
+	     (i)++)
+#define for_each_rtd_codec_dais_rollback(rtd, i, dai)		\
+	for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);)
+
+
 void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
 
 /* mixer control */
-- 
2.17.1


  reply	other threads:[~2020-03-09  4:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09  4:06 [PATCH 0/9] ASoC: soc-pcm cleanup step6 Kuninori Morimoto
2020-03-09  4:07 ` Kuninori Morimoto [this message]
2020-03-10 13:51   ` Applied "ASoC: soc.h: add for_each_rtd_codecs/cpus_dai() macro" to the asoc tree Mark Brown
2020-03-09  4:07 ` [PATCH 2/9] ASoC: Intel: use for_each_rtd_codecs/cpus_dai() macro Kuninori Morimoto
2020-03-10 13:51   ` Applied "ASoC: Intel: use for_each_rtd_codecs/cpus_dai() macro" to the asoc tree Mark Brown
2020-03-09  4:07 ` [PATCH 3/9] ASoC: mediatek: use for_each_rtd_codecs/cpus_dai() macro Kuninori Morimoto
2020-03-10 13:51   ` Applied "ASoC: mediatek: use for_each_rtd_codecs/cpus_dai() macro" to the asoc tree Mark Brown
2020-03-09  4:07 ` [PATCH 4/9] ASoC: meson: use for_each_rtd_codecs/cpus_dai() macro Kuninori Morimoto
2020-03-10 13:51   ` Applied "ASoC: meson: use for_each_rtd_codecs/cpus_dai() macro" to the asoc tree Mark Brown
2020-03-09  4:07 ` [PATCH 5/9] ASoC: qcom: use for_each_rtd_codecs/cpus_dai() macro Kuninori Morimoto
2020-03-10 13:51   ` Applied "ASoC: qcom: use for_each_rtd_codecs/cpus_dai() macro" to the asoc tree Mark Brown
2020-03-09  4:08 ` [PATCH 6/9] ASoC: soc: use for_each_rtd_codecs/cpus_dai() macro Kuninori Morimoto
2020-03-10 13:51   ` Applied "ASoC: soc: use for_each_rtd_codecs/cpus_dai() macro" to the asoc tree Mark Brown
2020-03-09  4:08 ` [PATCH 7/9] ASoC: soc.h: remove non plural form for_each_xxx macro Kuninori Morimoto
2020-03-10 13:51   ` Applied "ASoC: soc.h: remove non plural form for_each_xxx macro" to the asoc tree Mark Brown
2020-03-09  4:08 ` [PATCH 8/9] ASoC: soc-dapm: add for_each_card_dapms() macro Kuninori Morimoto
2020-03-10 13:51   ` Applied "ASoC: soc-dapm: add for_each_card_dapms() macro" to the asoc tree Mark Brown
2020-03-09  4:08 ` [PATCH 9/9] ASoC: soc-dapm: add for_each_card_widgets() macro Kuninori Morimoto
2020-03-10 13:51   ` Applied "ASoC: soc-dapm: add for_each_card_widgets() macro" to the asoc tree Mark Brown
2020-03-09 17:00 ` [PATCH 0/9] ASoC: soc-pcm cleanup step6 Sridharan, Ranjani
2020-03-09 17:15   ` Pierre-Louis Bossart

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=8736aii326.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.