github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_snd_seq.txt (about) 1 # Copyright 2015 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 include <uapi/asm/ioctl.h> 5 include <uapi/linux/fcntl.h> 6 include <uapi/linux/time.h> 7 include <uapi/sound/asound.h> 8 include <uapi/sound/asequencer.h> 9 10 resource fd_sndseq[fd] 11 12 openat$sndseq(fd const[AT_FDCWD], file ptr[in, string["/dev/snd/seq"]], flags flags[open_flags]) fd_sndseq 13 write$sndseq(fd fd_sndseq, data ptr[in, array[snd_seq_event]], len bytesize[data]) 14 15 ioctl$SNDRV_SEQ_IOCTL_PVERSION(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_PVERSION], arg ptr[out, int32]) 16 ioctl$SNDRV_SEQ_IOCTL_CLIENT_ID(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_CLIENT_ID], arg ptr[out, int32]) 17 18 ioctl$SNDRV_SEQ_IOCTL_SYSTEM_INFO(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_SYSTEM_INFO], arg ptr[in, snd_seq_system_info]) 19 ioctl$SNDRV_SEQ_IOCTL_RUNNING_MODE(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_RUNNING_MODE], arg ptr[in, snd_seq_running_info]) 20 ioctl$SNDRV_SEQ_IOCTL_GET_CLIENT_INFO(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_GET_CLIENT_INFO], arg ptr[out, snd_seq_client_info]) 21 ioctl$SNDRV_SEQ_IOCTL_SET_CLIENT_INFO(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_SET_CLIENT_INFO], arg ptr[in, snd_seq_client_info]) 22 ioctl$SNDRV_SEQ_IOCTL_CREATE_PORT(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_CREATE_PORT], arg ptr[in, snd_seq_port_info]) 23 ioctl$SNDRV_SEQ_IOCTL_DELETE_PORT(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_DELETE_PORT], arg ptr[in, snd_seq_port_info]) 24 ioctl$SNDRV_SEQ_IOCTL_GET_PORT_INFO(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_GET_PORT_INFO], arg ptr[out, snd_seq_port_info]) 25 ioctl$SNDRV_SEQ_IOCTL_SET_PORT_INFO(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_SET_PORT_INFO], arg ptr[in, snd_seq_port_info]) 26 ioctl$SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT], arg ptr[in, snd_seq_port_subscribe]) 27 ioctl$SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT], arg ptr[in, snd_seq_port_subscribe]) 28 ioctl$SNDRV_SEQ_IOCTL_CREATE_QUEUE(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_CREATE_QUEUE], arg ptr[in, snd_seq_queue_info]) 29 ioctl$SNDRV_SEQ_IOCTL_DELETE_QUEUE(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_DELETE_QUEUE], arg ptr[in, snd_seq_queue_info]) 30 ioctl$SNDRV_SEQ_IOCTL_GET_QUEUE_INFO(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_GET_QUEUE_INFO], arg ptr[in, snd_seq_queue_info]) 31 ioctl$SNDRV_SEQ_IOCTL_SET_QUEUE_INFO(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_SET_QUEUE_INFO], arg ptr[in, snd_seq_queue_info]) 32 ioctl$SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE], arg ptr[in, snd_seq_queue_info]) 33 ioctl$SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS], arg ptr[in, snd_seq_queue_status]) 34 ioctl$SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO], arg ptr[out, snd_seq_queue_status]) 35 ioctl$SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO], arg ptr[in, snd_seq_queue_status]) 36 ioctl$SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER], arg ptr[in, snd_seq_queue_timer]) 37 ioctl$SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER], arg ptr[in, snd_seq_queue_timer]) 38 ioctl$SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT], arg ptr[in, snd_seq_queue_client]) 39 ioctl$SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT], arg ptr[in, snd_seq_queue_client]) 40 ioctl$SNDRV_SEQ_IOCTL_GET_CLIENT_POOL(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_GET_CLIENT_POOL], arg ptr[in, snd_seq_client_pool]) 41 ioctl$SNDRV_SEQ_IOCTL_SET_CLIENT_POOL(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_SET_CLIENT_POOL], arg ptr[in, snd_seq_client_pool]) 42 ioctl$SNDRV_SEQ_IOCTL_REMOVE_EVENTS(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_REMOVE_EVENTS], arg ptr[in, snd_seq_remove_events]) 43 ioctl$SNDRV_SEQ_IOCTL_QUERY_SUBS(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_QUERY_SUBS], arg ptr[in, snd_seq_query_subs]) 44 ioctl$SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION], arg ptr[in, snd_seq_port_subscribe]) 45 ioctl$SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT], arg ptr[in, snd_seq_client_info]) 46 ioctl$SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT(fd fd_sndseq, cmd const[SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT], arg ptr[in, snd_seq_port_info]) 47 48 snd_seq_client_type = NO_CLIENT, USER_CLIENT, KERNEL_CLIENT 49 snd_seq_filter = SNDRV_SEQ_FILTER_BROADCAST, SNDRV_SEQ_FILTER_MULTICAST, SNDRV_SEQ_FILTER_BOUNCE, SNDRV_SEQ_FILTER_USE_EVENT 50 snd_seq_port_cap = SNDRV_SEQ_PORT_CAP_READ, SNDRV_SEQ_PORT_CAP_WRITE, SNDRV_SEQ_PORT_CAP_SYNC_READ, SNDRV_SEQ_PORT_CAP_SYNC_WRITE, SNDRV_SEQ_PORT_CAP_DUPLEX, SNDRV_SEQ_PORT_CAP_SUBS_READ, SNDRV_SEQ_PORT_CAP_SUBS_WRITE, SNDRV_SEQ_PORT_CAP_NO_EXPORT 51 snd_seq_port_type = SNDRV_SEQ_PORT_TYPE_SPECIFIC, SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC, SNDRV_SEQ_PORT_TYPE_MIDI_GM, SNDRV_SEQ_PORT_TYPE_MIDI_GS, SNDRV_SEQ_PORT_TYPE_MIDI_XG, SNDRV_SEQ_PORT_TYPE_MIDI_MT32, SNDRV_SEQ_PORT_TYPE_MIDI_GM2, SNDRV_SEQ_PORT_TYPE_SYNTH, SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE, SNDRV_SEQ_PORT_TYPE_SAMPLE, SNDRV_SEQ_PORT_TYPE_HARDWARE, SNDRV_SEQ_PORT_TYPE_SOFTWARE, SNDRV_SEQ_PORT_TYPE_SYNTHESIZER, SNDRV_SEQ_PORT_TYPE_PORT, SNDRV_SEQ_PORT_TYPE_APPLICATION 52 snd_seq_port_flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT, SNDRV_SEQ_PORT_FLG_TIMESTAMP, SNDRV_SEQ_PORT_FLG_TIME_REAL 53 snd_seq_sub_flags = SNDRV_SEQ_PORT_SUBS_EXCLUSIVE, SNDRV_SEQ_PORT_SUBS_TIMESTAMP, SNDRV_SEQ_PORT_SUBS_TIME_REAL 54 snd_seq_timer_type = SNDRV_SEQ_TIMER_ALSA, SNDRV_SEQ_TIMER_MIDI_CLOCK, SNDRV_SEQ_TIMER_MIDI_TICK 55 snd_seq_remove_mode = SNDRV_SEQ_REMOVE_INPUT, SNDRV_SEQ_REMOVE_OUTPUT, SNDRV_SEQ_REMOVE_DEST, SNDRV_SEQ_REMOVE_DEST_CHANNEL, SNDRV_SEQ_REMOVE_TIME_BEFORE, SNDRV_SEQ_REMOVE_TIME_AFTER, SNDRV_SEQ_REMOVE_TIME_TICK, SNDRV_SEQ_REMOVE_EVENT_TYPE, SNDRV_SEQ_REMOVE_IGNORE_OFF, SNDRV_SEQ_REMOVE_TAG_MATCH 56 snd_timer_class = SNDRV_TIMER_CLASS_NONE, SNDRV_TIMER_CLASS_SLAVE, SNDRV_TIMER_CLASS_GLOBAL, SNDRV_TIMER_CLASS_CARD, SNDRV_TIMER_CLASS_PCM 57 snd_timer_sclass = SNDRV_TIMER_SCLASS_NONE, SNDRV_TIMER_SCLASS_APPLICATION, SNDRV_TIMER_SCLASS_SEQUENCER, SNDRV_TIMER_SCLASS_OSS_SEQUENCER 58 snd_timer_dev = SNDRV_TIMER_GLOBAL_SYSTEM, SNDRV_TIMER_GLOBAL_RTC, SNDRV_TIMER_GLOBAL_HPET, SNDRV_TIMER_GLOBAL_HRTIMER 59 snd_seq_subs_type = SNDRV_SEQ_QUERY_SUBS_READ, SNDRV_SEQ_QUERY_SUBS_WRITE 60 61 snd_seq_client_name = "client0", "client1" 62 snd_seq_port_name = "port0", "port1" 63 snd_seq_queue_name = "queue0", "queue1" 64 65 snd_seq_system_info { 66 queues int32 67 clients int32 68 ports int32 69 channel int32 70 nclient int32 71 nqueue int32 72 pad array[const[0, int8], 24] 73 } 74 75 snd_seq_running_info { 76 client int8 77 bigend int8 78 cpumode int8 79 pad1 const[0, int8] 80 pad2 array[const[0, int8], 12] 81 } 82 83 snd_seq_client_info { 84 client int32 85 type flags[snd_seq_client_type, int32] 86 name string[snd_seq_client_name, 64] 87 filter flags[snd_seq_filter, int32] 88 multicast_filter array[int8, 8] 89 event_filter array[int8, 32] 90 num_ports int32 91 event_lost int32 92 card const[0, int32] 93 pid const[0, int32] 94 pad array[const[0, int8], 56] 95 } 96 97 snd_seq_port_info { 98 addr snd_seq_addr 99 name string[snd_seq_port_name, 64] 100 capability flags[snd_seq_port_cap, int32] 101 type flags[snd_seq_port_type, int32] 102 midi_channels int32 103 midi_voices int32 104 synth_voices int32 105 read_use int32 106 write_use int32 107 kernel const[0, intptr] 108 flags flags[snd_seq_port_flags, int32] 109 time_queue int8 110 pad array[const[0, int8], 59] 111 } 112 113 snd_seq_port_subscribe { 114 sender snd_seq_addr 115 dest snd_seq_addr 116 voices int32 117 flags flags[snd_seq_sub_flags, int32] 118 queue int8 119 pad1 array[const[0, int8], 3] 120 pad2 array[const[0, int8], 64] 121 } 122 123 snd_seq_queue_info { 124 queue int32 125 owner int32 126 locked int32:1 127 name string[snd_seq_queue_name, 64] 128 flags int32 129 reserved array[const[0, int8], 60] 130 } 131 132 snd_seq_queue_status { 133 queue int32 134 events int32 135 tick int32 136 time snd_seq_real_time 137 running int32 138 flags int32 139 pad array[const[0, int8], 64] 140 } 141 142 snd_seq_queue_timer { 143 queue int32 144 type flags[snd_seq_timer_type, int32] 145 id snd_timer_id 146 resolution int32 147 pad array[const[0, int8], 64] 148 } 149 150 snd_timer_id { 151 class flags[snd_timer_class, int32] 152 sclass flags[snd_timer_sclass, int32] 153 card int32 154 dev flags[snd_timer_dev, int32] 155 subdev int32 156 } 157 158 snd_seq_queue_client { 159 queue int32 160 client int32 161 used int32 162 pad array[const[0, int8], 64] 163 } 164 165 snd_seq_client_pool { 166 client int32 167 opool int32 168 ipool int32 169 oroom int32 170 ofree int32 171 ifree int32 172 pad array[const[0, int8], 64] 173 } 174 175 snd_seq_remove_events { 176 remove_mode flags[snd_seq_remove_mode, int32] 177 time snd_seq_timestamp 178 queue int8 179 dest snd_seq_addr 180 channel int8 181 type flags[snd_seq_client_type, int32] 182 tag int8 183 pad array[const[0, int32], 10] 184 } 185 186 snd_seq_query_subs { 187 root snd_seq_addr 188 type flags[snd_seq_subs_type, int32] 189 index int32 190 nsubs int32 191 addr snd_seq_addr 192 queue int8 193 flags int32 194 pad array[const[0, int8], 64] 195 } 196 197 snd_seq_event { 198 type int8 199 flags int8 200 tag int8 201 queue int8 202 time snd_seq_timestamp 203 src snd_seq_addr 204 dst snd_seq_addr 205 data snd_seq_event_data 206 } 207 208 snd_seq_event_data [ 209 note snd_seq_ev_note 210 control snd_seq_ev_ctrl 211 raw8 snd_seq_ev_raw8 212 raw32 snd_seq_ev_raw32 213 ext snd_seq_ev_ext 214 queue snd_seq_ev_queue_control 215 time snd_seq_timestamp 216 addr snd_seq_addr 217 connect snd_seq_connect 218 result snd_seq_result 219 quote snd_seq_ev_quote 220 ] 221 222 snd_seq_ev_note { 223 chan int8 224 note int8 225 veloc int8 226 oveloc int8 227 dur int32 228 } 229 230 snd_seq_ev_ctrl { 231 chan int8 232 param int32 233 val int32 234 } 235 236 snd_seq_ev_raw8 { 237 data array[int8, 12] 238 } 239 240 snd_seq_ev_raw32 { 241 data array[int32, 3] 242 } 243 244 snd_seq_ev_ext { 245 len len[ptr, int32] 246 ptr buffer[in] 247 } [packed] 248 249 snd_seq_ev_queue_control { 250 queue int8 251 param snd_seq_queue_skew 252 } 253 254 snd_seq_connect { 255 sender snd_seq_addr 256 dest snd_seq_addr 257 } 258 259 snd_seq_result { 260 event int32 261 result int32 262 } 263 264 snd_seq_ev_quote { 265 origin snd_seq_addr 266 val int16 267 event ptr[in, snd_seq_event, opt] 268 } [packed] 269 270 snd_seq_queue_skew { 271 val int32 272 base int32 273 } 274 275 snd_seq_timestamp [ 276 tick int32 277 time snd_seq_real_time 278 ] 279 280 snd_seq_real_time { 281 tv_sec int32 282 tv_nsec int32 283 } 284 285 snd_seq_addr { 286 client int8 287 port int8 288 }