23 #ifndef __SOUND_ASOUND_H
24 #define __SOUND_ASOUND_H
26 #include <linux/types.h>
30 #include <linux/time.h>
31 #include <asm/byteorder.h>
33 #ifdef __LITTLE_ENDIAN
34 #define SNDRV_LITTLE_ENDIAN
37 #define SNDRV_BIG_ENDIAN
39 #error "Unsupported endian..."
49 #define SNDRV_PROTOCOL_VERSION(major, minor, subminor) (((major)<<16)|((minor)<<8)|(subminor))
50 #define SNDRV_PROTOCOL_MAJOR(version) (((version)>>16)&0xffff)
51 #define SNDRV_PROTOCOL_MINOR(version) (((version)>>8)&0xff)
52 #define SNDRV_PROTOCOL_MICRO(version) ((version)&0xff)
53 #define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion) \
54 (SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || \
55 (SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && \
56 SNDRV_PROTOCOL_MINOR(kversion) != SNDRV_PROTOCOL_MINOR(uversion)))
91 #define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
120 unsigned char id[64];
129 unsigned char id[32];
144 #define SNDRV_HWDEP_IOCTL_PVERSION _IOR ('H', 0x00, int)
145 #define SNDRV_HWDEP_IOCTL_INFO _IOR ('H', 0x01, struct snd_hwdep_info)
146 #define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status)
147 #define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image)
155 #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 10)
183 #define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((__force snd_pcm_access_t) 0)
184 #define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((__force snd_pcm_access_t) 1)
185 #define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((__force snd_pcm_access_t) 2)
186 #define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((__force snd_pcm_access_t) 3)
187 #define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((__force snd_pcm_access_t) 4)
188 #define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
191 #define SNDRV_PCM_FORMAT_S8 ((__force snd_pcm_format_t) 0)
192 #define SNDRV_PCM_FORMAT_U8 ((__force snd_pcm_format_t) 1)
193 #define SNDRV_PCM_FORMAT_S16_LE ((__force snd_pcm_format_t) 2)
194 #define SNDRV_PCM_FORMAT_S16_BE ((__force snd_pcm_format_t) 3)
195 #define SNDRV_PCM_FORMAT_U16_LE ((__force snd_pcm_format_t) 4)
196 #define SNDRV_PCM_FORMAT_U16_BE ((__force snd_pcm_format_t) 5)
197 #define SNDRV_PCM_FORMAT_S24_LE ((__force snd_pcm_format_t) 6)
198 #define SNDRV_PCM_FORMAT_S24_BE ((__force snd_pcm_format_t) 7)
199 #define SNDRV_PCM_FORMAT_U24_LE ((__force snd_pcm_format_t) 8)
200 #define SNDRV_PCM_FORMAT_U24_BE ((__force snd_pcm_format_t) 9)
201 #define SNDRV_PCM_FORMAT_S32_LE ((__force snd_pcm_format_t) 10)
202 #define SNDRV_PCM_FORMAT_S32_BE ((__force snd_pcm_format_t) 11)
203 #define SNDRV_PCM_FORMAT_U32_LE ((__force snd_pcm_format_t) 12)
204 #define SNDRV_PCM_FORMAT_U32_BE ((__force snd_pcm_format_t) 13)
205 #define SNDRV_PCM_FORMAT_FLOAT_LE ((__force snd_pcm_format_t) 14)
206 #define SNDRV_PCM_FORMAT_FLOAT_BE ((__force snd_pcm_format_t) 15)
207 #define SNDRV_PCM_FORMAT_FLOAT64_LE ((__force snd_pcm_format_t) 16)
208 #define SNDRV_PCM_FORMAT_FLOAT64_BE ((__force snd_pcm_format_t) 17)
209 #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((__force snd_pcm_format_t) 18)
210 #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((__force snd_pcm_format_t) 19)
211 #define SNDRV_PCM_FORMAT_MU_LAW ((__force snd_pcm_format_t) 20)
212 #define SNDRV_PCM_FORMAT_A_LAW ((__force snd_pcm_format_t) 21)
213 #define SNDRV_PCM_FORMAT_IMA_ADPCM ((__force snd_pcm_format_t) 22)
214 #define SNDRV_PCM_FORMAT_MPEG ((__force snd_pcm_format_t) 23)
215 #define SNDRV_PCM_FORMAT_GSM ((__force snd_pcm_format_t) 24)
216 #define SNDRV_PCM_FORMAT_SPECIAL ((__force snd_pcm_format_t) 31)
217 #define SNDRV_PCM_FORMAT_S24_3LE ((__force snd_pcm_format_t) 32)
218 #define SNDRV_PCM_FORMAT_S24_3BE ((__force snd_pcm_format_t) 33)
219 #define SNDRV_PCM_FORMAT_U24_3LE ((__force snd_pcm_format_t) 34)
220 #define SNDRV_PCM_FORMAT_U24_3BE ((__force snd_pcm_format_t) 35)
221 #define SNDRV_PCM_FORMAT_S20_3LE ((__force snd_pcm_format_t) 36)
222 #define SNDRV_PCM_FORMAT_S20_3BE ((__force snd_pcm_format_t) 37)
223 #define SNDRV_PCM_FORMAT_U20_3LE ((__force snd_pcm_format_t) 38)
224 #define SNDRV_PCM_FORMAT_U20_3BE ((__force snd_pcm_format_t) 39)
225 #define SNDRV_PCM_FORMAT_S18_3LE ((__force snd_pcm_format_t) 40)
226 #define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41)
227 #define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42)
228 #define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43)
229 #define SNDRV_PCM_FORMAT_G723_24 ((__force snd_pcm_format_t) 44)
230 #define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45)
231 #define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46)
232 #define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47)
233 #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_G723_40_1B
235 #ifdef SNDRV_LITTLE_ENDIAN
236 #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
237 #define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_LE
238 #define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_LE
239 #define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_LE
240 #define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_LE
241 #define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_LE
242 #define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE
243 #define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE
244 #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE
246 #ifdef SNDRV_BIG_ENDIAN
247 #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE
248 #define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_BE
249 #define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_BE
250 #define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_BE
251 #define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_BE
252 #define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_BE
253 #define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE
254 #define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE
255 #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE
259 #define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0)
260 #define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD
262 #define SNDRV_PCM_INFO_MMAP 0x00000001
263 #define SNDRV_PCM_INFO_MMAP_VALID 0x00000002
264 #define SNDRV_PCM_INFO_DOUBLE 0x00000004
265 #define SNDRV_PCM_INFO_BATCH 0x00000010
266 #define SNDRV_PCM_INFO_INTERLEAVED 0x00000100
267 #define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200
268 #define SNDRV_PCM_INFO_COMPLEX 0x00000400
269 #define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000
270 #define SNDRV_PCM_INFO_OVERRANGE 0x00020000
271 #define SNDRV_PCM_INFO_RESUME 0x00040000
272 #define SNDRV_PCM_INFO_PAUSE 0x00080000
273 #define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000
274 #define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000
275 #define SNDRV_PCM_INFO_SYNC_START 0x00400000
276 #define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000
277 #define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000
280 #define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0)
281 #define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1)
282 #define SNDRV_PCM_STATE_PREPARED ((__force snd_pcm_state_t) 2)
283 #define SNDRV_PCM_STATE_RUNNING ((__force snd_pcm_state_t) 3)
284 #define SNDRV_PCM_STATE_XRUN ((__force snd_pcm_state_t) 4)
285 #define SNDRV_PCM_STATE_DRAINING ((__force snd_pcm_state_t) 5)
286 #define SNDRV_PCM_STATE_PAUSED ((__force snd_pcm_state_t) 6)
287 #define SNDRV_PCM_STATE_SUSPENDED ((__force snd_pcm_state_t) 7)
288 #define SNDRV_PCM_STATE_DISCONNECTED ((__force snd_pcm_state_t) 8)
289 #define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
298 unsigned char id[16];
308 unsigned char id[64];
320 #define SNDRV_PCM_HW_PARAM_ACCESS 0
321 #define SNDRV_PCM_HW_PARAM_FORMAT 1
322 #define SNDRV_PCM_HW_PARAM_SUBFORMAT 2
323 #define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS
324 #define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT
326 #define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8
327 #define SNDRV_PCM_HW_PARAM_FRAME_BITS 9
328 #define SNDRV_PCM_HW_PARAM_CHANNELS 10
329 #define SNDRV_PCM_HW_PARAM_RATE 11
330 #define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12
333 #define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13
336 #define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14
339 #define SNDRV_PCM_HW_PARAM_PERIODS 15
342 #define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16
345 #define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17
346 #define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18
347 #define SNDRV_PCM_HW_PARAM_TICK_TIME 19
348 #define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS
349 #define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME
351 #define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0)
352 #define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1<<1)
353 #define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1<<2)
363 #define SNDRV_MASK_MAX 256
441 #define SNDRV_PCM_SYNC_PTR_HWSYNC (1<<0)
442 #define SNDRV_PCM_SYNC_PTR_APPL (1<<1)
443 #define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1<<2)
510 #define SNDRV_CHMAP_POSITION_MASK 0xffff
511 #define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16)
512 #define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16)
514 #define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int)
515 #define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info)
516 #define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int)
517 #define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int)
518 #define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params)
519 #define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params)
520 #define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12)
521 #define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params)
522 #define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status)
523 #define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t)
524 #define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22)
525 #define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
526 #define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info)
527 #define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40)
528 #define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41)
529 #define SNDRV_PCM_IOCTL_START _IO('A', 0x42)
530 #define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43)
531 #define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44)
532 #define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int)
533 #define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t)
534 #define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47)
535 #define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48)
536 #define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t)
537 #define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi)
538 #define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi)
539 #define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern)
540 #define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern)
541 #define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int)
542 #define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61)
554 #define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 0)
562 #define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001
563 #define SNDRV_RAWMIDI_INFO_INPUT 0x00000002
564 #define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004
572 unsigned char id[64];
596 #define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
597 #define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
598 #define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
599 #define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
600 #define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)
601 #define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int)
607 #define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6)
628 #define SNDRV_TIMER_GLOBAL_SYSTEM 0
629 #define SNDRV_TIMER_GLOBAL_RTC 1
630 #define SNDRV_TIMER_GLOBAL_HPET 2
631 #define SNDRV_TIMER_GLOBAL_HRTIMER 3
634 #define SNDRV_TIMER_FLG_SLAVE (1<<0)
648 unsigned char id[64];
681 unsigned char id[64];
688 #define SNDRV_TIMER_PSFLG_AUTO (1<<0)
689 #define SNDRV_TIMER_PSFLG_EXCLUSIVE (1<<1)
690 #define SNDRV_TIMER_PSFLG_EARLY_EVENT (1<<2)
710 #define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int)
711 #define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id)
712 #define SNDRV_TIMER_IOCTL_TREAD _IOW('T', 0x02, int)
713 #define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo)
714 #define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams)
715 #define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus)
716 #define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select)
717 #define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info)
718 #define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params)
719 #define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status)
721 #define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0)
722 #define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1)
723 #define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2)
724 #define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3)
762 #define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7)
767 unsigned char id[16];
777 #define SNDRV_CTL_ELEM_TYPE_NONE ((__force snd_ctl_elem_type_t) 0)
778 #define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((__force snd_ctl_elem_type_t) 1)
779 #define SNDRV_CTL_ELEM_TYPE_INTEGER ((__force snd_ctl_elem_type_t) 2)
780 #define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((__force snd_ctl_elem_type_t) 3)
781 #define SNDRV_CTL_ELEM_TYPE_BYTES ((__force snd_ctl_elem_type_t) 4)
782 #define SNDRV_CTL_ELEM_TYPE_IEC958 ((__force snd_ctl_elem_type_t) 5)
783 #define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((__force snd_ctl_elem_type_t) 6)
784 #define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64
787 #define SNDRV_CTL_ELEM_IFACE_CARD ((__force snd_ctl_elem_iface_t) 0)
788 #define SNDRV_CTL_ELEM_IFACE_HWDEP ((__force snd_ctl_elem_iface_t) 1)
789 #define SNDRV_CTL_ELEM_IFACE_MIXER ((__force snd_ctl_elem_iface_t) 2)
790 #define SNDRV_CTL_ELEM_IFACE_PCM ((__force snd_ctl_elem_iface_t) 3)
791 #define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((__force snd_ctl_elem_iface_t) 4)
792 #define SNDRV_CTL_ELEM_IFACE_TIMER ((__force snd_ctl_elem_iface_t) 5)
793 #define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((__force snd_ctl_elem_iface_t) 6)
794 #define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER
796 #define SNDRV_CTL_ELEM_ACCESS_READ (1<<0)
797 #define SNDRV_CTL_ELEM_ACCESS_WRITE (1<<1)
798 #define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE)
799 #define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1<<2)
800 #define SNDRV_CTL_ELEM_ACCESS_TIMESTAMP (1<<3)
801 #define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1<<4)
802 #define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1<<5)
803 #define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ|SNDRV_CTL_ELEM_ACCESS_TLV_WRITE)
804 #define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1<<6)
805 #define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1<<8)
806 #define SNDRV_CTL_ELEM_ACCESS_LOCK (1<<9)
807 #define SNDRV_CTL_ELEM_ACCESS_OWNER (1<<10)
808 #define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1<<28)
809 #define SNDRV_CTL_ELEM_ACCESS_USER (1<<29)
813 #define SNDRV_CTL_POWER_D0 0x0000
814 #define SNDRV_CTL_POWER_D1 0x0100
815 #define SNDRV_CTL_POWER_D2 0x0200
816 #define SNDRV_CTL_POWER_D3 0x0300
817 #define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3|0x0000)
818 #define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3|0x0001)
903 #define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)
904 #define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info)
905 #define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list)
906 #define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info)
907 #define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value)
908 #define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value)
909 #define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id)
910 #define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id)
911 #define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int)
912 #define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info)
913 #define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info)
914 #define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id)
915 #define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv)
916 #define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv)
917 #define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv)
918 #define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int)
919 #define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info)
920 #define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int)
921 #define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info)
922 #define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int)
923 #define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
924 #define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)
925 #define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
926 #define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
927 #define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
938 #define SNDRV_CTL_EVENT_MASK_VALUE (1<<0)
939 #define SNDRV_CTL_EVENT_MASK_INFO (1<<1)
940 #define SNDRV_CTL_EVENT_MASK_ADD (1<<2)
941 #define SNDRV_CTL_EVENT_MASK_TLV (1<<3)
942 #define SNDRV_CTL_EVENT_MASK_REMOVE (~0U)
959 #define SNDRV_CTL_NAME_NONE ""
960 #define SNDRV_CTL_NAME_PLAYBACK "Playback "
961 #define SNDRV_CTL_NAME_CAPTURE "Capture "
963 #define SNDRV_CTL_NAME_IEC958_NONE ""
964 #define SNDRV_CTL_NAME_IEC958_SWITCH "Switch"
965 #define SNDRV_CTL_NAME_IEC958_VOLUME "Volume"
966 #define SNDRV_CTL_NAME_IEC958_DEFAULT "Default"
967 #define SNDRV_CTL_NAME_IEC958_MASK "Mask"
968 #define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask"
969 #define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask"
970 #define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream"
971 #define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what