#define SNDRV_TIMER_HW_AUTO 0x00000001 /* auto trigger is supported */ #define SNDRV_TIMER_HW_STOP 0x00000002 /* call stop before start */ #define SNDRV_TIMER_HW_SLAVE 0x00000004 /* only slave timer (variable resolution) */ #define SNDRV_TIMER_HW_FIRST 0x00000008 /* first tick can be incomplete */ #define SNDRV_TIMER_HW_WORK 0x00000010 /* timer is called from work */
#define SNDRV_TIMER_IFLG_SLAVE 0x00000001 #define SNDRV_TIMER_IFLG_RUNNING 0x00000002 #define SNDRV_TIMER_IFLG_START 0x00000004 #define SNDRV_TIMER_IFLG_AUTO 0x00000008 /* auto restart */ #define SNDRV_TIMER_IFLG_FAST 0x00000010 /* fast callback (do not use work) */ #define SNDRV_TIMER_IFLG_CALLBACK 0x00000020 /* timer callback is active */ #define SNDRV_TIMER_IFLG_EXCLUSIVE 0x00000040 /* exclusive owner - no more instances */ #define SNDRV_TIMER_IFLG_EARLY_EVENT 0x00000080 /* write early event to the poll queue */
#define SNDRV_TIMER_FLG_CHANGE 0x00000001 #define SNDRV_TIMER_FLG_RESCHED 0x00000002 /* need reschedule */
struct snd_timer;
struct snd_timer_hardware { /* -- must be filled with low-level driver */ unsignedint flags; /* various flags */ unsignedlong resolution; /* average timer resolution for one tick in nsec */ unsignedlong resolution_min; /* minimal resolution */ unsignedlong resolution_max; /* maximal resolution */ unsignedlong ticks; /* max timer ticks per interrupt */ /* -- low-level functions -- */ int (*open) (struct snd_timer * timer); int (*close) (struct snd_timer * timer); unsignedlong (*c_resolution) (struct snd_timer * timer); int (*start) (struct snd_timer * timer); int (*stop) (struct snd_timer * timer); int (*set_period) (struct snd_timer * timer, unsignedlong period_num, unsignedlong period_den); int (*precise_resolution) (struct snd_timer * timer, unsignedlong *num, unsignedlong *den);
};
struct snd_timer { int tmr_class; struct snd_card *card; struct module *module; int tmr_device; int tmr_subdevice; char id[64]; char name[80]; unsignedint flags; int running; /* running instances */ unsignedlong sticks; /* schedule ticks */ void *private_data; void (*private_free) (struct snd_timer *timer); struct snd_timer_hardware hw;
spinlock_t lock; struct list_head device_list; struct list_head open_list_head; struct list_head active_list_head; struct list_head ack_list_head; struct list_head sack_list_head; /* slow ack list head */ struct work_struct task_work; int max_instances; /* upper limit of timer instances */ int num_instances; /* current number of timer instances */
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.