Go to the documentation of this file.
22 #ifndef __SOUND_ASEQUENCER_H
23 #define __SOUND_ASEQUENCER_H
31 #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1)
40 #define SNDRV_SEQ_EVENT_SYSTEM 0
41 #define SNDRV_SEQ_EVENT_RESULT 1
46 #define SNDRV_SEQ_EVENT_NOTE 5
47 #define SNDRV_SEQ_EVENT_NOTEON 6
48 #define SNDRV_SEQ_EVENT_NOTEOFF 7
49 #define SNDRV_SEQ_EVENT_KEYPRESS 8
54 #define SNDRV_SEQ_EVENT_CONTROLLER 10
55 #define SNDRV_SEQ_EVENT_PGMCHANGE 11
56 #define SNDRV_SEQ_EVENT_CHANPRESS 12
57 #define SNDRV_SEQ_EVENT_PITCHBEND 13
58 #define SNDRV_SEQ_EVENT_CONTROL14 14
59 #define SNDRV_SEQ_EVENT_NONREGPARAM 15
60 #define SNDRV_SEQ_EVENT_REGPARAM 16
65 #define SNDRV_SEQ_EVENT_SONGPOS 20
66 #define SNDRV_SEQ_EVENT_SONGSEL 21
67 #define SNDRV_SEQ_EVENT_QFRAME 22
68 #define SNDRV_SEQ_EVENT_TIMESIGN 23
69 #define SNDRV_SEQ_EVENT_KEYSIGN 24
74 #define SNDRV_SEQ_EVENT_START 30
75 #define SNDRV_SEQ_EVENT_CONTINUE 31
76 #define SNDRV_SEQ_EVENT_STOP 32
77 #define SNDRV_SEQ_EVENT_SETPOS_TICK 33
78 #define SNDRV_SEQ_EVENT_SETPOS_TIME 34
79 #define SNDRV_SEQ_EVENT_TEMPO 35
80 #define SNDRV_SEQ_EVENT_CLOCK 36
81 #define SNDRV_SEQ_EVENT_TICK 37
82 #define SNDRV_SEQ_EVENT_QUEUE_SKEW 38
87 #define SNDRV_SEQ_EVENT_TUNE_REQUEST 40
88 #define SNDRV_SEQ_EVENT_RESET 41
89 #define SNDRV_SEQ_EVENT_SENSING 42
94 #define SNDRV_SEQ_EVENT_ECHO 50
95 #define SNDRV_SEQ_EVENT_OSS 51
100 #define SNDRV_SEQ_EVENT_CLIENT_START 60
101 #define SNDRV_SEQ_EVENT_CLIENT_EXIT 61
102 #define SNDRV_SEQ_EVENT_CLIENT_CHANGE 62
103 #define SNDRV_SEQ_EVENT_PORT_START 63
104 #define SNDRV_SEQ_EVENT_PORT_EXIT 64
105 #define SNDRV_SEQ_EVENT_PORT_CHANGE 65
110 #define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED 66
111 #define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67
118 #define SNDRV_SEQ_EVENT_USR0 90
119 #define SNDRV_SEQ_EVENT_USR1 91
120 #define SNDRV_SEQ_EVENT_USR2 92
121 #define SNDRV_SEQ_EVENT_USR3 93
122 #define SNDRV_SEQ_EVENT_USR4 94
123 #define SNDRV_SEQ_EVENT_USR5 95
124 #define SNDRV_SEQ_EVENT_USR6 96
125 #define SNDRV_SEQ_EVENT_USR7 97
126 #define SNDRV_SEQ_EVENT_USR8 98
127 #define SNDRV_SEQ_EVENT_USR9 99
136 #define SNDRV_SEQ_EVENT_SYSEX 130
137 #define SNDRV_SEQ_EVENT_BOUNCE 131
139 #define SNDRV_SEQ_EVENT_USR_VAR0 135
140 #define SNDRV_SEQ_EVENT_USR_VAR1 136
141 #define SNDRV_SEQ_EVENT_USR_VAR2 137
142 #define SNDRV_SEQ_EVENT_USR_VAR3 138
143 #define SNDRV_SEQ_EVENT_USR_VAR4 139
146 #define SNDRV_SEQ_EVENT_KERNEL_ERROR 150
147 #define SNDRV_SEQ_EVENT_KERNEL_QUOTE 151
154 #define SNDRV_SEQ_EVENT_NONE 255
172 #define SNDRV_SEQ_ADDRESS_UNKNOWN 253
173 #define SNDRV_SEQ_ADDRESS_SUBSCRIBERS 254
174 #define SNDRV_SEQ_ADDRESS_BROADCAST 255
175 #define SNDRV_SEQ_QUEUE_DIRECT 253
178 #define SNDRV_SEQ_TIME_STAMP_TICK (0<<0)
179 #define SNDRV_SEQ_TIME_STAMP_REAL (1<<0)
180 #define SNDRV_SEQ_TIME_STAMP_MASK (1<<0)
182 #define SNDRV_SEQ_TIME_MODE_ABS (0<<1)
183 #define SNDRV_SEQ_TIME_MODE_REL (1<<1)
184 #define SNDRV_SEQ_TIME_MODE_MASK (1<<1)
186 #define SNDRV_SEQ_EVENT_LENGTH_FIXED (0<<2)
187 #define SNDRV_SEQ_EVENT_LENGTH_VARIABLE (1<<2)
188 #define SNDRV_SEQ_EVENT_LENGTH_VARUSR (2<<2)
189 #define SNDRV_SEQ_EVENT_LENGTH_MASK (3<<2)
191 #define SNDRV_SEQ_PRIORITY_NORMAL (0<<4)
192 #define SNDRV_SEQ_PRIORITY_HIGH (1<<4)
193 #define SNDRV_SEQ_PRIORITY_MASK (1<<4)
315 #define snd_seq_event_bounce_ext_data(ev) ((void*)((char *)(ev)->data.ext.ptr + sizeof(struct snd_seq_event_bounce)))
321 #define snd_seq_ev_is_result_type(ev) ((ev)->type < 5)
323 #define snd_seq_ev_is_channel_type(ev) ((ev)->type >= 5 && (ev)->type < 20)
325 #define snd_seq_ev_is_note_type(ev) ((ev)->type >= 5 && (ev)->type < 10)
327 #define snd_seq_ev_is_control_type(ev) ((ev)->type >= 10 && (ev)->type < 20)
329 #define snd_seq_ev_is_queue_type(ev) ((ev)->type >= 30 && (ev)->type < 40)
331 #define snd_seq_ev_is_message_type(ev) ((ev)->type >= 60 && (ev)->type < 69)
333 #define snd_seq_ev_is_sample_type(ev) ((ev)->type >= 70 && (ev)->type < 79)
335 #define snd_seq_ev_is_user_type(ev) ((ev)->type >= 90 && (ev)->type < 99)
337 #define snd_seq_ev_is_fixed_type(ev) ((ev)->type < 100)
339 #define snd_seq_ev_is_variable_type(ev) ((ev)->type >= 130 && (ev)->type < 140)
341 #define snd_seq_ev_is_reserved(ev) ((ev)->type >= 150)
344 #define snd_seq_ev_is_direct(ev) ((ev)->queue == SNDRV_SEQ_QUEUE_DIRECT)
350 #define snd_seq_ev_is_prior(ev) (((ev)->flags & SNDRV_SEQ_PRIORITY_MASK) == SNDRV_SEQ_PRIORITY_HIGH)
353 #define snd_seq_ev_length_type(ev) ((ev)->flags & SNDRV_SEQ_EVENT_LENGTH_MASK)
354 #define snd_seq_ev_is_fixed(ev) (snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_FIXED)
355 #define snd_seq_ev_is_variable(ev) (snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
356 #define snd_seq_ev_is_varusr(ev) (snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARUSR)
359 #define snd_seq_ev_timestamp_type(ev) ((ev)->flags & SNDRV_SEQ_TIME_STAMP_MASK)
360 #define snd_seq_ev_is_tick(ev) (snd_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_TICK)
361 #define snd_seq_ev_is_real(ev) (snd_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_REAL)
364 #define snd_seq_ev_timemode_type(ev) ((ev)->flags & SNDRV_SEQ_TIME_MODE_MASK)
365 #define snd_seq_ev_is_abstime(ev) (snd_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_ABS)
366 #define snd_seq_ev_is_reltime(ev) (snd_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_REL)
369 #define snd_seq_queue_sync_port(q) ((q) + 16)
396 #define SNDRV_SEQ_CLIENT_SYSTEM 0
398 #define SNDRV_SEQ_CLIENT_DUMMY 14
399 #define SNDRV_SEQ_CLIENT_OSS 15
404 #define NO_CLIENT ((__force snd_seq_client_type_t) 0)
405 #define USER_CLIENT ((__force snd_seq_client_type_t) 1)
406 #define KERNEL_CLIENT ((__force snd_seq_client_type_t) 2)
409 #define SNDRV_SEQ_FILTER_BROADCAST (1<<0)
410 #define SNDRV_SEQ_FILTER_MULTICAST (1<<1)
411 #define SNDRV_SEQ_FILTER_BOUNCE (1<<2)
412 #define SNDRV_SEQ_FILTER_USE_EVENT (1<<31)
441 #define SNDRV_SEQ_REMOVE_INPUT (1<<0)
442 #define SNDRV_SEQ_REMOVE_OUTPUT (1<<1)
443 #define SNDRV_SEQ_REMOVE_DEST (1<<2)
444 #define SNDRV_SEQ_REMOVE_DEST_CHANNEL (1<<3)
445 #define SNDRV_SEQ_REMOVE_TIME_BEFORE (1<<4)
446 #define SNDRV_SEQ_REMOVE_TIME_AFTER (1<<5)
447 #define SNDRV_SEQ_REMOVE_TIME_TICK (1<<6)
448 #define SNDRV_SEQ_REMOVE_EVENT_TYPE (1<<7)
449 #define SNDRV_SEQ_REMOVE_IGNORE_OFF (1<<8)
450 #define SNDRV_SEQ_REMOVE_TAG_MATCH (1<<9)
470 #define SNDRV_SEQ_PORT_SYSTEM_TIMER 0
471 #define SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE 1
474 #define SNDRV_SEQ_PORT_CAP_READ (1<<0)
475 #define SNDRV_SEQ_PORT_CAP_WRITE (1<<1)
477 #define SNDRV_SEQ_PORT_CAP_SYNC_READ (1<<2)
478 #define SNDRV_SEQ_PORT_CAP_SYNC_WRITE (1<<3)
480 #define SNDRV_SEQ_PORT_CAP_DUPLEX (1<<4)
482 #define SNDRV_SEQ_PORT_CAP_SUBS_READ (1<<5)
483 #define SNDRV_SEQ_PORT_CAP_SUBS_WRITE (1<<6)
484 #define SNDRV_SEQ_PORT_CAP_NO_EXPORT (1<<7)
487 #define SNDRV_SEQ_PORT_TYPE_SPECIFIC (1<<0)
488 #define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1<<1)
489 #define SNDRV_SEQ_PORT_TYPE_MIDI_GM (1<<2)
490 #define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1<<3)
491 #define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1<<4)
492 #define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1<<5)
493 #define SNDRV_SEQ_PORT_TYPE_MIDI_GM2 (1<<6)
496 #define SNDRV_SEQ_PORT_TYPE_SYNTH (1<<10)
497 #define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11)
498 #define SNDRV_SEQ_PORT_TYPE_SAMPLE (1<<12)
500 #define SNDRV_SEQ_PORT_TYPE_HARDWARE (1<<16)
501 #define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1<<17)
502 #define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1<<18)
503 #define SNDRV_SEQ_PORT_TYPE_PORT (1<<19)
504 #define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20)
507 #define SNDRV_SEQ_PORT_FLG_GIVEN_PORT (1<<0)
508 #define SNDRV_SEQ_PORT_FLG_TIMESTAMP (1<<1)
509 #define SNDRV_SEQ_PORT_FLG_TIME_REAL (1<<2)
532 #define SNDRV_SEQ_QUEUE_FLG_SYNC (1<<0)
574 #define SNDRV_SEQ_TIMER_ALSA 0
575 #define SNDRV_SEQ_TIMER_MIDI_CLOCK 1
576 #define SNDRV_SEQ_TIMER_MIDI_TICK 2
602 #define SNDRV_SEQ_PORT_SUBS_EXCLUSIVE (1<<0)
603 #define SNDRV_SEQ_PORT_SUBS_TIMESTAMP (1<<1)
604 #define SNDRV_SEQ_PORT_SUBS_TIME_REAL (1<<2)
617 #define SNDRV_SEQ_QUERY_SUBS_READ 0
618 #define SNDRV_SEQ_QUERY_SUBS_WRITE 1
636 #define SNDRV_SEQ_IOCTL_PVERSION _IOR ('S', 0x00, int)
637 #define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR ('S', 0x01, int)
638 #define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info)
639 #define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct snd_seq_running_info)
641 #define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct snd_seq_client_info)
642 #define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW ('S', 0x11, struct snd_seq_client_info)
644 #define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct snd_seq_port_info)
645 #define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW ('S', 0x21, struct snd_seq_port_info)
646 #define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct snd_seq_port_info)
647 #define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW ('S', 0x23, struct snd_seq_port_info)
649 #define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW ('S', 0x30, struct snd_seq_port_subscribe)
650 #define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe)
652 #define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info)
653 #define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW ('S', 0x33, struct snd_seq_queue_info)
654 #define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct snd_seq_queue_info)
655 #define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct snd_seq_queue_info)
656 #define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct snd_seq_queue_info)
657 #define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
658 #define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo)
659 #define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct snd_seq_queue_tempo)
660 #define SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER _IOWR('S', 0x43, struct snd_seq_queue_owner)
661 #define SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER _IOW ('S', 0x44, struct snd_seq_queue_owner)
662 #define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer)
663 #define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct snd_seq_queue_timer)
668 #define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client)
669 #define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct snd_seq_queue_client)
670 #define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool)
671 #define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW ('S', 0x4c, struct snd_seq_client_pool)
672 #define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW ('S', 0x4e, struct snd_seq_remove_events)
673 #define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs)
674 #define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct snd_seq_port_subscribe)
675 #define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct snd_seq_client_info)
676 #define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct snd_seq_port_info)