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