github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_snd_control.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  
     9  resource fd_sndctrl[fd]
    10  
    11  syz_open_dev$sndctrl(dev ptr[in, string["/dev/snd/controlC#"]], id intptr, flags flags[open_flags]) fd_sndctrl
    12  
    13  ioctl$SNDRV_CTL_IOCTL_PVERSION(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_PVERSION], arg ptr[out, int32])
    14  ioctl$SNDRV_CTL_IOCTL_CARD_INFO(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_CARD_INFO], arg buffer[out])
    15  ioctl$SNDRV_CTL_IOCTL_HWDEP_INFO(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_HWDEP_INFO], arg buffer[out])
    16  ioctl$SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE], arg buffer[out])
    17  ioctl$SNDRV_CTL_IOCTL_POWER_STATE(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_POWER_STATE], arg ptr[out, int32])
    18  ioctl$SNDRV_CTL_IOCTL_ELEM_LIST(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_ELEM_LIST], arg ptr[in, snd_ctl_elem_list])
    19  ioctl$SNDRV_CTL_IOCTL_ELEM_INFO(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_ELEM_INFO], arg ptr[in, snd_ctl_elem_info])
    20  ioctl$SNDRV_CTL_IOCTL_ELEM_READ(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_ELEM_READ], arg ptr[in, snd_ctl_elem_value])
    21  ioctl$SNDRV_CTL_IOCTL_ELEM_WRITE(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_ELEM_WRITE], arg ptr[in, snd_ctl_elem_value])
    22  ioctl$SNDRV_CTL_IOCTL_ELEM_LOCK(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_ELEM_LOCK], arg ptr[in, snd_ctl_elem_id])
    23  ioctl$SNDRV_CTL_IOCTL_ELEM_UNLOCK(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_ELEM_UNLOCK], arg ptr[in, snd_ctl_elem_id])
    24  ioctl$SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS], arg ptr[in, int32])
    25  ioctl$SNDRV_CTL_IOCTL_ELEM_ADD(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_ELEM_ADD], arg ptr[in, snd_ctl_elem_info])
    26  ioctl$SNDRV_CTL_IOCTL_ELEM_REPLACE(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_ELEM_REPLACE], arg ptr[in, snd_ctl_elem_info])
    27  ioctl$SNDRV_CTL_IOCTL_ELEM_REMOVE(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_ELEM_REMOVE], arg ptr[in, snd_ctl_elem_id])
    28  ioctl$SNDRV_CTL_IOCTL_TLV_READ(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_TLV_READ], arg ptr[in, snd_ctl_tlv])
    29  ioctl$SNDRV_CTL_IOCTL_TLV_WRITE(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_TLV_WRITE], arg ptr[in, snd_ctl_tlv])
    30  ioctl$SNDRV_CTL_IOCTL_TLV_COMMAND(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_TLV_COMMAND], arg ptr[in, snd_ctl_tlv])
    31  ioctl$SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE], arg ptr[in, int32])
    32  ioctl$SNDRV_CTL_IOCTL_PCM_INFO(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_PCM_INFO], arg ptr[in, snd_pcm_info])
    33  ioctl$SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE], arg ptr[in, int32])
    34  ioctl$SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE], arg ptr[in, int32])
    35  ioctl$SNDRV_CTL_IOCTL_RAWMIDI_INFO(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_RAWMIDI_INFO], arg ptr[in, snd_rawmidi_info])
    36  ioctl$SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE(fd fd_sndctrl, cmd const[SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE], arg ptr[in, int32])
    37  
    38  snd_ctl_iface = SNDRV_CTL_ELEM_IFACE_CARD, SNDRV_CTL_ELEM_IFACE_HWDEP, SNDRV_CTL_ELEM_IFACE_MIXER, SNDRV_CTL_ELEM_IFACE_PCM, SNDRV_CTL_ELEM_IFACE_RAWMIDI, SNDRV_CTL_ELEM_IFACE_TIMER, SNDRV_CTL_ELEM_IFACE_SEQUENCER
    39  snd_ctl_access = SNDRV_CTL_ELEM_ACCESS_READ, SNDRV_CTL_ELEM_ACCESS_WRITE, SNDRV_CTL_ELEM_ACCESS_READWRITE, SNDRV_CTL_ELEM_ACCESS_VOLATILE, SNDRV_CTL_ELEM_ACCESS_TLV_READ, SNDRV_CTL_ELEM_ACCESS_TLV_WRITE, SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE, SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND, SNDRV_CTL_ELEM_ACCESS_INACTIVE, SNDRV_CTL_ELEM_ACCESS_LOCK, SNDRV_CTL_ELEM_ACCESS_OWNER, SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, SNDRV_CTL_ELEM_ACCESS_USER
    40  snd_ctl_names = "", "syz0", "syz1"
    41  snd_ctl_elem_names = "syz0", "syz1"
    42  
    43  snd_ctl_elem_id {
    44  	numid	int32[0:10]
    45  	iface	flags[snd_ctl_iface, int32]
    46  	dev	int32
    47  	subdev	int32
    48  	name	string[snd_ctl_names, SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
    49  	index	int32
    50  }
    51  
    52  snd_ctl_elem_list {
    53  	off	int32
    54  	space	len[pids, int32]
    55  	used	int32
    56  	count	int32
    57  	pids	ptr[out, array[snd_ctl_elem_id]]
    58  	pad	array[const[0, int8], 50]
    59  }
    60  
    61  snd_ctl_elem_info {
    62  	id		snd_ctl_elem_id
    63  	type		int32[SNDRV_CTL_ELEM_TYPE_NONE:SNDRV_CTL_ELEM_TYPE_LAST]
    64  	access		flags[snd_ctl_access, int32]
    65  	count		int32
    66  	owner		pid
    67  	items		len[names_ptr, int32]
    68  	item		int32
    69  	name		string[snd_ctl_elem_names, 64]
    70  	names_ptr	ptr64[in, array[string]]
    71  	names_length	bytesize[names_ptr, int32]
    72  	pad1		array[const[0, int8], 44]
    73  	pad		array[const[0, int8], 64]
    74  } [size[SND_CTL_ELEM_INFO_SIZE]]
    75  
    76  define SND_CTL_ELEM_INFO_SIZE	sizeof(struct snd_ctl_elem_info)
    77  
    78  snd_ctl_elem_value {
    79  	id		snd_ctl_elem_id
    80  	indirect	int32:1
    81  	value		array[intptr, 128]
    82  	reserved	array[const[0, int8], 128]
    83  }
    84  
    85  snd_ctl_tlv {
    86  	numid	int32
    87  	len	bytesize[tlv, int32]
    88  	tlv	array[int32]
    89  }
    90  
    91  snd_pcm_info {
    92  	dev	int32
    93  	subdev	int32
    94  	stream	int32
    95  	card	int32
    96  	id	array[const[0, int8], 64]
    97  	name	array[const[0, int8], 80]
    98  	subname	array[const[0, int8], 32]
    99  	devcl	int32
   100  	devscl	int32
   101  	count	int32
   102  	avail	int32
   103  	sync	array[int8, 16]
   104  	pad	array[const[0, int8], 64]
   105  }