]> git.baikalelectronics.ru Git - kernel.git/commit
kselftest: alsa: optimization for SNDRV_CTL_ELEM_ACCESS_VOLATILE
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 10 Dec 2021 18:54:09 +0000 (18:54 +0000)
committerTakashi Iwai <tiwai@suse.de>
Sun, 12 Dec 2021 09:04:29 +0000 (10:04 +0100)
commit438e0fe9ebccccd2f51c9de6c95d76457baf14a2
tree8abf24af4cd3b896114eac4380339af15818011c
parentd0a090af3fbd0ecae0c08b53c630a0ff0c97a081
kselftest: alsa: optimization for SNDRV_CTL_ELEM_ACCESS_VOLATILE

The volatile attribute of control element means that the hardware can
voluntarily change the state of control element independent of any
operation by software. ALSA control core necessarily sends notification
to userspace subscribers for any change from userspace application, while
it doesn't for the hardware's voluntary change.

This commit adds optimization for the attribute. Even if read value is
different from written value, the test reports success as long as the
target control element has the attribute. On the other hand, the
difference is itself reported for developers' convenience.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/Ya7TAHdMe9i41bsC@workstation
[Fix comment style as suggested by Shuah -- broonie]
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211210185410.740009-3-broonie@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
tools/testing/selftests/alsa/mixer-test.c