]> git.alsa-project.org Git - alsa-lib.git/commit
ctl: ext: Fail with error code if snd_ctl_ext_callback::read_event() callback is...
authorTimo Wischer <twischer@de.adit-jv.com>
Thu, 5 Oct 2017 14:25:23 +0000 (16:25 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 5 Oct 2017 14:42:09 +0000 (16:42 +0200)
commit98d2c12ac2f8dc7e92790e927f472e26459d3852
treec72abce8be1d3e57cfaae1d30ca55dfd1e603b78
parent8c0b17bca3d641dc86d35eb1b97fae5fe4080984
ctl: ext: Fail with error code if snd_ctl_ext_callback::read_event() callback is not defined

The snd_ctl_ext_callback::read_event() callback is only optional
if no poll descriptor was given via
snd_ctl_ext_t::poll_fd
or
snd_ctl_ext_callback::snd_ctl_ext_poll_descriptors().

If a poll descriptor is given the
snd_ctl_ext_callback::read_event()
callback has also to be defined
because there is no minigful default behavior.

This callback will be called when ever the poll() on
the file descriptor indicates that there is an event pending.
Therefore returning a 0 which indicates that there is no event makes no
sense.

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/control/control_ext.c