[alsa-devel] [PATCH RFC v2 2/4] ASoC: Add multiple CPU DAI support for PCM ops

Liao, Bard bard.liao at intel.com
Thu Jan 16 03:05:41 CET 2020


> -----Original Message-----
> From: Pierre-Louis Bossart [mailto:pierre-louis.bossart at linux.intel.com]
> Sent: Thursday, January 16, 2020 9:48 AM
> To: Bard liao <yung-chuan.liao at linux.intel.com>; broonie at kernel.org;
> tiwai at suse.de
> Cc: alsa-devel at alsa-project.org; liam.r.girdwood at linux.intel.com;
> kuninori.morimoto.gx at renesas.com; Liao, Bard <bard.liao at intel.com>
> Subject: Re: [alsa-devel] [PATCH RFC v2 2/4] ASoC: Add multiple CPU DAI
> support for PCM ops
> 
> 
> > @@ -1810,18 +1972,22 @@ static int dpcm_apply_symmetry(struct
> snd_pcm_substream *fe_substream,
> >   {
> >   	struct snd_soc_dpcm *dpcm;
> >   	struct snd_soc_pcm_runtime *fe = fe_substream->private_data;
> > -	struct snd_soc_dai *fe_cpu_dai = fe->cpu_dai;
> > +	struct snd_soc_dai *fe_cpu_dai;
> >   	int err;
> > +	int i;
> >
> >   	/* apply symmetry for FE */
> >   	if (soc_pcm_has_symmetry(fe_substream))
> >   		fe_substream->runtime->hw.info |=
> SNDRV_PCM_INFO_JOINT_DUPLEX;
> >
> >   	/* Symmetry only applies if we've got an active stream. */
> > -	if (fe_cpu_dai->active) {
> > -		err = soc_pcm_apply_symmetry(fe_substream, fe_cpu_dai);
> > -		if (err < 0)
> > -			return err;
> > +	/* Do we need to support Multi cpu for FE? */
> > +	for_each_rtd_cpu_dai(fe, i, fe_cpu_dai) {
> > +		if (fe_cpu_dai->active) {
> > +			err = soc_pcm_apply_symmetry(fe_substream,
> fe_cpu_dai);
> > +			if (err < 0)
> > +				return err;
> > +		}
> 
> that part seems inconsistent with Patch 4 where you add warnings/error
> everywhere there's a FE with num_cpus>1

Actually, I have a question here. Do we need to support Multi cpu for FE?
If yes, what is the use case? 



More information about the Alsa-devel mailing list