blob: 11af7636f361d3648a8248bfaf4673a604aedd63 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 _UAPISOUNDCARD_H
20#define _UAPISOUNDCARD_H
21#define SOUND_VERSION 0x030802
22#define OPEN_SOUND_SYSTEM
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <linux/ioctl.h>
25#include <endian.h>
26#define SNDCARD_ADLIB 1
27#define SNDCARD_SB 2
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define SNDCARD_PAS 3
30#define SNDCARD_GUS 4
31#define SNDCARD_MPU401 5
32#define SNDCARD_SB16 6
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define SNDCARD_SB16MIDI 7
35#define SNDCARD_UART6850 8
36#define SNDCARD_GUS16 9
37#define SNDCARD_MSS 10
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define SNDCARD_PSS 11
40#define SNDCARD_SSCAPE 12
41#define SNDCARD_PSS_MPU 13
42#define SNDCARD_PSS_MSS 14
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define SNDCARD_SSCAPE_MSS 15
45#define SNDCARD_TRXPRO 16
46#define SNDCARD_TRXPRO_SB 17
47#define SNDCARD_TRXPRO_MPU 18
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define SNDCARD_MAD16 19
50#define SNDCARD_MAD16_MPU 20
51#define SNDCARD_CS4232 21
52#define SNDCARD_CS4232_MPU 22
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define SNDCARD_MAUI 23
55#define SNDCARD_PSEUDO_MSS 24
56#define SNDCARD_GUSPNP 25
57#define SNDCARD_UART401 26
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#ifndef _SIOWR
60#if defined(_IOWR) && (defined(_AIX) || !defined(sun) && !defined(sparc) && !defined(__sparc__) && !defined(__INCioctlh) && !defined(__Lynx__))
61#define SIOCPARM_MASK IOCPARM_MASK
62#define SIOC_VOID IOC_VOID
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define SIOC_OUT IOC_OUT
65#define SIOC_IN IOC_IN
66#define SIOC_INOUT IOC_INOUT
67#define _SIOC_SIZE _IOC_SIZE
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define _SIOC_DIR _IOC_DIR
70#define _SIOC_NONE _IOC_NONE
71#define _SIOC_READ _IOC_READ
72#define _SIOC_WRITE _IOC_WRITE
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define _SIO _IO
75#define _SIOR _IOR
76#define _SIOW _IOW
77#define _SIOWR _IOWR
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#else
80#define SIOCPARM_MASK 0x1fff
81#define SIOC_VOID 0x00000000
82#define SIOC_OUT 0x20000000
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define SIOC_IN 0x40000000
Tao Baod7db5942015-01-28 10:07:51 -080085#define SIOC_INOUT (SIOC_IN | SIOC_OUT)
86#define _SIO(x,y) ((int) (SIOC_VOID | (x << 8) | y))
87#define _SIOR(x,y,t) ((int) (SIOC_OUT | ((sizeof(t) & SIOCPARM_MASK) << 16) | (x << 8) | y))
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089#define _SIOW(x,y,t) ((int) (SIOC_IN | ((sizeof(t) & SIOCPARM_MASK) << 16) | (x << 8) | y))
90#define _SIOWR(x,y,t) ((int) (SIOC_INOUT | ((sizeof(t) & SIOCPARM_MASK) << 16) | (x << 8) | y))
91#define _SIOC_SIZE(x) ((x >> 16) & SIOCPARM_MASK)
Ben Cheng655a7c02013-10-16 16:09:24 -070092#define _SIOC_DIR(x) (x & 0xf0000000)
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define _SIOC_NONE SIOC_VOID
95#define _SIOC_READ SIOC_OUT
96#define _SIOC_WRITE SIOC_IN
97#endif
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99#endif
Tao Baod7db5942015-01-28 10:07:51 -0800100#define SNDCTL_SEQ_RESET _SIO('Q', 0)
101#define SNDCTL_SEQ_SYNC _SIO('Q', 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700102#define SNDCTL_SYNTH_INFO _SIOWR('Q', 2, struct synth_info)
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#define SNDCTL_SEQ_CTRLRATE _SIOWR('Q', 3, int)
Tao Baod7db5942015-01-28 10:07:51 -0800105#define SNDCTL_SEQ_GETOUTCOUNT _SIOR('Q', 4, int)
106#define SNDCTL_SEQ_GETINCOUNT _SIOR('Q', 5, int)
107#define SNDCTL_SEQ_PERCMODE _SIOW('Q', 6, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109#define SNDCTL_FM_LOAD_INSTR _SIOW('Q', 7, struct sbi_instrument)
110#define SNDCTL_SEQ_TESTMIDI _SIOW('Q', 8, int)
111#define SNDCTL_SEQ_RESETSAMPLES _SIOW('Q', 9, int)
112#define SNDCTL_SEQ_NRSYNTHS _SIOR('Q', 10, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114#define SNDCTL_SEQ_NRMIDIS _SIOR('Q', 11, int)
115#define SNDCTL_MIDI_INFO _SIOWR('Q', 12, struct midi_info)
116#define SNDCTL_SEQ_THRESHOLD _SIOW('Q', 13, int)
117#define SNDCTL_SYNTH_MEMAVL _SIOWR('Q', 14, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119#define SNDCTL_FM_4OP_ENABLE _SIOW('Q', 15, int)
120#define SNDCTL_SEQ_PANIC _SIO('Q', 17)
121#define SNDCTL_SEQ_OUTOFBAND _SIOW('Q', 18, struct seq_event_rec)
122#define SNDCTL_SEQ_GETTIME _SIOR('Q', 19, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124#define SNDCTL_SYNTH_ID _SIOWR('Q', 20, struct synth_info)
125#define SNDCTL_SYNTH_CONTROL _SIOWR('Q', 21, struct synth_control)
126#define SNDCTL_SYNTH_REMOVESAMPLE _SIOWR('Q', 22, struct remove_sample)
127typedef struct synth_control {
Ben Cheng655a7c02013-10-16 16:09:24 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 int devno;
130 char data[4000];
131} synth_control;
132typedef struct remove_sample {
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800134 int devno;
135 int bankno;
136 int instrno;
Ben Cheng655a7c02013-10-16 16:09:24 -0700137} remove_sample;
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800139typedef struct seq_event_rec {
140 unsigned char arr[8];
Ben Cheng655a7c02013-10-16 16:09:24 -0700141} seq_event_rec;
142#define SNDCTL_TMR_TIMEBASE _SIOWR('T', 1, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144#define SNDCTL_TMR_START _SIO('T', 2)
145#define SNDCTL_TMR_STOP _SIO('T', 3)
146#define SNDCTL_TMR_CONTINUE _SIO('T', 4)
Ben Cheng655a7c02013-10-16 16:09:24 -0700147#define SNDCTL_TMR_TEMPO _SIOWR('T', 5, int)
Tao Baod7db5942015-01-28 10:07:51 -0800148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700149#define SNDCTL_TMR_SOURCE _SIOWR('T', 6, int)
150#define TMR_INTERNAL 0x00000001
Ben Cheng655a7c02013-10-16 16:09:24 -0700151#define TMR_EXTERNAL 0x00000002
152#define TMR_MODE_MIDI 0x00000010
Tao Baod7db5942015-01-28 10:07:51 -0800153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700154#define TMR_MODE_FSK 0x00000020
155#define TMR_MODE_CLS 0x00000040
Ben Cheng655a7c02013-10-16 16:09:24 -0700156#define TMR_MODE_SMPTE 0x00000080
Tao Baod7db5942015-01-28 10:07:51 -0800157#define SNDCTL_TMR_METRONOME _SIOW('T', 7, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800159#define SNDCTL_TMR_SELECT _SIOW('T', 8, int)
160#define _LINUX_PATCHKEY_H_INDIRECT
Ben Cheng655a7c02013-10-16 16:09:24 -0700161#include <linux/patchkey.h>
162#undef _LINUX_PATCHKEY_H_INDIRECT
Tao Baod7db5942015-01-28 10:07:51 -0800163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700164#ifdef __BYTE_ORDER
165#if __BYTE_ORDER == __BIG_ENDIAN
Ben Cheng655a7c02013-10-16 16:09:24 -0700166#define AFMT_S16_NE AFMT_S16_BE
Tao Baod7db5942015-01-28 10:07:51 -0800167#elif __BYTE_ORDER==__LITTLE_ENDIAN
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700169#define AFMT_S16_NE AFMT_S16_LE
170#else
Ben Cheng655a7c02013-10-16 16:09:24 -0700171#error "could not determine byte order"
172#endif
Tao Baod7db5942015-01-28 10:07:51 -0800173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700174#endif
175struct patch_info {
Tao Baod7db5942015-01-28 10:07:51 -0800176 unsigned short key;
Ben Cheng655a7c02013-10-16 16:09:24 -0700177#define WAVE_PATCH _PATCHKEY(0x04)
Tao Baod7db5942015-01-28 10:07:51 -0800178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700179#define GUS_PATCH WAVE_PATCH
180#define WAVEFRONT_PATCH _PATCHKEY(0x06)
Tao Baod7db5942015-01-28 10:07:51 -0800181 short device_no;
182 short instr_no;
Ben Cheng655a7c02013-10-16 16:09:24 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800184 unsigned int mode;
Ben Cheng655a7c02013-10-16 16:09:24 -0700185#define WAVE_16_BITS 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -0700186#define WAVE_UNSIGNED 0x02
187#define WAVE_LOOPING 0x04
Tao Baod7db5942015-01-28 10:07:51 -0800188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700189#define WAVE_BIDIR_LOOP 0x08
190#define WAVE_LOOP_BACK 0x10
Ben Cheng655a7c02013-10-16 16:09:24 -0700191#define WAVE_SUSTAIN_ON 0x20
192#define WAVE_ENVELOPES 0x40
Tao Baod7db5942015-01-28 10:07:51 -0800193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700194#define WAVE_FAST_RELEASE 0x80
195#define WAVE_VIBRATO 0x00010000
Ben Cheng655a7c02013-10-16 16:09:24 -0700196#define WAVE_TREMOLO 0x00020000
197#define WAVE_SCALE 0x00040000
Tao Baod7db5942015-01-28 10:07:51 -0800198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700199#define WAVE_FRACTIONS 0x00080000
200#define WAVE_ROM 0x40000000
Ben Cheng655a7c02013-10-16 16:09:24 -0700201#define WAVE_MULAW 0x20000000
Tao Baod7db5942015-01-28 10:07:51 -0800202 int len;
Ben Cheng655a7c02013-10-16 16:09:24 -0700203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800204 int loop_start, loop_end;
205 unsigned int base_freq;
206 unsigned int base_note;
207 unsigned int high_note;
Ben Cheng655a7c02013-10-16 16:09:24 -0700208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800209 unsigned int low_note;
210 int panning;
211 int detuning;
212 unsigned char env_rate[6];
Ben Cheng655a7c02013-10-16 16:09:24 -0700213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800214 unsigned char env_offset[6];
215 unsigned char tremolo_sweep;
216 unsigned char tremolo_rate;
217 unsigned char tremolo_depth;
Ben Cheng655a7c02013-10-16 16:09:24 -0700218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800219 unsigned char vibrato_sweep;
220 unsigned char vibrato_rate;
221 unsigned char vibrato_depth;
222 int scale_frequency;
Ben Cheng655a7c02013-10-16 16:09:24 -0700223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800224 unsigned int scale_factor;
225 int volume;
226 int fractions;
227 int reserved1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800229 int spare[2];
230 char data[1];
231};
Ben Cheng655a7c02013-10-16 16:09:24 -0700232struct sysex_info {
Tao Baod7db5942015-01-28 10:07:51 -0800233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 short key;
Ben Cheng655a7c02013-10-16 16:09:24 -0700235#define SYSEX_PATCH _PATCHKEY(0x05)
Ben Cheng655a7c02013-10-16 16:09:24 -0700236#define MAUI_PATCH _PATCHKEY(0x06)
Tao Baod7db5942015-01-28 10:07:51 -0800237 short device_no;
Ben Cheng655a7c02013-10-16 16:09:24 -0700238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800239 int len;
240 unsigned char data[1];
241};
Ben Cheng655a7c02013-10-16 16:09:24 -0700242#define SEQ_NOTEOFF 0
Tao Baod7db5942015-01-28 10:07:51 -0800243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700244#define SEQ_FMNOTEOFF SEQ_NOTEOFF
245#define SEQ_NOTEON 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700246#define SEQ_FMNOTEON SEQ_NOTEON
247#define SEQ_WAIT TMR_WAIT_ABS
Tao Baod7db5942015-01-28 10:07:51 -0800248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700249#define SEQ_PGMCHANGE 3
250#define SEQ_FMPGMCHANGE SEQ_PGMCHANGE
Ben Cheng655a7c02013-10-16 16:09:24 -0700251#define SEQ_SYNCTIMER TMR_START
252#define SEQ_MIDIPUTC 5
Tao Baod7db5942015-01-28 10:07:51 -0800253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700254#define SEQ_DRUMON 6
255#define SEQ_DRUMOFF 7
Ben Cheng655a7c02013-10-16 16:09:24 -0700256#define SEQ_ECHO TMR_ECHO
257#define SEQ_AFTERTOUCH 9
Tao Baod7db5942015-01-28 10:07:51 -0800258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700259#define SEQ_CONTROLLER 10
260#define CTL_BANK_SELECT 0x00
Ben Cheng655a7c02013-10-16 16:09:24 -0700261#define CTL_MODWHEEL 0x01
262#define CTL_BREATH 0x02
Tao Baod7db5942015-01-28 10:07:51 -0800263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700264#define CTL_FOOT 0x04
265#define CTL_PORTAMENTO_TIME 0x05
Ben Cheng655a7c02013-10-16 16:09:24 -0700266#define CTL_DATA_ENTRY 0x06
267#define CTL_MAIN_VOLUME 0x07
Tao Baod7db5942015-01-28 10:07:51 -0800268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700269#define CTL_BALANCE 0x08
270#define CTL_PAN 0x0a
Ben Cheng655a7c02013-10-16 16:09:24 -0700271#define CTL_EXPRESSION 0x0b
272#define CTL_GENERAL_PURPOSE1 0x10
Tao Baod7db5942015-01-28 10:07:51 -0800273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700274#define CTL_GENERAL_PURPOSE2 0x11
275#define CTL_GENERAL_PURPOSE3 0x12
Ben Cheng655a7c02013-10-16 16:09:24 -0700276#define CTL_GENERAL_PURPOSE4 0x13
277#define CTL_DAMPER_PEDAL 0x40
Tao Baod7db5942015-01-28 10:07:51 -0800278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700279#define CTL_SUSTAIN 0x40
280#define CTL_HOLD 0x40
Ben Cheng655a7c02013-10-16 16:09:24 -0700281#define CTL_PORTAMENTO 0x41
282#define CTL_SOSTENUTO 0x42
Tao Baod7db5942015-01-28 10:07:51 -0800283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700284#define CTL_SOFT_PEDAL 0x43
285#define CTL_HOLD2 0x45
Ben Cheng655a7c02013-10-16 16:09:24 -0700286#define CTL_GENERAL_PURPOSE5 0x50
287#define CTL_GENERAL_PURPOSE6 0x51
Tao Baod7db5942015-01-28 10:07:51 -0800288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700289#define CTL_GENERAL_PURPOSE7 0x52
290#define CTL_GENERAL_PURPOSE8 0x53
Ben Cheng655a7c02013-10-16 16:09:24 -0700291#define CTL_EXT_EFF_DEPTH 0x5b
292#define CTL_TREMOLO_DEPTH 0x5c
Tao Baod7db5942015-01-28 10:07:51 -0800293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700294#define CTL_CHORUS_DEPTH 0x5d
295#define CTL_DETUNE_DEPTH 0x5e
Ben Cheng655a7c02013-10-16 16:09:24 -0700296#define CTL_CELESTE_DEPTH 0x5e
297#define CTL_PHASER_DEPTH 0x5f
Tao Baod7db5942015-01-28 10:07:51 -0800298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700299#define CTL_DATA_INCREMENT 0x60
300#define CTL_DATA_DECREMENT 0x61
Ben Cheng655a7c02013-10-16 16:09:24 -0700301#define CTL_NONREG_PARM_NUM_LSB 0x62
302#define CTL_NONREG_PARM_NUM_MSB 0x63
Tao Baod7db5942015-01-28 10:07:51 -0800303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700304#define CTL_REGIST_PARM_NUM_LSB 0x64
305#define CTL_REGIST_PARM_NUM_MSB 0x65
Ben Cheng655a7c02013-10-16 16:09:24 -0700306#define CTRL_PITCH_BENDER 255
307#define CTRL_PITCH_BENDER_RANGE 254
Tao Baod7db5942015-01-28 10:07:51 -0800308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700309#define CTRL_EXPRESSION 253
310#define CTRL_MAIN_VOLUME 252
Ben Cheng655a7c02013-10-16 16:09:24 -0700311#define SEQ_BALANCE 11
312#define SEQ_VOLMODE 12
Tao Baod7db5942015-01-28 10:07:51 -0800313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700314#define VOL_METHOD_ADAGIO 1
315#define VOL_METHOD_LINEAR 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700316#define SEQ_FULLSIZE 0xfd
317#define SEQ_PRIVATE 0xfe
Tao Baod7db5942015-01-28 10:07:51 -0800318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700319#define SEQ_EXTENDED 0xff
320typedef unsigned char sbi_instr_data[32];
Ben Cheng655a7c02013-10-16 16:09:24 -0700321struct sbi_instrument {
Tao Baod7db5942015-01-28 10:07:51 -0800322 unsigned short key;
323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700324#define FM_PATCH _PATCHKEY(0x01)
325#define OPL3_PATCH _PATCHKEY(0x03)
Tao Baod7db5942015-01-28 10:07:51 -0800326 short device;
327 int channel;
Ben Cheng655a7c02013-10-16 16:09:24 -0700328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800329 sbi_instr_data operators;
330};
Ben Cheng655a7c02013-10-16 16:09:24 -0700331struct synth_info {
Tao Baod7db5942015-01-28 10:07:51 -0800332 char name[30];
Ben Cheng655a7c02013-10-16 16:09:24 -0700333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800334 int device;
335 int synth_type;
Ben Cheng655a7c02013-10-16 16:09:24 -0700336#define SYNTH_TYPE_FM 0
337#define SYNTH_TYPE_SAMPLE 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800339#define SYNTH_TYPE_MIDI 2
340 int synth_subtype;
Ben Cheng655a7c02013-10-16 16:09:24 -0700341#define FM_TYPE_ADLIB 0x00
342#define FM_TYPE_OPL3 0x01
Tao Baod7db5942015-01-28 10:07:51 -0800343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700344#define MIDI_TYPE_MPU401 0x401
345#define SAMPLE_TYPE_BASIC 0x10
Ben Cheng655a7c02013-10-16 16:09:24 -0700346#define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC
347#define SAMPLE_TYPE_WAVEFRONT 0x11
Ben Cheng655a7c02013-10-16 16:09:24 -0700348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800349 int perc_mode;
350 int nr_voices;
351 int nr_drums;
352 int instr_bank_size;
353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354 unsigned int capabilities;
Ben Cheng655a7c02013-10-16 16:09:24 -0700355#define SYNTH_CAP_PERCMODE 0x00000001
Ben Cheng655a7c02013-10-16 16:09:24 -0700356#define SYNTH_CAP_OPL3 0x00000002
357#define SYNTH_CAP_INPUT 0x00000004
Ben Cheng655a7c02013-10-16 16:09:24 -0700358/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800359 int dummies[19];
360};
Ben Cheng655a7c02013-10-16 16:09:24 -0700361struct sound_timer_info {
Tao Baod7db5942015-01-28 10:07:51 -0800362 char name[32];
Ben Cheng655a7c02013-10-16 16:09:24 -0700363/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800364 int caps;
365};
Ben Cheng655a7c02013-10-16 16:09:24 -0700366#define MIDI_CAP_MPU401 1
367struct midi_info {
Ben Cheng655a7c02013-10-16 16:09:24 -0700368/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800369 char name[30];
370 int device;
371 unsigned int capabilities;
372 int dev_type;
Ben Cheng655a7c02013-10-16 16:09:24 -0700373/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800374 int dummies[18];
375};
Ben Cheng655a7c02013-10-16 16:09:24 -0700376typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -0800377 unsigned char cmd;
Ben Cheng655a7c02013-10-16 16:09:24 -0700378/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800379 char nr_args, nr_returns;
380 unsigned char data[30];
381} mpu_command_rec;
Ben Cheng655a7c02013-10-16 16:09:24 -0700382#define SNDCTL_MIDI_PRETIME _SIOWR('m', 0, int)
Tao Baod7db5942015-01-28 10:07:51 -0800383/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700384#define SNDCTL_MIDI_MPUMODE _SIOWR('m', 1, int)
385#define SNDCTL_MIDI_MPUCMD _SIOWR('m', 2, mpu_command_rec)
Tao Baod7db5942015-01-28 10:07:51 -0800386#define SNDCTL_DSP_RESET _SIO('P', 0)
387#define SNDCTL_DSP_SYNC _SIO('P', 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700388/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700389#define SNDCTL_DSP_SPEED _SIOWR('P', 2, int)
390#define SNDCTL_DSP_STEREO _SIOWR('P', 3, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700391#define SNDCTL_DSP_GETBLKSIZE _SIOWR('P', 4, int)
392#define SNDCTL_DSP_SAMPLESIZE SNDCTL_DSP_SETFMT
Tao Baod7db5942015-01-28 10:07:51 -0800393/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700394#define SNDCTL_DSP_CHANNELS _SIOWR('P', 6, int)
395#define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS
Ben Cheng655a7c02013-10-16 16:09:24 -0700396#define SOUND_PCM_WRITE_FILTER _SIOWR('P', 7, int)
Tao Baod7db5942015-01-28 10:07:51 -0800397#define SNDCTL_DSP_POST _SIO('P', 8)
Ben Cheng655a7c02013-10-16 16:09:24 -0700398/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800399#define SNDCTL_DSP_SUBDIVIDE _SIOWR('P', 9, int)
400#define SNDCTL_DSP_SETFRAGMENT _SIOWR('P', 10, int)
401#define SNDCTL_DSP_GETFMTS _SIOR('P', 11, int)
402#define SNDCTL_DSP_SETFMT _SIOWR('P', 5, int)
403/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700404#define AFMT_QUERY 0x00000000
405#define AFMT_MU_LAW 0x00000001
Ben Cheng655a7c02013-10-16 16:09:24 -0700406#define AFMT_A_LAW 0x00000002
407#define AFMT_IMA_ADPCM 0x00000004
Tao Baod7db5942015-01-28 10:07:51 -0800408/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700409#define AFMT_U8 0x00000008
410#define AFMT_S16_LE 0x00000010
Ben Cheng655a7c02013-10-16 16:09:24 -0700411#define AFMT_S16_BE 0x00000020
412#define AFMT_S8 0x00000040
Tao Baod7db5942015-01-28 10:07:51 -0800413/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700414#define AFMT_U16_LE 0x00000080
415#define AFMT_U16_BE 0x00000100
Ben Cheng655a7c02013-10-16 16:09:24 -0700416#define AFMT_MPEG 0x00000200
417#define AFMT_AC3 0x00000400
Tao Baod7db5942015-01-28 10:07:51 -0800418/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700419typedef struct audio_buf_info {
Tao Baod7db5942015-01-28 10:07:51 -0800420 int fragments;
421 int fragstotal;
422 int fragsize;
Ben Cheng655a7c02013-10-16 16:09:24 -0700423/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800424 int bytes;
425} audio_buf_info;
426#define SNDCTL_DSP_GETOSPACE _SIOR('P', 12, audio_buf_info)
427#define SNDCTL_DSP_GETISPACE _SIOR('P', 13, audio_buf_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700428/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800429#define SNDCTL_DSP_NONBLOCK _SIO('P', 14)
430#define SNDCTL_DSP_GETCAPS _SIOR('P', 15, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700431#define DSP_CAP_REVISION 0x000000ff
432#define DSP_CAP_DUPLEX 0x00000100
Tao Baod7db5942015-01-28 10:07:51 -0800433/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700434#define DSP_CAP_REALTIME 0x00000200
435#define DSP_CAP_BATCH 0x00000400
Ben Cheng655a7c02013-10-16 16:09:24 -0700436#define DSP_CAP_COPROC 0x00000800
437#define DSP_CAP_TRIGGER 0x00001000
Tao Baod7db5942015-01-28 10:07:51 -0800438/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700439#define DSP_CAP_MMAP 0x00002000
440#define DSP_CAP_MULTI 0x00004000
Ben Cheng655a7c02013-10-16 16:09:24 -0700441#define DSP_CAP_BIND 0x00008000
Tao Baod7db5942015-01-28 10:07:51 -0800442#define SNDCTL_DSP_GETTRIGGER _SIOR('P', 16, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700443/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800444#define SNDCTL_DSP_SETTRIGGER _SIOW('P', 16, int)
445#define PCM_ENABLE_INPUT 0x00000001
Ben Cheng655a7c02013-10-16 16:09:24 -0700446#define PCM_ENABLE_OUTPUT 0x00000002
447typedef struct count_info {
Ben Cheng655a7c02013-10-16 16:09:24 -0700448/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800449 int bytes;
450 int blocks;
451 int ptr;
452} count_info;
Ben Cheng655a7c02013-10-16 16:09:24 -0700453/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800454#define SNDCTL_DSP_GETIPTR _SIOR('P', 17, count_info)
455#define SNDCTL_DSP_GETOPTR _SIOR('P', 18, count_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700456typedef struct buffmem_desc {
Tao Baod7db5942015-01-28 10:07:51 -0800457 unsigned * buffer;
Ben Cheng655a7c02013-10-16 16:09:24 -0700458/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800459 int size;
460} buffmem_desc;
461#define SNDCTL_DSP_MAPINBUF _SIOR('P', 19, buffmem_desc)
462#define SNDCTL_DSP_MAPOUTBUF _SIOR('P', 20, buffmem_desc)
Ben Cheng655a7c02013-10-16 16:09:24 -0700463/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800464#define SNDCTL_DSP_SETSYNCRO _SIO('P', 21)
465#define SNDCTL_DSP_SETDUPLEX _SIO('P', 22)
466#define SNDCTL_DSP_GETODELAY _SIOR('P', 23, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700467#define SNDCTL_DSP_GETCHANNELMASK _SIOWR('P', 64, int)
Tao Baod7db5942015-01-28 10:07:51 -0800468/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700469#define SNDCTL_DSP_BIND_CHANNEL _SIOWR('P', 65, int)
470#define DSP_BIND_QUERY 0x00000000
Ben Cheng655a7c02013-10-16 16:09:24 -0700471#define DSP_BIND_FRONT 0x00000001
472#define DSP_BIND_SURR 0x00000002
Tao Baod7db5942015-01-28 10:07:51 -0800473/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700474#define DSP_BIND_CENTER_LFE 0x00000004
475#define DSP_BIND_HANDSET 0x00000008
Ben Cheng655a7c02013-10-16 16:09:24 -0700476#define DSP_BIND_MIC 0x00000010
477#define DSP_BIND_MODEM1 0x00000020
Tao Baod7db5942015-01-28 10:07:51 -0800478/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700479#define DSP_BIND_MODEM2 0x00000040
480#define DSP_BIND_I2S 0x00000080
Ben Cheng655a7c02013-10-16 16:09:24 -0700481#define DSP_BIND_SPDIF 0x00000100
Tao Baod7db5942015-01-28 10:07:51 -0800482#define SNDCTL_DSP_SETSPDIF _SIOW('P', 66, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700483/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800484#define SNDCTL_DSP_GETSPDIF _SIOR('P', 67, int)
485#define SPDIF_PRO 0x0001
Ben Cheng655a7c02013-10-16 16:09:24 -0700486#define SPDIF_N_AUD 0x0002
487#define SPDIF_COPY 0x0004
Tao Baod7db5942015-01-28 10:07:51 -0800488/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700489#define SPDIF_PRE 0x0008
490#define SPDIF_CC 0x07f0
Ben Cheng655a7c02013-10-16 16:09:24 -0700491#define SPDIF_L 0x0800
492#define SPDIF_DRS 0x4000
Ben Cheng655a7c02013-10-16 16:09:24 -0700493/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800494#define SPDIF_V 0x8000
495#define SNDCTL_DSP_PROFILE _SIOW('P', 23, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700496#define APF_NORMAL 0
497#define APF_NETWORK 1
Tao Baod7db5942015-01-28 10:07:51 -0800498/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700499#define APF_CPUINTENS 2
Tao Baod7db5942015-01-28 10:07:51 -0800500#define SOUND_PCM_READ_RATE _SIOR('P', 2, int)
501#define SOUND_PCM_READ_CHANNELS _SIOR('P', 6, int)
502#define SOUND_PCM_READ_BITS _SIOR('P', 5, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700503/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800504#define SOUND_PCM_READ_FILTER _SIOR('P', 7, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700505#define SOUND_PCM_WRITE_BITS SNDCTL_DSP_SETFMT
Ben Cheng655a7c02013-10-16 16:09:24 -0700506#define SOUND_PCM_WRITE_RATE SNDCTL_DSP_SPEED
507#define SOUND_PCM_POST SNDCTL_DSP_POST
Tao Baod7db5942015-01-28 10:07:51 -0800508/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700509#define SOUND_PCM_RESET SNDCTL_DSP_RESET
510#define SOUND_PCM_SYNC SNDCTL_DSP_SYNC
Ben Cheng655a7c02013-10-16 16:09:24 -0700511#define SOUND_PCM_SUBDIVIDE SNDCTL_DSP_SUBDIVIDE
512#define SOUND_PCM_SETFRAGMENT SNDCTL_DSP_SETFRAGMENT
Tao Baod7db5942015-01-28 10:07:51 -0800513/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700514#define SOUND_PCM_GETFMTS SNDCTL_DSP_GETFMTS
515#define SOUND_PCM_SETFMT SNDCTL_DSP_SETFMT
Ben Cheng655a7c02013-10-16 16:09:24 -0700516#define SOUND_PCM_GETOSPACE SNDCTL_DSP_GETOSPACE
517#define SOUND_PCM_GETISPACE SNDCTL_DSP_GETISPACE
Tao Baod7db5942015-01-28 10:07:51 -0800518/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700519#define SOUND_PCM_NONBLOCK SNDCTL_DSP_NONBLOCK
520#define SOUND_PCM_GETCAPS SNDCTL_DSP_GETCAPS
Ben Cheng655a7c02013-10-16 16:09:24 -0700521#define SOUND_PCM_GETTRIGGER SNDCTL_DSP_GETTRIGGER
522#define SOUND_PCM_SETTRIGGER SNDCTL_DSP_SETTRIGGER
Tao Baod7db5942015-01-28 10:07:51 -0800523/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700524#define SOUND_PCM_SETSYNCRO SNDCTL_DSP_SETSYNCRO
525#define SOUND_PCM_GETIPTR SNDCTL_DSP_GETIPTR
Ben Cheng655a7c02013-10-16 16:09:24 -0700526#define SOUND_PCM_GETOPTR SNDCTL_DSP_GETOPTR
527#define SOUND_PCM_MAPINBUF SNDCTL_DSP_MAPINBUF
Tao Baod7db5942015-01-28 10:07:51 -0800528/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700529#define SOUND_PCM_MAPOUTBUF SNDCTL_DSP_MAPOUTBUF
530typedef struct copr_buffer {
Tao Baod7db5942015-01-28 10:07:51 -0800531 int command;
532 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700533/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700534#define CPF_NONE 0x0000
535#define CPF_FIRST 0x0001
Ben Cheng655a7c02013-10-16 16:09:24 -0700536#define CPF_LAST 0x0002
Tao Baod7db5942015-01-28 10:07:51 -0800537 int len;
Ben Cheng655a7c02013-10-16 16:09:24 -0700538/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800539 int offs;
540 unsigned char data[4000];
541} copr_buffer;
Ben Cheng655a7c02013-10-16 16:09:24 -0700542typedef struct copr_debug_buf {
Ben Cheng655a7c02013-10-16 16:09:24 -0700543/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800544 int command;
545 int parm1;
546 int parm2;
547 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700548/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800549 int len;
550} copr_debug_buf;
Ben Cheng655a7c02013-10-16 16:09:24 -0700551typedef struct copr_msg {
Tao Baod7db5942015-01-28 10:07:51 -0800552 int len;
Ben Cheng655a7c02013-10-16 16:09:24 -0700553/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800554 unsigned char data[4000];
555} copr_msg;
556#define SNDCTL_COPR_RESET _SIO('C', 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700557#define SNDCTL_COPR_LOAD _SIOWR('C', 1, copr_buffer)
Tao Baod7db5942015-01-28 10:07:51 -0800558/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700559#define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf)
560#define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf)
Tao Baod7db5942015-01-28 10:07:51 -0800561#define SNDCTL_COPR_WDATA _SIOW('C', 4, copr_debug_buf)
562#define SNDCTL_COPR_WCODE _SIOW('C', 5, copr_debug_buf)
Ben Cheng655a7c02013-10-16 16:09:24 -0700563/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700564#define SNDCTL_COPR_RUN _SIOWR('C', 6, copr_debug_buf)
565#define SNDCTL_COPR_HALT _SIOWR('C', 7, copr_debug_buf)
Ben Cheng655a7c02013-10-16 16:09:24 -0700566#define SNDCTL_COPR_SENDMSG _SIOWR('C', 8, copr_msg)
Tao Baod7db5942015-01-28 10:07:51 -0800567#define SNDCTL_COPR_RCVMSG _SIOR('C', 9, copr_msg)
568/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700569#define SOUND_MIXER_NRDEVICES 25
570#define SOUND_MIXER_VOLUME 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700571#define SOUND_MIXER_BASS 1
572#define SOUND_MIXER_TREBLE 2
Tao Baod7db5942015-01-28 10:07:51 -0800573/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700574#define SOUND_MIXER_SYNTH 3
575#define SOUND_MIXER_PCM 4
Ben Cheng655a7c02013-10-16 16:09:24 -0700576#define SOUND_MIXER_SPEAKER 5
577#define SOUND_MIXER_LINE 6
Tao Baod7db5942015-01-28 10:07:51 -0800578/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700579#define SOUND_MIXER_MIC 7
580#define SOUND_MIXER_CD 8
Ben Cheng655a7c02013-10-16 16:09:24 -0700581#define SOUND_MIXER_IMIX 9
582#define SOUND_MIXER_ALTPCM 10
Tao Baod7db5942015-01-28 10:07:51 -0800583/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700584#define SOUND_MIXER_RECLEV 11
585#define SOUND_MIXER_IGAIN 12
Ben Cheng655a7c02013-10-16 16:09:24 -0700586#define SOUND_MIXER_OGAIN 13
587#define SOUND_MIXER_LINE1 14
Tao Baod7db5942015-01-28 10:07:51 -0800588/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700589#define SOUND_MIXER_LINE2 15
590#define SOUND_MIXER_LINE3 16
Ben Cheng655a7c02013-10-16 16:09:24 -0700591#define SOUND_MIXER_DIGITAL1 17
592#define SOUND_MIXER_DIGITAL2 18
Tao Baod7db5942015-01-28 10:07:51 -0800593/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700594#define SOUND_MIXER_DIGITAL3 19
595#define SOUND_MIXER_PHONEIN 20
Ben Cheng655a7c02013-10-16 16:09:24 -0700596#define SOUND_MIXER_PHONEOUT 21
597#define SOUND_MIXER_VIDEO 22
Tao Baod7db5942015-01-28 10:07:51 -0800598/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700599#define SOUND_MIXER_RADIO 23
600#define SOUND_MIXER_MONITOR 24
Ben Cheng655a7c02013-10-16 16:09:24 -0700601#define SOUND_ONOFF_MIN 28
602#define SOUND_ONOFF_MAX 30
Tao Baod7db5942015-01-28 10:07:51 -0800603/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700604#define SOUND_MIXER_NONE 31
605#define SOUND_MIXER_ENHANCE SOUND_MIXER_NONE
Ben Cheng655a7c02013-10-16 16:09:24 -0700606#define SOUND_MIXER_MUTE SOUND_MIXER_NONE
607#define SOUND_MIXER_LOUD SOUND_MIXER_NONE
Ben Cheng655a7c02013-10-16 16:09:24 -0700608/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800609#define SOUND_DEVICE_LABELS { "Vol ", "Bass ", "Trebl", "Synth", "Pcm ", "Spkr ", "Line ", "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", "Line1", "Line2", "Line3", "Digital1", "Digital2", "Digital3", "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor" }
610#define SOUND_DEVICE_NAMES { "vol", "bass", "treble", "synth", "pcm", "speaker", "line", "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", "line1", "line2", "line3", "dig1", "dig2", "dig3", "phin", "phout", "video", "radio", "monitor" }
Ben Cheng655a7c02013-10-16 16:09:24 -0700611#define SOUND_MIXER_RECSRC 0xff
612#define SOUND_MIXER_DEVMASK 0xfe
Tao Baod7db5942015-01-28 10:07:51 -0800613/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700614#define SOUND_MIXER_RECMASK 0xfd
615#define SOUND_MIXER_CAPS 0xfc
Ben Cheng655a7c02013-10-16 16:09:24 -0700616#define SOUND_CAP_EXCL_INPUT 0x00000001
617#define SOUND_MIXER_STEREODEVS 0xfb
Tao Baod7db5942015-01-28 10:07:51 -0800618/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700619#define SOUND_MIXER_OUTSRC 0xfa
620#define SOUND_MIXER_OUTMASK 0xf9
Ben Cheng655a7c02013-10-16 16:09:24 -0700621#define SOUND_MASK_VOLUME (1 << SOUND_MIXER_VOLUME)
622#define SOUND_MASK_BASS (1 << SOUND_MIXER_BASS)
Tao Baod7db5942015-01-28 10:07:51 -0800623/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700624#define SOUND_MASK_TREBLE (1 << SOUND_MIXER_TREBLE)
625#define SOUND_MASK_SYNTH (1 << SOUND_MIXER_SYNTH)
Ben Cheng655a7c02013-10-16 16:09:24 -0700626#define SOUND_MASK_PCM (1 << SOUND_MIXER_PCM)
627#define SOUND_MASK_SPEAKER (1 << SOUND_MIXER_SPEAKER)
Tao Baod7db5942015-01-28 10:07:51 -0800628/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700629#define SOUND_MASK_LINE (1 << SOUND_MIXER_LINE)
630#define SOUND_MASK_MIC (1 << SOUND_MIXER_MIC)
Ben Cheng655a7c02013-10-16 16:09:24 -0700631#define SOUND_MASK_CD (1 << SOUND_MIXER_CD)
632#define SOUND_MASK_IMIX (1 << SOUND_MIXER_IMIX)
Tao Baod7db5942015-01-28 10:07:51 -0800633/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700634#define SOUND_MASK_ALTPCM (1 << SOUND_MIXER_ALTPCM)
635#define SOUND_MASK_RECLEV (1 << SOUND_MIXER_RECLEV)
Ben Cheng655a7c02013-10-16 16:09:24 -0700636#define SOUND_MASK_IGAIN (1 << SOUND_MIXER_IGAIN)
637#define SOUND_MASK_OGAIN (1 << SOUND_MIXER_OGAIN)
Tao Baod7db5942015-01-28 10:07:51 -0800638/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700639#define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1)
640#define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700641#define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3)
642#define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1)
Tao Baod7db5942015-01-28 10:07:51 -0800643/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700644#define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2)
645#define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3)
Ben Cheng655a7c02013-10-16 16:09:24 -0700646#define SOUND_MASK_PHONEIN (1 << SOUND_MIXER_PHONEIN)
647#define SOUND_MASK_PHONEOUT (1 << SOUND_MIXER_PHONEOUT)
Tao Baod7db5942015-01-28 10:07:51 -0800648/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700649#define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO)
650#define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO)
Ben Cheng655a7c02013-10-16 16:09:24 -0700651#define SOUND_MASK_MONITOR (1 << SOUND_MIXER_MONITOR)
652#define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE)
Tao Baod7db5942015-01-28 10:07:51 -0800653/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700654#define SOUND_MASK_ENHANCE (1 << SOUND_MIXER_ENHANCE)
655#define SOUND_MASK_LOUD (1 << SOUND_MIXER_LOUD)
Ben Cheng655a7c02013-10-16 16:09:24 -0700656#define MIXER_READ(dev) _SIOR('M', dev, int)
657#define SOUND_MIXER_READ_VOLUME MIXER_READ(SOUND_MIXER_VOLUME)
Tao Baod7db5942015-01-28 10:07:51 -0800658/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700659#define SOUND_MIXER_READ_BASS MIXER_READ(SOUND_MIXER_BASS)
660#define SOUND_MIXER_READ_TREBLE MIXER_READ(SOUND_MIXER_TREBLE)
Ben Cheng655a7c02013-10-16 16:09:24 -0700661#define SOUND_MIXER_READ_SYNTH MIXER_READ(SOUND_MIXER_SYNTH)
662#define SOUND_MIXER_READ_PCM MIXER_READ(SOUND_MIXER_PCM)
Tao Baod7db5942015-01-28 10:07:51 -0800663/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700664#define SOUND_MIXER_READ_SPEAKER MIXER_READ(SOUND_MIXER_SPEAKER)
665#define SOUND_MIXER_READ_LINE MIXER_READ(SOUND_MIXER_LINE)
Ben Cheng655a7c02013-10-16 16:09:24 -0700666#define SOUND_MIXER_READ_MIC MIXER_READ(SOUND_MIXER_MIC)
667#define SOUND_MIXER_READ_CD MIXER_READ(SOUND_MIXER_CD)
Tao Baod7db5942015-01-28 10:07:51 -0800668/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700669#define SOUND_MIXER_READ_IMIX MIXER_READ(SOUND_MIXER_IMIX)
670#define SOUND_MIXER_READ_ALTPCM MIXER_READ(SOUND_MIXER_ALTPCM)
Ben Cheng655a7c02013-10-16 16:09:24 -0700671#define SOUND_MIXER_READ_RECLEV MIXER_READ(SOUND_MIXER_RECLEV)
672#define SOUND_MIXER_READ_IGAIN MIXER_READ(SOUND_MIXER_IGAIN)
Tao Baod7db5942015-01-28 10:07:51 -0800673/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700674#define SOUND_MIXER_READ_OGAIN MIXER_READ(SOUND_MIXER_OGAIN)
675#define SOUND_MIXER_READ_LINE1 MIXER_READ(SOUND_MIXER_LINE1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700676#define SOUND_MIXER_READ_LINE2 MIXER_READ(SOUND_MIXER_LINE2)
677#define SOUND_MIXER_READ_LINE3 MIXER_READ(SOUND_MIXER_LINE3)
Tao Baod7db5942015-01-28 10:07:51 -0800678/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700679#define SOUND_MIXER_READ_MUTE MIXER_READ(SOUND_MIXER_MUTE)
680#define SOUND_MIXER_READ_ENHANCE MIXER_READ(SOUND_MIXER_ENHANCE)
Ben Cheng655a7c02013-10-16 16:09:24 -0700681#define SOUND_MIXER_READ_LOUD MIXER_READ(SOUND_MIXER_LOUD)
682#define SOUND_MIXER_READ_RECSRC MIXER_READ(SOUND_MIXER_RECSRC)
Tao Baod7db5942015-01-28 10:07:51 -0800683/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700684#define SOUND_MIXER_READ_DEVMASK MIXER_READ(SOUND_MIXER_DEVMASK)
685#define SOUND_MIXER_READ_RECMASK MIXER_READ(SOUND_MIXER_RECMASK)
Ben Cheng655a7c02013-10-16 16:09:24 -0700686#define SOUND_MIXER_READ_STEREODEVS MIXER_READ(SOUND_MIXER_STEREODEVS)
687#define SOUND_MIXER_READ_CAPS MIXER_READ(SOUND_MIXER_CAPS)
Tao Baod7db5942015-01-28 10:07:51 -0800688/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700689#define MIXER_WRITE(dev) _SIOWR('M', dev, int)
690#define SOUND_MIXER_WRITE_VOLUME MIXER_WRITE(SOUND_MIXER_VOLUME)
Ben Cheng655a7c02013-10-16 16:09:24 -0700691#define SOUND_MIXER_WRITE_BASS MIXER_WRITE(SOUND_MIXER_BASS)
692#define SOUND_MIXER_WRITE_TREBLE MIXER_WRITE(SOUND_MIXER_TREBLE)
Tao Baod7db5942015-01-28 10:07:51 -0800693/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700694#define SOUND_MIXER_WRITE_SYNTH MIXER_WRITE(SOUND_MIXER_SYNTH)
695#define SOUND_MIXER_WRITE_PCM MIXER_WRITE(SOUND_MIXER_PCM)
Ben Cheng655a7c02013-10-16 16:09:24 -0700696#define SOUND_MIXER_WRITE_SPEAKER MIXER_WRITE(SOUND_MIXER_SPEAKER)
697#define SOUND_MIXER_WRITE_LINE MIXER_WRITE(SOUND_MIXER_LINE)
Tao Baod7db5942015-01-28 10:07:51 -0800698/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700699#define SOUND_MIXER_WRITE_MIC MIXER_WRITE(SOUND_MIXER_MIC)
700#define SOUND_MIXER_WRITE_CD MIXER_WRITE(SOUND_MIXER_CD)
Ben Cheng655a7c02013-10-16 16:09:24 -0700701#define SOUND_MIXER_WRITE_IMIX MIXER_WRITE(SOUND_MIXER_IMIX)
702#define SOUND_MIXER_WRITE_ALTPCM MIXER_WRITE(SOUND_MIXER_ALTPCM)
Tao Baod7db5942015-01-28 10:07:51 -0800703/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700704#define SOUND_MIXER_WRITE_RECLEV MIXER_WRITE(SOUND_MIXER_RECLEV)
705#define SOUND_MIXER_WRITE_IGAIN MIXER_WRITE(SOUND_MIXER_IGAIN)
Ben Cheng655a7c02013-10-16 16:09:24 -0700706#define SOUND_MIXER_WRITE_OGAIN MIXER_WRITE(SOUND_MIXER_OGAIN)
707#define SOUND_MIXER_WRITE_LINE1 MIXER_WRITE(SOUND_MIXER_LINE1)
Tao Baod7db5942015-01-28 10:07:51 -0800708/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700709#define SOUND_MIXER_WRITE_LINE2 MIXER_WRITE(SOUND_MIXER_LINE2)
710#define SOUND_MIXER_WRITE_LINE3 MIXER_WRITE(SOUND_MIXER_LINE3)
Ben Cheng655a7c02013-10-16 16:09:24 -0700711#define SOUND_MIXER_WRITE_MUTE MIXER_WRITE(SOUND_MIXER_MUTE)
712#define SOUND_MIXER_WRITE_ENHANCE MIXER_WRITE(SOUND_MIXER_ENHANCE)
Tao Baod7db5942015-01-28 10:07:51 -0800713/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700714#define SOUND_MIXER_WRITE_LOUD MIXER_WRITE(SOUND_MIXER_LOUD)
715#define SOUND_MIXER_WRITE_RECSRC MIXER_WRITE(SOUND_MIXER_RECSRC)
Tao Baod7db5942015-01-28 10:07:51 -0800716typedef struct mixer_info {
717 char id[16];
Ben Cheng655a7c02013-10-16 16:09:24 -0700718/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800719 char name[32];
720 int modify_counter;
721 int fillers[10];
Ben Cheng655a7c02013-10-16 16:09:24 -0700722} mixer_info;
Ben Cheng655a7c02013-10-16 16:09:24 -0700723/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800724typedef struct _old_mixer_info {
725 char id[16];
726 char name[32];
Ben Cheng655a7c02013-10-16 16:09:24 -0700727} _old_mixer_info;
728/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800729#define SOUND_MIXER_INFO _SIOR('M', 101, mixer_info)
730#define SOUND_OLD_MIXER_INFO _SIOR('M', 101, _old_mixer_info)
Ben Cheng655a7c02013-10-16 16:09:24 -0700731typedef unsigned char mixer_record[128];
732#define SOUND_MIXER_ACCESS _SIOWR('M', 102, mixer_record)
733/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
734#define SOUND_MIXER_AGC _SIOWR('M', 103, int)
735#define SOUND_MIXER_3DSE _SIOWR('M', 104, int)
736#define SOUND_MIXER_PRIVATE1 _SIOWR('M', 111, int)
737#define SOUND_MIXER_PRIVATE2 _SIOWR('M', 112, int)
738/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
739#define SOUND_MIXER_PRIVATE3 _SIOWR('M', 113, int)
740#define SOUND_MIXER_PRIVATE4 _SIOWR('M', 114, int)
741#define SOUND_MIXER_PRIVATE5 _SIOWR('M', 115, int)
742typedef struct mixer_vol_table {
743/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800744 int num;
745 char name[32];
746 int levels[32];
Ben Cheng655a7c02013-10-16 16:09:24 -0700747} mixer_vol_table;
748/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
749#define SOUND_MIXER_GETLEVELS _SIOWR('M', 116, mixer_vol_table)
750#define SOUND_MIXER_SETLEVELS _SIOWR('M', 117, mixer_vol_table)
Tao Baod7db5942015-01-28 10:07:51 -0800751#define OSS_GETVERSION _SIOR('M', 118, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700752#define EV_SEQ_LOCAL 0x80
753/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
754#define EV_TIMING 0x81
755#define EV_CHN_COMMON 0x92
756#define EV_CHN_VOICE 0x93
757#define EV_SYSEX 0x94
758/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
759#define MIDI_NOTEOFF 0x80
760#define MIDI_NOTEON 0x90
761#define MIDI_KEY_PRESSURE 0xA0
762#define MIDI_CTL_CHANGE 0xB0
763/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
764#define MIDI_PGM_CHANGE 0xC0
765#define MIDI_CHN_PRESSURE 0xD0
766#define MIDI_PITCH_BEND 0xE0
767#define MIDI_SYSTEM_PREFIX 0xF0
768/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
769#define TMR_WAIT_REL 1
770#define TMR_WAIT_ABS 2
771#define TMR_STOP 3
772#define TMR_START 4
773/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
774#define TMR_CONTINUE 5
775#define TMR_TEMPO 6
776#define TMR_ECHO 8
777#define TMR_CLOCK 9
778/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
779#define TMR_SPP 10
780#define TMR_TIMESIG 11
781#define LOCL_STARTAUDIO 1
782#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
783/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
784#define SEQ_PM_DEFINES int __foo_bar___
Tao Baod7db5942015-01-28 10:07:51 -0800785#define SEQ_LOAD_GMINSTR(dev,instr)
786#define SEQ_LOAD_GMDRUM(dev,drum)
Ben Cheng655a7c02013-10-16 16:09:24 -0700787#define _SEQ_EXTERN extern
788/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800789#define SEQ_USE_EXTBUF() _SEQ_EXTERN unsigned char _seqbuf[]; _SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr
Ben Cheng655a7c02013-10-16 16:09:24 -0700790#ifndef USE_SIMPLE_MACROS
Tao Baod7db5942015-01-28 10:07:51 -0800791#define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len; int _seqbufptr = 0
792#define _SEQ_NEEDBUF(len) if((_seqbufptr + (len)) > _seqbuflen) seqbuf_dump()
Ben Cheng655a7c02013-10-16 16:09:24 -0700793/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
794#define _SEQ_ADVBUF(len) _seqbufptr += len
795#define SEQ_DUMPBUF seqbuf_dump
796#else
797#define _SEQ_NEEDBUF(len)
798/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
799#endif
Tao Baod7db5942015-01-28 10:07:51 -0800800#define SEQ_VOLUME_MODE(dev,mode) { _SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = SEQ_EXTENDED; _seqbuf[_seqbufptr + 1] = SEQ_VOLMODE; _seqbuf[_seqbufptr + 2] = (dev); _seqbuf[_seqbufptr + 3] = (mode); _seqbuf[_seqbufptr + 4] = 0; _seqbuf[_seqbufptr + 5] = 0; _seqbuf[_seqbufptr + 6] = 0; _seqbuf[_seqbufptr + 7] = 0; _SEQ_ADVBUF(8); }
801#define _CHN_VOICE(dev,event,chn,note,parm) { _SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = EV_CHN_VOICE; _seqbuf[_seqbufptr + 1] = (dev); _seqbuf[_seqbufptr + 2] = (event); _seqbuf[_seqbufptr + 3] = (chn); _seqbuf[_seqbufptr + 4] = (note); _seqbuf[_seqbufptr + 5] = (parm); _seqbuf[_seqbufptr + 6] = (0); _seqbuf[_seqbufptr + 7] = 0; _SEQ_ADVBUF(8); }
802#define SEQ_START_NOTE(dev,chn,note,vol) _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol)
Ben Cheng655a7c02013-10-16 16:09:24 -0700803/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800804#define SEQ_STOP_NOTE(dev,chn,note,vol) _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol)
805#define SEQ_KEY_PRESSURE(dev,chn,note,pressure) _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure)
806#define _CHN_COMMON(dev,event,chn,p1,p2,w14) { _SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = EV_CHN_COMMON; _seqbuf[_seqbufptr + 1] = (dev); _seqbuf[_seqbufptr + 2] = (event); _seqbuf[_seqbufptr + 3] = (chn); _seqbuf[_seqbufptr + 4] = (p1); _seqbuf[_seqbufptr + 5] = (p2); * (short *) & _seqbuf[_seqbufptr + 6] = (w14); _SEQ_ADVBUF(8); }
807#define SEQ_SYSEX(dev,buf,len) { int ii, ll = (len); unsigned char * bufp = buf; if(ll > 6) ll = 6; _SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = EV_SYSEX; _seqbuf[_seqbufptr + 1] = (dev); for(ii = 0; ii < ll; ii ++) _seqbuf[_seqbufptr + ii + 2] = bufp[ii]; for(ii = ll; ii < 6; ii ++) _seqbuf[_seqbufptr + ii + 2] = 0xff; _SEQ_ADVBUF(8); }
Ben Cheng655a7c02013-10-16 16:09:24 -0700808/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800809#define SEQ_CHN_PRESSURE(dev,chn,pressure) _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700810#define SEQ_SET_PATCH SEQ_PGM_CHANGE
Tao Baod7db5942015-01-28 10:07:51 -0800811#define SEQ_PGM_CHANGE(dev,chn,patch) _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
812#define SEQ_CONTROL(dev,chn,controller,value) _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)
Ben Cheng655a7c02013-10-16 16:09:24 -0700813/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800814#define SEQ_BENDER(dev,chn,value) _CHN_COMMON(dev, MIDI_PITCH_BEND, chn, 0, 0, value)
815#define SEQ_V2_X_CONTROL(dev,voice,controller,value) { _SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = SEQ_EXTENDED; _seqbuf[_seqbufptr + 1] = SEQ_CONTROLLER; _seqbuf[_seqbufptr + 2] = (dev); _seqbuf[_seqbufptr + 3] = (voice); _seqbuf[_seqbufptr + 4] = (controller); _seqbuf[_seqbufptr + 5] = ((value) & 0xff); _seqbuf[_seqbufptr + 6] = ((value >> 8) & 0xff); _seqbuf[_seqbufptr + 7] = 0; _SEQ_ADVBUF(8); }
816#define SEQ_PITCHBEND(dev,voice,value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value)
817#define SEQ_BENDER_RANGE(dev,voice,value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value)
Ben Cheng655a7c02013-10-16 16:09:24 -0700818/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800819#define SEQ_EXPRESSION(dev,voice,value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value * 128)
820#define SEQ_MAIN_VOLUME(dev,voice,value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value * 16383) / 100)
821#define SEQ_PANNING(dev,voice,pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos + 128) / 2)
822#define _TIMER_EVENT(ev,parm) { _SEQ_NEEDBUF(8); _seqbuf[_seqbufptr + 0] = EV_TIMING; _seqbuf[_seqbufptr + 1] = (ev); _seqbuf[_seqbufptr + 2] = 0; _seqbuf[_seqbufptr + 3] = 0; * (unsigned int *) & _seqbuf[_seqbufptr + 4] = (parm); _SEQ_ADVBUF(8); }
Ben Cheng655a7c02013-10-16 16:09:24 -0700823/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
824#define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0)
825#define SEQ_STOP_TIMER() _TIMER_EVENT(TMR_STOP, 0)
826#define SEQ_CONTINUE_TIMER() _TIMER_EVENT(TMR_CONTINUE, 0)
827#define SEQ_WAIT_TIME(ticks) _TIMER_EVENT(TMR_WAIT_ABS, ticks)
828/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
829#define SEQ_DELTA_TIME(ticks) _TIMER_EVENT(TMR_WAIT_REL, ticks)
830#define SEQ_ECHO_BACK(key) _TIMER_EVENT(TMR_ECHO, key)
831#define SEQ_SET_TEMPO(value) _TIMER_EVENT(TMR_TEMPO, value)
832#define SEQ_SONGPOS(pos) _TIMER_EVENT(TMR_SPP, pos)
833/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
834#define SEQ_TIME_SIGNATURE(sig) _TIMER_EVENT(TMR_TIMESIG, sig)
Tao Baod7db5942015-01-28 10:07:51 -0800835#define _LOCAL_EVENT(ev,parm) { _SEQ_NEEDBUF(8); _seqbuf[_seqbufptr + 0] = EV_SEQ_LOCAL; _seqbuf[_seqbufptr + 1] = (ev); _seqbuf[_seqbufptr + 2] = 0; _seqbuf[_seqbufptr + 3] = 0; * (unsigned int *) & _seqbuf[_seqbufptr + 4] = (parm); _SEQ_ADVBUF(8); }
Ben Cheng655a7c02013-10-16 16:09:24 -0700836#define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask)
Tao Baod7db5942015-01-28 10:07:51 -0800837#define SEQ_MIDIOUT(device,byte) { _SEQ_NEEDBUF(4); _seqbuf[_seqbufptr] = SEQ_MIDIPUTC; _seqbuf[_seqbufptr + 1] = (byte); _seqbuf[_seqbufptr + 2] = (device); _seqbuf[_seqbufptr + 3] = 0; _SEQ_ADVBUF(4); }
Ben Cheng655a7c02013-10-16 16:09:24 -0700838/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800839#define SEQ_WRPATCH(patchx,len) { if(_seqbufptr) SEQ_DUMPBUF(); if(write(seqfd, (char *) (patchx), len) == - 1) perror("Write patch: /dev/sequencer"); }
840#define SEQ_WRPATCH2(patchx,len) (SEQ_DUMPBUF(), write(seqfd, (char *) (patchx), len))
Ben Cheng655a7c02013-10-16 16:09:24 -0700841#endif