[alsa-devel] [alsa-lib][RFC PATCH] ucm: reset config id of condition items

Yang, Libin libin.yang at intel.com
Fri May 1 15:44:41 CEST 2020


Hi Jaroslav,

> 
> EnableSequence [
>    cmd1 arg1
>    cms2 arg2
> ]
> 
> is expanded to:
> 
> EnableSequence {
>    0 cmd1
>    1 arg1
>    2 cmd2
>    3 arg2
> }
> 
> or
> 
> EnableSequence.0 cmd1
> EnableSequence.1 arg1
> EnableSequence.2 cmd2
> EnableSequence.3 arg2
> 
> So if you like to add a new sequence which is outside the declared array, then
> you need to add this:
> 
> EnableSequence { cmdid3 cmd3 argid3 arg3 }
> 
> or (maybe more readable):
> 
> EnableSequence { cmdid3=cmd3 argid3=arg3 }
> 
> or:
> 
> EnableSequence.cmdid3 cmd3
> EnableSequence.argid3 arg3
> 
> The ids names can be anything but they must be unique in the block (tree leaf).
> 
> The declaration order matters in this context (_arg_ must be right behind _cmd_
> for the sequences). Note that the functions which works on top of the
> configuration tree (like the in-place evaluation - If blocks) are executed on top
> of this tree (which is parsed at first)! Keep it in the mind.

Yes, it works with your new suggestion now. 

Do you think this patch is necessary or not? With this patch we can use the
style of:
EnableSequence [
    cmd1 arg1
    cms2 arg2
]

Regards,
Libin

> 
> 					Jaroslav
> 
> --
> Jaroslav Kysela <perex at perex.cz>
> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


More information about the Alsa-devel mailing list