[578] | 1 |
|
---|
| 2 | #define SIZE_DEVICE_NAME 32
|
---|
| 3 |
|
---|
| 4 | typedef struct sndrv_ctl_card_info {
|
---|
| 5 | int card; /* card number */
|
---|
| 6 | int pad; /* reserved for future (was type) */
|
---|
| 7 | unsigned char id[16]; /* ID of card (user selectable) */
|
---|
| 8 | unsigned char driver[16]; /* Driver name */
|
---|
| 9 | unsigned char name[32]; /* Short name of soundcard */
|
---|
| 10 | unsigned char longname[80]; /* name + info text about soundcard */
|
---|
| 11 | unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */
|
---|
| 12 | unsigned char mixername[80]; /* visual mixer identification */
|
---|
| 13 | unsigned char components[80]; /* card components / fine identification, delimited with one space (AC97 etc..) */
|
---|
| 14 | unsigned char reserved[48]; /* reserved for future */
|
---|
| 15 | } UniaudCardInfo;
|
---|
| 16 |
|
---|
| 17 | enum sndrv_ctl_elem_iface {
|
---|
| 18 | SNDRV_CTL_ELEM_IFACE_CARD = 0, /* global control */
|
---|
| 19 | SNDRV_CTL_ELEM_IFACE_HWDEP, /* hardware dependent device */
|
---|
| 20 | SNDRV_CTL_ELEM_IFACE_MIXER, /* virtual mixer device */
|
---|
| 21 | SNDRV_CTL_ELEM_IFACE_PCM, /* PCM device */
|
---|
| 22 | SNDRV_CTL_ELEM_IFACE_RAWMIDI, /* RawMidi device */
|
---|
| 23 | SNDRV_CTL_ELEM_IFACE_TIMER, /* timer device */
|
---|
| 24 | SNDRV_CTL_ELEM_IFACE_SEQUENCER, /* sequencer client */
|
---|
| 25 | SNDRV_CTL_ELEM_IFACE_LAST = SNDRV_CTL_ELEM_IFACE_SEQUENCER,
|
---|
| 26 | };
|
---|
| 27 |
|
---|
| 28 | typedef struct sndrv_ctl_elem_id {
|
---|
| 29 | unsigned int numid; /* numeric identifier, zero = invalid */
|
---|
| 30 | enum sndrv_ctl_elem_iface iface; /* interface identifier */
|
---|
| 31 | unsigned int device; /* device/client number */
|
---|
| 32 | unsigned int subdevice; /* subdevice (substream) number */
|
---|
| 33 | unsigned char name[44]; /* ASCII name of item */
|
---|
| 34 | unsigned int index; /* index of item */
|
---|
| 35 | } UniaudControl;
|
---|
| 36 |
|
---|
| 37 | enum sndrv_ctl_elem_type {
|
---|
| 38 | SNDRV_CTL_ELEM_TYPE_NONE = 0, /* invalid */
|
---|
| 39 | SNDRV_CTL_ELEM_TYPE_BOOLEAN, /* boolean type */
|
---|
| 40 | SNDRV_CTL_ELEM_TYPE_INTEGER, /* integer type */
|
---|
| 41 | SNDRV_CTL_ELEM_TYPE_ENUMERATED, /* enumerated type */
|
---|
| 42 | SNDRV_CTL_ELEM_TYPE_BYTES, /* byte array */
|
---|
| 43 | SNDRV_CTL_ELEM_TYPE_IEC958, /* IEC958 (S/PDIF) setup */
|
---|
| 44 | SNDRV_CTL_ELEM_TYPE_INTEGER64, /* 64-bit integer type */
|
---|
| 45 | SNDRV_CTL_ELEM_TYPE_LAST = SNDRV_CTL_ELEM_TYPE_INTEGER64,
|
---|
| 46 | };
|
---|
| 47 |
|
---|
| 48 | typedef struct sndrv_ctl_elem_info {
|
---|
| 49 | UniaudControl id; /* W: element ID */
|
---|
| 50 | enum sndrv_ctl_elem_type type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */
|
---|
| 51 | unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */
|
---|
| 52 | unsigned int count; /* count of values */
|
---|
| 53 | int owner; /* owner's PID of this control */
|
---|
| 54 | union {
|
---|
| 55 | struct {
|
---|
| 56 | long min; /* R: minimum value */
|
---|
| 57 | long max; /* R: maximum value */
|
---|
| 58 | long step; /* R: step (0 variable) */
|
---|
| 59 | } integer;
|
---|
| 60 | struct {
|
---|
| 61 | long long min; /* R: minimum value */
|
---|
| 62 | long long max; /* R: maximum value */
|
---|
| 63 | long long step; /* R: step (0 variable) */
|
---|
| 64 | } integer64;
|
---|
| 65 | struct {
|
---|
| 66 | unsigned int items; /* R: number of items */
|
---|
| 67 | unsigned int item; /* W: item number */
|
---|
| 68 | char name[64]; /* R: value name */
|
---|
| 69 | } enumerated;
|
---|
| 70 | unsigned char reserved[128];
|
---|
| 71 | } value;
|
---|
| 72 | union {
|
---|
| 73 | unsigned short d[4]; /* dimensions */
|
---|
| 74 | unsigned short *d_ptr; /* indirect */
|
---|
| 75 | } dimen;
|
---|
| 76 | unsigned char reserved[64-4*sizeof(unsigned short)];
|
---|
| 77 | } UniaudControlInfo;
|
---|
| 78 |
|
---|
| 79 | struct sndrv_aes_iec958 {
|
---|
| 80 | unsigned char status[24]; /* AES/IEC958 channel status bits */
|
---|
| 81 | unsigned char subcode[147]; /* AES/IEC958 subcode bits */
|
---|
| 82 | unsigned char pad; /* nothing */
|
---|
| 83 | unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */
|
---|
| 84 | };
|
---|
| 85 |
|
---|
| 86 | struct timespec {
|
---|
| 87 | long tv_sec; /* seconds */
|
---|
| 88 | long tv_usec; /* and microseconds */
|
---|
| 89 | };
|
---|
| 90 |
|
---|
| 91 | typedef struct sndrv_ctl_elem_value {
|
---|
| 92 | UniaudControl id; /* W: element ID */
|
---|
| 93 | unsigned int indirect: 1; /* W: use indirect pointer (xxx_ptr member) */
|
---|
| 94 | union {
|
---|
| 95 | union {
|
---|
| 96 | long value[128];
|
---|
| 97 | long *value_ptr;
|
---|
| 98 | } integer;
|
---|
| 99 | union {
|
---|
| 100 | long long value[64];
|
---|
| 101 | long long *value_ptr;
|
---|
| 102 | } integer64;
|
---|
| 103 | union {
|
---|
| 104 | unsigned int item[128];
|
---|
| 105 | unsigned int *item_ptr;
|
---|
| 106 | } enumerated;
|
---|
| 107 | union {
|
---|
| 108 | unsigned char data[512];
|
---|
| 109 | unsigned char *data_ptr;
|
---|
| 110 | } bytes;
|
---|
| 111 | struct sndrv_aes_iec958 iec958;
|
---|
| 112 | } value; /* RO */
|
---|
| 113 | struct timespec tstamp;
|
---|
| 114 | unsigned char reserved[128-sizeof(struct timespec)];
|
---|
| 115 | } UniaudControlValue;
|
---|
| 116 |
|
---|
| 117 | typedef struct DumpFileHeader {
|
---|
| 118 | char ID[10]; // "UNIMIXDUMP"
|
---|
| 119 | unsigned char driver[16]; /* Driver name */
|
---|
| 120 | int controls; // number of controls
|
---|
| 121 | } DumpFileHeader;
|
---|
| 122 |
|
---|
| 123 | typedef struct {
|
---|
| 124 | ULONG nrStreams; //nr of activate wave streams supported
|
---|
| 125 | ULONG ulMinChannels; //min nr of channels
|
---|
| 126 | ULONG ulMaxChannels; //max nr of channels
|
---|
| 127 | ULONG ulChanFlags; //channel flags
|
---|
| 128 | ULONG ulMinRate; //min sample rate
|
---|
| 129 | ULONG ulMaxRate; //max sample rate
|
---|
| 130 | ULONG ulRateFlags; //sample rate flags
|
---|
| 131 | ULONG ulDataFormats; //supported wave formats
|
---|
| 132 | } WAVE_CAPS, *PWAVE_CAPS, FAR *LPWAVE_CAPS;
|
---|
| 133 |
|
---|
| 134 | typedef struct {
|
---|
| 135 | ULONG nrDevices; //total nr of audio devices
|
---|
| 136 | ULONG ulCaps; //device caps
|
---|
| 137 | char szDeviceName[SIZE_DEVICE_NAME];
|
---|
| 138 | char szMixerName[SIZE_DEVICE_NAME];
|
---|
| 139 | WAVE_CAPS waveOutCaps;
|
---|
| 140 | WAVE_CAPS waveInCaps;
|
---|
| 141 | } OSS32_DEVCAPS, *POSS32_DEVCAPS, FAR *LPOSS32_DEVCAPS;
|
---|