summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2019-06-27 14:13:50 +0200
committerMark Brown <broonie@kernel.org>2019-06-28 13:41:19 +0100
commit34614739988ad60c3493da66dd856002ee93edf9 (patch)
tree0fe6f846ec5dd3083e3d10d7de55c933adba267a /include/sound
parentaf18b13fedae4637b439d1265038b30929ca5a4c (diff)
downloadlinux-34614739988ad60c3493da66dd856002ee93edf9.tar.bz2
ASoC: soc-core: support dai_link with platforms_num != 1
Add support platforms_num != 1 in dai_link. Initially, the main purpose of this change was to make the platform optional in the dai_link, instead of inserting the dummy platform driver. This particular case had just been solved by Kuninori Morimoto with commit 1d7689892878 ("ASoC: soc-core: allow no Platform on dai_link"). However, this change may still be useful for those who need multiple platform components on a single dai_link (it solves one of the FIXME note in soc-core) Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 64405cdab8bb..4e8071269639 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -997,6 +997,12 @@ struct snd_soc_dai_link {
((i) < link->num_codecs) && ((codec) = &link->codecs[i]); \
(i)++)
+#define for_each_link_platforms(link, i, platform) \
+ for ((i) = 0; \
+ ((i) < link->num_platforms) && \
+ ((platform) = &link->platforms[i]); \
+ (i)++)
+
/*
* Sample 1 : Single CPU/Codec/Platform
*