github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_snd_hw.txt (about)

     1  # Copyright 2020 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/firewire.h>
     9  
    10  resource fd_snd_hw[fd]
    11  
    12  syz_open_dev$sndhw(dev ptr[in, string["/dev/snd/hwC#D#"]], id intptr, flags flags[open_flags]) fd_snd_hw
    13  read$sndhw(fd fd_snd_hw, buffer ptr[out, array[int8]], count bytesize[buffer])
    14  write$sndhw(fd fd_snd_hw, buffer ptr[in, array[int8]], count bytesize[buffer])
    15  
    16  # This syscall requires actual firewire hardware.
    17  write$sndhw_fireworks(fd fd_snd_hw, buffer ptr[in, snd_efw_transaction], count bytesize[buffer])
    18  
    19  ioctl$SNDRV_HWDEP_IOCTL_PVERSION(fd fd_snd_hw, cmd const[SNDRV_HWDEP_IOCTL_PVERSION], arg ptr[out, int32])
    20  ioctl$SNDRV_HWDEP_IOCTL_INFO(fd fd_snd_hw, cmd const[SNDRV_HWDEP_IOCTL_INFO], arg ptr[out, snd_hwdep_info])
    21  ioctl$SNDRV_HWDEP_IOCTL_DSP_STATUS(fd fd_snd_hw, cmd const[SNDRV_HWDEP_IOCTL_DSP_STATUS], arg ptr[out, snd_hwdep_dsp_status])
    22  ioctl$SNDRV_HWDEP_IOCTL_DSP_LOAD(fd fd_snd_hw, cmd const[SNDRV_HWDEP_IOCTL_DSP_LOAD], arg ptr[in, snd_hwdep_dsp_image])
    23  
    24  # These ioctls require actual firewire hardware.
    25  ioctl$SNDRV_FIREWIRE_IOCTL_GET_INFO(fd fd_snd_hw, cmd const[SNDRV_FIREWIRE_IOCTL_GET_INFO], arg ptr[out, snd_firewire_get_info])
    26  ioctl$SNDRV_FIREWIRE_IOCTL_LOCK(fd fd_snd_hw, cmd const[SNDRV_FIREWIRE_IOCTL_LOCK])
    27  ioctl$SNDRV_FIREWIRE_IOCTL_UNLOCK(fd fd_snd_hw, cmd const[SNDRV_FIREWIRE_IOCTL_UNLOCK])
    28  ioctl$SNDRV_FIREWIRE_IOCTL_TASCAM_STATE(fd fd_snd_hw, cmd const[SNDRV_FIREWIRE_IOCTL_TASCAM_STATE], arg ptr[out, snd_firewire_tascam_state])
    29  
    30  snd_hwdep_info {
    31  	device		int32
    32  	card		int32
    33  	id		array[int8, 64]
    34  	name		array[int8, 80]
    35  	iface		int32[SNDRV_HWDEP_IFACE_OPL2:SNDRV_HWDEP_IFACE_LAST]
    36  	reserved	array[int8, 64]
    37  }
    38  
    39  snd_hwdep_dsp_status {
    40  	version		int32
    41  	id		array[int8, 32]
    42  	num_dsps	int32
    43  	dsp_loaded	int32
    44  	chip_ready	int32
    45  	reserved	array[int8, 16]
    46  }
    47  
    48  snd_hwdep_dsp_image {
    49  	index		int32[0:31]
    50  	name		array[int8, 64]
    51  	image		ptr[in, array[int8]]
    52  	length		bytesize[image, intptr]
    53  	driver_data	intptr
    54  }
    55  
    56  snd_firewire_get_info {
    57  	type		int32[SNDRV_FIREWIRE_TYPE_DICE:SNDRV_FIREWIRE_TYPE_FIREFACE]
    58  	index		int32
    59  	quid		array[int32be, 2]
    60  	device_name	array[int8, 16]
    61  }
    62  
    63  snd_firewire_tascam_state {
    64  	data	array[int32be, SNDRV_FIREWIRE_TASCAM_STATE_COUNT]
    65  }
    66  
    67  snd_efw_transaction {
    68  	length		int32be
    69  	version		int32be
    70  	seqnum		int32be[0:SND_EFW_TRANSACTION_USER_SEQNUM_MAX]
    71  	category	int32be
    72  	command		int32be
    73  	status		int32be
    74  	params		array[int32be]
    75  }