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/audio-graph-card2.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/audio-graph-card2.c')
-rw-r--r-- | sound/soc/generic/audio-graph-card2.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 259544f64df9..d145b74d41e4 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -1046,8 +1046,14 @@ static int graph_count_normal(struct asoc_simple_priv *priv, * => lnk: port { endpoint { .. }; }; * }; */ + /* + * DON'T REMOVE platforms + * see + * simple-card.c :: simple_count_noml() + */ li->num[li->link].cpus = li->num[li->link].platforms = graph_counter(cpu_port); + li->num[li->link].codecs = graph_counter(codec_port); of_node_put(cpu_ep); @@ -1079,6 +1085,11 @@ static int graph_count_dpcm(struct asoc_simple_priv *priv, */ if (asoc_graph_is_ports0(lnk)) { + /* + * DON'T REMOVE platforms + * see + * simple-card.c :: simple_count_noml() + */ li->num[li->link].cpus = graph_counter(rport); /* FE */ li->num[li->link].platforms = graph_counter(rport); } else { @@ -1113,8 +1124,14 @@ static int graph_count_c2c(struct asoc_simple_priv *priv, * }; * }; */ + /* + * DON'T REMOVE platforms + * see + * simple-card.c :: simple_count_noml() + */ li->num[li->link].cpus = li->num[li->link].platforms = graph_counter(codec0); + li->num[li->link].codecs = graph_counter(codec1); of_node_put(ports); |