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