Re: [PATCH][TEST-REQUEST] ASoC: makes CPU/Codec channel connection map more generic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/18/23 21:04, Kuninori Morimoto wrote:
> Current ASoC CPU:Codec = N:M connection is using connection mapping idea,
> but it is used for CPU < Codec case only. We want to use it for any case.
> 
> By this patch, not only N:M connection, but all existing connection
> (1:1, 1:N, N:N) will use same connection mapping.
> Because it will use default mapping, no conversion patch is needed
> to exising CPU/Codec drivers.
> 
> More over, CPU:Codec = M:N (M > N) also supported in the same time.
> 
> Link: https://lore.kernel.org/r/87fs6wuszr.wl-kuninori.morimoto.gx@xxxxxxxxxxx
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

No issues detected with this patch by the Intel CI (other than the usual
suspend-resume timeouts that have nothing to do with this patch), see
https://github.com/thesofproject/linux/pull/4632

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>

Thanks Morimoto-san!


> +				if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) &&
> +				    snd_soc_dai_stream_valid(cpu_dai,   cpu_playback))
> +					has_playback = 1;
> +				if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) &&
> +				    snd_soc_dai_stream_valid(cpu_dai,   cpu_capture))
> +					has_capture = 1;
>  			}
> +		}
> +		/* .ch_map is from Codec */
> +		else {
> +			for_each_rtd_codec_dais(rtd, i, codec_dai) {
> +				cpu_dai = snd_soc_rtd_to_cpu(rtd, dai_link->ch_maps[i].connected_node);
> +
> +				if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) &&
> +				    snd_soc_dai_stream_valid(cpu_dai,   cpu_playback))
> +					has_playback = 1;
> +				if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) &&
> +				    snd_soc_dai_stream_valid(cpu_dai,   cpu_capture))

while we're at it, can we also clean-up the weird extra spaces - unless
they were intentional?

> +					has_capture = 1;
>  
> -			if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) &&
> -			    snd_soc_dai_stream_valid(cpu_dai,   cpu_playback))
> -				has_playback = 1;
> -			if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) &&
> -			    snd_soc_dai_stream_valid(cpu_dai,   cpu_capture))
> -				has_capture = 1;
> +			}
>  		}
>  	}
>  



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux