On 1/14/20 11:51 AM, Bard liao wrote:
As discussed in [1], ASoC core supports multi codec DAIs on a DAI link. However it does not do so for CPU DAIs.
So, add support for multi CPU DAIs on a DAI Link by adding multi CPU DAI in Card instantiation, suspend and resume functions, PCM ops, stream handling functions and DAPM.
Maybe a tangential question, but I am a bit confused on the code cleanups.
After this series of patches is applied, we have this in soc.h:
struct snd_soc_dai *codec_dai; struct snd_soc_dai *cpu_dai;
struct snd_soc_dai **codec_dais; unsigned int num_codecs;
struct snd_soc_dai **cpu_dais; unsigned int num_cpus;
What is the intent behind keeping the two fields codec_dai and cpu_dai?
Shouldn't we use the multi-dai structures in all cases, possible degraded to a single element rather than maintaining what looks like duplicate ways of accessing the same element?
If removing these fields across all drivers is just too invasive for now, shouldn't we start defining access macros so that those fields can be deprecated and removed at a later time, platform-by-platform?
Thanks -Pierre