0001
0002
0003
0004
0005
0006 #ifndef __SND_SEQ_FIFO_H
0007 #define __SND_SEQ_FIFO_H
0008
0009 #include "seq_memory.h"
0010 #include "seq_lock.h"
0011
0012
0013
0014
0015 struct snd_seq_fifo {
0016 struct snd_seq_pool *pool;
0017 struct snd_seq_event_cell *head;
0018 struct snd_seq_event_cell *tail;
0019 int cells;
0020 spinlock_t lock;
0021 snd_use_lock_t use_lock;
0022 wait_queue_head_t input_sleep;
0023 atomic_t overflow;
0024
0025 };
0026
0027
0028 struct snd_seq_fifo *snd_seq_fifo_new(int poolsize);
0029
0030
0031 void snd_seq_fifo_delete(struct snd_seq_fifo **f);
0032
0033
0034
0035 int snd_seq_fifo_event_in(struct snd_seq_fifo *f, struct snd_seq_event *event);
0036
0037
0038 #define snd_seq_fifo_lock(fifo) snd_use_lock_use(&(fifo)->use_lock)
0039 #define snd_seq_fifo_unlock(fifo) snd_use_lock_free(&(fifo)->use_lock)
0040
0041
0042 int snd_seq_fifo_cell_out(struct snd_seq_fifo *f, struct snd_seq_event_cell **cellp, int nonblock);
0043
0044
0045 void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f, struct snd_seq_event_cell *cell);
0046
0047
0048 void snd_seq_fifo_clear(struct snd_seq_fifo *f);
0049
0050
0051 int snd_seq_fifo_poll_wait(struct snd_seq_fifo *f, struct file *file, poll_table *wait);
0052
0053
0054 int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize);
0055
0056
0057 int snd_seq_fifo_unused_cells(struct snd_seq_fifo *f);
0058
0059 #endif