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/linux/dev_snd_timer.txt | |
| 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/linux/dev_snd_timer.txt')
| -rw-r--r-- | sys/linux/dev_snd_timer.txt | 35 |
1 files changed, 27 insertions, 8 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]) |
