| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** | 
 | 2 |  **************************************************************************** | 
 | 3 |  *** | 
 | 4 |  ***   This header was automatically generated from a Linux kernel header | 
 | 5 |  ***   of the same name, to make information necessary for userspace to | 
 | 6 |  ***   call into the kernel available to libc.  It contains only constants, | 
 | 7 |  ***   structures, and macros generated from the original header, and thus, | 
 | 8 |  ***   contains no copyrightable information. | 
 | 9 |  *** | 
 | 10 |  ***   To edit the content of this header, modify the corresponding | 
 | 11 |  ***   source file (e.g. under external/kernel-headers/original/) then | 
 | 12 |  ***   run bionic/libc/kernel/tools/update_all.py | 
 | 13 |  *** | 
 | 14 |  ***   Any manual change here will be lost the next time this script will | 
 | 15 |  ***   be run. You've been warned! | 
 | 16 |  *** | 
 | 17 |  **************************************************************************** | 
 | 18 |  ****************************************************************************/ | 
 | 19 | #ifndef _UAPI__SOUND_ASOUND_H | 
 | 20 | #define _UAPI__SOUND_ASOUND_H | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 21 | #ifdef __linux__ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 22 | #include <linux/types.h> | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 23 | #else | 
 | 24 | #include <sys/ioctl.h> | 
 | 25 | #endif | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 26 | #include <stdlib.h> | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 27 | #define SNDRV_PROTOCOL_VERSION(major,minor,subminor) (((major) << 16) | ((minor) << 8) | (subminor)) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 28 | #define SNDRV_PROTOCOL_MAJOR(version) (((version) >> 16) & 0xffff) | 
 | 29 | #define SNDRV_PROTOCOL_MINOR(version) (((version) >> 8) & 0xff) | 
 | 30 | #define SNDRV_PROTOCOL_MICRO(version) ((version) & 0xff) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 31 | #define SNDRV_PROTOCOL_INCOMPATIBLE(kversion,uversion) (SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || (SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && SNDRV_PROTOCOL_MINOR(kversion) != SNDRV_PROTOCOL_MINOR(uversion))) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 32 | struct snd_aes_iec958 { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 33 |   unsigned char status[24]; | 
 | 34 |   unsigned char subcode[147]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 35 |   unsigned char pad; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 36 |   unsigned char dig_subframe[4]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 37 | }; | 
 | 38 | struct snd_cea_861_aud_if { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 39 |   unsigned char db1_ct_cc; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 40 |   unsigned char db2_sf_ss; | 
 | 41 |   unsigned char db3; | 
 | 42 |   unsigned char db4_ca; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 43 |   unsigned char db5_dminh_lsv; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | }; | 
 | 45 | #define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1) | 
 | 46 | enum { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 47 |   SNDRV_HWDEP_IFACE_OPL2 = 0, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 48 |   SNDRV_HWDEP_IFACE_OPL3, | 
 | 49 |   SNDRV_HWDEP_IFACE_OPL4, | 
 | 50 |   SNDRV_HWDEP_IFACE_SB16CSP, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 51 |   SNDRV_HWDEP_IFACE_EMU10K1, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 52 |   SNDRV_HWDEP_IFACE_YSS225, | 
 | 53 |   SNDRV_HWDEP_IFACE_ICS2115, | 
 | 54 |   SNDRV_HWDEP_IFACE_SSCAPE, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 55 |   SNDRV_HWDEP_IFACE_VX, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 |   SNDRV_HWDEP_IFACE_MIXART, | 
 | 57 |   SNDRV_HWDEP_IFACE_USX2Y, | 
 | 58 |   SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 59 |   SNDRV_HWDEP_IFACE_BLUETOOTH, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 60 |   SNDRV_HWDEP_IFACE_USX2Y_PCM, | 
 | 61 |   SNDRV_HWDEP_IFACE_PCXHR, | 
 | 62 |   SNDRV_HWDEP_IFACE_SB_RC, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 63 |   SNDRV_HWDEP_IFACE_HDA, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 64 |   SNDRV_HWDEP_IFACE_USB_STREAM, | 
 | 65 |   SNDRV_HWDEP_IFACE_FW_DICE, | 
 | 66 |   SNDRV_HWDEP_IFACE_FW_FIREWORKS, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 67 |   SNDRV_HWDEP_IFACE_FW_BEBOB, | 
 | 68 |   SNDRV_HWDEP_IFACE_FW_OXFW, | 
 | 69 |   SNDRV_HWDEP_IFACE_FW_DIGI00X, | 
 | 70 |   SNDRV_HWDEP_IFACE_FW_TASCAM, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 71 |   SNDRV_HWDEP_IFACE_LINE6, | 
| Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 72 |   SNDRV_HWDEP_IFACE_FW_MOTU, | 
 | 73 |   SNDRV_HWDEP_IFACE_FW_FIREFACE, | 
 | 74 |   SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE | 
| Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 75 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 76 | struct snd_hwdep_info { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 77 |   unsigned int device; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 78 |   int card; | 
 | 79 |   unsigned char id[64]; | 
 | 80 |   unsigned char name[80]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 81 |   int iface; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 82 |   unsigned char reserved[64]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 83 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 84 | struct snd_hwdep_dsp_status { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 85 |   unsigned int version; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 86 |   unsigned char id[32]; | 
 | 87 |   unsigned int num_dsps; | 
 | 88 |   unsigned int dsp_loaded; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 89 |   unsigned int chip_ready; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 90 |   unsigned char reserved[16]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 92 | struct snd_hwdep_dsp_image { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 93 |   unsigned int index; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 94 |   unsigned char name[64]; | 
 | 95 |   unsigned char __user * image; | 
 | 96 |   size_t length; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 97 |   unsigned long driver_data; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 99 | #define SNDRV_HWDEP_IOCTL_PVERSION _IOR('H', 0x00, int) | 
 | 100 | #define SNDRV_HWDEP_IOCTL_INFO _IOR('H', 0x01, struct snd_hwdep_info) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 101 | #define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 102 | #define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image) | 
| Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 103 | #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 14) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 104 | typedef unsigned long snd_pcm_uframes_t; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 105 | typedef signed long snd_pcm_sframes_t; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 106 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 107 |   SNDRV_PCM_CLASS_GENERIC = 0, | 
 | 108 |   SNDRV_PCM_CLASS_MULTI, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 109 |   SNDRV_PCM_CLASS_MODEM, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 110 |   SNDRV_PCM_CLASS_DIGITIZER, | 
 | 111 |   SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER, | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 112 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 113 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 114 |   SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0, | 
 | 115 |   SNDRV_PCM_SUBCLASS_MULTI_MIX, | 
 | 116 |   SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 117 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 118 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 119 |   SNDRV_PCM_STREAM_PLAYBACK = 0, | 
 | 120 |   SNDRV_PCM_STREAM_CAPTURE, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 121 |   SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 122 | }; | 
 | 123 | typedef int __bitwise snd_pcm_access_t; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 124 | #define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((__force snd_pcm_access_t) 0) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 125 | #define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((__force snd_pcm_access_t) 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 126 | #define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((__force snd_pcm_access_t) 2) | 
 | 127 | #define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((__force snd_pcm_access_t) 3) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 128 | #define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((__force snd_pcm_access_t) 4) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 129 | #define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 130 | typedef int __bitwise snd_pcm_format_t; | 
 | 131 | #define SNDRV_PCM_FORMAT_S8 ((__force snd_pcm_format_t) 0) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 132 | #define SNDRV_PCM_FORMAT_U8 ((__force snd_pcm_format_t) 1) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 133 | #define SNDRV_PCM_FORMAT_S16_LE ((__force snd_pcm_format_t) 2) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 134 | #define SNDRV_PCM_FORMAT_S16_BE ((__force snd_pcm_format_t) 3) | 
 | 135 | #define SNDRV_PCM_FORMAT_U16_LE ((__force snd_pcm_format_t) 4) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 136 | #define SNDRV_PCM_FORMAT_U16_BE ((__force snd_pcm_format_t) 5) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 137 | #define SNDRV_PCM_FORMAT_S24_LE ((__force snd_pcm_format_t) 6) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 138 | #define SNDRV_PCM_FORMAT_S24_BE ((__force snd_pcm_format_t) 7) | 
 | 139 | #define SNDRV_PCM_FORMAT_U24_LE ((__force snd_pcm_format_t) 8) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 140 | #define SNDRV_PCM_FORMAT_U24_BE ((__force snd_pcm_format_t) 9) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 141 | #define SNDRV_PCM_FORMAT_S32_LE ((__force snd_pcm_format_t) 10) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 142 | #define SNDRV_PCM_FORMAT_S32_BE ((__force snd_pcm_format_t) 11) | 
 | 143 | #define SNDRV_PCM_FORMAT_U32_LE ((__force snd_pcm_format_t) 12) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 144 | #define SNDRV_PCM_FORMAT_U32_BE ((__force snd_pcm_format_t) 13) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 145 | #define SNDRV_PCM_FORMAT_FLOAT_LE ((__force snd_pcm_format_t) 14) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 146 | #define SNDRV_PCM_FORMAT_FLOAT_BE ((__force snd_pcm_format_t) 15) | 
 | 147 | #define SNDRV_PCM_FORMAT_FLOAT64_LE ((__force snd_pcm_format_t) 16) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 148 | #define SNDRV_PCM_FORMAT_FLOAT64_BE ((__force snd_pcm_format_t) 17) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 149 | #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((__force snd_pcm_format_t) 18) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 150 | #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((__force snd_pcm_format_t) 19) | 
 | 151 | #define SNDRV_PCM_FORMAT_MU_LAW ((__force snd_pcm_format_t) 20) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 152 | #define SNDRV_PCM_FORMAT_A_LAW ((__force snd_pcm_format_t) 21) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 153 | #define SNDRV_PCM_FORMAT_IMA_ADPCM ((__force snd_pcm_format_t) 22) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 154 | #define SNDRV_PCM_FORMAT_MPEG ((__force snd_pcm_format_t) 23) | 
 | 155 | #define SNDRV_PCM_FORMAT_GSM ((__force snd_pcm_format_t) 24) | 
| Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 156 | #define SNDRV_PCM_FORMAT_S20_LE ((__force snd_pcm_format_t) 25) | 
 | 157 | #define SNDRV_PCM_FORMAT_S20_BE ((__force snd_pcm_format_t) 26) | 
 | 158 | #define SNDRV_PCM_FORMAT_U20_LE ((__force snd_pcm_format_t) 27) | 
 | 159 | #define SNDRV_PCM_FORMAT_U20_BE ((__force snd_pcm_format_t) 28) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 160 | #define SNDRV_PCM_FORMAT_SPECIAL ((__force snd_pcm_format_t) 31) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 161 | #define SNDRV_PCM_FORMAT_S24_3LE ((__force snd_pcm_format_t) 32) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 162 | #define SNDRV_PCM_FORMAT_S24_3BE ((__force snd_pcm_format_t) 33) | 
 | 163 | #define SNDRV_PCM_FORMAT_U24_3LE ((__force snd_pcm_format_t) 34) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 164 | #define SNDRV_PCM_FORMAT_U24_3BE ((__force snd_pcm_format_t) 35) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 165 | #define SNDRV_PCM_FORMAT_S20_3LE ((__force snd_pcm_format_t) 36) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 166 | #define SNDRV_PCM_FORMAT_S20_3BE ((__force snd_pcm_format_t) 37) | 
 | 167 | #define SNDRV_PCM_FORMAT_U20_3LE ((__force snd_pcm_format_t) 38) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 168 | #define SNDRV_PCM_FORMAT_U20_3BE ((__force snd_pcm_format_t) 39) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 169 | #define SNDRV_PCM_FORMAT_S18_3LE ((__force snd_pcm_format_t) 40) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 170 | #define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41) | 
 | 171 | #define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 172 | #define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 173 | #define SNDRV_PCM_FORMAT_G723_24 ((__force snd_pcm_format_t) 44) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 174 | #define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45) | 
 | 175 | #define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 176 | #define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 177 | #define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 178 | #define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) | 
| Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 179 | #define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50) | 
 | 180 | #define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 181 | #define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) | 
| Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 182 | #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE | 
| Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 183 | #define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 184 | #ifdef SNDRV_LITTLE_ENDIAN | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 185 | #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 186 | #define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_LE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 187 | #define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_LE | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 188 | #define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_LE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 189 | #define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_LE | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 190 | #define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_LE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 191 | #define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 192 | #define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 193 | #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE | 
| Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 194 | #define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_LE | 
 | 195 | #define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_LE | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 196 | #endif | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 197 | #ifdef SNDRV_BIG_ENDIAN | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 198 | #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 199 | #define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_BE | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 200 | #define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_BE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 201 | #define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_BE | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 202 | #define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_BE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 203 | #define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_BE | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 204 | #define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 205 | #define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 206 | #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE | 
| Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 207 | #define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_BE | 
 | 208 | #define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 209 | #endif | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 210 | typedef int __bitwise snd_pcm_subformat_t; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 211 | #define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 212 | #define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 213 | #define SNDRV_PCM_INFO_MMAP 0x00000001 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 214 | #define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 215 | #define SNDRV_PCM_INFO_DOUBLE 0x00000004 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 216 | #define SNDRV_PCM_INFO_BATCH 0x00000010 | 
| Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 217 | #define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 218 | #define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 219 | #define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 220 | #define SNDRV_PCM_INFO_COMPLEX 0x00000400 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 221 | #define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 222 | #define SNDRV_PCM_INFO_OVERRANGE 0x00020000 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 223 | #define SNDRV_PCM_INFO_RESUME 0x00040000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 224 | #define SNDRV_PCM_INFO_PAUSE 0x00080000 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 225 | #define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 226 | #define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 227 | #define SNDRV_PCM_INFO_SYNC_START 0x00400000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 228 | #define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 229 | #define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 230 | #define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 231 | #define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME 0x02000000 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 232 | #define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000 | 
 | 233 | #define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 | 
 | 234 | #define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 235 | #define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 236 | typedef int __bitwise snd_pcm_state_t; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 237 | #define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 238 | #define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 239 | #define SNDRV_PCM_STATE_PREPARED ((__force snd_pcm_state_t) 2) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 240 | #define SNDRV_PCM_STATE_RUNNING ((__force snd_pcm_state_t) 3) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 241 | #define SNDRV_PCM_STATE_XRUN ((__force snd_pcm_state_t) 4) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 242 | #define SNDRV_PCM_STATE_DRAINING ((__force snd_pcm_state_t) 5) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 243 | #define SNDRV_PCM_STATE_PAUSED ((__force snd_pcm_state_t) 6) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 244 | #define SNDRV_PCM_STATE_SUSPENDED ((__force snd_pcm_state_t) 7) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 245 | #define SNDRV_PCM_STATE_DISCONNECTED ((__force snd_pcm_state_t) 8) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 246 | #define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 247 | enum { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 248 |   SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 249 |   SNDRV_PCM_MMAP_OFFSET_STATUS = 0x80000000, | 
 | 250 |   SNDRV_PCM_MMAP_OFFSET_CONTROL = 0x81000000, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 251 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 252 | union snd_pcm_sync_id { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 253 |   unsigned char id[16]; | 
 | 254 |   unsigned short id16[8]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 255 |   unsigned int id32[4]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 256 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 257 | struct snd_pcm_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 258 |   unsigned int device; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 259 |   unsigned int subdevice; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 260 |   int stream; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 261 |   int card; | 
 | 262 |   unsigned char id[64]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 263 |   unsigned char name[80]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 264 |   unsigned char subname[32]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 265 |   int dev_class; | 
 | 266 |   int dev_subclass; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 267 |   unsigned int subdevices_count; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 268 |   unsigned int subdevices_avail; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 269 |   union snd_pcm_sync_id sync; | 
 | 270 |   unsigned char reserved[64]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 271 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 272 | typedef int snd_pcm_hw_param_t; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 273 | #define SNDRV_PCM_HW_PARAM_ACCESS 0 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 274 | #define SNDRV_PCM_HW_PARAM_FORMAT 1 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 275 | #define SNDRV_PCM_HW_PARAM_SUBFORMAT 2 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 276 | #define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 277 | #define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 278 | #define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 279 | #define SNDRV_PCM_HW_PARAM_FRAME_BITS 9 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 280 | #define SNDRV_PCM_HW_PARAM_CHANNELS 10 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 281 | #define SNDRV_PCM_HW_PARAM_RATE 11 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 282 | #define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 283 | #define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 284 | #define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 285 | #define SNDRV_PCM_HW_PARAM_PERIODS 15 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 286 | #define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 287 | #define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 288 | #define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 289 | #define SNDRV_PCM_HW_PARAM_TICK_TIME 19 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 290 | #define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 291 | #define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 292 | #define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1 << 0) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 293 | #define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1 << 1) | 
 | 294 | #define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1 << 2) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 295 | struct snd_interval { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 296 |   unsigned int min, max; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 297 |   unsigned int openmin : 1, openmax : 1, integer : 1, empty : 1; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 298 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 299 | #define SNDRV_MASK_MAX 256 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 300 | struct snd_mask { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 301 |   __u32 bits[(SNDRV_MASK_MAX + 31) / 32]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 302 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 303 | struct snd_pcm_hw_params { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 304 |   unsigned int flags; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 305 |   struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; | 
 | 306 |   struct snd_mask mres[5]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 307 |   struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 308 |   struct snd_interval ires[9]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 309 |   unsigned int rmask; | 
 | 310 |   unsigned int cmask; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 311 |   unsigned int info; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 312 |   unsigned int msbits; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 313 |   unsigned int rate_num; | 
 | 314 |   unsigned int rate_den; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 315 |   snd_pcm_uframes_t fifo_size; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 316 |   unsigned char reserved[64]; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 317 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 318 | enum { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 319 |   SNDRV_PCM_TSTAMP_NONE = 0, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 320 |   SNDRV_PCM_TSTAMP_ENABLE, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 321 |   SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_ENABLE, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 322 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 323 | struct snd_pcm_sw_params { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 324 |   int tstamp_mode; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 325 |   unsigned int period_step; | 
 | 326 |   unsigned int sleep_min; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 327 |   snd_pcm_uframes_t avail_min; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 328 |   snd_pcm_uframes_t xfer_align; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 329 |   snd_pcm_uframes_t start_threshold; | 
 | 330 |   snd_pcm_uframes_t stop_threshold; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 331 |   snd_pcm_uframes_t silence_threshold; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 332 |   snd_pcm_uframes_t silence_size; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 333 |   snd_pcm_uframes_t boundary; | 
 | 334 |   unsigned int proto; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 335 |   unsigned int tstamp_type; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 336 |   unsigned char reserved[56]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 337 | }; | 
 | 338 | struct snd_pcm_channel_info { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 339 |   unsigned int channel; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 340 |   __kernel_off_t offset; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 341 |   unsigned int first; | 
 | 342 |   unsigned int step; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 343 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 344 | enum { | 
 | 345 |   SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0, | 
 | 346 |   SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 347 |   SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 348 |   SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, | 
 | 349 |   SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, | 
 | 350 |   SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 351 |   SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 352 | }; | 
 | 353 | struct snd_pcm_status { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 354 |   snd_pcm_state_t state; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 355 |   struct timespec trigger_tstamp; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 356 |   struct timespec tstamp; | 
 | 357 |   snd_pcm_uframes_t appl_ptr; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 358 |   snd_pcm_uframes_t hw_ptr; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 359 |   snd_pcm_sframes_t delay; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 360 |   snd_pcm_uframes_t avail; | 
 | 361 |   snd_pcm_uframes_t avail_max; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 362 |   snd_pcm_uframes_t overrange; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 363 |   snd_pcm_state_t suspended_state; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 364 |   __u32 audio_tstamp_data; | 
 | 365 |   struct timespec audio_tstamp; | 
 | 366 |   struct timespec driver_tstamp; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 367 |   __u32 audio_tstamp_accuracy; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 368 |   unsigned char reserved[52 - 2 * sizeof(struct timespec)]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 369 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 370 | struct snd_pcm_mmap_status { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 371 |   snd_pcm_state_t state; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 372 |   int pad1; | 
 | 373 |   snd_pcm_uframes_t hw_ptr; | 
 | 374 |   struct timespec tstamp; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 375 |   snd_pcm_state_t suspended_state; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 376 |   struct timespec audio_tstamp; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 377 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 378 | struct snd_pcm_mmap_control { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 379 |   snd_pcm_uframes_t appl_ptr; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 380 |   snd_pcm_uframes_t avail_min; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 381 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 382 | #define SNDRV_PCM_SYNC_PTR_HWSYNC (1 << 0) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 383 | #define SNDRV_PCM_SYNC_PTR_APPL (1 << 1) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 384 | #define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1 << 2) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 385 | struct snd_pcm_sync_ptr { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 386 |   unsigned int flags; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 387 |   union { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 388 |     struct snd_pcm_mmap_status status; | 
 | 389 |     unsigned char reserved[64]; | 
 | 390 |   } s; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 391 |   union { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 392 |     struct snd_pcm_mmap_control control; | 
 | 393 |     unsigned char reserved[64]; | 
 | 394 |   } c; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 395 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 396 | struct snd_xferi { | 
 | 397 |   snd_pcm_sframes_t result; | 
 | 398 |   void __user * buf; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 399 |   snd_pcm_uframes_t frames; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 400 | }; | 
 | 401 | struct snd_xfern { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 402 |   snd_pcm_sframes_t result; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 403 |   void __user * __user * bufs; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 404 |   snd_pcm_uframes_t frames; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 405 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 406 | enum { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 407 |   SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 408 |   SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, | 
 | 409 |   SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, | 
 | 410 |   SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 411 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 412 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 413 |   SNDRV_CHMAP_UNKNOWN = 0, | 
 | 414 |   SNDRV_CHMAP_NA, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 415 |   SNDRV_CHMAP_MONO, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 416 |   SNDRV_CHMAP_FL, | 
 | 417 |   SNDRV_CHMAP_FR, | 
 | 418 |   SNDRV_CHMAP_RL, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 419 |   SNDRV_CHMAP_RR, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 420 |   SNDRV_CHMAP_FC, | 
 | 421 |   SNDRV_CHMAP_LFE, | 
 | 422 |   SNDRV_CHMAP_SL, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 423 |   SNDRV_CHMAP_SR, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 424 |   SNDRV_CHMAP_RC, | 
 | 425 |   SNDRV_CHMAP_FLC, | 
 | 426 |   SNDRV_CHMAP_FRC, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 427 |   SNDRV_CHMAP_RLC, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 428 |   SNDRV_CHMAP_RRC, | 
 | 429 |   SNDRV_CHMAP_FLW, | 
 | 430 |   SNDRV_CHMAP_FRW, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 431 |   SNDRV_CHMAP_FLH, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 432 |   SNDRV_CHMAP_FCH, | 
 | 433 |   SNDRV_CHMAP_FRH, | 
 | 434 |   SNDRV_CHMAP_TC, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 435 |   SNDRV_CHMAP_TFL, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 436 |   SNDRV_CHMAP_TFR, | 
 | 437 |   SNDRV_CHMAP_TFC, | 
 | 438 |   SNDRV_CHMAP_TRL, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 439 |   SNDRV_CHMAP_TRR, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 440 |   SNDRV_CHMAP_TRC, | 
 | 441 |   SNDRV_CHMAP_TFLC, | 
 | 442 |   SNDRV_CHMAP_TFRC, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 443 |   SNDRV_CHMAP_TSL, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 444 |   SNDRV_CHMAP_TSR, | 
 | 445 |   SNDRV_CHMAP_LLFE, | 
 | 446 |   SNDRV_CHMAP_RLFE, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 447 |   SNDRV_CHMAP_BC, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 448 |   SNDRV_CHMAP_BLC, | 
 | 449 |   SNDRV_CHMAP_BRC, | 
 | 450 |   SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 451 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 452 | #define SNDRV_CHMAP_POSITION_MASK 0xffff | 
 | 453 | #define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16) | 
 | 454 | #define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 455 | #define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 456 | #define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info) | 
 | 457 | #define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int) | 
 | 458 | #define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int) | 
| Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 459 | #define SNDRV_PCM_IOCTL_USER_PVERSION _IOW('A', 0x04, int) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 460 | #define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 461 | #define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params) | 
 | 462 | #define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12) | 
 | 463 | #define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 464 | #define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 465 | #define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t) | 
 | 466 | #define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22) | 
 | 467 | #define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 468 | #define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 469 | #define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 470 | #define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40) | 
 | 471 | #define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 472 | #define SNDRV_PCM_IOCTL_START _IO('A', 0x42) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 473 | #define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 474 | #define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44) | 
 | 475 | #define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 476 | #define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 477 | #define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 478 | #define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48) | 
 | 479 | #define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 480 | #define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 481 | #define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 482 | #define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern) | 
 | 483 | #define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 484 | #define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 485 | #define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 486 | #define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 0) | 
 | 487 | enum { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 488 |   SNDRV_RAWMIDI_STREAM_OUTPUT = 0, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 489 |   SNDRV_RAWMIDI_STREAM_INPUT, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 490 |   SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 491 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 492 | #define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 493 | #define SNDRV_RAWMIDI_INFO_INPUT 0x00000002 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 494 | #define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004 | 
 | 495 | struct snd_rawmidi_info { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 496 |   unsigned int device; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 497 |   unsigned int subdevice; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 498 |   int stream; | 
 | 499 |   int card; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 500 |   unsigned int flags; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 501 |   unsigned char id[64]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 502 |   unsigned char name[80]; | 
 | 503 |   unsigned char subname[32]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 504 |   unsigned int subdevices_count; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 505 |   unsigned int subdevices_avail; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 506 |   unsigned char reserved[64]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 507 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 508 | struct snd_rawmidi_params { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 509 |   int stream; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 510 |   size_t buffer_size; | 
 | 511 |   size_t avail_min; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 512 |   unsigned int no_active_sensing : 1; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 513 |   unsigned char reserved[16]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 514 | }; | 
 | 515 | struct snd_rawmidi_status { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 516 |   int stream; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 517 |   struct timespec tstamp; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 518 |   size_t avail; | 
 | 519 |   size_t xruns; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 520 |   unsigned char reserved[16]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 521 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 522 | #define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int) | 
 | 523 | #define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 524 | #define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 525 | #define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 526 | #define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int) | 
 | 527 | #define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 528 | #define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 529 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 530 |   SNDRV_TIMER_CLASS_NONE = - 1, | 
 | 531 |   SNDRV_TIMER_CLASS_SLAVE = 0, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 532 |   SNDRV_TIMER_CLASS_GLOBAL, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 533 |   SNDRV_TIMER_CLASS_CARD, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 534 |   SNDRV_TIMER_CLASS_PCM, | 
 | 535 |   SNDRV_TIMER_CLASS_LAST = SNDRV_TIMER_CLASS_PCM, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 536 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 537 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 538 |   SNDRV_TIMER_SCLASS_NONE = 0, | 
 | 539 |   SNDRV_TIMER_SCLASS_APPLICATION, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 540 |   SNDRV_TIMER_SCLASS_SEQUENCER, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 541 |   SNDRV_TIMER_SCLASS_OSS_SEQUENCER, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 542 |   SNDRV_TIMER_SCLASS_LAST = SNDRV_TIMER_SCLASS_OSS_SEQUENCER, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 543 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 544 | #define SNDRV_TIMER_GLOBAL_SYSTEM 0 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 545 | #define SNDRV_TIMER_GLOBAL_RTC 1 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 546 | #define SNDRV_TIMER_GLOBAL_HPET 2 | 
 | 547 | #define SNDRV_TIMER_GLOBAL_HRTIMER 3 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 548 | #define SNDRV_TIMER_FLG_SLAVE (1 << 0) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 549 | struct snd_timer_id { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 550 |   int dev_class; | 
 | 551 |   int dev_sclass; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 552 |   int card; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 553 |   int device; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 554 |   int subdevice; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 555 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 556 | struct snd_timer_ginfo { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 557 |   struct snd_timer_id tid; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 558 |   unsigned int flags; | 
 | 559 |   int card; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 560 |   unsigned char id[64]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 561 |   unsigned char name[80]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 562 |   unsigned long reserved0; | 
 | 563 |   unsigned long resolution; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 564 |   unsigned long resolution_min; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 565 |   unsigned long resolution_max; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 566 |   unsigned int clients; | 
 | 567 |   unsigned char reserved[32]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 568 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 569 | struct snd_timer_gparams { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 570 |   struct snd_timer_id tid; | 
 | 571 |   unsigned long period_num; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 572 |   unsigned long period_den; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 573 |   unsigned char reserved[32]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 574 | }; | 
 | 575 | struct snd_timer_gstatus { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 576 |   struct snd_timer_id tid; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 577 |   unsigned long resolution; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 578 |   unsigned long resolution_num; | 
 | 579 |   unsigned long resolution_den; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 580 |   unsigned char reserved[32]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 581 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 582 | struct snd_timer_select { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 583 |   struct snd_timer_id id; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 584 |   unsigned char reserved[32]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 585 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 586 | struct snd_timer_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 587 |   unsigned int flags; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 588 |   int card; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 589 |   unsigned char id[64]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 590 |   unsigned char name[80]; | 
 | 591 |   unsigned long reserved0; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 592 |   unsigned long resolution; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 593 |   unsigned char reserved[64]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 594 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 595 | #define SNDRV_TIMER_PSFLG_AUTO (1 << 0) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 596 | #define SNDRV_TIMER_PSFLG_EXCLUSIVE (1 << 1) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 597 | #define SNDRV_TIMER_PSFLG_EARLY_EVENT (1 << 2) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 598 | struct snd_timer_params { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 599 |   unsigned int flags; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 600 |   unsigned int ticks; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 601 |   unsigned int queue_size; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 602 |   unsigned int reserved0; | 
 | 603 |   unsigned int filter; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 604 |   unsigned char reserved[60]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 605 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 606 | struct snd_timer_status { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 607 |   struct timespec tstamp; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 608 |   unsigned int resolution; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 609 |   unsigned int lost; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 610 |   unsigned int overrun; | 
 | 611 |   unsigned int queue; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 612 |   unsigned char reserved[64]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 613 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 614 | #define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int) | 
 | 615 | #define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 616 | #define SNDRV_TIMER_IOCTL_TREAD _IOW('T', 0x02, int) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 617 | #define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 618 | #define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams) | 
 | 619 | #define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 620 | #define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 621 | #define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 622 | #define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params) | 
 | 623 | #define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 624 | #define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 625 | #define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 626 | #define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2) | 
 | 627 | #define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 628 | struct snd_timer_read { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 629 |   unsigned int resolution; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 630 |   unsigned int ticks; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 631 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 632 | enum { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 633 |   SNDRV_TIMER_EVENT_RESOLUTION = 0, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 634 |   SNDRV_TIMER_EVENT_TICK, | 
 | 635 |   SNDRV_TIMER_EVENT_START, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 636 |   SNDRV_TIMER_EVENT_STOP, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 637 |   SNDRV_TIMER_EVENT_CONTINUE, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 638 |   SNDRV_TIMER_EVENT_PAUSE, | 
 | 639 |   SNDRV_TIMER_EVENT_EARLY, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 640 |   SNDRV_TIMER_EVENT_SUSPEND, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 641 |   SNDRV_TIMER_EVENT_RESUME, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 642 |   SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10, | 
 | 643 |   SNDRV_TIMER_EVENT_MSTOP = SNDRV_TIMER_EVENT_STOP + 10, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 644 |   SNDRV_TIMER_EVENT_MCONTINUE = SNDRV_TIMER_EVENT_CONTINUE + 10, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 645 |   SNDRV_TIMER_EVENT_MPAUSE = SNDRV_TIMER_EVENT_PAUSE + 10, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 646 |   SNDRV_TIMER_EVENT_MSUSPEND = SNDRV_TIMER_EVENT_SUSPEND + 10, | 
 | 647 |   SNDRV_TIMER_EVENT_MRESUME = SNDRV_TIMER_EVENT_RESUME + 10, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 648 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 649 | struct snd_timer_tread { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 650 |   int event; | 
 | 651 |   struct timespec tstamp; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 652 |   unsigned int val; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 653 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 654 | #define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7) | 
 | 655 | struct snd_ctl_card_info { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 656 |   int card; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 657 |   int pad; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 658 |   unsigned char id[16]; | 
 | 659 |   unsigned char driver[16]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 660 |   unsigned char name[32]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 661 |   unsigned char longname[80]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 662 |   unsigned char reserved_[16]; | 
 | 663 |   unsigned char mixername[80]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 664 |   unsigned char components[128]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 665 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 666 | typedef int __bitwise snd_ctl_elem_type_t; | 
 | 667 | #define SNDRV_CTL_ELEM_TYPE_NONE ((__force snd_ctl_elem_type_t) 0) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 668 | #define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((__force snd_ctl_elem_type_t) 1) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 669 | #define SNDRV_CTL_ELEM_TYPE_INTEGER ((__force snd_ctl_elem_type_t) 2) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 670 | #define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((__force snd_ctl_elem_type_t) 3) | 
 | 671 | #define SNDRV_CTL_ELEM_TYPE_BYTES ((__force snd_ctl_elem_type_t) 4) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 672 | #define SNDRV_CTL_ELEM_TYPE_IEC958 ((__force snd_ctl_elem_type_t) 5) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 673 | #define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((__force snd_ctl_elem_type_t) 6) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 674 | #define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64 | 
 | 675 | typedef int __bitwise snd_ctl_elem_iface_t; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 676 | #define SNDRV_CTL_ELEM_IFACE_CARD ((__force snd_ctl_elem_iface_t) 0) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 677 | #define SNDRV_CTL_ELEM_IFACE_HWDEP ((__force snd_ctl_elem_iface_t) 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 678 | #define SNDRV_CTL_ELEM_IFACE_MIXER ((__force snd_ctl_elem_iface_t) 2) | 
 | 679 | #define SNDRV_CTL_ELEM_IFACE_PCM ((__force snd_ctl_elem_iface_t) 3) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 680 | #define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((__force snd_ctl_elem_iface_t) 4) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 681 | #define SNDRV_CTL_ELEM_IFACE_TIMER ((__force snd_ctl_elem_iface_t) 5) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 682 | #define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((__force snd_ctl_elem_iface_t) 6) | 
 | 683 | #define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 684 | #define SNDRV_CTL_ELEM_ACCESS_READ (1 << 0) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 685 | #define SNDRV_CTL_ELEM_ACCESS_WRITE (1 << 1) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 686 | #define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE) | 
 | 687 | #define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1 << 2) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 688 | #define SNDRV_CTL_ELEM_ACCESS_TIMESTAMP (1 << 3) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 689 | #define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1 << 4) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 690 | #define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1 << 5) | 
 | 691 | #define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 692 | #define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1 << 6) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 693 | #define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1 << 8) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 694 | #define SNDRV_CTL_ELEM_ACCESS_LOCK (1 << 9) | 
 | 695 | #define SNDRV_CTL_ELEM_ACCESS_OWNER (1 << 10) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 696 | #define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1 << 28) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 697 | #define SNDRV_CTL_ELEM_ACCESS_USER (1 << 29) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 698 | #define SNDRV_CTL_POWER_D0 0x0000 | 
 | 699 | #define SNDRV_CTL_POWER_D1 0x0100 | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 700 | #define SNDRV_CTL_POWER_D2 0x0200 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 701 | #define SNDRV_CTL_POWER_D3 0x0300 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 702 | #define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3 | 0x0000) | 
 | 703 | #define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3 | 0x0001) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 704 | #define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 705 | struct snd_ctl_elem_id { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 706 |   unsigned int numid; | 
 | 707 |   snd_ctl_elem_iface_t iface; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 708 |   unsigned int device; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 709 |   unsigned int subdevice; | 
 | 710 |   unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 711 |   unsigned int index; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 712 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 713 | struct snd_ctl_elem_list { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 714 |   unsigned int offset; | 
 | 715 |   unsigned int space; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 716 |   unsigned int used; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 717 |   unsigned int count; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 718 |   struct snd_ctl_elem_id __user * pids; | 
 | 719 |   unsigned char reserved[50]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 720 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 721 | struct snd_ctl_elem_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 722 |   struct snd_ctl_elem_id id; | 
 | 723 |   snd_ctl_elem_type_t type; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 724 |   unsigned int access; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 725 |   unsigned int count; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 726 |   __kernel_pid_t owner; | 
 | 727 |   union { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 728 |     struct { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 729 |       long min; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 730 |       long max; | 
 | 731 |       long step; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 732 |     } integer; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 733 |     struct { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 734 |       long long min; | 
 | 735 |       long long max; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 736 |       long long step; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 737 |     } integer64; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 738 |     struct { | 
 | 739 |       unsigned int items; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 740 |       unsigned int item; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 741 |       char name[64]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 742 |       __u64 names_ptr; | 
 | 743 |       unsigned int names_length; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 744 |     } enumerated; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 745 |     unsigned char reserved[128]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 746 |   } value; | 
 | 747 |   union { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 748 |     unsigned short d[4]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 749 |     unsigned short * d_ptr; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 750 |   } dimen; | 
 | 751 |   unsigned char reserved[64 - 4 * sizeof(unsigned short)]; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 752 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 753 | struct snd_ctl_elem_value { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 754 |   struct snd_ctl_elem_id id; | 
 | 755 |   unsigned int indirect : 1; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 756 |   union { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 757 |     union { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 758 |       long value[128]; | 
 | 759 |       long * value_ptr; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 760 |     } integer; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 761 |     union { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 762 |       long long value[64]; | 
 | 763 |       long long * value_ptr; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 764 |     } integer64; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 765 |     union { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 766 |       unsigned int item[128]; | 
 | 767 |       unsigned int * item_ptr; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 768 |     } enumerated; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 769 |     union { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 770 |       unsigned char data[512]; | 
 | 771 |       unsigned char * data_ptr; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 772 |     } bytes; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 773 |     struct snd_aes_iec958 iec958; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 774 |   } value; | 
 | 775 |   struct timespec tstamp; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 776 |   unsigned char reserved[128 - sizeof(struct timespec)]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 777 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 778 | struct snd_ctl_tlv { | 
 | 779 |   unsigned int numid; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 780 |   unsigned int length; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 781 |   unsigned int tlv[0]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 782 | }; | 
 | 783 | #define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 784 | #define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 785 | #define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 786 | #define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info) | 
 | 787 | #define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 788 | #define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 789 | #define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 790 | #define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id) | 
 | 791 | #define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 792 | #define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 793 | #define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 794 | #define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id) | 
 | 795 | #define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 796 | #define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 797 | #define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 798 | #define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int) | 
 | 799 | #define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 800 | #define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 801 | #define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 802 | #define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int) | 
 | 803 | #define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 804 | #define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 805 | #define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 806 | #define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int) | 
 | 807 | #define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 808 | enum sndrv_ctl_event_type { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 809 |   SNDRV_CTL_EVENT_ELEM = 0, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 810 |   SNDRV_CTL_EVENT_LAST = SNDRV_CTL_EVENT_ELEM, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 811 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 812 | #define SNDRV_CTL_EVENT_MASK_VALUE (1 << 0) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 813 | #define SNDRV_CTL_EVENT_MASK_INFO (1 << 1) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 814 | #define SNDRV_CTL_EVENT_MASK_ADD (1 << 2) | 
 | 815 | #define SNDRV_CTL_EVENT_MASK_TLV (1 << 3) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 816 | #define SNDRV_CTL_EVENT_MASK_REMOVE (~0U) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 817 | struct snd_ctl_event { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 818 |   int type; | 
 | 819 |   union { | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 820 |     struct { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 821 |       unsigned int mask; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 822 |       struct snd_ctl_elem_id id; | 
 | 823 |     } elem; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 824 |     unsigned char data8[60]; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 825 |   } data; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 826 | }; | 
 | 827 | #define SNDRV_CTL_NAME_NONE "" | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 828 | #define SNDRV_CTL_NAME_PLAYBACK "Playback " | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 829 | #define SNDRV_CTL_NAME_CAPTURE "Capture " | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 830 | #define SNDRV_CTL_NAME_IEC958_NONE "" | 
 | 831 | #define SNDRV_CTL_NAME_IEC958_SWITCH "Switch" | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 832 | #define SNDRV_CTL_NAME_IEC958_VOLUME "Volume" | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 833 | #define SNDRV_CTL_NAME_IEC958_DEFAULT "Default" | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 834 | #define SNDRV_CTL_NAME_IEC958_MASK "Mask" | 
 | 835 | #define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask" | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 836 | #define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask" | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 837 | #define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream" | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 838 | #define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_ ##direction SNDRV_CTL_NAME_IEC958_ ##what | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 839 | #endif |