aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/asound.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/asound.h')
-rw-r--r--include/sound/asound.h194
1 files changed, 84 insertions, 110 deletions
diff --git a/include/sound/asound.h b/include/sound/asound.h
index 1c02ed1d7c4a..6add80fc2512 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -23,9 +23,10 @@
23#ifndef __SOUND_ASOUND_H 23#ifndef __SOUND_ASOUND_H
24#define __SOUND_ASOUND_H 24#define __SOUND_ASOUND_H
25 25
26#include <linux/types.h>
27
26#ifdef __KERNEL__ 28#ifdef __KERNEL__
27#include <linux/ioctl.h> 29#include <linux/ioctl.h>
28#include <linux/types.h>
29#include <linux/time.h> 30#include <linux/time.h>
30#include <asm/byteorder.h> 31#include <asm/byteorder.h>
31 32
@@ -126,12 +127,10 @@ struct snd_hwdep_dsp_image {
126 unsigned long driver_data; /* W: driver-specific data */ 127 unsigned long driver_data; /* W: driver-specific data */
127}; 128};
128 129
129enum { 130#define SNDRV_HWDEP_IOCTL_PVERSION _IOR ('H', 0x00, int)
130 SNDRV_HWDEP_IOCTL_PVERSION = _IOR ('H', 0x00, int), 131#define SNDRV_HWDEP_IOCTL_INFO _IOR ('H', 0x01, struct snd_hwdep_info)
131 SNDRV_HWDEP_IOCTL_INFO = _IOR ('H', 0x01, struct snd_hwdep_info), 132#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status)
132 SNDRV_HWDEP_IOCTL_DSP_STATUS = _IOR('H', 0x02, struct snd_hwdep_dsp_status), 133#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image)
133 SNDRV_HWDEP_IOCTL_DSP_LOAD = _IOW('H', 0x03, struct snd_hwdep_dsp_image)
134};
135 134
136/***************************************************************************** 135/*****************************************************************************
137 * * 136 * *
@@ -342,7 +341,7 @@ struct snd_interval {
342#define SNDRV_MASK_MAX 256 341#define SNDRV_MASK_MAX 256
343 342
344struct snd_mask { 343struct snd_mask {
345 u_int32_t bits[(SNDRV_MASK_MAX+31)/32]; 344 __u32 bits[(SNDRV_MASK_MAX+31)/32];
346}; 345};
347 346
348struct snd_pcm_hw_params { 347struct snd_pcm_hw_params {
@@ -385,7 +384,7 @@ struct snd_pcm_sw_params {
385 384
386struct snd_pcm_channel_info { 385struct snd_pcm_channel_info {
387 unsigned int channel; 386 unsigned int channel;
388 off_t offset; /* mmap offset */ 387 __kernel_off_t offset; /* mmap offset */
389 unsigned int first; /* offset to first sample in bits */ 388 unsigned int first; /* offset to first sample in bits */
390 unsigned int step; /* samples distance in bits */ 389 unsigned int step; /* samples distance in bits */
391}; 390};
@@ -451,40 +450,35 @@ enum {
451 SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, 450 SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC,
452}; 451};
453 452
454enum { 453#define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int)
455 SNDRV_PCM_IOCTL_PVERSION = _IOR('A', 0x00, int), 454#define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info)
456 SNDRV_PCM_IOCTL_INFO = _IOR('A', 0x01, struct snd_pcm_info), 455#define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int)
457 SNDRV_PCM_IOCTL_TSTAMP = _IOW('A', 0x02, int), 456#define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int)
458 SNDRV_PCM_IOCTL_TTSTAMP = _IOW('A', 0x03, int), 457#define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params)
459 SNDRV_PCM_IOCTL_HW_REFINE = _IOWR('A', 0x10, struct snd_pcm_hw_params), 458#define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params)
460 SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR('A', 0x11, struct snd_pcm_hw_params), 459#define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12)
461 SNDRV_PCM_IOCTL_HW_FREE = _IO('A', 0x12), 460#define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params)
462 SNDRV_PCM_IOCTL_SW_PARAMS = _IOWR('A', 0x13, struct snd_pcm_sw_params), 461#define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status)
463 SNDRV_PCM_IOCTL_STATUS = _IOR('A', 0x20, struct snd_pcm_status), 462#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t)
464 SNDRV_PCM_IOCTL_DELAY = _IOR('A', 0x21, snd_pcm_sframes_t), 463#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22)
465 SNDRV_PCM_IOCTL_HWSYNC = _IO('A', 0x22), 464#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
466 SNDRV_PCM_IOCTL_SYNC_PTR = _IOWR('A', 0x23, struct snd_pcm_sync_ptr), 465#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info)
467 SNDRV_PCM_IOCTL_CHANNEL_INFO = _IOR('A', 0x32, struct snd_pcm_channel_info), 466#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40)
468 SNDRV_PCM_IOCTL_PREPARE = _IO('A', 0x40), 467#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41)
469 SNDRV_PCM_IOCTL_RESET = _IO('A', 0x41), 468#define SNDRV_PCM_IOCTL_START _IO('A', 0x42)
470 SNDRV_PCM_IOCTL_START = _IO('A', 0x42), 469#define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43)
471 SNDRV_PCM_IOCTL_DROP = _IO('A', 0x43), 470#define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44)
472 SNDRV_PCM_IOCTL_DRAIN = _IO('A', 0x44), 471#define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int)
473 SNDRV_PCM_IOCTL_PAUSE = _IOW('A', 0x45, int), 472#define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t)
474 SNDRV_PCM_IOCTL_REWIND = _IOW('A', 0x46, snd_pcm_uframes_t), 473#define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47)
475 SNDRV_PCM_IOCTL_RESUME = _IO('A', 0x47), 474#define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48)
476 SNDRV_PCM_IOCTL_XRUN = _IO('A', 0x48), 475#define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t)
477 SNDRV_PCM_IOCTL_FORWARD = _IOW('A', 0x49, snd_pcm_uframes_t), 476#define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi)
478 SNDRV_PCM_IOCTL_WRITEI_FRAMES = _IOW('A', 0x50, struct snd_xferi), 477#define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi)
479 SNDRV_PCM_IOCTL_READI_FRAMES = _IOR('A', 0x51, struct snd_xferi), 478#define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern)
480 SNDRV_PCM_IOCTL_WRITEN_FRAMES = _IOW('A', 0x52, struct snd_xfern), 479#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern)
481 SNDRV_PCM_IOCTL_READN_FRAMES = _IOR('A', 0x53, struct snd_xfern), 480#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int)
482 SNDRV_PCM_IOCTL_LINK = _IOW('A', 0x60, int), 481#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61)
483 SNDRV_PCM_IOCTL_UNLINK = _IO('A', 0x61),
484};
485
486/* Trick to make alsa-lib/acinclude.m4 happy */
487#define SNDRV_PCM_IOCTL_REWIND SNDRV_PCM_IOCTL_REWIND
488 482
489/***************************************************************************** 483/*****************************************************************************
490 * * 484 * *
@@ -538,14 +532,12 @@ struct snd_rawmidi_status {
538 unsigned char reserved[16]; /* reserved for future use */ 532 unsigned char reserved[16]; /* reserved for future use */
539}; 533};
540 534
541enum { 535#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
542 SNDRV_RAWMIDI_IOCTL_PVERSION = _IOR('W', 0x00, int), 536#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
543 SNDRV_RAWMIDI_IOCTL_INFO = _IOR('W', 0x01, struct snd_rawmidi_info), 537#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
544 SNDRV_RAWMIDI_IOCTL_PARAMS = _IOWR('W', 0x10, struct snd_rawmidi_params), 538#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
545 SNDRV_RAWMIDI_IOCTL_STATUS = _IOWR('W', 0x20, struct snd_rawmidi_status), 539#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)
546 SNDRV_RAWMIDI_IOCTL_DROP = _IOW('W', 0x30, int), 540#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int)
547 SNDRV_RAWMIDI_IOCTL_DRAIN = _IOW('W', 0x31, int),
548};
549 541
550/* 542/*
551 * Timer section - /dev/snd/timer 543 * Timer section - /dev/snd/timer
@@ -654,23 +646,21 @@ struct snd_timer_status {
654 unsigned char reserved[64]; /* reserved */ 646 unsigned char reserved[64]; /* reserved */
655}; 647};
656 648
657enum { 649#define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int)
658 SNDRV_TIMER_IOCTL_PVERSION = _IOR('T', 0x00, int), 650#define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id)
659 SNDRV_TIMER_IOCTL_NEXT_DEVICE = _IOWR('T', 0x01, struct snd_timer_id), 651#define SNDRV_TIMER_IOCTL_TREAD _IOW('T', 0x02, int)
660 SNDRV_TIMER_IOCTL_TREAD = _IOW('T', 0x02, int), 652#define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo)
661 SNDRV_TIMER_IOCTL_GINFO = _IOWR('T', 0x03, struct snd_timer_ginfo), 653#define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams)
662 SNDRV_TIMER_IOCTL_GPARAMS = _IOW('T', 0x04, struct snd_timer_gparams), 654#define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus)
663 SNDRV_TIMER_IOCTL_GSTATUS = _IOWR('T', 0x05, struct snd_timer_gstatus), 655#define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select)
664 SNDRV_TIMER_IOCTL_SELECT = _IOW('T', 0x10, struct snd_timer_select), 656#define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info)
665 SNDRV_TIMER_IOCTL_INFO = _IOR('T', 0x11, struct snd_timer_info), 657#define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params)
666 SNDRV_TIMER_IOCTL_PARAMS = _IOW('T', 0x12, struct snd_timer_params), 658#define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status)
667 SNDRV_TIMER_IOCTL_STATUS = _IOR('T', 0x14, struct snd_timer_status), 659/* The following four ioctls are changed since 1.0.9 due to confliction */
668 /* The following four ioctls are changed since 1.0.9 due to confliction */ 660#define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0)
669 SNDRV_TIMER_IOCTL_START = _IO('T', 0xa0), 661#define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1)
670 SNDRV_TIMER_IOCTL_STOP = _IO('T', 0xa1), 662#define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2)
671 SNDRV_TIMER_IOCTL_CONTINUE = _IO('T', 0xa2), 663#define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3)
672 SNDRV_TIMER_IOCTL_PAUSE = _IO('T', 0xa3),
673};
674 664
675struct snd_timer_read { 665struct snd_timer_read {
676 unsigned int resolution; 666 unsigned int resolution;
@@ -789,7 +779,7 @@ struct snd_ctl_elem_info {
789 snd_ctl_elem_type_t type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */ 779 snd_ctl_elem_type_t type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */
790 unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */ 780 unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */
791 unsigned int count; /* count of values */ 781 unsigned int count; /* count of values */
792 pid_t owner; /* owner's PID of this control */ 782 __kernel_pid_t owner; /* owner's PID of this control */
793 union { 783 union {
794 struct { 784 struct {
795 long min; /* R: minimum value */ 785 long min; /* R: minimum value */
@@ -847,33 +837,31 @@ struct snd_ctl_tlv {
847 unsigned int tlv[0]; /* first TLV */ 837 unsigned int tlv[0]; /* first TLV */
848}; 838};
849 839
850enum { 840#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)
851 SNDRV_CTL_IOCTL_PVERSION = _IOR('U', 0x00, int), 841#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info)
852 SNDRV_CTL_IOCTL_CARD_INFO = _IOR('U', 0x01, struct snd_ctl_card_info), 842#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list)
853 SNDRV_CTL_IOCTL_ELEM_LIST = _IOWR('U', 0x10, struct snd_ctl_elem_list), 843#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info)
854 SNDRV_CTL_IOCTL_ELEM_INFO = _IOWR('U', 0x11, struct snd_ctl_elem_info), 844#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value)
855 SNDRV_CTL_IOCTL_ELEM_READ = _IOWR('U', 0x12, struct snd_ctl_elem_value), 845#define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value)
856 SNDRV_CTL_IOCTL_ELEM_WRITE = _IOWR('U', 0x13, struct snd_ctl_elem_value), 846#define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id)
857 SNDRV_CTL_IOCTL_ELEM_LOCK = _IOW('U', 0x14, struct snd_ctl_elem_id), 847#define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id)
858 SNDRV_CTL_IOCTL_ELEM_UNLOCK = _IOW('U', 0x15, struct snd_ctl_elem_id), 848#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int)
859 SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS = _IOWR('U', 0x16, int), 849#define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info)
860 SNDRV_CTL_IOCTL_ELEM_ADD = _IOWR('U', 0x17, struct snd_ctl_elem_info), 850#define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info)
861 SNDRV_CTL_IOCTL_ELEM_REPLACE = _IOWR('U', 0x18, struct snd_ctl_elem_info), 851#define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id)
862 SNDRV_CTL_IOCTL_ELEM_REMOVE = _IOWR('U', 0x19, struct snd_ctl_elem_id), 852#define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv)
863 SNDRV_CTL_IOCTL_TLV_READ = _IOWR('U', 0x1a, struct snd_ctl_tlv), 853#define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv)
864 SNDRV_CTL_IOCTL_TLV_WRITE = _IOWR('U', 0x1b, struct snd_ctl_tlv), 854#define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv)
865 SNDRV_CTL_IOCTL_TLV_COMMAND = _IOWR('U', 0x1c, struct snd_ctl_tlv), 855#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int)
866 SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE = _IOWR('U', 0x20, int), 856#define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info)
867 SNDRV_CTL_IOCTL_HWDEP_INFO = _IOR('U', 0x21, struct snd_hwdep_info), 857#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int)
868 SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE = _IOR('U', 0x30, int), 858#define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info)
869 SNDRV_CTL_IOCTL_PCM_INFO = _IOWR('U', 0x31, struct snd_pcm_info), 859#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int)
870 SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE = _IOW('U', 0x32, int), 860#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
871 SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE = _IOWR('U', 0x40, int), 861#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)
872 SNDRV_CTL_IOCTL_RAWMIDI_INFO = _IOWR('U', 0x41, struct snd_rawmidi_info), 862#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
873 SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE = _IOW('U', 0x42, int), 863#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
874 SNDRV_CTL_IOCTL_POWER = _IOWR('U', 0xd0, int), 864#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
875 SNDRV_CTL_IOCTL_POWER_STATE = _IOR('U', 0xd1, int),
876};
877 865
878/* 866/*
879 * Read interface. 867 * Read interface.
@@ -919,18 +907,4 @@ struct snd_ctl_event {
919#define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream" 907#define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream"
920#define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what 908#define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what
921 909
922/*
923 *
924 */
925
926struct snd_xferv {
927 const struct iovec *vector;
928 unsigned long count;
929};
930
931enum {
932 SNDRV_IOCTL_READV = _IOW('K', 0x00, struct snd_xferv),
933 SNDRV_IOCTL_WRITEV = _IOW('K', 0x01, struct snd_xferv),
934};
935
936#endif /* __SOUND_ASOUND_H */ 910#endif /* __SOUND_ASOUND_H */