pcm: add SND_CTL_EINTR open mode

Add possibility to return -EINTR instead waiting for the event. The
applications may want to handle -EINTR condition themselves.

BugLink: https://github.com/alsa-project/alsa-lib/issues/228
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2023-05-03 11:48:35 +02:00
parent d6d5982d3a
commit 507d906abb
8 changed files with 13 additions and 8 deletions

View file

@ -62,6 +62,7 @@ struct _snd_ctl {
snd_ctl_type_t type;
const snd_ctl_ops_t *ops;
void *private_data;
int mode;
int nonblock;
int poll_fd;
struct list_head async_handlers;
@ -93,7 +94,7 @@ struct _snd_hctl {
/* make local functions really local */
#define snd_ctl_new snd1_ctl_new
int snd_ctl_new(snd_ctl_t **ctlp, snd_ctl_type_t type, const char *name);
int snd_ctl_new(snd_ctl_t **ctlp, snd_ctl_type_t type, const char *name, int mode);
int _snd_ctl_poll_descriptor(snd_ctl_t *ctl);
#define _snd_ctl_async_descriptor _snd_ctl_poll_descriptor
int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode);