diff options
| author | fellair <tesladead43@gmail.com> | 2025-06-02 20:13:22 +0300 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-06-04 13:58:10 +0000 |
| commit | 6b6b5f21aadcc3fc3ccd91da0b782a4307229d70 (patch) | |
| tree | 422fad3eff06a0cfce846f057210a44115b6ce19 /sys | |
| parent | fd5e6e6163762c69d56c2cf63b53ec292c2f23ea (diff) | |
sys/linux: update descriptions in dev_snd_timer.txt
A few things done here:
- Add new userspace-driven ioctls (and necessary structs as well):
SNDRV_TIMER_IOCTL_CREATE
SNDRV_TIMER_IOCTL_TRIGGER
- Change a few object pointers' directions to better reflect their
intent (mostly inout).
- Split old SNDRV_TIMER_IOCTL_TREAD into two:
SNDRV_TIMER_IOCTL_TREAD_OLD and SNDRV_TIMER_IOCTL_TREAD64 the way
it is done in the kernel.
- Remove TODO descriptions concerning SNDCTL_TMR_START etc. as they
are described elsewhere, and as far as I can tell, are not necessary
here.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/linux/dev_snd_timer.txt | 35 | ||||
| -rw-r--r-- | sys/linux/dev_snd_timer.txt.const | 13 |
2 files changed, 31 insertions, 17 deletions
diff --git a/sys/linux/dev_snd_timer.txt b/sys/linux/dev_snd_timer.txt index 1c99db817..8ac268517 100644 --- a/sys/linux/dev_snd_timer.txt +++ b/sys/linux/dev_snd_timer.txt @@ -12,13 +12,13 @@ resource fd_sndtimer[fd] openat$sndtimer(fd const[AT_FDCWD], file ptr[in, string["/dev/snd/timer"]], flags flags[open_flags]) fd_sndtimer ioctl$SNDRV_TIMER_IOCTL_PVERSION(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_PVERSION], arg ptr[out, int32]) -ioctl$SNDRV_TIMER_IOCTL_NEXT_DEVICE(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_NEXT_DEVICE], arg ptr[in, snd_timer_id]) -ioctl$SNDRV_TIMER_IOCTL_TREAD(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_TREAD], arg ptr[in, int32[0:1]]) -ioctl$SNDRV_TIMER_IOCTL_GINFO(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_GINFO], arg ptr[in, snd_timer_ginfo]) +ioctl$SNDRV_TIMER_IOCTL_NEXT_DEVICE(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_NEXT_DEVICE], arg ptr[inout, snd_timer_id]) +ioctl$SNDRV_TIMER_IOCTL_TREAD_OLD(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_TREAD_OLD], arg ptr[in, int32[0:1]]) +ioctl$SNDRV_TIMER_IOCTL_GINFO(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_GINFO], arg ptr[inout, snd_timer_ginfo]) ioctl$SNDRV_TIMER_IOCTL_GPARAMS(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_GPARAMS], arg ptr[in, snd_timer_gparams]) -ioctl$SNDRV_TIMER_IOCTL_GSTATUS(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_GSTATUS], arg ptr[in, snd_timer_gstatus]) +ioctl$SNDRV_TIMER_IOCTL_GSTATUS(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_GSTATUS], arg ptr[inout, snd_timer_gstatus]) ioctl$SNDRV_TIMER_IOCTL_SELECT(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_SELECT], arg ptr[in, snd_timer_select]) -ioctl$SNDRV_TIMER_IOCTL_INFO(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_INFO], arg buffer[out]) +ioctl$SNDRV_TIMER_IOCTL_INFO(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_INFO], arg ptr[out, snd_timer_info]) ioctl$SNDRV_TIMER_IOCTL_PARAMS(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_PARAMS], arg ptr[in, snd_timer_params]) ioctl$SNDRV_TIMER_IOCTL_STATUS32(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_STATUS32], arg ptr[out, snd_timer_status[int32]]) ioctl$SNDRV_TIMER_IOCTL_STATUS64(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_STATUS64], arg ptr[out, snd_timer_status[int64]]) @@ -26,13 +26,15 @@ ioctl$SNDRV_TIMER_IOCTL_START(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_START] ioctl$SNDRV_TIMER_IOCTL_STOP(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_STOP]) ioctl$SNDRV_TIMER_IOCTL_CONTINUE(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_CONTINUE]) ioctl$SNDRV_TIMER_IOCTL_PAUSE(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_PAUSE]) +ioctl$SNDRV_TIMER_IOCTL_TREAD64(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_TREAD64], arg ptr[in, int32[0:1]]) + +# ioctls for userspace-driven timers +ioctl$SNDRV_TIMER_IOCTL_CREATE(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_CREATE], arg ptr[inout, snd_timer_uinfo]) +ioctl$SNDRV_TIMER_IOCTL_TRIGGER(fd fd_sndtimer, cmd const[SNDRV_TIMER_IOCTL_TRIGGER]) snd_timer_flags = SNDRV_TIMER_PSFLG_AUTO, SNDRV_TIMER_PSFLG_EXCLUSIVE, SNDRV_TIMER_PSFLG_EARLY_EVENT 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 -# TODO: Add descriptions -_ = SNDCTL_TMR_START, SNDCTL_TMR_STOP, SNDCTL_TMR_TIMEBASE, SNDCTL_TMR_CONTINUE, SNDCTL_TMR_TEMPO, SNDCTL_TMR_SOURCE, SNDCTL_TMR_METRONOME, SNDCTL_TMR_SELECT - snd_timer_id_str = "id0", "id1" snd_timer_name = "timer0", "timer1" @@ -89,6 +91,23 @@ type snd_timer_status[TYPE] { pad2 array[const[0, int8], 64] } +snd_timer_info { + flags int32 + card int32 + id string[snd_timer_id_str, 64] + name string[snd_timer_name, 80] + pad1 const[0, intptr] + res intptr + pad2 array[const[0, int8], 32] +} + +snd_timer_uinfo { + res intptr + tfd fd + id string[snd_timer_id_str, 64] + pad1 array[const[0, int8], 16] +} + define SND_TIMER_STATUS32_SIZE 88 define SND_TIMER_STATUS64_SIZE 96 define SNDRV_TIMER_IOCTL_STATUS32 _IOR('T', 0x14, char[SND_TIMER_STATUS32_SIZE]) diff --git a/sys/linux/dev_snd_timer.txt.const b/sys/linux/dev_snd_timer.txt.const index f0f4b85cb..4a65ba80a 100644 --- a/sys/linux/dev_snd_timer.txt.const +++ b/sys/linux/dev_snd_timer.txt.const @@ -1,14 +1,6 @@ # Code generated by syz-sysgen. DO NOT EDIT. arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x AT_FDCWD = 18446744073709551516 -SNDCTL_TMR_CONTINUE = 21508, mips64le:ppc64le:536892420 -SNDCTL_TMR_METRONOME = 1074025479, mips64le:ppc64le:2147767303 -SNDCTL_TMR_SELECT = 1074025480, mips64le:ppc64le:2147767304 -SNDCTL_TMR_SOURCE = 3221509126 -SNDCTL_TMR_START = 21506, mips64le:ppc64le:536892418 -SNDCTL_TMR_STOP = 21507, mips64le:ppc64le:536892419 -SNDCTL_TMR_TEMPO = 3221509125 -SNDCTL_TMR_TIMEBASE = 3221509121 SNDRV_TIMER_EVENT_CONTINUE = 4 SNDRV_TIMER_EVENT_EARLY = 6 SNDRV_TIMER_EVENT_MCONTINUE = 14 @@ -25,6 +17,7 @@ SNDRV_TIMER_EVENT_STOP = 3 SNDRV_TIMER_EVENT_SUSPEND = 7 SNDRV_TIMER_EVENT_TICK = 1 SNDRV_TIMER_IOCTL_CONTINUE = 21666, mips64le:ppc64le:536892578 +SNDRV_TIMER_IOCTL_CREATE = 3223344293 SNDRV_TIMER_IOCTL_GINFO = 3237499907, 386:arm:3235927043 SNDRV_TIMER_IOCTL_GPARAMS = 1078481924, 386:arm:1077695492, mips64le:ppc64le:2152223748 SNDRV_TIMER_IOCTL_GSTATUS = 3226489861, 386:arm:3225441285 @@ -38,7 +31,9 @@ SNDRV_TIMER_IOCTL_START = 21664, mips64le:ppc64le:536892576 SNDRV_TIMER_IOCTL_STATUS32 = 2153272340, mips64le:ppc64le:1079530516 SNDRV_TIMER_IOCTL_STATUS64 = 2153796628, mips64le:ppc64le:1080054804 SNDRV_TIMER_IOCTL_STOP = 21665, mips64le:ppc64le:536892577 -SNDRV_TIMER_IOCTL_TREAD = 1074025474, 386:arm:???, mips64le:ppc64le:2147767298 +SNDRV_TIMER_IOCTL_TREAD64 = 1074025636, mips64le:ppc64le:2147767460 +SNDRV_TIMER_IOCTL_TREAD_OLD = 1074025474, mips64le:ppc64le:2147767298 +SNDRV_TIMER_IOCTL_TRIGGER = 21670, mips64le:ppc64le:536892582 SNDRV_TIMER_PSFLG_AUTO = 1 SNDRV_TIMER_PSFLG_EARLY_EVENT = 4 SNDRV_TIMER_PSFLG_EXCLUSIVE = 2 |
