1158979Snetchild/*- 2166322Sjoel * Copyright (c) 2003 Mathew Kanner 3166322Sjoel * Copyright (c) 1999 Seigo Tanimura 4166322Sjoel * All rights reserved. 5158979Snetchild * 6158979Snetchild * Redistribution and use in source and binary forms, with or without 7158979Snetchild * modification, are permitted provided that the following conditions 8158979Snetchild * are met: 9158979Snetchild * 1. Redistributions of source code must retain the above copyright 10158979Snetchild * notice, this list of conditions and the following disclaimer. 11158979Snetchild * 2. Redistributions in binary form must reproduce the above copyright 12158979Snetchild * notice, this list of conditions and the following disclaimer in the 13158979Snetchild * documentation and/or other materials provided with the distribution. 14158979Snetchild * 15158979Snetchild * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16158979Snetchild * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17158979Snetchild * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18158979Snetchild * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19158979Snetchild * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20158979Snetchild * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21158979Snetchild * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22158979Snetchild * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23158979Snetchild * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24158979Snetchild * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25158979Snetchild * SUCH DAMAGE. 26158979Snetchild * 27158979Snetchild * $FreeBSD: releng/11.0/sys/dev/sound/midi/sequencer.h 193640 2009-06-07 19:12:08Z ariff $ 28158979Snetchild */ 29158979Snetchild 30166322Sjoel/* 31166322Sjoel * Include file for the midi sequence driver. 32166322Sjoel */ 33166322Sjoel 34158979Snetchild#ifndef _SEQUENCER_H_ 35158979Snetchild#define _SEQUENCER_H_ 36158979Snetchild 37158979Snetchild 38158979Snetchild#define NSEQ_MAX 16 39158979Snetchild 40158979Snetchild/* 41158979Snetchild * many variables should be reduced to a range. Here define a macro 42158979Snetchild */ 43158979Snetchild 44158979Snetchild#define RANGE(var, low, high) (var) = \ 45158979Snetchild((var)<(low)?(low) : (var)>(high)?(high) : (var)) 46158979Snetchild 47158979Snetchild#ifdef _KERNEL 48158979Snetchild 49158979Snetchildvoid seq_timer(void *arg); 50158979Snetchild 51158979SnetchildSYSCTL_DECL(_hw_midi_seq); 52158979Snetchild 53166971Snetchildextern int seq_debug; 54166971Snetchild 55158979Snetchild#define SEQ_DEBUG(y, x) \ 56158979Snetchild do { \ 57158979Snetchild if (seq_debug >= y) { \ 58158979Snetchild (x); \ 59158979Snetchild } \ 60193640Sariff } while (0) 61158979Snetchild 62158979SnetchildSYSCTL_DECL(_hw_midi); 63158979Snetchild 64166971Snetchild#endif /* _KERNEL */ 65158979Snetchild 66158979Snetchild#define SYNTHPROP_MIDI 1 67158979Snetchild#define SYNTHPROP_SYNTH 2 68158979Snetchild#define SYNTHPROP_RX 4 69158979Snetchild#define SYNTHPROP_TX 8 70158979Snetchild 71158979Snetchildstruct _midi_cmdtab { 72166971Snetchild int cmd; 73166971Snetchild char *name; 74158979Snetchild}; 75166971Snetchildtypedef struct _midi_cmdtab midi_cmdtab; 76158979Snetchildextern midi_cmdtab cmdtab_seqevent[]; 77158979Snetchildextern midi_cmdtab cmdtab_seqioctl[]; 78158979Snetchildextern midi_cmdtab cmdtab_timer[]; 79158979Snetchildextern midi_cmdtab cmdtab_seqcv[]; 80158979Snetchildextern midi_cmdtab cmdtab_seqccmn[]; 81158979Snetchild 82166971Snetchildchar *midi_cmdname(int cmd, midi_cmdtab * tab); 83158979Snetchild 84158979Snetchildenum { 85158979Snetchild MORE, 86158979Snetchild TIMERARMED, 87158979Snetchild QUEUEFULL 88158979Snetchild}; 89158979Snetchild 90158979Snetchild#endif 91