18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  Main header file for the ALSA sequencer
48c2ecf20Sopenharmony_ci *  Copyright (c) 1998-1999 by Frank van de Pol <fvdpol@coil.demon.nl>
58c2ecf20Sopenharmony_ci *            (c) 1998-1999 by Jaroslav Kysela <perex@perex.cz>
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci *   This program is free software; you can redistribute it and/or modify
98c2ecf20Sopenharmony_ci *   it under the terms of the GNU General Public License as published by
108c2ecf20Sopenharmony_ci *   the Free Software Foundation; either version 2 of the License, or
118c2ecf20Sopenharmony_ci *   (at your option) any later version.
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci *   This program is distributed in the hope that it will be useful,
148c2ecf20Sopenharmony_ci *   but WITHOUT ANY WARRANTY; without even the implied warranty of
158c2ecf20Sopenharmony_ci *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
168c2ecf20Sopenharmony_ci *   GNU General Public License for more details.
178c2ecf20Sopenharmony_ci *
188c2ecf20Sopenharmony_ci *   You should have received a copy of the GNU General Public License
198c2ecf20Sopenharmony_ci *   along with this program; if not, write to the Free Software
208c2ecf20Sopenharmony_ci *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci */
238c2ecf20Sopenharmony_ci#ifndef _UAPI__SOUND_ASEQUENCER_H
248c2ecf20Sopenharmony_ci#define _UAPI__SOUND_ASEQUENCER_H
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#include <sound/asound.h>
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci/** version of the sequencer */
298c2ecf20Sopenharmony_ci#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 2)
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci/**
328c2ecf20Sopenharmony_ci * definition of sequencer event types
338c2ecf20Sopenharmony_ci */
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci/** system messages
368c2ecf20Sopenharmony_ci * event data type = #snd_seq_result
378c2ecf20Sopenharmony_ci */
388c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_SYSTEM		0
398c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_RESULT		1
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci/** note messages (channel specific)
428c2ecf20Sopenharmony_ci * event data type = #snd_seq_ev_note
438c2ecf20Sopenharmony_ci */
448c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_NOTE		5
458c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_NOTEON		6
468c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_NOTEOFF		7
478c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_KEYPRESS	8
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci/** control messages (channel specific)
508c2ecf20Sopenharmony_ci * event data type = #snd_seq_ev_ctrl
518c2ecf20Sopenharmony_ci */
528c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_CONTROLLER	10
538c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_PGMCHANGE	11
548c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_CHANPRESS	12
558c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_PITCHBEND	13	/**< from -8192 to 8191 */
568c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_CONTROL14	14	/**< 14 bit controller value */
578c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_NONREGPARAM	15	/**< 14 bit NRPN address + 14 bit unsigned value */
588c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_REGPARAM	16	/**< 14 bit RPN address + 14 bit unsigned value */
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci/** synchronisation messages
618c2ecf20Sopenharmony_ci * event data type = #snd_seq_ev_ctrl
628c2ecf20Sopenharmony_ci */
638c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_SONGPOS		20	/* Song Position Pointer with LSB and MSB values */
648c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_SONGSEL		21	/* Song Select with song ID number */
658c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_QFRAME		22	/* midi time code quarter frame */
668c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_TIMESIGN	23	/* SMF Time Signature event */
678c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_KEYSIGN		24	/* SMF Key Signature event */
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci/** timer messages
708c2ecf20Sopenharmony_ci * event data type = snd_seq_ev_queue_control
718c2ecf20Sopenharmony_ci */
728c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_START		30	/* midi Real Time Start message */
738c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_CONTINUE	31	/* midi Real Time Continue message */
748c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_STOP		32	/* midi Real Time Stop message */
758c2ecf20Sopenharmony_ci#define	SNDRV_SEQ_EVENT_SETPOS_TICK	33	/* set tick queue position */
768c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_SETPOS_TIME	34	/* set realtime queue position */
778c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_TEMPO		35	/* (SMF) Tempo event */
788c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_CLOCK		36	/* midi Real Time Clock message */
798c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_TICK		37	/* midi Real Time Tick message */
808c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_QUEUE_SKEW	38	/* skew queue tempo */
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci/** others
838c2ecf20Sopenharmony_ci * event data type = none
848c2ecf20Sopenharmony_ci */
858c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_TUNE_REQUEST	40	/* tune request */
868c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_RESET		41	/* reset to power-on state */
878c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_SENSING		42	/* "active sensing" event */
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci/** echo back, kernel private messages
908c2ecf20Sopenharmony_ci * event data type = any type
918c2ecf20Sopenharmony_ci */
928c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_ECHO		50	/* echo event */
938c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_OSS		51	/* OSS raw event */
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci/** system status messages (broadcast for subscribers)
968c2ecf20Sopenharmony_ci * event data type = snd_seq_addr
978c2ecf20Sopenharmony_ci */
988c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_CLIENT_START	60	/* new client has connected */
998c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_CLIENT_EXIT	61	/* client has left the system */
1008c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_CLIENT_CHANGE	62	/* client status/info has changed */
1018c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_PORT_START	63	/* new port was created */
1028c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_PORT_EXIT	64	/* port was deleted from system */
1038c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_PORT_CHANGE	65	/* port status/info has changed */
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci/** port connection changes
1068c2ecf20Sopenharmony_ci * event data type = snd_seq_connect
1078c2ecf20Sopenharmony_ci */
1088c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED	66	/* ports connected */
1098c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67	/* ports disconnected */
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ci/* 70-89:  synthesizer events - obsoleted */
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci/** user-defined events with fixed length
1148c2ecf20Sopenharmony_ci * event data type = any
1158c2ecf20Sopenharmony_ci */
1168c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR0		90
1178c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR1		91
1188c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR2		92
1198c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR3		93
1208c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR4		94
1218c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR5		95
1228c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR6		96
1238c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR7		97
1248c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR8		98
1258c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR9		99
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ci/* 100-118: instrument layer - obsoleted */
1288c2ecf20Sopenharmony_ci/* 119-129: reserved */
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_ci/* 130-139: variable length events
1318c2ecf20Sopenharmony_ci * event data type = snd_seq_ev_ext
1328c2ecf20Sopenharmony_ci * (SNDRV_SEQ_EVENT_LENGTH_VARIABLE must be set)
1338c2ecf20Sopenharmony_ci */
1348c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_SYSEX		130	/* system exclusive data (variable length) */
1358c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_BOUNCE		131	/* error event */
1368c2ecf20Sopenharmony_ci/* 132-134: reserved */
1378c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR_VAR0	135
1388c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR_VAR1	136
1398c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR_VAR2	137
1408c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR_VAR3	138
1418c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_USR_VAR4	139
1428c2ecf20Sopenharmony_ci
1438c2ecf20Sopenharmony_ci/* 150-151: kernel events with quote - DO NOT use in user clients */
1448c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_KERNEL_ERROR	150
1458c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_KERNEL_QUOTE	151	/* obsolete */
1468c2ecf20Sopenharmony_ci
1478c2ecf20Sopenharmony_ci/* 152-191: reserved */
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ci/* 192-254: hardware specific events */
1508c2ecf20Sopenharmony_ci
1518c2ecf20Sopenharmony_ci/* 255: special event */
1528c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_NONE		255
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ci
1558c2ecf20Sopenharmony_citypedef unsigned char snd_seq_event_type_t;
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_ci/** event address */
1588c2ecf20Sopenharmony_cistruct snd_seq_addr {
1598c2ecf20Sopenharmony_ci	unsigned char client;	/**< Client number:         0..255, 255 = broadcast to all clients */
1608c2ecf20Sopenharmony_ci	unsigned char port;	/**< Port within client:    0..255, 255 = broadcast to all ports */
1618c2ecf20Sopenharmony_ci};
1628c2ecf20Sopenharmony_ci
1638c2ecf20Sopenharmony_ci/** port connection */
1648c2ecf20Sopenharmony_cistruct snd_seq_connect {
1658c2ecf20Sopenharmony_ci	struct snd_seq_addr sender;
1668c2ecf20Sopenharmony_ci	struct snd_seq_addr dest;
1678c2ecf20Sopenharmony_ci};
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ci
1708c2ecf20Sopenharmony_ci#define SNDRV_SEQ_ADDRESS_UNKNOWN	253	/* unknown source */
1718c2ecf20Sopenharmony_ci#define SNDRV_SEQ_ADDRESS_SUBSCRIBERS	254	/* send event to all subscribed ports */
1728c2ecf20Sopenharmony_ci#define SNDRV_SEQ_ADDRESS_BROADCAST	255	/* send event to all queues/clients/ports/channels */
1738c2ecf20Sopenharmony_ci#define SNDRV_SEQ_QUEUE_DIRECT		253	/* direct dispatch */
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ci	/* event mode flag - NOTE: only 8 bits available! */
1768c2ecf20Sopenharmony_ci#define SNDRV_SEQ_TIME_STAMP_TICK	(0<<0) /* timestamp in clock ticks */
1778c2ecf20Sopenharmony_ci#define SNDRV_SEQ_TIME_STAMP_REAL	(1<<0) /* timestamp in real time */
1788c2ecf20Sopenharmony_ci#define SNDRV_SEQ_TIME_STAMP_MASK	(1<<0)
1798c2ecf20Sopenharmony_ci
1808c2ecf20Sopenharmony_ci#define SNDRV_SEQ_TIME_MODE_ABS		(0<<1)	/* absolute timestamp */
1818c2ecf20Sopenharmony_ci#define SNDRV_SEQ_TIME_MODE_REL		(1<<1)	/* relative to current time */
1828c2ecf20Sopenharmony_ci#define SNDRV_SEQ_TIME_MODE_MASK	(1<<1)
1838c2ecf20Sopenharmony_ci
1848c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_LENGTH_FIXED	(0<<2)	/* fixed event size */
1858c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_LENGTH_VARIABLE	(1<<2)	/* variable event size */
1868c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_LENGTH_VARUSR	(2<<2)	/* variable event size - user memory space */
1878c2ecf20Sopenharmony_ci#define SNDRV_SEQ_EVENT_LENGTH_MASK	(3<<2)
1888c2ecf20Sopenharmony_ci
1898c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PRIORITY_NORMAL	(0<<4)	/* normal priority */
1908c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PRIORITY_HIGH		(1<<4)	/* event should be processed before others */
1918c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PRIORITY_MASK		(1<<4)
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ci
1948c2ecf20Sopenharmony_ci	/* note event */
1958c2ecf20Sopenharmony_cistruct snd_seq_ev_note {
1968c2ecf20Sopenharmony_ci	unsigned char channel;
1978c2ecf20Sopenharmony_ci	unsigned char note;
1988c2ecf20Sopenharmony_ci	unsigned char velocity;
1998c2ecf20Sopenharmony_ci	unsigned char off_velocity;	/* only for SNDRV_SEQ_EVENT_NOTE */
2008c2ecf20Sopenharmony_ci	unsigned int duration;		/* only for SNDRV_SEQ_EVENT_NOTE */
2018c2ecf20Sopenharmony_ci};
2028c2ecf20Sopenharmony_ci
2038c2ecf20Sopenharmony_ci	/* controller event */
2048c2ecf20Sopenharmony_cistruct snd_seq_ev_ctrl {
2058c2ecf20Sopenharmony_ci	unsigned char channel;
2068c2ecf20Sopenharmony_ci	unsigned char unused1, unused2, unused3;	/* pad */
2078c2ecf20Sopenharmony_ci	unsigned int param;
2088c2ecf20Sopenharmony_ci	signed int value;
2098c2ecf20Sopenharmony_ci};
2108c2ecf20Sopenharmony_ci
2118c2ecf20Sopenharmony_ci	/* generic set of bytes (12x8 bit) */
2128c2ecf20Sopenharmony_cistruct snd_seq_ev_raw8 {
2138c2ecf20Sopenharmony_ci	unsigned char d[12];	/* 8 bit value */
2148c2ecf20Sopenharmony_ci};
2158c2ecf20Sopenharmony_ci
2168c2ecf20Sopenharmony_ci	/* generic set of integers (3x32 bit) */
2178c2ecf20Sopenharmony_cistruct snd_seq_ev_raw32 {
2188c2ecf20Sopenharmony_ci	unsigned int d[3];	/* 32 bit value */
2198c2ecf20Sopenharmony_ci};
2208c2ecf20Sopenharmony_ci
2218c2ecf20Sopenharmony_ci	/* external stored data */
2228c2ecf20Sopenharmony_cistruct snd_seq_ev_ext {
2238c2ecf20Sopenharmony_ci	unsigned int len;	/* length of data */
2248c2ecf20Sopenharmony_ci	void *ptr;		/* pointer to data (note: maybe 64-bit) */
2258c2ecf20Sopenharmony_ci} __attribute__((packed));
2268c2ecf20Sopenharmony_ci
2278c2ecf20Sopenharmony_cistruct snd_seq_result {
2288c2ecf20Sopenharmony_ci	int event;		/* processed event type */
2298c2ecf20Sopenharmony_ci	int result;
2308c2ecf20Sopenharmony_ci};
2318c2ecf20Sopenharmony_ci
2328c2ecf20Sopenharmony_ci
2338c2ecf20Sopenharmony_cistruct snd_seq_real_time {
2348c2ecf20Sopenharmony_ci	unsigned int tv_sec;	/* seconds */
2358c2ecf20Sopenharmony_ci	unsigned int tv_nsec;	/* nanoseconds */
2368c2ecf20Sopenharmony_ci};
2378c2ecf20Sopenharmony_ci
2388c2ecf20Sopenharmony_citypedef unsigned int snd_seq_tick_time_t;	/* midi ticks */
2398c2ecf20Sopenharmony_ci
2408c2ecf20Sopenharmony_ciunion snd_seq_timestamp {
2418c2ecf20Sopenharmony_ci	snd_seq_tick_time_t tick;
2428c2ecf20Sopenharmony_ci	struct snd_seq_real_time time;
2438c2ecf20Sopenharmony_ci};
2448c2ecf20Sopenharmony_ci
2458c2ecf20Sopenharmony_cistruct snd_seq_queue_skew {
2468c2ecf20Sopenharmony_ci	unsigned int value;
2478c2ecf20Sopenharmony_ci	unsigned int base;
2488c2ecf20Sopenharmony_ci};
2498c2ecf20Sopenharmony_ci
2508c2ecf20Sopenharmony_ci	/* queue timer control */
2518c2ecf20Sopenharmony_cistruct snd_seq_ev_queue_control {
2528c2ecf20Sopenharmony_ci	unsigned char queue;			/* affected queue */
2538c2ecf20Sopenharmony_ci	unsigned char pad[3];			/* reserved */
2548c2ecf20Sopenharmony_ci	union {
2558c2ecf20Sopenharmony_ci		signed int value;		/* affected value (e.g. tempo) */
2568c2ecf20Sopenharmony_ci		union snd_seq_timestamp time;	/* time */
2578c2ecf20Sopenharmony_ci		unsigned int position;		/* sync position */
2588c2ecf20Sopenharmony_ci		struct snd_seq_queue_skew skew;
2598c2ecf20Sopenharmony_ci		unsigned int d32[2];
2608c2ecf20Sopenharmony_ci		unsigned char d8[8];
2618c2ecf20Sopenharmony_ci	} param;
2628c2ecf20Sopenharmony_ci};
2638c2ecf20Sopenharmony_ci
2648c2ecf20Sopenharmony_ci	/* quoted event - inside the kernel only */
2658c2ecf20Sopenharmony_cistruct snd_seq_ev_quote {
2668c2ecf20Sopenharmony_ci	struct snd_seq_addr origin;		/* original sender */
2678c2ecf20Sopenharmony_ci	unsigned short value;		/* optional data */
2688c2ecf20Sopenharmony_ci	struct snd_seq_event *event;		/* quoted event */
2698c2ecf20Sopenharmony_ci} __attribute__((packed));
2708c2ecf20Sopenharmony_ci
2718c2ecf20Sopenharmony_ci
2728c2ecf20Sopenharmony_ci	/* sequencer event */
2738c2ecf20Sopenharmony_cistruct snd_seq_event {
2748c2ecf20Sopenharmony_ci	snd_seq_event_type_t type;	/* event type */
2758c2ecf20Sopenharmony_ci	unsigned char flags;		/* event flags */
2768c2ecf20Sopenharmony_ci	char tag;
2778c2ecf20Sopenharmony_ci
2788c2ecf20Sopenharmony_ci	unsigned char queue;		/* schedule queue */
2798c2ecf20Sopenharmony_ci	union snd_seq_timestamp time;	/* schedule time */
2808c2ecf20Sopenharmony_ci
2818c2ecf20Sopenharmony_ci
2828c2ecf20Sopenharmony_ci	struct snd_seq_addr source;	/* source address */
2838c2ecf20Sopenharmony_ci	struct snd_seq_addr dest;	/* destination address */
2848c2ecf20Sopenharmony_ci
2858c2ecf20Sopenharmony_ci	union {				/* event data... */
2868c2ecf20Sopenharmony_ci		struct snd_seq_ev_note note;
2878c2ecf20Sopenharmony_ci		struct snd_seq_ev_ctrl control;
2888c2ecf20Sopenharmony_ci		struct snd_seq_ev_raw8 raw8;
2898c2ecf20Sopenharmony_ci		struct snd_seq_ev_raw32 raw32;
2908c2ecf20Sopenharmony_ci		struct snd_seq_ev_ext ext;
2918c2ecf20Sopenharmony_ci		struct snd_seq_ev_queue_control queue;
2928c2ecf20Sopenharmony_ci		union snd_seq_timestamp time;
2938c2ecf20Sopenharmony_ci		struct snd_seq_addr addr;
2948c2ecf20Sopenharmony_ci		struct snd_seq_connect connect;
2958c2ecf20Sopenharmony_ci		struct snd_seq_result result;
2968c2ecf20Sopenharmony_ci		struct snd_seq_ev_quote quote;
2978c2ecf20Sopenharmony_ci	} data;
2988c2ecf20Sopenharmony_ci};
2998c2ecf20Sopenharmony_ci
3008c2ecf20Sopenharmony_ci
3018c2ecf20Sopenharmony_ci/*
3028c2ecf20Sopenharmony_ci * bounce event - stored as variable size data
3038c2ecf20Sopenharmony_ci */
3048c2ecf20Sopenharmony_cistruct snd_seq_event_bounce {
3058c2ecf20Sopenharmony_ci	int err;
3068c2ecf20Sopenharmony_ci	struct snd_seq_event event;
3078c2ecf20Sopenharmony_ci	/* external data follows here. */
3088c2ecf20Sopenharmony_ci};
3098c2ecf20Sopenharmony_ci
3108c2ecf20Sopenharmony_ci
3118c2ecf20Sopenharmony_ci	/* system information */
3128c2ecf20Sopenharmony_cistruct snd_seq_system_info {
3138c2ecf20Sopenharmony_ci	int queues;			/* maximum queues count */
3148c2ecf20Sopenharmony_ci	int clients;			/* maximum clients count */
3158c2ecf20Sopenharmony_ci	int ports;			/* maximum ports per client */
3168c2ecf20Sopenharmony_ci	int channels;			/* maximum channels per port */
3178c2ecf20Sopenharmony_ci	int cur_clients;		/* current clients */
3188c2ecf20Sopenharmony_ci	int cur_queues;			/* current queues */
3198c2ecf20Sopenharmony_ci	char reserved[24];
3208c2ecf20Sopenharmony_ci};
3218c2ecf20Sopenharmony_ci
3228c2ecf20Sopenharmony_ci
3238c2ecf20Sopenharmony_ci	/* system running information */
3248c2ecf20Sopenharmony_cistruct snd_seq_running_info {
3258c2ecf20Sopenharmony_ci	unsigned char client;		/* client id */
3268c2ecf20Sopenharmony_ci	unsigned char big_endian;	/* 1 = big-endian */
3278c2ecf20Sopenharmony_ci	unsigned char cpu_mode;		/* 4 = 32bit, 8 = 64bit */
3288c2ecf20Sopenharmony_ci	unsigned char pad;		/* reserved */
3298c2ecf20Sopenharmony_ci	unsigned char reserved[12];
3308c2ecf20Sopenharmony_ci};
3318c2ecf20Sopenharmony_ci
3328c2ecf20Sopenharmony_ci
3338c2ecf20Sopenharmony_ci	/* known client numbers */
3348c2ecf20Sopenharmony_ci#define SNDRV_SEQ_CLIENT_SYSTEM		0
3358c2ecf20Sopenharmony_ci	/* internal client numbers */
3368c2ecf20Sopenharmony_ci#define SNDRV_SEQ_CLIENT_DUMMY		14	/* midi through */
3378c2ecf20Sopenharmony_ci#define SNDRV_SEQ_CLIENT_OSS		15	/* oss sequencer emulator */
3388c2ecf20Sopenharmony_ci
3398c2ecf20Sopenharmony_ci
3408c2ecf20Sopenharmony_ci	/* client types */
3418c2ecf20Sopenharmony_citypedef int __bitwise snd_seq_client_type_t;
3428c2ecf20Sopenharmony_ci#define	NO_CLIENT	((__force snd_seq_client_type_t) 0)
3438c2ecf20Sopenharmony_ci#define	USER_CLIENT	((__force snd_seq_client_type_t) 1)
3448c2ecf20Sopenharmony_ci#define	KERNEL_CLIENT	((__force snd_seq_client_type_t) 2)
3458c2ecf20Sopenharmony_ci
3468c2ecf20Sopenharmony_ci	/* event filter flags */
3478c2ecf20Sopenharmony_ci#define SNDRV_SEQ_FILTER_BROADCAST	(1U<<0)	/* accept broadcast messages */
3488c2ecf20Sopenharmony_ci#define SNDRV_SEQ_FILTER_MULTICAST	(1U<<1)	/* accept multicast messages */
3498c2ecf20Sopenharmony_ci#define SNDRV_SEQ_FILTER_BOUNCE		(1U<<2)	/* accept bounce event in error */
3508c2ecf20Sopenharmony_ci#define SNDRV_SEQ_FILTER_USE_EVENT	(1U<<31)	/* use event filter */
3518c2ecf20Sopenharmony_ci
3528c2ecf20Sopenharmony_cistruct snd_seq_client_info {
3538c2ecf20Sopenharmony_ci	int client;			/* client number to inquire */
3548c2ecf20Sopenharmony_ci	snd_seq_client_type_t type;	/* client type */
3558c2ecf20Sopenharmony_ci	char name[64];			/* client name */
3568c2ecf20Sopenharmony_ci	unsigned int filter;		/* filter flags */
3578c2ecf20Sopenharmony_ci	unsigned char multicast_filter[8]; /* multicast filter bitmap */
3588c2ecf20Sopenharmony_ci	unsigned char event_filter[32];	/* event filter bitmap */
3598c2ecf20Sopenharmony_ci	int num_ports;			/* RO: number of ports */
3608c2ecf20Sopenharmony_ci	int event_lost;			/* number of lost events */
3618c2ecf20Sopenharmony_ci	int card;			/* RO: card number[kernel] */
3628c2ecf20Sopenharmony_ci	int pid;			/* RO: pid[user] */
3638c2ecf20Sopenharmony_ci	char reserved[56];		/* for future use */
3648c2ecf20Sopenharmony_ci};
3658c2ecf20Sopenharmony_ci
3668c2ecf20Sopenharmony_ci
3678c2ecf20Sopenharmony_ci/* client pool size */
3688c2ecf20Sopenharmony_cistruct snd_seq_client_pool {
3698c2ecf20Sopenharmony_ci	int client;			/* client number to inquire */
3708c2ecf20Sopenharmony_ci	int output_pool;		/* outgoing (write) pool size */
3718c2ecf20Sopenharmony_ci	int input_pool;			/* incoming (read) pool size */
3728c2ecf20Sopenharmony_ci	int output_room;		/* minimum free pool size for select/blocking mode */
3738c2ecf20Sopenharmony_ci	int output_free;		/* unused size */
3748c2ecf20Sopenharmony_ci	int input_free;			/* unused size */
3758c2ecf20Sopenharmony_ci	char reserved[64];
3768c2ecf20Sopenharmony_ci};
3778c2ecf20Sopenharmony_ci
3788c2ecf20Sopenharmony_ci
3798c2ecf20Sopenharmony_ci/* Remove events by specified criteria */
3808c2ecf20Sopenharmony_ci
3818c2ecf20Sopenharmony_ci#define SNDRV_SEQ_REMOVE_INPUT		(1<<0)	/* Flush input queues */
3828c2ecf20Sopenharmony_ci#define SNDRV_SEQ_REMOVE_OUTPUT		(1<<1)	/* Flush output queues */
3838c2ecf20Sopenharmony_ci#define SNDRV_SEQ_REMOVE_DEST		(1<<2)	/* Restrict by destination q:client:port */
3848c2ecf20Sopenharmony_ci#define SNDRV_SEQ_REMOVE_DEST_CHANNEL	(1<<3)	/* Restrict by channel */
3858c2ecf20Sopenharmony_ci#define SNDRV_SEQ_REMOVE_TIME_BEFORE	(1<<4)	/* Restrict to before time */
3868c2ecf20Sopenharmony_ci#define SNDRV_SEQ_REMOVE_TIME_AFTER	(1<<5)	/* Restrict to time or after */
3878c2ecf20Sopenharmony_ci#define SNDRV_SEQ_REMOVE_TIME_TICK	(1<<6)	/* Time is in ticks */
3888c2ecf20Sopenharmony_ci#define SNDRV_SEQ_REMOVE_EVENT_TYPE	(1<<7)	/* Restrict to event type */
3898c2ecf20Sopenharmony_ci#define SNDRV_SEQ_REMOVE_IGNORE_OFF 	(1<<8)	/* Do not flush off events */
3908c2ecf20Sopenharmony_ci#define SNDRV_SEQ_REMOVE_TAG_MATCH 	(1<<9)	/* Restrict to events with given tag */
3918c2ecf20Sopenharmony_ci
3928c2ecf20Sopenharmony_cistruct snd_seq_remove_events {
3938c2ecf20Sopenharmony_ci	unsigned int  remove_mode;	/* Flags that determine what gets removed */
3948c2ecf20Sopenharmony_ci
3958c2ecf20Sopenharmony_ci	union snd_seq_timestamp time;
3968c2ecf20Sopenharmony_ci
3978c2ecf20Sopenharmony_ci	unsigned char queue;	/* Queue for REMOVE_DEST */
3988c2ecf20Sopenharmony_ci	struct snd_seq_addr dest;	/* Address for REMOVE_DEST */
3998c2ecf20Sopenharmony_ci	unsigned char channel;	/* Channel for REMOVE_DEST */
4008c2ecf20Sopenharmony_ci
4018c2ecf20Sopenharmony_ci	int  type;	/* For REMOVE_EVENT_TYPE */
4028c2ecf20Sopenharmony_ci	char  tag;	/* Tag for REMOVE_TAG */
4038c2ecf20Sopenharmony_ci
4048c2ecf20Sopenharmony_ci	int  reserved[10];	/* To allow for future binary compatibility */
4058c2ecf20Sopenharmony_ci
4068c2ecf20Sopenharmony_ci};
4078c2ecf20Sopenharmony_ci
4088c2ecf20Sopenharmony_ci
4098c2ecf20Sopenharmony_ci	/* known port numbers */
4108c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_SYSTEM_TIMER	0
4118c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE	1
4128c2ecf20Sopenharmony_ci
4138c2ecf20Sopenharmony_ci	/* port capabilities (32 bits) */
4148c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_CAP_READ		(1<<0)	/* readable from this port */
4158c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_CAP_WRITE	(1<<1)	/* writable to this port */
4168c2ecf20Sopenharmony_ci
4178c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_CAP_SYNC_READ	(1<<2)
4188c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_CAP_SYNC_WRITE	(1<<3)
4198c2ecf20Sopenharmony_ci
4208c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_CAP_DUPLEX	(1<<4)
4218c2ecf20Sopenharmony_ci
4228c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_CAP_SUBS_READ	(1<<5)	/* allow read subscription */
4238c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE	(1<<6)	/* allow write subscription */
4248c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_CAP_NO_EXPORT	(1<<7)	/* routing not allowed */
4258c2ecf20Sopenharmony_ci
4268c2ecf20Sopenharmony_ci	/* port type */
4278c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_SPECIFIC	(1<<0)	/* hardware specific */
4288c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1<<1)	/* generic MIDI device */
4298c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_MIDI_GM	(1<<2)	/* General MIDI compatible device */
4308c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_MIDI_GS	(1<<3)	/* GS compatible device */
4318c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_MIDI_XG	(1<<4)	/* XG compatible device */
4328c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32	(1<<5)	/* MT-32 compatible device */
4338c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2	(1<<6)	/* General MIDI 2 compatible device */
4348c2ecf20Sopenharmony_ci
4358c2ecf20Sopenharmony_ci/* other standards...*/
4368c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_SYNTH	(1<<10)	/* Synth device (no MIDI compatible - direct wavetable) */
4378c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11)	/* Sampling device (support sample download) */
4388c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_SAMPLE	(1<<12)	/* Sampling device (sample can be downloaded at any time) */
4398c2ecf20Sopenharmony_ci/*...*/
4408c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_HARDWARE	(1<<16)	/* driver for a hardware device */
4418c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_SOFTWARE	(1<<17)	/* implemented in software */
4428c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER	(1<<18)	/* generates sound */
4438c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_PORT	(1<<19)	/* connects to other device(s) */
4448c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_TYPE_APPLICATION	(1<<20)	/* application (sequencer/editor) */
4458c2ecf20Sopenharmony_ci
4468c2ecf20Sopenharmony_ci/* misc. conditioning flags */
4478c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_FLG_GIVEN_PORT	(1<<0)
4488c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_FLG_TIMESTAMP	(1<<1)
4498c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_FLG_TIME_REAL	(1<<2)
4508c2ecf20Sopenharmony_ci
4518c2ecf20Sopenharmony_cistruct snd_seq_port_info {
4528c2ecf20Sopenharmony_ci	struct snd_seq_addr addr;	/* client/port numbers */
4538c2ecf20Sopenharmony_ci	char name[64];			/* port name */
4548c2ecf20Sopenharmony_ci
4558c2ecf20Sopenharmony_ci	unsigned int capability;	/* port capability bits */
4568c2ecf20Sopenharmony_ci	unsigned int type;		/* port type bits */
4578c2ecf20Sopenharmony_ci	int midi_channels;		/* channels per MIDI port */
4588c2ecf20Sopenharmony_ci	int midi_voices;		/* voices per MIDI port */
4598c2ecf20Sopenharmony_ci	int synth_voices;		/* voices per SYNTH port */
4608c2ecf20Sopenharmony_ci
4618c2ecf20Sopenharmony_ci	int read_use;			/* R/O: subscribers for output (from this port) */
4628c2ecf20Sopenharmony_ci	int write_use;			/* R/O: subscribers for input (to this port) */
4638c2ecf20Sopenharmony_ci
4648c2ecf20Sopenharmony_ci	void *kernel;			/* reserved for kernel use (must be NULL) */
4658c2ecf20Sopenharmony_ci	unsigned int flags;		/* misc. conditioning */
4668c2ecf20Sopenharmony_ci	unsigned char time_queue;	/* queue # for timestamping */
4678c2ecf20Sopenharmony_ci	char reserved[59];		/* for future use */
4688c2ecf20Sopenharmony_ci};
4698c2ecf20Sopenharmony_ci
4708c2ecf20Sopenharmony_ci
4718c2ecf20Sopenharmony_ci/* queue flags */
4728c2ecf20Sopenharmony_ci#define SNDRV_SEQ_QUEUE_FLG_SYNC	(1<<0)	/* sync enabled */
4738c2ecf20Sopenharmony_ci
4748c2ecf20Sopenharmony_ci/* queue information */
4758c2ecf20Sopenharmony_cistruct snd_seq_queue_info {
4768c2ecf20Sopenharmony_ci	int queue;		/* queue id */
4778c2ecf20Sopenharmony_ci
4788c2ecf20Sopenharmony_ci	/*
4798c2ecf20Sopenharmony_ci	 *  security settings, only owner of this queue can start/stop timer
4808c2ecf20Sopenharmony_ci	 *  etc. if the queue is locked for other clients
4818c2ecf20Sopenharmony_ci	 */
4828c2ecf20Sopenharmony_ci	int owner;		/* client id for owner of the queue */
4838c2ecf20Sopenharmony_ci	unsigned locked:1;	/* timing queue locked for other queues */
4848c2ecf20Sopenharmony_ci	char name[64];		/* name of this queue */
4858c2ecf20Sopenharmony_ci	unsigned int flags;	/* flags */
4868c2ecf20Sopenharmony_ci	char reserved[60];	/* for future use */
4878c2ecf20Sopenharmony_ci
4888c2ecf20Sopenharmony_ci};
4898c2ecf20Sopenharmony_ci
4908c2ecf20Sopenharmony_ci/* queue info/status */
4918c2ecf20Sopenharmony_cistruct snd_seq_queue_status {
4928c2ecf20Sopenharmony_ci	int queue;			/* queue id */
4938c2ecf20Sopenharmony_ci	int events;			/* read-only - queue size */
4948c2ecf20Sopenharmony_ci	snd_seq_tick_time_t tick;	/* current tick */
4958c2ecf20Sopenharmony_ci	struct snd_seq_real_time time;	/* current time */
4968c2ecf20Sopenharmony_ci	int running;			/* running state of queue */
4978c2ecf20Sopenharmony_ci	int flags;			/* various flags */
4988c2ecf20Sopenharmony_ci	char reserved[64];		/* for the future */
4998c2ecf20Sopenharmony_ci};
5008c2ecf20Sopenharmony_ci
5018c2ecf20Sopenharmony_ci
5028c2ecf20Sopenharmony_ci/* queue tempo */
5038c2ecf20Sopenharmony_cistruct snd_seq_queue_tempo {
5048c2ecf20Sopenharmony_ci	int queue;			/* sequencer queue */
5058c2ecf20Sopenharmony_ci	unsigned int tempo;		/* current tempo, us/tick */
5068c2ecf20Sopenharmony_ci	int ppq;			/* time resolution, ticks/quarter */
5078c2ecf20Sopenharmony_ci	unsigned int skew_value;	/* queue skew */
5088c2ecf20Sopenharmony_ci	unsigned int skew_base;		/* queue skew base */
5098c2ecf20Sopenharmony_ci	char reserved[24];		/* for the future */
5108c2ecf20Sopenharmony_ci};
5118c2ecf20Sopenharmony_ci
5128c2ecf20Sopenharmony_ci
5138c2ecf20Sopenharmony_ci/* sequencer timer sources */
5148c2ecf20Sopenharmony_ci#define SNDRV_SEQ_TIMER_ALSA		0	/* ALSA timer */
5158c2ecf20Sopenharmony_ci#define SNDRV_SEQ_TIMER_MIDI_CLOCK	1	/* Midi Clock (CLOCK event) */
5168c2ecf20Sopenharmony_ci#define SNDRV_SEQ_TIMER_MIDI_TICK	2	/* Midi Timer Tick (TICK event) */
5178c2ecf20Sopenharmony_ci
5188c2ecf20Sopenharmony_ci/* queue timer info */
5198c2ecf20Sopenharmony_cistruct snd_seq_queue_timer {
5208c2ecf20Sopenharmony_ci	int queue;			/* sequencer queue */
5218c2ecf20Sopenharmony_ci	int type;			/* source timer type */
5228c2ecf20Sopenharmony_ci	union {
5238c2ecf20Sopenharmony_ci		struct {
5248c2ecf20Sopenharmony_ci			struct snd_timer_id id;	/* ALSA's timer ID */
5258c2ecf20Sopenharmony_ci			unsigned int resolution;	/* resolution in Hz */
5268c2ecf20Sopenharmony_ci		} alsa;
5278c2ecf20Sopenharmony_ci	} u;
5288c2ecf20Sopenharmony_ci	char reserved[64];		/* for the future use */
5298c2ecf20Sopenharmony_ci};
5308c2ecf20Sopenharmony_ci
5318c2ecf20Sopenharmony_ci
5328c2ecf20Sopenharmony_cistruct snd_seq_queue_client {
5338c2ecf20Sopenharmony_ci	int queue;		/* sequencer queue */
5348c2ecf20Sopenharmony_ci	int client;		/* sequencer client */
5358c2ecf20Sopenharmony_ci	int used;		/* queue is used with this client
5368c2ecf20Sopenharmony_ci				   (must be set for accepting events) */
5378c2ecf20Sopenharmony_ci	/* per client watermarks */
5388c2ecf20Sopenharmony_ci	char reserved[64];	/* for future use */
5398c2ecf20Sopenharmony_ci};
5408c2ecf20Sopenharmony_ci
5418c2ecf20Sopenharmony_ci
5428c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_SUBS_EXCLUSIVE	(1<<0)	/* exclusive connection */
5438c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_SUBS_TIMESTAMP	(1<<1)
5448c2ecf20Sopenharmony_ci#define SNDRV_SEQ_PORT_SUBS_TIME_REAL	(1<<2)
5458c2ecf20Sopenharmony_ci
5468c2ecf20Sopenharmony_cistruct snd_seq_port_subscribe {
5478c2ecf20Sopenharmony_ci	struct snd_seq_addr sender;	/* sender address */
5488c2ecf20Sopenharmony_ci	struct snd_seq_addr dest;	/* destination address */
5498c2ecf20Sopenharmony_ci	unsigned int voices;		/* number of voices to be allocated (0 = don't care) */
5508c2ecf20Sopenharmony_ci	unsigned int flags;		/* modes */
5518c2ecf20Sopenharmony_ci	unsigned char queue;		/* input time-stamp queue (optional) */
5528c2ecf20Sopenharmony_ci	unsigned char pad[3];		/* reserved */
5538c2ecf20Sopenharmony_ci	char reserved[64];
5548c2ecf20Sopenharmony_ci};
5558c2ecf20Sopenharmony_ci
5568c2ecf20Sopenharmony_ci/* type of query subscription */
5578c2ecf20Sopenharmony_ci#define SNDRV_SEQ_QUERY_SUBS_READ	0
5588c2ecf20Sopenharmony_ci#define SNDRV_SEQ_QUERY_SUBS_WRITE	1
5598c2ecf20Sopenharmony_ci
5608c2ecf20Sopenharmony_cistruct snd_seq_query_subs {
5618c2ecf20Sopenharmony_ci	struct snd_seq_addr root;	/* client/port id to be searched */
5628c2ecf20Sopenharmony_ci	int type;		/* READ or WRITE */
5638c2ecf20Sopenharmony_ci	int index;		/* 0..N-1 */
5648c2ecf20Sopenharmony_ci	int num_subs;		/* R/O: number of subscriptions on this port */
5658c2ecf20Sopenharmony_ci	struct snd_seq_addr addr;	/* R/O: result */
5668c2ecf20Sopenharmony_ci	unsigned char queue;	/* R/O: result */
5678c2ecf20Sopenharmony_ci	unsigned int flags;	/* R/O: result */
5688c2ecf20Sopenharmony_ci	char reserved[64];	/* for future use */
5698c2ecf20Sopenharmony_ci};
5708c2ecf20Sopenharmony_ci
5718c2ecf20Sopenharmony_ci
5728c2ecf20Sopenharmony_ci/*
5738c2ecf20Sopenharmony_ci *  IOCTL commands
5748c2ecf20Sopenharmony_ci */
5758c2ecf20Sopenharmony_ci
5768c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_PVERSION	_IOR ('S', 0x00, int)
5778c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_CLIENT_ID	_IOR ('S', 0x01, int)
5788c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct snd_seq_system_info)
5798c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct snd_seq_running_info)
5808c2ecf20Sopenharmony_ci
5818c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct snd_seq_client_info)
5828c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct snd_seq_client_info)
5838c2ecf20Sopenharmony_ci
5848c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct snd_seq_port_info)
5858c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct snd_seq_port_info)
5868c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_GET_PORT_INFO	_IOWR('S', 0x22, struct snd_seq_port_info)
5878c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_SET_PORT_INFO	_IOW ('S', 0x23, struct snd_seq_port_info)
5888c2ecf20Sopenharmony_ci
5898c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT	_IOW ('S', 0x30, struct snd_seq_port_subscribe)
5908c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe)
5918c2ecf20Sopenharmony_ci
5928c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_CREATE_QUEUE	_IOWR('S', 0x32, struct snd_seq_queue_info)
5938c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_DELETE_QUEUE	_IOW ('S', 0x33, struct snd_seq_queue_info)
5948c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO	_IOWR('S', 0x34, struct snd_seq_queue_info)
5958c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO	_IOWR('S', 0x35, struct snd_seq_queue_info)
5968c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE	_IOWR('S', 0x36, struct snd_seq_queue_info)
5978c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
5988c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO	_IOWR('S', 0x41, struct snd_seq_queue_tempo)
5998c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO	_IOW ('S', 0x42, struct snd_seq_queue_tempo)
6008c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER	_IOWR('S', 0x45, struct snd_seq_queue_timer)
6018c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER	_IOW ('S', 0x46, struct snd_seq_queue_timer)
6028c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT	_IOWR('S', 0x49, struct snd_seq_queue_client)
6038c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT	_IOW ('S', 0x4a, struct snd_seq_queue_client)
6048c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL	_IOWR('S', 0x4b, struct snd_seq_client_pool)
6058c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL	_IOW ('S', 0x4c, struct snd_seq_client_pool)
6068c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS	_IOW ('S', 0x4e, struct snd_seq_remove_events)
6078c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_QUERY_SUBS	_IOWR('S', 0x4f, struct snd_seq_query_subs)
6088c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION	_IOWR('S', 0x50, struct snd_seq_port_subscribe)
6098c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT	_IOWR('S', 0x51, struct snd_seq_client_info)
6108c2ecf20Sopenharmony_ci#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT	_IOWR('S', 0x52, struct snd_seq_port_info)
6118c2ecf20Sopenharmony_ci
6128c2ecf20Sopenharmony_ci#endif /* _UAPI__SOUND_ASEQUENCER_H */
613