mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
More generic support for poll descriptors
This commit is contained in:
parent
a86efa083c
commit
460660d4b4
25 changed files with 162 additions and 68 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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__))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue