xref: /openbmc/linux/include/uapi/sound/asequencer.h (revision 5437ac9b)
1e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2674e95caSDavid Howells /*
3674e95caSDavid Howells  *  Main header file for the ALSA sequencer
4674e95caSDavid Howells  *  Copyright (c) 1998-1999 by Frank van de Pol <fvdpol@coil.demon.nl>
5674e95caSDavid Howells  *            (c) 1998-1999 by Jaroslav Kysela <perex@perex.cz>
6674e95caSDavid Howells  */
7674e95caSDavid Howells #ifndef _UAPI__SOUND_ASEQUENCER_H
8674e95caSDavid Howells #define _UAPI__SOUND_ASEQUENCER_H
9674e95caSDavid Howells 
10bbf91c1cSMikko Rapeli #include <sound/asound.h>
11674e95caSDavid Howells 
12674e95caSDavid Howells /** version of the sequencer */
1346397622STakashi Iwai #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 3)
14674e95caSDavid Howells 
15674e95caSDavid Howells /**
16674e95caSDavid Howells  * definition of sequencer event types
17674e95caSDavid Howells  */
18674e95caSDavid Howells 
19674e95caSDavid Howells /** system messages
20674e95caSDavid Howells  * event data type = #snd_seq_result
21674e95caSDavid Howells  */
22674e95caSDavid Howells #define SNDRV_SEQ_EVENT_SYSTEM		0
23674e95caSDavid Howells #define SNDRV_SEQ_EVENT_RESULT		1
24674e95caSDavid Howells 
25674e95caSDavid Howells /** note messages (channel specific)
26674e95caSDavid Howells  * event data type = #snd_seq_ev_note
27674e95caSDavid Howells  */
28674e95caSDavid Howells #define SNDRV_SEQ_EVENT_NOTE		5
29674e95caSDavid Howells #define SNDRV_SEQ_EVENT_NOTEON		6
30674e95caSDavid Howells #define SNDRV_SEQ_EVENT_NOTEOFF		7
31674e95caSDavid Howells #define SNDRV_SEQ_EVENT_KEYPRESS	8
32674e95caSDavid Howells 
33674e95caSDavid Howells /** control messages (channel specific)
34674e95caSDavid Howells  * event data type = #snd_seq_ev_ctrl
35674e95caSDavid Howells  */
36674e95caSDavid Howells #define SNDRV_SEQ_EVENT_CONTROLLER	10
37674e95caSDavid Howells #define SNDRV_SEQ_EVENT_PGMCHANGE	11
38674e95caSDavid Howells #define SNDRV_SEQ_EVENT_CHANPRESS	12
39674e95caSDavid Howells #define SNDRV_SEQ_EVENT_PITCHBEND	13	/**< from -8192 to 8191 */
40674e95caSDavid Howells #define SNDRV_SEQ_EVENT_CONTROL14	14	/**< 14 bit controller value */
41674e95caSDavid Howells #define SNDRV_SEQ_EVENT_NONREGPARAM	15	/**< 14 bit NRPN address + 14 bit unsigned value */
42674e95caSDavid Howells #define SNDRV_SEQ_EVENT_REGPARAM	16	/**< 14 bit RPN address + 14 bit unsigned value */
43674e95caSDavid Howells 
44674e95caSDavid Howells /** synchronisation messages
45674e95caSDavid Howells  * event data type = #snd_seq_ev_ctrl
46674e95caSDavid Howells  */
47674e95caSDavid Howells #define SNDRV_SEQ_EVENT_SONGPOS		20	/* Song Position Pointer with LSB and MSB values */
48674e95caSDavid Howells #define SNDRV_SEQ_EVENT_SONGSEL		21	/* Song Select with song ID number */
49674e95caSDavid Howells #define SNDRV_SEQ_EVENT_QFRAME		22	/* midi time code quarter frame */
50674e95caSDavid Howells #define SNDRV_SEQ_EVENT_TIMESIGN	23	/* SMF Time Signature event */
51674e95caSDavid Howells #define SNDRV_SEQ_EVENT_KEYSIGN		24	/* SMF Key Signature event */
52674e95caSDavid Howells 
53674e95caSDavid Howells /** timer messages
54674e95caSDavid Howells  * event data type = snd_seq_ev_queue_control
55674e95caSDavid Howells  */
56674e95caSDavid Howells #define SNDRV_SEQ_EVENT_START		30	/* midi Real Time Start message */
57674e95caSDavid Howells #define SNDRV_SEQ_EVENT_CONTINUE	31	/* midi Real Time Continue message */
58674e95caSDavid Howells #define SNDRV_SEQ_EVENT_STOP		32	/* midi Real Time Stop message */
59674e95caSDavid Howells #define	SNDRV_SEQ_EVENT_SETPOS_TICK	33	/* set tick queue position */
60674e95caSDavid Howells #define SNDRV_SEQ_EVENT_SETPOS_TIME	34	/* set realtime queue position */
61674e95caSDavid Howells #define SNDRV_SEQ_EVENT_TEMPO		35	/* (SMF) Tempo event */
62674e95caSDavid Howells #define SNDRV_SEQ_EVENT_CLOCK		36	/* midi Real Time Clock message */
63674e95caSDavid Howells #define SNDRV_SEQ_EVENT_TICK		37	/* midi Real Time Tick message */
64674e95caSDavid Howells #define SNDRV_SEQ_EVENT_QUEUE_SKEW	38	/* skew queue tempo */
65674e95caSDavid Howells 
66674e95caSDavid Howells /** others
67674e95caSDavid Howells  * event data type = none
68674e95caSDavid Howells  */
69674e95caSDavid Howells #define SNDRV_SEQ_EVENT_TUNE_REQUEST	40	/* tune request */
70674e95caSDavid Howells #define SNDRV_SEQ_EVENT_RESET		41	/* reset to power-on state */
71674e95caSDavid Howells #define SNDRV_SEQ_EVENT_SENSING		42	/* "active sensing" event */
72674e95caSDavid Howells 
73674e95caSDavid Howells /** echo back, kernel private messages
74674e95caSDavid Howells  * event data type = any type
75674e95caSDavid Howells  */
76674e95caSDavid Howells #define SNDRV_SEQ_EVENT_ECHO		50	/* echo event */
77674e95caSDavid Howells #define SNDRV_SEQ_EVENT_OSS		51	/* OSS raw event */
78674e95caSDavid Howells 
79674e95caSDavid Howells /** system status messages (broadcast for subscribers)
80674e95caSDavid Howells  * event data type = snd_seq_addr
81674e95caSDavid Howells  */
82674e95caSDavid Howells #define SNDRV_SEQ_EVENT_CLIENT_START	60	/* new client has connected */
83674e95caSDavid Howells #define SNDRV_SEQ_EVENT_CLIENT_EXIT	61	/* client has left the system */
84674e95caSDavid Howells #define SNDRV_SEQ_EVENT_CLIENT_CHANGE	62	/* client status/info has changed */
85674e95caSDavid Howells #define SNDRV_SEQ_EVENT_PORT_START	63	/* new port was created */
86674e95caSDavid Howells #define SNDRV_SEQ_EVENT_PORT_EXIT	64	/* port was deleted from system */
87674e95caSDavid Howells #define SNDRV_SEQ_EVENT_PORT_CHANGE	65	/* port status/info has changed */
88674e95caSDavid Howells 
89674e95caSDavid Howells /** port connection changes
90674e95caSDavid Howells  * event data type = snd_seq_connect
91674e95caSDavid Howells  */
92674e95caSDavid Howells #define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED	66	/* ports connected */
93674e95caSDavid Howells #define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67	/* ports disconnected */
94674e95caSDavid Howells 
95674e95caSDavid Howells /* 70-89:  synthesizer events - obsoleted */
96674e95caSDavid Howells 
97674e95caSDavid Howells /** user-defined events with fixed length
98674e95caSDavid Howells  * event data type = any
99674e95caSDavid Howells  */
100674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR0		90
101674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR1		91
102674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR2		92
103674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR3		93
104674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR4		94
105674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR5		95
106674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR6		96
107674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR7		97
108674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR8		98
109674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR9		99
110674e95caSDavid Howells 
111674e95caSDavid Howells /* 100-118: instrument layer - obsoleted */
112674e95caSDavid Howells /* 119-129: reserved */
113674e95caSDavid Howells 
114674e95caSDavid Howells /* 130-139: variable length events
115674e95caSDavid Howells  * event data type = snd_seq_ev_ext
116674e95caSDavid Howells  * (SNDRV_SEQ_EVENT_LENGTH_VARIABLE must be set)
117674e95caSDavid Howells  */
118674e95caSDavid Howells #define SNDRV_SEQ_EVENT_SYSEX		130	/* system exclusive data (variable length) */
119674e95caSDavid Howells #define SNDRV_SEQ_EVENT_BOUNCE		131	/* error event */
120674e95caSDavid Howells /* 132-134: reserved */
121674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR_VAR0	135
122674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR_VAR1	136
123674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR_VAR2	137
124674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR_VAR3	138
125674e95caSDavid Howells #define SNDRV_SEQ_EVENT_USR_VAR4	139
126674e95caSDavid Howells 
127674e95caSDavid Howells /* 150-151: kernel events with quote - DO NOT use in user clients */
128674e95caSDavid Howells #define SNDRV_SEQ_EVENT_KERNEL_ERROR	150
129674e95caSDavid Howells #define SNDRV_SEQ_EVENT_KERNEL_QUOTE	151	/* obsolete */
130674e95caSDavid Howells 
131674e95caSDavid Howells /* 152-191: reserved */
132674e95caSDavid Howells 
133674e95caSDavid Howells /* 192-254: hardware specific events */
134674e95caSDavid Howells 
135674e95caSDavid Howells /* 255: special event */
136674e95caSDavid Howells #define SNDRV_SEQ_EVENT_NONE		255
137674e95caSDavid Howells 
138674e95caSDavid Howells 
139674e95caSDavid Howells typedef unsigned char snd_seq_event_type_t;
140674e95caSDavid Howells 
141674e95caSDavid Howells /** event address */
142674e95caSDavid Howells struct snd_seq_addr {
143674e95caSDavid Howells 	unsigned char client;	/**< Client number:         0..255, 255 = broadcast to all clients */
144674e95caSDavid Howells 	unsigned char port;	/**< Port within client:    0..255, 255 = broadcast to all ports */
145674e95caSDavid Howells };
146674e95caSDavid Howells 
147674e95caSDavid Howells /** port connection */
148674e95caSDavid Howells struct snd_seq_connect {
149674e95caSDavid Howells 	struct snd_seq_addr sender;
150674e95caSDavid Howells 	struct snd_seq_addr dest;
151674e95caSDavid Howells };
152674e95caSDavid Howells 
153674e95caSDavid Howells 
154674e95caSDavid Howells #define SNDRV_SEQ_ADDRESS_UNKNOWN	253	/* unknown source */
155674e95caSDavid Howells #define SNDRV_SEQ_ADDRESS_SUBSCRIBERS	254	/* send event to all subscribed ports */
156674e95caSDavid Howells #define SNDRV_SEQ_ADDRESS_BROADCAST	255	/* send event to all queues/clients/ports/channels */
157674e95caSDavid Howells #define SNDRV_SEQ_QUEUE_DIRECT		253	/* direct dispatch */
158674e95caSDavid Howells 
159674e95caSDavid Howells 	/* event mode flag - NOTE: only 8 bits available! */
160674e95caSDavid Howells #define SNDRV_SEQ_TIME_STAMP_TICK	(0<<0) /* timestamp in clock ticks */
161674e95caSDavid Howells #define SNDRV_SEQ_TIME_STAMP_REAL	(1<<0) /* timestamp in real time */
162674e95caSDavid Howells #define SNDRV_SEQ_TIME_STAMP_MASK	(1<<0)
163674e95caSDavid Howells 
164674e95caSDavid Howells #define SNDRV_SEQ_TIME_MODE_ABS		(0<<1)	/* absolute timestamp */
165674e95caSDavid Howells #define SNDRV_SEQ_TIME_MODE_REL		(1<<1)	/* relative to current time */
166674e95caSDavid Howells #define SNDRV_SEQ_TIME_MODE_MASK	(1<<1)
167674e95caSDavid Howells 
168674e95caSDavid Howells #define SNDRV_SEQ_EVENT_LENGTH_FIXED	(0<<2)	/* fixed event size */
169674e95caSDavid Howells #define SNDRV_SEQ_EVENT_LENGTH_VARIABLE	(1<<2)	/* variable event size */
170674e95caSDavid Howells #define SNDRV_SEQ_EVENT_LENGTH_VARUSR	(2<<2)	/* variable event size - user memory space */
171674e95caSDavid Howells #define SNDRV_SEQ_EVENT_LENGTH_MASK	(3<<2)
172674e95caSDavid Howells 
173674e95caSDavid Howells #define SNDRV_SEQ_PRIORITY_NORMAL	(0<<4)	/* normal priority */
174674e95caSDavid Howells #define SNDRV_SEQ_PRIORITY_HIGH		(1<<4)	/* event should be processed before others */
175674e95caSDavid Howells #define SNDRV_SEQ_PRIORITY_MASK		(1<<4)
176674e95caSDavid Howells 
17746397622STakashi Iwai #define SNDRV_SEQ_EVENT_UMP		(1<<5)	/* event holds a UMP packet */
178674e95caSDavid Howells 
179674e95caSDavid Howells 	/* note event */
180674e95caSDavid Howells struct snd_seq_ev_note {
181674e95caSDavid Howells 	unsigned char channel;
182674e95caSDavid Howells 	unsigned char note;
183674e95caSDavid Howells 	unsigned char velocity;
184674e95caSDavid Howells 	unsigned char off_velocity;	/* only for SNDRV_SEQ_EVENT_NOTE */
185674e95caSDavid Howells 	unsigned int duration;		/* only for SNDRV_SEQ_EVENT_NOTE */
186674e95caSDavid Howells };
187674e95caSDavid Howells 
188674e95caSDavid Howells 	/* controller event */
189674e95caSDavid Howells struct snd_seq_ev_ctrl {
190674e95caSDavid Howells 	unsigned char channel;
191674e95caSDavid Howells 	unsigned char unused1, unused2, unused3;	/* pad */
192674e95caSDavid Howells 	unsigned int param;
193674e95caSDavid Howells 	signed int value;
194674e95caSDavid Howells };
195674e95caSDavid Howells 
196674e95caSDavid Howells 	/* generic set of bytes (12x8 bit) */
197674e95caSDavid Howells struct snd_seq_ev_raw8 {
198674e95caSDavid Howells 	unsigned char d[12];	/* 8 bit value */
199674e95caSDavid Howells };
200674e95caSDavid Howells 
201674e95caSDavid Howells 	/* generic set of integers (3x32 bit) */
202674e95caSDavid Howells struct snd_seq_ev_raw32 {
203674e95caSDavid Howells 	unsigned int d[3];	/* 32 bit value */
204674e95caSDavid Howells };
205674e95caSDavid Howells 
206674e95caSDavid Howells 	/* external stored data */
207674e95caSDavid Howells struct snd_seq_ev_ext {
208674e95caSDavid Howells 	unsigned int len;	/* length of data */
209674e95caSDavid Howells 	void *ptr;		/* pointer to data (note: maybe 64-bit) */
210674e95caSDavid Howells } __attribute__((packed));
211674e95caSDavid Howells 
212674e95caSDavid Howells struct snd_seq_result {
213674e95caSDavid Howells 	int event;		/* processed event type */
214674e95caSDavid Howells 	int result;
215674e95caSDavid Howells };
216674e95caSDavid Howells 
217674e95caSDavid Howells 
218674e95caSDavid Howells struct snd_seq_real_time {
219674e95caSDavid Howells 	unsigned int tv_sec;	/* seconds */
220674e95caSDavid Howells 	unsigned int tv_nsec;	/* nanoseconds */
221674e95caSDavid Howells };
222674e95caSDavid Howells 
223674e95caSDavid Howells typedef unsigned int snd_seq_tick_time_t;	/* midi ticks */
224674e95caSDavid Howells 
225674e95caSDavid Howells union snd_seq_timestamp {
226674e95caSDavid Howells 	snd_seq_tick_time_t tick;
227674e95caSDavid Howells 	struct snd_seq_real_time time;
228674e95caSDavid Howells };
229674e95caSDavid Howells 
230674e95caSDavid Howells struct snd_seq_queue_skew {
231674e95caSDavid Howells 	unsigned int value;
232674e95caSDavid Howells 	unsigned int base;
233674e95caSDavid Howells };
234674e95caSDavid Howells 
235674e95caSDavid Howells 	/* queue timer control */
236674e95caSDavid Howells struct snd_seq_ev_queue_control {
237674e95caSDavid Howells 	unsigned char queue;			/* affected queue */
238674e95caSDavid Howells 	unsigned char pad[3];			/* reserved */
239674e95caSDavid Howells 	union {
240674e95caSDavid Howells 		signed int value;		/* affected value (e.g. tempo) */
241674e95caSDavid Howells 		union snd_seq_timestamp time;	/* time */
242674e95caSDavid Howells 		unsigned int position;		/* sync position */
243674e95caSDavid Howells 		struct snd_seq_queue_skew skew;
244674e95caSDavid Howells 		unsigned int d32[2];
245674e95caSDavid Howells 		unsigned char d8[8];
246674e95caSDavid Howells 	} param;
247674e95caSDavid Howells };
248674e95caSDavid Howells 
249674e95caSDavid Howells 	/* quoted event - inside the kernel only */
250674e95caSDavid Howells struct snd_seq_ev_quote {
251674e95caSDavid Howells 	struct snd_seq_addr origin;		/* original sender */
252674e95caSDavid Howells 	unsigned short value;		/* optional data */
253674e95caSDavid Howells 	struct snd_seq_event *event;		/* quoted event */
254674e95caSDavid Howells } __attribute__((packed));
255674e95caSDavid Howells 
25646397622STakashi Iwai union snd_seq_event_data { /* event data... */
257674e95caSDavid Howells 	struct snd_seq_ev_note note;
258674e95caSDavid Howells 	struct snd_seq_ev_ctrl control;
259674e95caSDavid Howells 	struct snd_seq_ev_raw8 raw8;
260674e95caSDavid Howells 	struct snd_seq_ev_raw32 raw32;
261674e95caSDavid Howells 	struct snd_seq_ev_ext ext;
262674e95caSDavid Howells 	struct snd_seq_ev_queue_control queue;
263674e95caSDavid Howells 	union snd_seq_timestamp time;
264674e95caSDavid Howells 	struct snd_seq_addr addr;
265674e95caSDavid Howells 	struct snd_seq_connect connect;
266674e95caSDavid Howells 	struct snd_seq_result result;
267674e95caSDavid Howells 	struct snd_seq_ev_quote quote;
268674e95caSDavid Howells };
269674e95caSDavid Howells 
27046397622STakashi Iwai 	/* sequencer event */
27146397622STakashi Iwai struct snd_seq_event {
27246397622STakashi Iwai 	snd_seq_event_type_t type;	/* event type */
27346397622STakashi Iwai 	unsigned char flags;		/* event flags */
27446397622STakashi Iwai 	char tag;
27546397622STakashi Iwai 
27646397622STakashi Iwai 	unsigned char queue;		/* schedule queue */
27746397622STakashi Iwai 	union snd_seq_timestamp time;	/* schedule time */
27846397622STakashi Iwai 
27946397622STakashi Iwai 	struct snd_seq_addr source;	/* source address */
28046397622STakashi Iwai 	struct snd_seq_addr dest;	/* destination address */
28146397622STakashi Iwai 
28246397622STakashi Iwai 	union snd_seq_event_data data;
28346397622STakashi Iwai };
28446397622STakashi Iwai 
28546397622STakashi Iwai 	/* (compatible) event for UMP-capable clients */
28646397622STakashi Iwai struct snd_seq_ump_event {
28746397622STakashi Iwai 	snd_seq_event_type_t type;	/* event type */
28846397622STakashi Iwai 	unsigned char flags;		/* event flags */
28946397622STakashi Iwai 	char tag;
29046397622STakashi Iwai 	unsigned char queue;		/* schedule queue */
29146397622STakashi Iwai 	union snd_seq_timestamp time;	/* schedule time */
29246397622STakashi Iwai 	struct snd_seq_addr source;	/* source address */
29346397622STakashi Iwai 	struct snd_seq_addr dest;	/* destination address */
29446397622STakashi Iwai 
29546397622STakashi Iwai 	union {
29646397622STakashi Iwai 		union snd_seq_event_data data;
29746397622STakashi Iwai 		unsigned int ump[4];
29846397622STakashi Iwai 	};
29946397622STakashi Iwai };
300674e95caSDavid Howells 
301674e95caSDavid Howells /*
302674e95caSDavid Howells  * bounce event - stored as variable size data
303674e95caSDavid Howells  */
304674e95caSDavid Howells struct snd_seq_event_bounce {
305674e95caSDavid Howells 	int err;
306674e95caSDavid Howells 	struct snd_seq_event event;
307674e95caSDavid Howells 	/* external data follows here. */
308674e95caSDavid Howells };
309674e95caSDavid Howells 
310674e95caSDavid Howells 
311674e95caSDavid Howells 	/* system information */
312674e95caSDavid Howells struct snd_seq_system_info {
313674e95caSDavid Howells 	int queues;			/* maximum queues count */
314674e95caSDavid Howells 	int clients;			/* maximum clients count */
315674e95caSDavid Howells 	int ports;			/* maximum ports per client */
316674e95caSDavid Howells 	int channels;			/* maximum channels per port */
317674e95caSDavid Howells 	int cur_clients;		/* current clients */
318674e95caSDavid Howells 	int cur_queues;			/* current queues */
319674e95caSDavid Howells 	char reserved[24];
320674e95caSDavid Howells };
321674e95caSDavid Howells 
322674e95caSDavid Howells 
323674e95caSDavid Howells 	/* system running information */
324674e95caSDavid Howells struct snd_seq_running_info {
325674e95caSDavid Howells 	unsigned char client;		/* client id */
326674e95caSDavid Howells 	unsigned char big_endian;	/* 1 = big-endian */
327674e95caSDavid Howells 	unsigned char cpu_mode;		/* 4 = 32bit, 8 = 64bit */
328674e95caSDavid Howells 	unsigned char pad;		/* reserved */
329674e95caSDavid Howells 	unsigned char reserved[12];
330674e95caSDavid Howells };
331674e95caSDavid Howells 
332674e95caSDavid Howells 
333674e95caSDavid Howells 	/* known client numbers */
334674e95caSDavid Howells #define SNDRV_SEQ_CLIENT_SYSTEM		0
335674e95caSDavid Howells 	/* internal client numbers */
336674e95caSDavid Howells #define SNDRV_SEQ_CLIENT_DUMMY		14	/* midi through */
337674e95caSDavid Howells #define SNDRV_SEQ_CLIENT_OSS		15	/* oss sequencer emulator */
338674e95caSDavid Howells 
339674e95caSDavid Howells 
340674e95caSDavid Howells 	/* client types */
341674e95caSDavid Howells typedef int __bitwise snd_seq_client_type_t;
342674e95caSDavid Howells #define	NO_CLIENT	((__force snd_seq_client_type_t) 0)
343674e95caSDavid Howells #define	USER_CLIENT	((__force snd_seq_client_type_t) 1)
344674e95caSDavid Howells #define	KERNEL_CLIENT	((__force snd_seq_client_type_t) 2)
345674e95caSDavid Howells 
346674e95caSDavid Howells 	/* event filter flags */
347cf59e1e4SBaisong Zhong #define SNDRV_SEQ_FILTER_BROADCAST	(1U<<0)	/* accept broadcast messages */
348cf59e1e4SBaisong Zhong #define SNDRV_SEQ_FILTER_MULTICAST	(1U<<1)	/* accept multicast messages */
349cf59e1e4SBaisong Zhong #define SNDRV_SEQ_FILTER_BOUNCE		(1U<<2)	/* accept bounce event in error */
350329ffe11STakashi Iwai #define SNDRV_SEQ_FILTER_NO_CONVERT	(1U<<30) /* don't convert UMP events */
351cf59e1e4SBaisong Zhong #define SNDRV_SEQ_FILTER_USE_EVENT	(1U<<31)	/* use event filter */
352674e95caSDavid Howells 
353674e95caSDavid Howells struct snd_seq_client_info {
354674e95caSDavid Howells 	int client;			/* client number to inquire */
355674e95caSDavid Howells 	snd_seq_client_type_t type;	/* client type */
356674e95caSDavid Howells 	char name[64];			/* client name */
357674e95caSDavid Howells 	unsigned int filter;		/* filter flags */
358674e95caSDavid Howells 	unsigned char multicast_filter[8]; /* multicast filter bitmap */
359674e95caSDavid Howells 	unsigned char event_filter[32];	/* event filter bitmap */
360674e95caSDavid Howells 	int num_ports;			/* RO: number of ports */
361674e95caSDavid Howells 	int event_lost;			/* number of lost events */
362a1ce94d0SMartin Koegler 	int card;			/* RO: card number[kernel] */
363a1ce94d0SMartin Koegler 	int pid;			/* RO: pid[user] */
36446397622STakashi Iwai 	unsigned int midi_version;	/* MIDI version */
365*5437ac9bSTakashi Iwai 	unsigned int group_filter;	/* UMP group filter bitmap
366*5437ac9bSTakashi Iwai 					 * (bit 0 = groupless messages,
367*5437ac9bSTakashi Iwai 					 *  bit 1-16 = messages for groups 1-16)
368*5437ac9bSTakashi Iwai 					 */
369d2b70607STakashi Iwai 	char reserved[48];		/* for future use */
370674e95caSDavid Howells };
371674e95caSDavid Howells 
37246397622STakashi Iwai /* MIDI version numbers in client info */
37346397622STakashi Iwai #define SNDRV_SEQ_CLIENT_LEGACY_MIDI		0	/* Legacy client */
37446397622STakashi Iwai #define SNDRV_SEQ_CLIENT_UMP_MIDI_1_0		1	/* UMP MIDI 1.0 */
37546397622STakashi Iwai #define SNDRV_SEQ_CLIENT_UMP_MIDI_2_0		2	/* UMP MIDI 2.0 */
376674e95caSDavid Howells 
377674e95caSDavid Howells /* client pool size */
378674e95caSDavid Howells struct snd_seq_client_pool {
379674e95caSDavid Howells 	int client;			/* client number to inquire */
380674e95caSDavid Howells 	int output_pool;		/* outgoing (write) pool size */
381674e95caSDavid Howells 	int input_pool;			/* incoming (read) pool size */
382674e95caSDavid Howells 	int output_room;		/* minimum free pool size for select/blocking mode */
383674e95caSDavid Howells 	int output_free;		/* unused size */
384674e95caSDavid Howells 	int input_free;			/* unused size */
385674e95caSDavid Howells 	char reserved[64];
386674e95caSDavid Howells };
387674e95caSDavid Howells 
388674e95caSDavid Howells 
389674e95caSDavid Howells /* Remove events by specified criteria */
390674e95caSDavid Howells 
391674e95caSDavid Howells #define SNDRV_SEQ_REMOVE_INPUT		(1<<0)	/* Flush input queues */
392674e95caSDavid Howells #define SNDRV_SEQ_REMOVE_OUTPUT		(1<<1)	/* Flush output queues */
393674e95caSDavid Howells #define SNDRV_SEQ_REMOVE_DEST		(1<<2)	/* Restrict by destination q:client:port */
394674e95caSDavid Howells #define SNDRV_SEQ_REMOVE_DEST_CHANNEL	(1<<3)	/* Restrict by channel */
395674e95caSDavid Howells #define SNDRV_SEQ_REMOVE_TIME_BEFORE	(1<<4)	/* Restrict to before time */
396674e95caSDavid Howells #define SNDRV_SEQ_REMOVE_TIME_AFTER	(1<<5)	/* Restrict to time or after */
397674e95caSDavid Howells #define SNDRV_SEQ_REMOVE_TIME_TICK	(1<<6)	/* Time is in ticks */
398674e95caSDavid Howells #define SNDRV_SEQ_REMOVE_EVENT_TYPE	(1<<7)	/* Restrict to event type */
399674e95caSDavid Howells #define SNDRV_SEQ_REMOVE_IGNORE_OFF 	(1<<8)	/* Do not flush off events */
400674e95caSDavid Howells #define SNDRV_SEQ_REMOVE_TAG_MATCH 	(1<<9)	/* Restrict to events with given tag */
401674e95caSDavid Howells 
402674e95caSDavid Howells struct snd_seq_remove_events {
403674e95caSDavid Howells 	unsigned int  remove_mode;	/* Flags that determine what gets removed */
404674e95caSDavid Howells 
405674e95caSDavid Howells 	union snd_seq_timestamp time;
406674e95caSDavid Howells 
407674e95caSDavid Howells 	unsigned char queue;	/* Queue for REMOVE_DEST */
408674e95caSDavid Howells 	struct snd_seq_addr dest;	/* Address for REMOVE_DEST */
409674e95caSDavid Howells 	unsigned char channel;	/* Channel for REMOVE_DEST */
410674e95caSDavid Howells 
411674e95caSDavid Howells 	int  type;	/* For REMOVE_EVENT_TYPE */
412674e95caSDavid Howells 	char  tag;	/* Tag for REMOVE_TAG */
413674e95caSDavid Howells 
414674e95caSDavid Howells 	int  reserved[10];	/* To allow for future binary compatibility */
415674e95caSDavid Howells 
416674e95caSDavid Howells };
417674e95caSDavid Howells 
418674e95caSDavid Howells 
419674e95caSDavid Howells 	/* known port numbers */
420674e95caSDavid Howells #define SNDRV_SEQ_PORT_SYSTEM_TIMER	0
421674e95caSDavid Howells #define SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE	1
422674e95caSDavid Howells 
423674e95caSDavid Howells 	/* port capabilities (32 bits) */
424674e95caSDavid Howells #define SNDRV_SEQ_PORT_CAP_READ		(1<<0)	/* readable from this port */
425674e95caSDavid Howells #define SNDRV_SEQ_PORT_CAP_WRITE	(1<<1)	/* writable to this port */
426674e95caSDavid Howells 
427674e95caSDavid Howells #define SNDRV_SEQ_PORT_CAP_SYNC_READ	(1<<2)
428674e95caSDavid Howells #define SNDRV_SEQ_PORT_CAP_SYNC_WRITE	(1<<3)
429674e95caSDavid Howells 
430674e95caSDavid Howells #define SNDRV_SEQ_PORT_CAP_DUPLEX	(1<<4)
431674e95caSDavid Howells 
432674e95caSDavid Howells #define SNDRV_SEQ_PORT_CAP_SUBS_READ	(1<<5)	/* allow read subscription */
433674e95caSDavid Howells #define SNDRV_SEQ_PORT_CAP_SUBS_WRITE	(1<<6)	/* allow write subscription */
434674e95caSDavid Howells #define SNDRV_SEQ_PORT_CAP_NO_EXPORT	(1<<7)	/* routing not allowed */
43574661932STakashi Iwai #define SNDRV_SEQ_PORT_CAP_INACTIVE	(1<<8)	/* inactive port */
436177ccf81STakashi Iwai #define SNDRV_SEQ_PORT_CAP_UMP_ENDPOINT	(1<<9)	/* MIDI 2.0 UMP Endpoint port */
437674e95caSDavid Howells 
438674e95caSDavid Howells 	/* port type */
439674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_SPECIFIC	(1<<0)	/* hardware specific */
440674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1<<1)	/* generic MIDI device */
441674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_MIDI_GM	(1<<2)	/* General MIDI compatible device */
442674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_MIDI_GS	(1<<3)	/* GS compatible device */
443674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_MIDI_XG	(1<<4)	/* XG compatible device */
444674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_MIDI_MT32	(1<<5)	/* MT-32 compatible device */
445674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_MIDI_GM2	(1<<6)	/* General MIDI 2 compatible device */
44681fd444aSTakashi Iwai #define SNDRV_SEQ_PORT_TYPE_MIDI_UMP	(1<<7)	/* UMP */
447674e95caSDavid Howells 
448674e95caSDavid Howells /* other standards...*/
449674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_SYNTH	(1<<10)	/* Synth device (no MIDI compatible - direct wavetable) */
450674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11)	/* Sampling device (support sample download) */
451674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_SAMPLE	(1<<12)	/* Sampling device (sample can be downloaded at any time) */
452674e95caSDavid Howells /*...*/
453674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_HARDWARE	(1<<16)	/* driver for a hardware device */
454674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_SOFTWARE	(1<<17)	/* implemented in software */
455674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER	(1<<18)	/* generates sound */
456674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_PORT	(1<<19)	/* connects to other device(s) */
457674e95caSDavid Howells #define SNDRV_SEQ_PORT_TYPE_APPLICATION	(1<<20)	/* application (sequencer/editor) */
458674e95caSDavid Howells 
459674e95caSDavid Howells /* misc. conditioning flags */
460674e95caSDavid Howells #define SNDRV_SEQ_PORT_FLG_GIVEN_PORT	(1<<0)
461674e95caSDavid Howells #define SNDRV_SEQ_PORT_FLG_TIMESTAMP	(1<<1)
462674e95caSDavid Howells #define SNDRV_SEQ_PORT_FLG_TIME_REAL	(1<<2)
463674e95caSDavid Howells 
464ff166a9dSTakashi Iwai /* port direction */
465ff166a9dSTakashi Iwai #define SNDRV_SEQ_PORT_DIR_UNKNOWN	0
466ff166a9dSTakashi Iwai #define SNDRV_SEQ_PORT_DIR_INPUT	1
467ff166a9dSTakashi Iwai #define SNDRV_SEQ_PORT_DIR_OUTPUT	2
468ff166a9dSTakashi Iwai #define SNDRV_SEQ_PORT_DIR_BIDIRECTION	3
469ff166a9dSTakashi Iwai 
470674e95caSDavid Howells struct snd_seq_port_info {
471674e95caSDavid Howells 	struct snd_seq_addr addr;	/* client/port numbers */
472674e95caSDavid Howells 	char name[64];			/* port name */
473674e95caSDavid Howells 
474674e95caSDavid Howells 	unsigned int capability;	/* port capability bits */
475674e95caSDavid Howells 	unsigned int type;		/* port type bits */
476674e95caSDavid Howells 	int midi_channels;		/* channels per MIDI port */
477674e95caSDavid Howells 	int midi_voices;		/* voices per MIDI port */
478674e95caSDavid Howells 	int synth_voices;		/* voices per SYNTH port */
479674e95caSDavid Howells 
480674e95caSDavid Howells 	int read_use;			/* R/O: subscribers for output (from this port) */
481674e95caSDavid Howells 	int write_use;			/* R/O: subscribers for input (to this port) */
482674e95caSDavid Howells 
483674e95caSDavid Howells 	void *kernel;			/* reserved for kernel use (must be NULL) */
484674e95caSDavid Howells 	unsigned int flags;		/* misc. conditioning */
485674e95caSDavid Howells 	unsigned char time_queue;	/* queue # for timestamping */
486ff166a9dSTakashi Iwai 	unsigned char direction;	/* port usage direction (r/w/bidir) */
487a3ca3b30STakashi Iwai 	unsigned char ump_group;	/* 0 = UMP EP (no conversion), 1-16 = UMP group number */
488a3ca3b30STakashi Iwai 	char reserved[57];		/* for future use */
489674e95caSDavid Howells };
490674e95caSDavid Howells 
491674e95caSDavid Howells 
492674e95caSDavid Howells /* queue flags */
493674e95caSDavid Howells #define SNDRV_SEQ_QUEUE_FLG_SYNC	(1<<0)	/* sync enabled */
494674e95caSDavid Howells 
495674e95caSDavid Howells /* queue information */
496674e95caSDavid Howells struct snd_seq_queue_info {
497674e95caSDavid Howells 	int queue;		/* queue id */
498674e95caSDavid Howells 
499674e95caSDavid Howells 	/*
500674e95caSDavid Howells 	 *  security settings, only owner of this queue can start/stop timer
501674e95caSDavid Howells 	 *  etc. if the queue is locked for other clients
502674e95caSDavid Howells 	 */
503674e95caSDavid Howells 	int owner;		/* client id for owner of the queue */
504674e95caSDavid Howells 	unsigned locked:1;	/* timing queue locked for other queues */
505674e95caSDavid Howells 	char name[64];		/* name of this queue */
506674e95caSDavid Howells 	unsigned int flags;	/* flags */
507674e95caSDavid Howells 	char reserved[60];	/* for future use */
508674e95caSDavid Howells 
509674e95caSDavid Howells };
510674e95caSDavid Howells 
511674e95caSDavid Howells /* queue info/status */
512674e95caSDavid Howells struct snd_seq_queue_status {
513674e95caSDavid Howells 	int queue;			/* queue id */
514674e95caSDavid Howells 	int events;			/* read-only - queue size */
515674e95caSDavid Howells 	snd_seq_tick_time_t tick;	/* current tick */
516674e95caSDavid Howells 	struct snd_seq_real_time time;	/* current time */
517674e95caSDavid Howells 	int running;			/* running state of queue */
518674e95caSDavid Howells 	int flags;			/* various flags */
519674e95caSDavid Howells 	char reserved[64];		/* for the future */
520674e95caSDavid Howells };
521674e95caSDavid Howells 
522674e95caSDavid Howells 
523674e95caSDavid Howells /* queue tempo */
524674e95caSDavid Howells struct snd_seq_queue_tempo {
525674e95caSDavid Howells 	int queue;			/* sequencer queue */
526674e95caSDavid Howells 	unsigned int tempo;		/* current tempo, us/tick */
527674e95caSDavid Howells 	int ppq;			/* time resolution, ticks/quarter */
528674e95caSDavid Howells 	unsigned int skew_value;	/* queue skew */
529674e95caSDavid Howells 	unsigned int skew_base;		/* queue skew base */
530674e95caSDavid Howells 	char reserved[24];		/* for the future */
531674e95caSDavid Howells };
532674e95caSDavid Howells 
533674e95caSDavid Howells 
534674e95caSDavid Howells /* sequencer timer sources */
535674e95caSDavid Howells #define SNDRV_SEQ_TIMER_ALSA		0	/* ALSA timer */
536674e95caSDavid Howells #define SNDRV_SEQ_TIMER_MIDI_CLOCK	1	/* Midi Clock (CLOCK event) */
537674e95caSDavid Howells #define SNDRV_SEQ_TIMER_MIDI_TICK	2	/* Midi Timer Tick (TICK event) */
538674e95caSDavid Howells 
539674e95caSDavid Howells /* queue timer info */
540674e95caSDavid Howells struct snd_seq_queue_timer {
541674e95caSDavid Howells 	int queue;			/* sequencer queue */
542674e95caSDavid Howells 	int type;			/* source timer type */
543674e95caSDavid Howells 	union {
544674e95caSDavid Howells 		struct {
545674e95caSDavid Howells 			struct snd_timer_id id;	/* ALSA's timer ID */
546674e95caSDavid Howells 			unsigned int resolution;	/* resolution in Hz */
547674e95caSDavid Howells 		} alsa;
548674e95caSDavid Howells 	} u;
549674e95caSDavid Howells 	char reserved[64];		/* for the future use */
550674e95caSDavid Howells };
551674e95caSDavid Howells 
552674e95caSDavid Howells 
553674e95caSDavid Howells struct snd_seq_queue_client {
554674e95caSDavid Howells 	int queue;		/* sequencer queue */
555674e95caSDavid Howells 	int client;		/* sequencer client */
556674e95caSDavid Howells 	int used;		/* queue is used with this client
557674e95caSDavid Howells 				   (must be set for accepting events) */
558674e95caSDavid Howells 	/* per client watermarks */
559674e95caSDavid Howells 	char reserved[64];	/* for future use */
560674e95caSDavid Howells };
561674e95caSDavid Howells 
562674e95caSDavid Howells 
563674e95caSDavid Howells #define SNDRV_SEQ_PORT_SUBS_EXCLUSIVE	(1<<0)	/* exclusive connection */
564674e95caSDavid Howells #define SNDRV_SEQ_PORT_SUBS_TIMESTAMP	(1<<1)
565674e95caSDavid Howells #define SNDRV_SEQ_PORT_SUBS_TIME_REAL	(1<<2)
566674e95caSDavid Howells 
567674e95caSDavid Howells struct snd_seq_port_subscribe {
568674e95caSDavid Howells 	struct snd_seq_addr sender;	/* sender address */
569674e95caSDavid Howells 	struct snd_seq_addr dest;	/* destination address */
570674e95caSDavid Howells 	unsigned int voices;		/* number of voices to be allocated (0 = don't care) */
571674e95caSDavid Howells 	unsigned int flags;		/* modes */
572674e95caSDavid Howells 	unsigned char queue;		/* input time-stamp queue (optional) */
573674e95caSDavid Howells 	unsigned char pad[3];		/* reserved */
574674e95caSDavid Howells 	char reserved[64];
575674e95caSDavid Howells };
576674e95caSDavid Howells 
577674e95caSDavid Howells /* type of query subscription */
578674e95caSDavid Howells #define SNDRV_SEQ_QUERY_SUBS_READ	0
579674e95caSDavid Howells #define SNDRV_SEQ_QUERY_SUBS_WRITE	1
580674e95caSDavid Howells 
581674e95caSDavid Howells struct snd_seq_query_subs {
582674e95caSDavid Howells 	struct snd_seq_addr root;	/* client/port id to be searched */
583674e95caSDavid Howells 	int type;		/* READ or WRITE */
584674e95caSDavid Howells 	int index;		/* 0..N-1 */
585674e95caSDavid Howells 	int num_subs;		/* R/O: number of subscriptions on this port */
586674e95caSDavid Howells 	struct snd_seq_addr addr;	/* R/O: result */
587674e95caSDavid Howells 	unsigned char queue;	/* R/O: result */
588674e95caSDavid Howells 	unsigned int flags;	/* R/O: result */
589674e95caSDavid Howells 	char reserved[64];	/* for future use */
590674e95caSDavid Howells };
591674e95caSDavid Howells 
592d2d247e3STakashi Iwai /*
593d2d247e3STakashi Iwai  * UMP-specific information
594d2d247e3STakashi Iwai  */
595d2d247e3STakashi Iwai /* type of UMP info query */
596d2d247e3STakashi Iwai #define SNDRV_SEQ_CLIENT_UMP_INFO_ENDPOINT	0
597d2d247e3STakashi Iwai #define SNDRV_SEQ_CLIENT_UMP_INFO_BLOCK		1
598d2d247e3STakashi Iwai 
599d2d247e3STakashi Iwai struct snd_seq_client_ump_info {
600d2d247e3STakashi Iwai 	int client;			/* client number to inquire/set */
601d2d247e3STakashi Iwai 	int type;			/* type to inquire/set */
602d2d247e3STakashi Iwai 	unsigned char info[512];	/* info (either UMP ep or block info) */
603d2d247e3STakashi Iwai } __packed;
604674e95caSDavid Howells 
605674e95caSDavid Howells /*
606674e95caSDavid Howells  *  IOCTL commands
607674e95caSDavid Howells  */
608674e95caSDavid Howells 
609674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_PVERSION	_IOR ('S', 0x00, int)
610674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_CLIENT_ID	_IOR ('S', 0x01, int)
611674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct snd_seq_system_info)
612674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct snd_seq_running_info)
613afb72505STakashi Iwai #define SNDRV_SEQ_IOCTL_USER_PVERSION	_IOW('S', 0x04, int)
614674e95caSDavid Howells 
615674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct snd_seq_client_info)
616674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct snd_seq_client_info)
617d2d247e3STakashi Iwai #define SNDRV_SEQ_IOCTL_GET_CLIENT_UMP_INFO	_IOWR('S', 0x12, struct snd_seq_client_ump_info)
618d2d247e3STakashi Iwai #define SNDRV_SEQ_IOCTL_SET_CLIENT_UMP_INFO	_IOWR('S', 0x13, struct snd_seq_client_ump_info)
619674e95caSDavid Howells 
620674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct snd_seq_port_info)
621674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct snd_seq_port_info)
622674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_GET_PORT_INFO	_IOWR('S', 0x22, struct snd_seq_port_info)
623674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_SET_PORT_INFO	_IOW ('S', 0x23, struct snd_seq_port_info)
624674e95caSDavid Howells 
625674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT	_IOW ('S', 0x30, struct snd_seq_port_subscribe)
626674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe)
627674e95caSDavid Howells 
628674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_CREATE_QUEUE	_IOWR('S', 0x32, struct snd_seq_queue_info)
629674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_DELETE_QUEUE	_IOW ('S', 0x33, struct snd_seq_queue_info)
630674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO	_IOWR('S', 0x34, struct snd_seq_queue_info)
631674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO	_IOWR('S', 0x35, struct snd_seq_queue_info)
632674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE	_IOWR('S', 0x36, struct snd_seq_queue_info)
633674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
634674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO	_IOWR('S', 0x41, struct snd_seq_queue_tempo)
635674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO	_IOW ('S', 0x42, struct snd_seq_queue_tempo)
636674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER	_IOWR('S', 0x45, struct snd_seq_queue_timer)
637674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER	_IOW ('S', 0x46, struct snd_seq_queue_timer)
638674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT	_IOWR('S', 0x49, struct snd_seq_queue_client)
639674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT	_IOW ('S', 0x4a, struct snd_seq_queue_client)
640674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL	_IOWR('S', 0x4b, struct snd_seq_client_pool)
641674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL	_IOW ('S', 0x4c, struct snd_seq_client_pool)
642674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_REMOVE_EVENTS	_IOW ('S', 0x4e, struct snd_seq_remove_events)
643674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_QUERY_SUBS	_IOWR('S', 0x4f, struct snd_seq_query_subs)
644674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION	_IOWR('S', 0x50, struct snd_seq_port_subscribe)
645674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT	_IOWR('S', 0x51, struct snd_seq_client_info)
646674e95caSDavid Howells #define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT	_IOWR('S', 0x52, struct snd_seq_port_info)
647674e95caSDavid Howells 
648674e95caSDavid Howells #endif /* _UAPI__SOUND_ASEQUENCER_H */
649