snd_soc_component_driver substream ops

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Jul 27 00:13:23 CEST 2020


Hi Daniel

Thank you for asking
And sorry for late response, Japan was holiday.

> Looking at snd_soc_component_driver I see there
> are some operations like: open, close, hw_params, hw_free. (1)
> 
> Now, snd_soc_component_driver has snd_compress_ops.
> 
> Do you think it is worth it to group operations from (1) in a similar structure
> maybe snd_<xyz>_ops.

It seems snd_soc_component_driver is using many functions and flags.
Keeping these in the some structure is better, IMO.

I think separating "component" and "compress" is better cleaning ?

	struct snd_compress_ops {
		...
	};

	struct snd_soc_component_driver {
		...
-		const struct snd_compress_ops *compress_ops;
		...
	};

	struct snd_soc_component {
		...
		struct snd_soc_component_driver *driver;
+		const struct snd_compress_ops *compress_ops;
		...
	};	


Thank you for your help !!

Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list