~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/core/seq/seq_fifo.h

Version: ~ [ linux-5.15-rc5 ] ~ [ linux-5.14.11 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.72 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.152 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.210 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.250 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.286 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.288 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *   ALSA sequencer FIFO
  3  *   Copyright (c) 1998 by Frank van de Pol <fvdpol@coil.demon.nl>
  4  *
  5  *
  6  *   This program is free software; you can redistribute it and/or modify
  7  *   it under the terms of the GNU General Public License as published by
  8  *   the Free Software Foundation; either version 2 of the License, or
  9  *   (at your option) any later version.
 10  *
 11  *   This program is distributed in the hope that it will be useful,
 12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14  *   GNU General Public License for more details.
 15  *
 16  *   You should have received a copy of the GNU General Public License
 17  *   along with this program; if not, write to the Free Software
 18  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 19  *
 20  */
 21 #ifndef __SND_SEQ_FIFO_H
 22 #define __SND_SEQ_FIFO_H
 23 
 24 #include "seq_memory.h"
 25 #include "seq_lock.h"
 26 
 27 
 28 /* === FIFO === */
 29 
 30 struct snd_seq_fifo {
 31         struct snd_seq_pool *pool;              /* FIFO pool */
 32         struct snd_seq_event_cell *head;        /* pointer to head of fifo */
 33         struct snd_seq_event_cell *tail;        /* pointer to tail of fifo */
 34         int cells;
 35         spinlock_t lock;
 36         snd_use_lock_t use_lock;
 37         wait_queue_head_t input_sleep;
 38         atomic_t overflow;
 39 
 40 };
 41 
 42 /* create new fifo (constructor) */
 43 struct snd_seq_fifo *snd_seq_fifo_new(int poolsize);
 44 
 45 /* delete fifo (destructor) */
 46 void snd_seq_fifo_delete(struct snd_seq_fifo **f);
 47 
 48 
 49 /* enqueue event to fifo */
 50 int snd_seq_fifo_event_in(struct snd_seq_fifo *f, struct snd_seq_event *event);
 51 
 52 /* lock fifo from release */
 53 #define snd_seq_fifo_lock(fifo)         snd_use_lock_use(&(fifo)->use_lock)
 54 #define snd_seq_fifo_unlock(fifo)       snd_use_lock_free(&(fifo)->use_lock)
 55 
 56 /* get a cell from fifo - fifo should be locked */
 57 int snd_seq_fifo_cell_out(struct snd_seq_fifo *f, struct snd_seq_event_cell **cellp, int nonblock);
 58 
 59 /* free dequeued cell - fifo should be locked */
 60 void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f, struct snd_seq_event_cell *cell);
 61 
 62 /* clean up queue */
 63 void snd_seq_fifo_clear(struct snd_seq_fifo *f);
 64 
 65 /* polling */
 66 int snd_seq_fifo_poll_wait(struct snd_seq_fifo *f, struct file *file, poll_table *wait);
 67 
 68 /* resize pool in fifo */
 69 int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize);
 70 
 71 /* get the number of unused cells safely */
 72 int snd_seq_fifo_unused_cells(struct snd_seq_fifo *f);
 73 
 74 #endif
 75 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp