blob: ac72736d6e488a62cf8ac74522af310393aa39b0 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI__SOUND_ASEQUENCER_H
20#define _UAPI__SOUND_ASEQUENCER_H
Christopher Ferris05d08e92016-02-04 13:16:38 -080021#include <sound/asound.h>
Christopher Ferris106b3a82016-08-24 12:15:38 -070022#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -080023#define SNDRV_SEQ_EVENT_SYSTEM 0
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define SNDRV_SEQ_EVENT_RESULT 1
25#define SNDRV_SEQ_EVENT_NOTE 5
26#define SNDRV_SEQ_EVENT_NOTEON 6
Christopher Ferris05d08e92016-02-04 13:16:38 -080027#define SNDRV_SEQ_EVENT_NOTEOFF 7
Ben Cheng655a7c02013-10-16 16:09:24 -070028#define SNDRV_SEQ_EVENT_KEYPRESS 8
29#define SNDRV_SEQ_EVENT_CONTROLLER 10
30#define SNDRV_SEQ_EVENT_PGMCHANGE 11
Christopher Ferris05d08e92016-02-04 13:16:38 -080031#define SNDRV_SEQ_EVENT_CHANPRESS 12
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define SNDRV_SEQ_EVENT_PITCHBEND 13
33#define SNDRV_SEQ_EVENT_CONTROL14 14
34#define SNDRV_SEQ_EVENT_NONREGPARAM 15
Christopher Ferris05d08e92016-02-04 13:16:38 -080035#define SNDRV_SEQ_EVENT_REGPARAM 16
Ben Cheng655a7c02013-10-16 16:09:24 -070036#define SNDRV_SEQ_EVENT_SONGPOS 20
37#define SNDRV_SEQ_EVENT_SONGSEL 21
38#define SNDRV_SEQ_EVENT_QFRAME 22
Christopher Ferris05d08e92016-02-04 13:16:38 -080039#define SNDRV_SEQ_EVENT_TIMESIGN 23
Ben Cheng655a7c02013-10-16 16:09:24 -070040#define SNDRV_SEQ_EVENT_KEYSIGN 24
41#define SNDRV_SEQ_EVENT_START 30
42#define SNDRV_SEQ_EVENT_CONTINUE 31
Christopher Ferris05d08e92016-02-04 13:16:38 -080043#define SNDRV_SEQ_EVENT_STOP 32
Ben Cheng655a7c02013-10-16 16:09:24 -070044#define SNDRV_SEQ_EVENT_SETPOS_TICK 33
45#define SNDRV_SEQ_EVENT_SETPOS_TIME 34
46#define SNDRV_SEQ_EVENT_TEMPO 35
Christopher Ferris05d08e92016-02-04 13:16:38 -080047#define SNDRV_SEQ_EVENT_CLOCK 36
Ben Cheng655a7c02013-10-16 16:09:24 -070048#define SNDRV_SEQ_EVENT_TICK 37
49#define SNDRV_SEQ_EVENT_QUEUE_SKEW 38
50#define SNDRV_SEQ_EVENT_TUNE_REQUEST 40
Christopher Ferris05d08e92016-02-04 13:16:38 -080051#define SNDRV_SEQ_EVENT_RESET 41
Ben Cheng655a7c02013-10-16 16:09:24 -070052#define SNDRV_SEQ_EVENT_SENSING 42
53#define SNDRV_SEQ_EVENT_ECHO 50
54#define SNDRV_SEQ_EVENT_OSS 51
Christopher Ferris05d08e92016-02-04 13:16:38 -080055#define SNDRV_SEQ_EVENT_CLIENT_START 60
Ben Cheng655a7c02013-10-16 16:09:24 -070056#define SNDRV_SEQ_EVENT_CLIENT_EXIT 61
57#define SNDRV_SEQ_EVENT_CLIENT_CHANGE 62
58#define SNDRV_SEQ_EVENT_PORT_START 63
Christopher Ferris05d08e92016-02-04 13:16:38 -080059#define SNDRV_SEQ_EVENT_PORT_EXIT 64
Ben Cheng655a7c02013-10-16 16:09:24 -070060#define SNDRV_SEQ_EVENT_PORT_CHANGE 65
61#define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED 66
62#define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67
Christopher Ferris05d08e92016-02-04 13:16:38 -080063#define SNDRV_SEQ_EVENT_USR0 90
Ben Cheng655a7c02013-10-16 16:09:24 -070064#define SNDRV_SEQ_EVENT_USR1 91
65#define SNDRV_SEQ_EVENT_USR2 92
66#define SNDRV_SEQ_EVENT_USR3 93
Christopher Ferris05d08e92016-02-04 13:16:38 -080067#define SNDRV_SEQ_EVENT_USR4 94
Ben Cheng655a7c02013-10-16 16:09:24 -070068#define SNDRV_SEQ_EVENT_USR5 95
69#define SNDRV_SEQ_EVENT_USR6 96
70#define SNDRV_SEQ_EVENT_USR7 97
Christopher Ferris05d08e92016-02-04 13:16:38 -080071#define SNDRV_SEQ_EVENT_USR8 98
Ben Cheng655a7c02013-10-16 16:09:24 -070072#define SNDRV_SEQ_EVENT_USR9 99
73#define SNDRV_SEQ_EVENT_SYSEX 130
74#define SNDRV_SEQ_EVENT_BOUNCE 131
Christopher Ferris05d08e92016-02-04 13:16:38 -080075#define SNDRV_SEQ_EVENT_USR_VAR0 135
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define SNDRV_SEQ_EVENT_USR_VAR1 136
77#define SNDRV_SEQ_EVENT_USR_VAR2 137
78#define SNDRV_SEQ_EVENT_USR_VAR3 138
Christopher Ferris05d08e92016-02-04 13:16:38 -080079#define SNDRV_SEQ_EVENT_USR_VAR4 139
Ben Cheng655a7c02013-10-16 16:09:24 -070080#define SNDRV_SEQ_EVENT_KERNEL_ERROR 150
81#define SNDRV_SEQ_EVENT_KERNEL_QUOTE 151
82#define SNDRV_SEQ_EVENT_NONE 255
Christopher Ferris05d08e92016-02-04 13:16:38 -080083typedef unsigned char snd_seq_event_type_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070084struct snd_seq_addr {
Tao Baod7db5942015-01-28 10:07:51 -080085 unsigned char client;
86 unsigned char port;
Christopher Ferris05d08e92016-02-04 13:16:38 -080087};
Ben Cheng655a7c02013-10-16 16:09:24 -070088struct snd_seq_connect {
Tao Baod7db5942015-01-28 10:07:51 -080089 struct snd_seq_addr sender;
90 struct snd_seq_addr dest;
Christopher Ferris05d08e92016-02-04 13:16:38 -080091};
Ben Cheng655a7c02013-10-16 16:09:24 -070092#define SNDRV_SEQ_ADDRESS_UNKNOWN 253
93#define SNDRV_SEQ_ADDRESS_SUBSCRIBERS 254
94#define SNDRV_SEQ_ADDRESS_BROADCAST 255
Christopher Ferris05d08e92016-02-04 13:16:38 -080095#define SNDRV_SEQ_QUEUE_DIRECT 253
Tao Baod7db5942015-01-28 10:07:51 -080096#define SNDRV_SEQ_TIME_STAMP_TICK (0 << 0)
97#define SNDRV_SEQ_TIME_STAMP_REAL (1 << 0)
98#define SNDRV_SEQ_TIME_STAMP_MASK (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -080099#define SNDRV_SEQ_TIME_MODE_ABS (0 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800100#define SNDRV_SEQ_TIME_MODE_REL (1 << 1)
101#define SNDRV_SEQ_TIME_MODE_MASK (1 << 1)
102#define SNDRV_SEQ_EVENT_LENGTH_FIXED (0 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800103#define SNDRV_SEQ_EVENT_LENGTH_VARIABLE (1 << 2)
Tao Baod7db5942015-01-28 10:07:51 -0800104#define SNDRV_SEQ_EVENT_LENGTH_VARUSR (2 << 2)
105#define SNDRV_SEQ_EVENT_LENGTH_MASK (3 << 2)
106#define SNDRV_SEQ_PRIORITY_NORMAL (0 << 4)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800107#define SNDRV_SEQ_PRIORITY_HIGH (1 << 4)
Tao Baod7db5942015-01-28 10:07:51 -0800108#define SNDRV_SEQ_PRIORITY_MASK (1 << 4)
Ben Cheng655a7c02013-10-16 16:09:24 -0700109struct snd_seq_ev_note {
Tao Baod7db5942015-01-28 10:07:51 -0800110 unsigned char channel;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800111 unsigned char note;
Tao Baod7db5942015-01-28 10:07:51 -0800112 unsigned char velocity;
113 unsigned char off_velocity;
114 unsigned int duration;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800115};
Ben Cheng655a7c02013-10-16 16:09:24 -0700116struct snd_seq_ev_ctrl {
Tao Baod7db5942015-01-28 10:07:51 -0800117 unsigned char channel;
118 unsigned char unused1, unused2, unused3;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800119 unsigned int param;
Tao Baod7db5942015-01-28 10:07:51 -0800120 signed int value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700121};
122struct snd_seq_ev_raw8 {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800123 unsigned char d[12];
Ben Cheng655a7c02013-10-16 16:09:24 -0700124};
125struct snd_seq_ev_raw32 {
Tao Baod7db5942015-01-28 10:07:51 -0800126 unsigned int d[3];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800127};
Ben Cheng655a7c02013-10-16 16:09:24 -0700128struct snd_seq_ev_ext {
Tao Baod7db5942015-01-28 10:07:51 -0800129 unsigned int len;
130 void * ptr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800131} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -0700132struct snd_seq_result {
Tao Baod7db5942015-01-28 10:07:51 -0800133 int event;
134 int result;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800135};
Ben Cheng655a7c02013-10-16 16:09:24 -0700136struct snd_seq_real_time {
Tao Baod7db5942015-01-28 10:07:51 -0800137 unsigned int tv_sec;
138 unsigned int tv_nsec;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800139};
Ben Cheng655a7c02013-10-16 16:09:24 -0700140typedef unsigned int snd_seq_tick_time_t;
141union snd_seq_timestamp {
Tao Baod7db5942015-01-28 10:07:51 -0800142 snd_seq_tick_time_t tick;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800143 struct snd_seq_real_time time;
Ben Cheng655a7c02013-10-16 16:09:24 -0700144};
145struct snd_seq_queue_skew {
Tao Baod7db5942015-01-28 10:07:51 -0800146 unsigned int value;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800147 unsigned int base;
Ben Cheng655a7c02013-10-16 16:09:24 -0700148};
149struct snd_seq_ev_queue_control {
Tao Baod7db5942015-01-28 10:07:51 -0800150 unsigned char queue;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800151 unsigned char pad[3];
Tao Baod7db5942015-01-28 10:07:51 -0800152 union {
153 signed int value;
154 union snd_seq_timestamp time;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800155 unsigned int position;
Tao Baod7db5942015-01-28 10:07:51 -0800156 struct snd_seq_queue_skew skew;
157 unsigned int d32[2];
158 unsigned char d8[8];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800159 } param;
Ben Cheng655a7c02013-10-16 16:09:24 -0700160};
161struct snd_seq_ev_quote {
Tao Baod7db5942015-01-28 10:07:51 -0800162 struct snd_seq_addr origin;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800163 unsigned short value;
Tao Baod7db5942015-01-28 10:07:51 -0800164 struct snd_seq_event * event;
Ben Cheng655a7c02013-10-16 16:09:24 -0700165} __attribute__((packed));
166struct snd_seq_event {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800167 snd_seq_event_type_t type;
Tao Baod7db5942015-01-28 10:07:51 -0800168 unsigned char flags;
169 char tag;
170 unsigned char queue;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800171 union snd_seq_timestamp time;
Tao Baod7db5942015-01-28 10:07:51 -0800172 struct snd_seq_addr source;
173 struct snd_seq_addr dest;
174 union {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800175 struct snd_seq_ev_note note;
Tao Baod7db5942015-01-28 10:07:51 -0800176 struct snd_seq_ev_ctrl control;
177 struct snd_seq_ev_raw8 raw8;
178 struct snd_seq_ev_raw32 raw32;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800179 struct snd_seq_ev_ext ext;
Tao Baod7db5942015-01-28 10:07:51 -0800180 struct snd_seq_ev_queue_control queue;
181 union snd_seq_timestamp time;
182 struct snd_seq_addr addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800183 struct snd_seq_connect connect;
Tao Baod7db5942015-01-28 10:07:51 -0800184 struct snd_seq_result result;
185 struct snd_seq_ev_quote quote;
186 } data;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800187};
Ben Cheng655a7c02013-10-16 16:09:24 -0700188struct snd_seq_event_bounce {
Tao Baod7db5942015-01-28 10:07:51 -0800189 int err;
190 struct snd_seq_event event;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800191};
Ben Cheng655a7c02013-10-16 16:09:24 -0700192struct snd_seq_system_info {
Tao Baod7db5942015-01-28 10:07:51 -0800193 int queues;
194 int clients;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800195 int ports;
Tao Baod7db5942015-01-28 10:07:51 -0800196 int channels;
197 int cur_clients;
198 int cur_queues;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800199 char reserved[24];
Ben Cheng655a7c02013-10-16 16:09:24 -0700200};
201struct snd_seq_running_info {
Tao Baod7db5942015-01-28 10:07:51 -0800202 unsigned char client;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800203 unsigned char big_endian;
Tao Baod7db5942015-01-28 10:07:51 -0800204 unsigned char cpu_mode;
205 unsigned char pad;
206 unsigned char reserved[12];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800207};
Ben Cheng655a7c02013-10-16 16:09:24 -0700208#define SNDRV_SEQ_CLIENT_SYSTEM 0
209#define SNDRV_SEQ_CLIENT_DUMMY 14
210#define SNDRV_SEQ_CLIENT_OSS 15
Christopher Ferris05d08e92016-02-04 13:16:38 -0800211typedef int __bitwise snd_seq_client_type_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700212#define NO_CLIENT ((__force snd_seq_client_type_t) 0)
213#define USER_CLIENT ((__force snd_seq_client_type_t) 1)
214#define KERNEL_CLIENT ((__force snd_seq_client_type_t) 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800215#define SNDRV_SEQ_FILTER_BROADCAST (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800216#define SNDRV_SEQ_FILTER_MULTICAST (1 << 1)
217#define SNDRV_SEQ_FILTER_BOUNCE (1 << 2)
218#define SNDRV_SEQ_FILTER_USE_EVENT (1 << 31)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800219struct snd_seq_client_info {
Tao Baod7db5942015-01-28 10:07:51 -0800220 int client;
221 snd_seq_client_type_t type;
222 char name[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800223 unsigned int filter;
Tao Baod7db5942015-01-28 10:07:51 -0800224 unsigned char multicast_filter[8];
225 unsigned char event_filter[32];
226 int num_ports;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800227 int event_lost;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700228 int card;
229 int pid;
230 char reserved[56];
Ben Cheng655a7c02013-10-16 16:09:24 -0700231};
232struct snd_seq_client_pool {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800233 int client;
Tao Baod7db5942015-01-28 10:07:51 -0800234 int output_pool;
235 int input_pool;
236 int output_room;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800237 int output_free;
Tao Baod7db5942015-01-28 10:07:51 -0800238 int input_free;
239 char reserved[64];
Ben Cheng655a7c02013-10-16 16:09:24 -0700240};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800241#define SNDRV_SEQ_REMOVE_INPUT (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800242#define SNDRV_SEQ_REMOVE_OUTPUT (1 << 1)
243#define SNDRV_SEQ_REMOVE_DEST (1 << 2)
244#define SNDRV_SEQ_REMOVE_DEST_CHANNEL (1 << 3)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800245#define SNDRV_SEQ_REMOVE_TIME_BEFORE (1 << 4)
Tao Baod7db5942015-01-28 10:07:51 -0800246#define SNDRV_SEQ_REMOVE_TIME_AFTER (1 << 5)
247#define SNDRV_SEQ_REMOVE_TIME_TICK (1 << 6)
248#define SNDRV_SEQ_REMOVE_EVENT_TYPE (1 << 7)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800249#define SNDRV_SEQ_REMOVE_IGNORE_OFF (1 << 8)
Tao Baod7db5942015-01-28 10:07:51 -0800250#define SNDRV_SEQ_REMOVE_TAG_MATCH (1 << 9)
Ben Cheng655a7c02013-10-16 16:09:24 -0700251struct snd_seq_remove_events {
Tao Baod7db5942015-01-28 10:07:51 -0800252 unsigned int remove_mode;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800253 union snd_seq_timestamp time;
Tao Baod7db5942015-01-28 10:07:51 -0800254 unsigned char queue;
255 struct snd_seq_addr dest;
256 unsigned char channel;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800257 int type;
Tao Baod7db5942015-01-28 10:07:51 -0800258 char tag;
259 int reserved[10];
Ben Cheng655a7c02013-10-16 16:09:24 -0700260};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800261#define SNDRV_SEQ_PORT_SYSTEM_TIMER 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700262#define SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE 1
Tao Baod7db5942015-01-28 10:07:51 -0800263#define SNDRV_SEQ_PORT_CAP_READ (1 << 0)
264#define SNDRV_SEQ_PORT_CAP_WRITE (1 << 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800265#define SNDRV_SEQ_PORT_CAP_SYNC_READ (1 << 2)
Tao Baod7db5942015-01-28 10:07:51 -0800266#define SNDRV_SEQ_PORT_CAP_SYNC_WRITE (1 << 3)
267#define SNDRV_SEQ_PORT_CAP_DUPLEX (1 << 4)
268#define SNDRV_SEQ_PORT_CAP_SUBS_READ (1 << 5)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800269#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE (1 << 6)
Tao Baod7db5942015-01-28 10:07:51 -0800270#define SNDRV_SEQ_PORT_CAP_NO_EXPORT (1 << 7)
271#define SNDRV_SEQ_PORT_TYPE_SPECIFIC (1 << 0)
272#define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1 << 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800273#define SNDRV_SEQ_PORT_TYPE_MIDI_GM (1 << 2)
Tao Baod7db5942015-01-28 10:07:51 -0800274#define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1 << 3)
275#define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1 << 4)
276#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1 << 5)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800277#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2 (1 << 6)
Tao Baod7db5942015-01-28 10:07:51 -0800278#define SNDRV_SEQ_PORT_TYPE_SYNTH (1 << 10)
279#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1 << 11)
280#define SNDRV_SEQ_PORT_TYPE_SAMPLE (1 << 12)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800281#define SNDRV_SEQ_PORT_TYPE_HARDWARE (1 << 16)
Tao Baod7db5942015-01-28 10:07:51 -0800282#define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1 << 17)
283#define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1 << 18)
284#define SNDRV_SEQ_PORT_TYPE_PORT (1 << 19)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800285#define SNDRV_SEQ_PORT_TYPE_APPLICATION (1 << 20)
Tao Baod7db5942015-01-28 10:07:51 -0800286#define SNDRV_SEQ_PORT_FLG_GIVEN_PORT (1 << 0)
287#define SNDRV_SEQ_PORT_FLG_TIMESTAMP (1 << 1)
288#define SNDRV_SEQ_PORT_FLG_TIME_REAL (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800289struct snd_seq_port_info {
Tao Baod7db5942015-01-28 10:07:51 -0800290 struct snd_seq_addr addr;
291 char name[64];
292 unsigned int capability;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800293 unsigned int type;
Tao Baod7db5942015-01-28 10:07:51 -0800294 int midi_channels;
295 int midi_voices;
296 int synth_voices;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800297 int read_use;
Tao Baod7db5942015-01-28 10:07:51 -0800298 int write_use;
299 void * kernel;
300 unsigned int flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800301 unsigned char time_queue;
Tao Baod7db5942015-01-28 10:07:51 -0800302 char reserved[59];
Ben Cheng655a7c02013-10-16 16:09:24 -0700303};
Tao Baod7db5942015-01-28 10:07:51 -0800304#define SNDRV_SEQ_QUEUE_FLG_SYNC (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800305struct snd_seq_queue_info {
Tao Baod7db5942015-01-28 10:07:51 -0800306 int queue;
307 int owner;
308 unsigned locked : 1;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800309 char name[64];
Tao Baod7db5942015-01-28 10:07:51 -0800310 unsigned int flags;
311 char reserved[60];
Ben Cheng655a7c02013-10-16 16:09:24 -0700312};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800313struct snd_seq_queue_status {
Tao Baod7db5942015-01-28 10:07:51 -0800314 int queue;
315 int events;
316 snd_seq_tick_time_t tick;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800317 struct snd_seq_real_time time;
Tao Baod7db5942015-01-28 10:07:51 -0800318 int running;
319 int flags;
320 char reserved[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800321};
Ben Cheng655a7c02013-10-16 16:09:24 -0700322struct snd_seq_queue_tempo {
Tao Baod7db5942015-01-28 10:07:51 -0800323 int queue;
324 unsigned int tempo;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800325 int ppq;
Tao Baod7db5942015-01-28 10:07:51 -0800326 unsigned int skew_value;
327 unsigned int skew_base;
328 char reserved[24];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800329};
Ben Cheng655a7c02013-10-16 16:09:24 -0700330#define SNDRV_SEQ_TIMER_ALSA 0
331#define SNDRV_SEQ_TIMER_MIDI_CLOCK 1
332#define SNDRV_SEQ_TIMER_MIDI_TICK 2
Christopher Ferris05d08e92016-02-04 13:16:38 -0800333struct snd_seq_queue_timer {
Tao Baod7db5942015-01-28 10:07:51 -0800334 int queue;
335 int type;
336 union {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800337 struct {
Tao Baod7db5942015-01-28 10:07:51 -0800338 struct snd_timer_id id;
339 unsigned int resolution;
340 } alsa;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800341 } u;
Tao Baod7db5942015-01-28 10:07:51 -0800342 char reserved[64];
Ben Cheng655a7c02013-10-16 16:09:24 -0700343};
344struct snd_seq_queue_client {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800345 int queue;
Tao Baod7db5942015-01-28 10:07:51 -0800346 int client;
347 int used;
348 char reserved[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800349};
Tao Baod7db5942015-01-28 10:07:51 -0800350#define SNDRV_SEQ_PORT_SUBS_EXCLUSIVE (1 << 0)
351#define SNDRV_SEQ_PORT_SUBS_TIMESTAMP (1 << 1)
352#define SNDRV_SEQ_PORT_SUBS_TIME_REAL (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800353struct snd_seq_port_subscribe {
Tao Baod7db5942015-01-28 10:07:51 -0800354 struct snd_seq_addr sender;
355 struct snd_seq_addr dest;
356 unsigned int voices;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800357 unsigned int flags;
Tao Baod7db5942015-01-28 10:07:51 -0800358 unsigned char queue;
359 unsigned char pad[3];
360 char reserved[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800361};
Ben Cheng655a7c02013-10-16 16:09:24 -0700362#define SNDRV_SEQ_QUERY_SUBS_READ 0
363#define SNDRV_SEQ_QUERY_SUBS_WRITE 1
364struct snd_seq_query_subs {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800365 struct snd_seq_addr root;
Tao Baod7db5942015-01-28 10:07:51 -0800366 int type;
367 int index;
368 int num_subs;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800369 struct snd_seq_addr addr;
Tao Baod7db5942015-01-28 10:07:51 -0800370 unsigned char queue;
371 unsigned int flags;
372 char reserved[64];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800373};
Tao Baod7db5942015-01-28 10:07:51 -0800374#define SNDRV_SEQ_IOCTL_PVERSION _IOR('S', 0x00, int)
375#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR('S', 0x01, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700376#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800377#define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct snd_seq_running_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700378#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct snd_seq_client_info)
Tao Baod7db5942015-01-28 10:07:51 -0800379#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW('S', 0x11, struct snd_seq_client_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700380#define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct snd_seq_port_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800381#define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW('S', 0x21, struct snd_seq_port_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700382#define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct snd_seq_port_info)
Tao Baod7db5942015-01-28 10:07:51 -0800383#define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW('S', 0x23, struct snd_seq_port_info)
384#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW('S', 0x30, struct snd_seq_port_subscribe)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800385#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW('S', 0x31, struct snd_seq_port_subscribe)
Ben Cheng655a7c02013-10-16 16:09:24 -0700386#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info)
Tao Baod7db5942015-01-28 10:07:51 -0800387#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW('S', 0x33, struct snd_seq_queue_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700388#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct snd_seq_queue_info)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800389#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct snd_seq_queue_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700390#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct snd_seq_queue_info)
391#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
392#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800393#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW('S', 0x42, struct snd_seq_queue_tempo)
Ben Cheng655a7c02013-10-16 16:09:24 -0700394#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800395#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW('S', 0x46, struct snd_seq_queue_timer)
Ben Cheng655a7c02013-10-16 16:09:24 -0700396#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client)
Tao Baod7db5942015-01-28 10:07:51 -0800397#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW('S', 0x4a, struct snd_seq_queue_client)
Ben Cheng655a7c02013-10-16 16:09:24 -0700398#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800399#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW('S', 0x4c, struct snd_seq_client_pool)
Tao Baod7db5942015-01-28 10:07:51 -0800400#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW('S', 0x4e, struct snd_seq_remove_events)
Ben Cheng655a7c02013-10-16 16:09:24 -0700401#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs)
402#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct snd_seq_port_subscribe)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800403#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct snd_seq_client_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700404#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct snd_seq_port_info)
405#endif