[PATCH 25/25] ASoC: soc-dai.h: cleanup Playback/Capture data for snd_soc_dai

Charles Keepax ckeepax at opensource.cirrus.com
Fri Jan 20 12:40:51 CET 2023


On Fri, Jan 20, 2023 at 07:04:14AM +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> 
> Current snd_soc_dai has data for Playback/Capture, but it is very
> random. Someone is array (A), someone is playback/capture (B),
> and someone is tx/rx (C);
> 
> 	struct snd_soc_dai {
> 		...
> (A)		unsigned int stream_active[SNDRV_PCM_STREAM_LAST + 1];
> 
> (B)		struct snd_soc_dapm_widget *playback_widget;
> (B)		struct snd_soc_dapm_widget *capture_widget;
> 
> (B)		void *playback_dma_data;
> (B)		void *capture_dma_data;
> 
> 		...
> 
> (C)		unsigned int tx_mask;
> (C)		unsigned int rx_mask;
> 	};
> 
> Because of it, the code was very complicated.
> This patch creates new data structure to merge these into one,
> and tidyup the code.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> ---

Reviewed-by: Charles Keepax <ckeepax at opensource.cirrus.com>

Thanks,
Charles


More information about the Alsa-devel mailing list