00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "local.h"
00023 #include <limits.h>
00024 #include <sys/ioctl.h>
00025
00026 #ifndef DOC_HIDDEN
00027 typedef struct {
00028 int (*close)(snd_timer_t *timer);
00029 int (*nonblock)(snd_timer_t *timer, int nonblock);
00030 int (*async)(snd_timer_t *timer, int sig, pid_t pid);
00031 int (*info)(snd_timer_t *timer, snd_timer_info_t *info);
00032 int (*params)(snd_timer_t *timer, snd_timer_params_t *params);
00033 int (*status)(snd_timer_t *timer, snd_timer_status_t *status);
00034 int (*rt_start)(snd_timer_t *timer);
00035 int (*rt_stop)(snd_timer_t *timer);
00036 int (*rt_continue)(snd_timer_t *timer);
00037 ssize_t (*read)(snd_timer_t *timer, void *buffer, size_t size);
00038 } snd_timer_ops_t;
00039
00040 struct _snd_timer {
00041 unsigned int version;
00042 void *dl_handle;
00043 char *name;
00044 snd_timer_type_t type;
00045 int mode;
00046 int poll_fd;
00047 const snd_timer_ops_t *ops;
00048 void *private_data;
00049 struct list_head async_handlers;
00050 };
00051
00052 typedef struct {
00053 int (*close)(snd_timer_query_t *timer);
00054 int (*next_device)(snd_timer_query_t *timer, snd_timer_id_t *tid);
00055 int (*info)(snd_timer_query_t *timer, snd_timer_ginfo_t *info);
00056 int (*params)(snd_timer_query_t *timer, snd_timer_gparams_t *info);
00057 int (*status)(snd_timer_query_t *timer, snd_timer_gstatus_t *info);
00058 } snd_timer_query_ops_t;
00059
00060 struct _snd_timer_query {
00061 void *dl_handle;
00062 char *name;
00063 snd_timer_type_t type;
00064 int mode;
00065 int poll_fd;
00066 const snd_timer_query_ops_t *ops;
00067 void *private_data;
00068 };
00069 #endif
00070
00071 int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int dev_sclass, int card, int device, int subdevice, int mode);
00072
00073 int snd_timer_query_hw_open(snd_timer_query_t **handle, const char *name, int mode);
00074
00075 int snd_timer_async(snd_timer_t *timer, int sig, pid_t pid);