aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo@alsa-project.org>2001-02-12 23:51:49 +0000
committerAbramo Bagnara <abramo@alsa-project.org>2001-02-12 23:51:49 +0000
commit460660d4b44de84df5e77cd34afa8329c1f3cd58 (patch)
treeacb0ce8fc552126a7b797f8e90f8c2059caa20c8 /include
parenta86efa083cbfd485e9d0103e578f71a089cf46ce (diff)
More generic support for poll descriptors
Diffstat (limited to 'include')
-rw-r--r--include/aserver.h1
-rw-r--r--include/control.h5
-rw-r--r--include/header.h2
-rw-r--r--include/hwdep.h16
-rw-r--r--include/mixer.h3
-rw-r--r--include/pcm.h2
-rw-r--r--include/rawmidi.h2
-rw-r--r--include/seq.h2
-rw-r--r--include/timer.h2
9 files changed, 19 insertions, 16 deletions
diff --git a/include/aserver.h b/include/aserver.h
index 05242117..69076a61 100644
--- a/include/aserver.h
+++ b/include/aserver.h
@@ -19,6 +19,7 @@
*/
#include "../src/pcm/pcm_local.h"
+#include "../src/control/control_local.h"
typedef enum _snd_dev_type {
SND_DEV_TYPE_PCM,
diff --git a/include/control.h b/include/control.h
index a58133f6..8730b574 100644
--- a/include/control.h
+++ b/include/control.h
@@ -159,7 +159,7 @@ int snd_ctl_open(snd_ctl_t **ctl, const char *name);
int snd_ctl_close(snd_ctl_t *ctl);
int snd_ctl_nonblock(snd_ctl_t *ctl, int nonblock);
int snd_ctl_async(snd_ctl_t *ctl, int sig, pid_t pid);
-int snd_ctl_poll_descriptor(snd_ctl_t *ctl);
+int snd_ctl_poll_descriptors(snd_ctl_t *ctl, struct pollfd *pfds, unsigned int space);
int snd_ctl_card_info(snd_ctl_t *ctl, snd_ctl_card_info_t *info);
int snd_ctl_elem_list(snd_ctl_t *ctl, snd_ctl_elem_list_t * list);
int snd_ctl_elem_info(snd_ctl_t *ctl, snd_ctl_elem_info_t *info);
@@ -215,7 +215,7 @@ int snd_hctl_open(snd_hctl_t **hctl, const char *name);
int snd_hctl_close(snd_hctl_t *hctl);
int snd_hctl_nonblock(snd_hctl_t *hctl, int nonblock);
int snd_hctl_async(snd_hctl_t *hctl, int sig, pid_t pid);
-int snd_hctl_poll_descriptor(snd_hctl_t *hctl);
+int snd_hctl_poll_descriptors(snd_hctl_t *hctl, struct pollfd *pfds, unsigned int space);
unsigned int snd_hctl_get_count(snd_hctl_t *hctl);
int snd_hctl_set_compare(snd_hctl_t *hctl, snd_hctl_compare_t hsort);
snd_hctl_elem_t *snd_hctl_first_elem(snd_hctl_t *hctl);
@@ -230,6 +230,7 @@ int snd_hctl_handle_event(snd_hctl_t *hctl, snd_ctl_event_t *event);
int snd_hctl_handle_events(snd_hctl_t *hctl);
const char *snd_hctl_name(snd_hctl_t *hctl);
snd_ctl_type_t snd_hctl_type(snd_hctl_t *hctl);
+int snd_hctl_wait(snd_hctl_t *hctl, int timeout);
snd_hctl_elem_t *snd_hctl_elem_next(snd_hctl_elem_t *elem);
snd_hctl_elem_t *snd_hctl_elem_prev(snd_hctl_elem_t *elem);
diff --git a/include/header.h b/include/header.h
index e2fa5efc..946755ed 100644
--- a/include/header.h
+++ b/include/header.h
@@ -32,7 +32,7 @@
#include <string.h>
#include <fcntl.h>
#include <assert.h>
-#include <sys/uio.h>
+#include <sys/poll.h>
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
diff --git a/include/hwdep.h b/include/hwdep.h
index 76bd4363..4b8da59a 100644
--- a/include/hwdep.h
+++ b/include/hwdep.h
@@ -33,14 +33,14 @@ typedef struct _snd_hwdep snd_hwdep_t;
extern "C" {
#endif
-int snd_hwdep_open(snd_hwdep_t **handle, int card, int device, int mode);
-int snd_hwdep_close(snd_hwdep_t *handle);
-int snd_hwdep_poll_descriptor(snd_hwdep_t *handle);
-int snd_hwdep_block_mode(snd_hwdep_t *handle, int enable);
-int snd_hwdep_info(snd_hwdep_t *handle, snd_hwdep_info_t * info);
-int snd_hwdep_ioctl(snd_hwdep_t *handle, int request, void * arg);
-ssize_t snd_hwdep_write(snd_hwdep_t *handle, const void *buffer, size_t size);
-ssize_t snd_hwdep_read(snd_hwdep_t *handle, void *buffer, size_t size);
+int snd_hwdep_open(snd_hwdep_t **hwdep, int card, int device, int mode);
+int snd_hwdep_close(snd_hwdep_t *hwdep);
+int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned int space);
+int snd_hwdep_block_mode(snd_hwdep_t *hwdep, int enable);
+int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info);
+int snd_hwdep_ioctl(snd_hwdep_t *hwdep, int request, void * arg);
+ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size);
+ssize_t snd_hwdep_read(snd_hwdep_t *hwdep, void *buffer, size_t size);
#ifdef __cplusplus
}
diff --git a/include/mixer.h b/include/mixer.h
index 18391286..fc47c986 100644
--- a/include/mixer.h
+++ b/include/mixer.h
@@ -44,8 +44,9 @@ snd_mixer_elem_t *snd_mixer_last_elem(snd_mixer_t *mixer);
int snd_mixer_handle_events(snd_mixer_t *mixer);
int snd_mixer_attach(snd_mixer_t *mixer, const char *name);
int snd_mixer_detach(snd_mixer_t *mixer, const char *name);
-int snd_mixer_poll_descriptor(snd_mixer_t *mixer, const char *name);
+int snd_mixer_poll_descriptors(snd_mixer_t *mixer, struct pollfd *pfds, unsigned int space);
int snd_mixer_load(snd_mixer_t *mixer);
+int snd_mixer_wait(snd_mixer_t *mixer, int timeout);
int snd_mixer_set_compare(snd_mixer_t *mixer, snd_mixer_compare_t msort);
snd_mixer_elem_t *snd_mixer_elem_next(snd_mixer_elem_t *elem);
diff --git a/include/pcm.h b/include/pcm.h
index 5707aeaf..920ce49e 100644
--- a/include/pcm.h
+++ b/include/pcm.h
@@ -216,7 +216,7 @@ int snd_pcm_open(snd_pcm_t **pcm, const char *name,
snd_pcm_type_t snd_pcm_type(snd_pcm_t *pcm);
int snd_pcm_close(snd_pcm_t *pcm);
-int snd_pcm_poll_descriptor(snd_pcm_t *pcm);
+int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
int snd_pcm_nonblock(snd_pcm_t *pcm, int nonblock);
int snd_pcm_async(snd_pcm_t *pcm, int sig, pid_t pid);
int snd_pcm_info(snd_pcm_t *pcm, snd_pcm_info_t *info);
diff --git a/include/rawmidi.h b/include/rawmidi.h
index 582bb9ed..a87927eb 100644
--- a/include/rawmidi.h
+++ b/include/rawmidi.h
@@ -47,7 +47,7 @@ extern "C" {
int snd_rawmidi_open(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
const char *name, int mode);
int snd_rawmidi_close(snd_rawmidi_t *rmidi);
-int snd_rawmidi_poll_descriptor(snd_rawmidi_t *rmidi);
+int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rmidi, struct pollfd *pfds, unsigned int space);
int snd_rawmidi_nonblock(snd_rawmidi_t *rmidi, int nonblock);
int snd_rawmidi_info(snd_rawmidi_t *rmidi, snd_rawmidi_info_t * info);
int snd_rawmidi_params(snd_rawmidi_t *rmidi, snd_rawmidi_params_t * params);
diff --git a/include/seq.h b/include/seq.h
index 312b9e23..41c44bcc 100644
--- a/include/seq.h
+++ b/include/seq.h
@@ -324,7 +324,7 @@ extern "C" {
int snd_seq_open(snd_seq_t **handle, const char *name, int streams, int mode);
int snd_seq_close(snd_seq_t *handle);
-int snd_seq_poll_descriptor(snd_seq_t *handle);
+int snd_seq_poll_descriptors(snd_seq_t *handle, struct pollfd *pfds, unsigned int space);
int snd_seq_nonblock(snd_seq_t *handle, int nonblock);
int snd_seq_client_id(snd_seq_t *handle);
int snd_seq_output_buffer_size(snd_seq_t *handle);
diff --git a/include/timer.h b/include/timer.h
index f146f909..a40a2807 100644
--- a/include/timer.h
+++ b/include/timer.h
@@ -50,7 +50,7 @@ extern "C" {
int snd_timer_open(snd_timer_t **handle);
int snd_timer_close(snd_timer_t *handle);
-int snd_timer_poll_descriptor(snd_timer_t *handle);
+int snd_timer_poll_descriptors(snd_timer_t *handle, struct pollfd *pfds, unsigned int space);
int snd_timer_next_device(snd_timer_t *handle, snd_timer_id_t *tid);
int snd_timer_select(snd_timer_t *handle, snd_timer_select_t *tselect);
int snd_timer_info(snd_timer_t *handle, snd_timer_info_t *timer);