diff options
Diffstat (limited to 'src/control/control_local.h')
-rw-r--r-- | src/control/control_local.h | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/control/control_local.h b/src/control/control_local.h index fd9f9418..b7518397 100644 --- a/src/control/control_local.h +++ b/src/control/control_local.h @@ -59,42 +59,44 @@ struct _snd_ctl { void *dl_handle; char *name; snd_ctl_type_t type; + int mode; const snd_ctl_ops_t *ops; void *private_data; int nonblock; int poll_fd; struct list_head async_handlers; + struct list_head elems; /* list of all controls */ + unsigned int alloc; + unsigned int count; + snd_ctl_elem_t **pelems; + snd_ctl_compare_t compare; + snd_ctl_callback_t callback; + void *callback_private; }; -struct _snd_hctl_elem { +struct _snd_ctl_elem { snd_ctl_elem_id_t id; /* must be always on top */ struct list_head list; /* links for list of all helems */ int compare_weight; /* compare weight (reversed) */ /* event callback */ - snd_hctl_elem_callback_t callback; + snd_ctl_elem_callback_t callback; void *callback_private; /* links */ - snd_hctl_t *hctl; /* associated handle */ -}; - -struct _snd_hctl { - snd_ctl_t *ctl; - struct list_head elems; /* list of all controls */ - unsigned int alloc; - unsigned int count; - snd_hctl_elem_t **pelems; - snd_hctl_compare_t compare; - snd_hctl_callback_t callback; - void *callback_private; + snd_ctl_t *ctl; /* associated handle */ }; /* make local functions really local */ -#define snd_ctl_new snd1_ctl_new +#define snd_ctl_new snd1_ctl_new +#define snd_ctl_cache_load snd1_ctl_cache_load +#define snd_ctl_cache_free snd1_ctl_cache_free -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); int snd_ctl_shm_open(snd_ctl_t **handlep, const char *name, const char *sockname, const char *sname, int mode); int snd_ctl_async(snd_ctl_t *ctl, int sig, pid_t pid); + +int snd_ctl_cache_load(snd_ctl_t *ctl); +int snd_ctl_cache_free(snd_ctl_t *ctl); |