Hi Clemens,
I find a curious issue about the userspace element. Could I ask you to give some comments about
The code is this one line.
sound/core/control.c:1188 {{{ kctl.count = info->owner ? info->owner : 1; }}} http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/core/...
In this code, the value in struct snd_ctl_elem_info.owner is assigned to struct snd_kcontrol.count. The meaning of these two member is completely different but assigned.
include/sound/control.h:67 {{{ struct snd_kcontrol { ... unsigned int count; ... }; }}} http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/include/sou...
include/uapi/sound/asound.h:851 {{{ struct snd_ctl_elem_info { ... __kernel_pid_t owner; /* owner's PID of this control */ ... }; }; }}} http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/include/uap... (I wonder why the value with _kernel_pid type is exported to userspace...)
I guess that the reason is to limit the number of event generated when the control element set is operated. Actually, my sample code reports one event every time when operating the control element with 10 entries. But I believe this is the different behaviour as the kernel control elements do.
sound/core/control.c:257 {{{ kctl.count = ncontrol->count ? ncontrol->count : 1; }}} http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/core/...
For me, the behaviour of userspace control element is a bit strange. The behaviour is legal as a control element?
Regards
Takashi Sakamoto