]> git.alsa-project.org Git - alsa-lib.git/commit
ctl: optimize a test for user-defined element set to older kernels
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 29 Jun 2016 13:43:01 +0000 (22:43 +0900)
committerTakashi Iwai <tiwai@suse.de>
Thu, 30 Jun 2016 06:42:17 +0000 (08:42 +0200)
commit1edc5f5259f36a17487f0955401049369d71dc7d
tree4c6c0b3c69a3b9f6bc042db9d31e77af03483f24
parent16812b70daeb1c31f4681d22474b21f986ff6619
ctl: optimize a test for user-defined element set to older kernels

In Linux 4.0 or former, call of ioctl(2) with SNDRV_CTL_IOCTL_ELEM_ADD
doesn't fill all of identical information in an argument; i.e. numid.
With the kernel, a test of user-defined element set fails.

This commit fixes the bug. The 'numid' field in identical information
is always zero when adding an element set, therefore zero check has an
effect.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
test/user-ctl-element-set.c