[alsa-devel] [PATCH 3/4] ASoC: firmware core: Add core support for dynamic kcontrols and widgets.

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Nov 20 03:36:09 CET 2012

On Mon, Nov 19, 2012 at 06:12:44PM +0000, Liam Girdwood wrote:

> @@ -584,6 +584,8 @@ struct snd_soc_dapm_widget {
>  	int num_kcontrols;
>  	const struct snd_kcontrol_new *kcontrol_news;
>  	struct snd_kcontrol **kcontrols;
> +	int denum;
> +	int dmixer;

In the patch adding the actual functional code it looks like these are
just treated as booleans saying if the control is dynamic.  This in
conjunction with the fact that we've got a single list of dynamic
controls means that we can only have one block of dynamic controls on
this device.  Is that correct?  If not then I've got the wrong end of
the stick otherwise...

It occurs to me that if we just assign these to numbers per thing with
firmware then we can easily use this data structure to support multiple
firmwares per device.  We just go through the list and delete all mixers
numbered 1 or something.  If we do that I think we can simplify the code
a little and just make all the mixers and controls "dynamic", using ID 0
for the non-changable ones.

The patch itself looks good but leaving it for now since it's so closely
tied in with patch 4, any change in patch 4 is likely to give changes in
the data structure I guess.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20121120/23739163/attachment.sig>

More information about the Alsa-devel mailing list