diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2019-06-27 14:13:50 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-28 14:41:19 +0200 |
commit | 34614739988ad60c3493da66dd856002ee93edf9 (patch) | |
tree | 0fe6f846ec5dd3083e3d10d7de55c933adba267a /include/sound/soc.h | |
parent | ASoC: soc-core: defer card registration if codec component is missing (diff) | |
download | linux-34614739988ad60c3493da66dd856002ee93edf9.tar.xz linux-34614739988ad60c3493da66dd856002ee93edf9.zip |
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/soc.h')
-rw-r--r-- | include/sound/soc.h | 6 |
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 * |