github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/sys/linux/dev_snd_timer.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/linux/soundcard.h> 9 10 resource fd_sndtimer[fd] 11 12 openat$sndtimer(fd const[AT_FDCWD], file ptr[in, string["/dev/snd/timer"]], flags flags[open_flags]) fd_sndtimer 13 14 ioctl$SNDRV_TIMER_IOCTL_PVERSION(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_PVERSION], arg ptr[out, int32]) 15 ioctl$SNDRV_TIMER_IOCTL_NEXT_DEVICE(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_NEXT_DEVICE], arg ptr[inout, snd_timer_id]) 16 ioctl$SNDRV_TIMER_IOCTL_TREAD_OLD(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_TREAD_OLD], arg ptr[in, int32[0:1]]) 17 ioctl$SNDRV_TIMER_IOCTL_GINFO(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_GINFO], arg ptr[inout, snd_timer_ginfo]) 18 ioctl$SNDRV_TIMER_IOCTL_GPARAMS(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_GPARAMS], arg ptr[in, snd_timer_gparams]) 19 ioctl$SNDRV_TIMER_IOCTL_GSTATUS(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_GSTATUS], arg ptr[inout, snd_timer_gstatus]) 20 ioctl$SNDRV_TIMER_IOCTL_SELECT(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_SELECT], arg ptr[in, snd_timer_select]) 21 ioctl$SNDRV_TIMER_IOCTL_INFO(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_INFO], arg ptr[out, snd_timer_info]) 22 ioctl$SNDRV_TIMER_IOCTL_PARAMS(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_PARAMS], arg ptr[in, snd_timer_params]) 23 ioctl$SNDRV_TIMER_IOCTL_STATUS32(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_STATUS32], arg ptr[out, snd_timer_status[int32]]) 24 ioctl$SNDRV_TIMER_IOCTL_STATUS64(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_STATUS64], arg ptr[out, snd_timer_status[int64]]) 25 ioctl$SNDRV_TIMER_IOCTL_START(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_START]) 26 ioctl$SNDRV_TIMER_IOCTL_STOP(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_STOP]) 27 ioctl$SNDRV_TIMER_IOCTL_CONTINUE(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_CONTINUE]) 28 ioctl$SNDRV_TIMER_IOCTL_PAUSE(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_PAUSE]) 29 ioctl$SNDRV_TIMER_IOCTL_TREAD64(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_TREAD64], arg ptr[in, int32[0:1]]) 30 31 # ioctls for userspace-driven timers 32 ioctl$SNDRV_TIMER_IOCTL_CREATE(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_CREATE], arg ptr[inout, snd_timer_uinfo]) 33 ioctl$SNDRV_TIMER_IOCTL_TRIGGER(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_TRIGGER]) 34 35 snd_timer_flags = SNDRV_TIMER_PSFLG_AUTO, SNDRV_TIMER_PSFLG_EXCLUSIVE, SNDRV_TIMER_PSFLG_EARLY_EVENT 36 snd_timer_filter = SNDRV_TIMER_EVENT_RESOLUTION, SNDRV_TIMER_EVENT_TICK, SNDRV_TIMER_EVENT_START, SNDRV_TIMER_EVENT_STOP, SNDRV_TIMER_EVENT_CONTINUE, SNDRV_TIMER_EVENT_PAUSE, SNDRV_TIMER_EVENT_EARLY, SNDRV_TIMER_EVENT_SUSPEND, SNDRV_TIMER_EVENT_RESUME, SNDRV_TIMER_EVENT_MSTART, SNDRV_TIMER_EVENT_MSTOP, SNDRV_TIMER_EVENT_MCONTINUE, SNDRV_TIMER_EVENT_MPAUSE, SNDRV_TIMER_EVENT_MSUSPEND, SNDRV_TIMER_EVENT_MRESUME 37 38 snd_timer_id_str = "id0", "id1" 39 snd_timer_name = "timer0", "timer1" 40 41 snd_timer_ginfo { 42 tid snd_timer_id 43 flags int32 44 card int32 45 id string[snd_timer_id_str, 64] 46 name string[snd_timer_name, 80] 47 pad1 const[0, intptr] 48 res intptr 49 resmin intptr 50 resmax intptr 51 clients int32 52 pad2 array[const[0, int8], 32] 53 } 54 55 snd_timer_gparams { 56 tid snd_timer_id 57 periodn intptr 58 periodd intptr 59 pad array[const[0, int8], 32] 60 } 61 62 snd_timer_gstatus { 63 tid snd_timer_id 64 res intptr 65 resnum intptr 66 resden intptr 67 pad array[const[0, int8], 32] 68 } 69 70 snd_timer_select { 71 tid snd_timer_id 72 pad array[const[0, int8], 32] 73 } 74 75 snd_timer_params { 76 flags flags[snd_timer_flags, int32] 77 ticks int32 78 qsize int32 79 pad1 const[0, int32] 80 filter flags[snd_timer_filter, int32] 81 pad2 array[const[0, int8], 60] 82 } 83 84 type snd_timer_status[TYPE] { 85 tstamp_sec TYPE 86 tstamp_nsec TYPE 87 resolution int32 88 lost int32 89 overrun int32 90 queue int32 91 pad2 array[const[0, int8], 64] 92 } 93 94 snd_timer_info { 95 flags int32 96 card int32 97 id string[snd_timer_id_str, 64] 98 name string[snd_timer_name, 80] 99 pad1 const[0, intptr] 100 res intptr 101 pad2 array[const[0, int8], 32] 102 } 103 104 snd_timer_uinfo { 105 res intptr 106 tfd fd 107 id string[snd_timer_id_str, 64] 108 pad1 array[const[0, int8], 16] 109 } 110 111 define SND_TIMER_STATUS32_SIZE 88 112 define SND_TIMER_STATUS64_SIZE 96 113 define SNDRV_TIMER_IOCTL_STATUS32 _IOR('T', 0x14, char[SND_TIMER_STATUS32_SIZE]) 114 define SNDRV_TIMER_IOCTL_STATUS64 _IOR('T', 0x14, char[SND_TIMER_STATUS64_SIZE])