Hi,
This patchset adds support extra information to the type-specific for user-defined element set. Currently, 'dimension' is such an extra information.
In ALSA kernel/userspace interface, information to an element is described in this structure.
struct snd_ctl_elem_info { struct snd_ctl_elem_id id; unsigned int access; unsigned int count; pid_t owner; union value;
union dimen; unsigned char reserved[64 - 4 * sizeof(unsigned short)]; };
This structure includes reserved fields, thus it's possible to add more fields for future extension.
Currently, APIs to add user-defined element set don't support such extra fields. Meanwhile, supporting just the dimension field is not good as stable library APIs.
This patchset changes prototype of the APIs with 'snd_ctl_elem_info_t' instead of adding more parameters. Callers are expected to fill the parameter with identification information and the extra information.
Takashi Sakamoto (5): ctl: support extra information in user-defined element set ctl: add an API to set dimension levels to element information ctl: optimize a test for user-defined element set to older kernels ctl: optimize a test for user-defined element set to changes of APIs ctl: support dimension test for user-defined element set
include/control.h | 12 ++- src/control/control.c | 219 +++++++++++++++++++++++--------------------- src/pcm/pcm_softvol.c | 10 +- test/user-ctl-element-set.c | 122 ++++++++++++++++++------ 4 files changed, 220 insertions(+), 143 deletions(-)