summaryrefslogtreecommitdiffstats
path: root/include/sound/soc-dpcm.h
diff options
context:
space:
mode:
authorKuninori Morimoto2018-09-18 03:30:54 +0200
committerMark Brown2018-09-20 19:31:19 +0200
commitd2e24d64652bf9d272e5496ae8a562bc64facff3 (patch)
treeffdfeb6b7da3437740701b148ae5c4f22382eb52 /include/sound/soc-dpcm.h
parentASoC: add for_each_comp_order() macro (diff)
downloadkernel-qcow2-linux-d2e24d64652bf9d272e5496ae8a562bc64facff3.tar.gz
kernel-qcow2-linux-d2e24d64652bf9d272e5496ae8a562bc64facff3.tar.xz
kernel-qcow2-linux-d2e24d64652bf9d272e5496ae8a562bc64facff3.zip
ASoC: add for_each_dpcm_fe() macro
To be more readable code, this patch adds new for_each_dpcm_fe() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/soc-dpcm.h')
-rw-r--r--include/sound/soc-dpcm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h
index 9bb92f187af8..f130de6cfe8e 100644
--- a/include/sound/soc-dpcm.h
+++ b/include/sound/soc-dpcm.h
@@ -103,6 +103,9 @@ struct snd_soc_dpcm_runtime {
int trigger_pending; /* trigger cmd + 1 if pending, 0 if not */
};
+#define for_each_dpcm_fe(be, stream, dpcm) \
+ list_for_each_entry(dpcm, &(be)->dpcm[stream].fe_clients, list_fe)
+
/* can this BE stop and free */
int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe,
struct snd_soc_pcm_runtime *be, int stream);