diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2023-03-22 01:12:24 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-22 13:17:38 +0000 |
commit | dcf084247e376b35c139c922d30917f4ff716a4c (patch) | |
tree | baf015e8ffe4c9236a45c0fcb752dda2141e0eb4 /sound/soc/generic/simple-card-utils.c | |
parent | 3e1a334ad5b6e1aee25fd7f09400000f9b7b1f82 (diff) |
ASoC: simple-card: add comment to indicate don't remove platforms
Basically CPU and Platform are different Component, but if CPU is using
soc-generic-dmaengine-pcm, same dev will be shared between CPU and
Platform, and Simple Card had been supporting it.
When we focus to clean up Simple Card driver, we tend to remove platforms
if no Platform was selected, but it is wrong because of above reasons.
This patch adds comment why we shouldn't remove platforms.
In case of CPU is not using soc-generic-dmaengine-pcm, CPU and Platform
will be duplicated, but it will be ignored by snd_soc_rtd_add_component().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875yattwqv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic/simple-card-utils.c')
-rw-r--r-- | sound/soc/generic/simple-card-utils.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 56552a616f21..34a9b91e676f 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -638,7 +638,16 @@ EXPORT_SYMBOL_GPL(asoc_simple_dai_init); void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component *platforms, struct snd_soc_dai_link_component *cpus) { - /* Assumes platform == cpu */ + /* + * Assumes Platform == CPU + * + * Some CPU might be using soc-generic-dmaengine-pcm. This means CPU and Platform + * are different Component, but are sharing same component->dev. + * + * Let's assume Platform is same as CPU if it doesn't identify Platform on DT. + * see + * simple-card.c :: simple_count_noml() + */ if (!platforms->of_node) platforms->of_node = cpus->of_node; } |