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

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Thu Jan 16 02:48:19 CET 2020


> @@ -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


More information about the Alsa-devel mailing list