wavefront.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696
  1. #ifndef __SOUND_WAVEFRONT_H__
  2. #define __SOUND_WAVEFRONT_H__
  3. /*
  4. * Driver for Turtle Beach Wavefront cards (Maui,Tropez,Tropez+)
  5. *
  6. * Copyright (c) by Paul Barton-Davis <pbd@op.net>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. */
  22. #if (!defined(__GNUC__) && !defined(__GNUG__))
  23. You will not be able to compile this file correctly without gcc, because
  24. it is necessary to pack the "wavefront_alias" structure to a size
  25. of 22 bytes, corresponding to 16-bit alignment (as would have been
  26. the case on the original platform, MS-DOS). If this is not done,
  27. then WavePatch-format files cannot be read/written correctly.
  28. The method used to do this here ("__attribute__((packed)") is
  29. completely compiler dependent.
  30. All other wavefront_* types end up aligned to 32 bit values and
  31. still have the same (correct) size.
  32. #else
  33. /* However, note that as of G++ 2.7.3.2, g++ was unable to
  34. correctly parse *type* __attribute__ tags. It will do the
  35. right thing if we use the "packed" attribute on each struct
  36. member, which has the same semantics anyway.
  37. */
  38. #endif /* __GNUC__ */
  39. /***************************** WARNING ********************************
  40. PLEASE DO NOT MODIFY THIS FILE IN ANY WAY THAT AFFECTS ITS ABILITY TO
  41. BE USED WITH EITHER C *OR* C++.
  42. **********************************************************************/
  43. #ifndef NUM_MIDIKEYS
  44. #define NUM_MIDIKEYS 128
  45. #endif /* NUM_MIDIKEYS */
  46. #ifndef NUM_MIDICHANNELS
  47. #define NUM_MIDICHANNELS 16
  48. #endif /* NUM_MIDICHANNELS */
  49. /* These are very useful/important. the original wavefront interface
  50. was developed on a 16 bit system, where sizeof(int) = 2
  51. bytes. Defining things like this makes the code much more portable, and
  52. easier to understand without having to toggle back and forth
  53. between a 16-bit view of the world and a 32-bit one.
  54. */
  55. #ifndef __KERNEL__
  56. /* keep them for compatibility */
  57. typedef short s16;
  58. typedef unsigned short u16;
  59. typedef int s32;
  60. typedef unsigned int u32;
  61. typedef char s8;
  62. typedef unsigned char u8;
  63. typedef s16 INT16;
  64. typedef u16 UINT16;
  65. typedef s32 INT32;
  66. typedef u32 UINT32;
  67. typedef s8 CHAR8;
  68. typedef u8 UCHAR8;
  69. #endif
  70. /* Pseudo-commands not part of the WaveFront command set.
  71. These are used for various driver controls and direct
  72. hardware control.
  73. */
  74. #define WFC_DEBUG_DRIVER 0
  75. #define WFC_FX_IOCTL 1
  76. #define WFC_PATCH_STATUS 2
  77. #define WFC_PROGRAM_STATUS 3
  78. #define WFC_SAMPLE_STATUS 4
  79. #define WFC_DISABLE_INTERRUPTS 5
  80. #define WFC_ENABLE_INTERRUPTS 6
  81. #define WFC_INTERRUPT_STATUS 7
  82. #define WFC_ROMSAMPLES_RDONLY 8
  83. #define WFC_IDENTIFY_SLOT_TYPE 9
  84. /* Wavefront synth commands
  85. */
  86. #define WFC_DOWNLOAD_SAMPLE 0x80
  87. #define WFC_DOWNLOAD_BLOCK 0x81
  88. #define WFC_DOWNLOAD_MULTISAMPLE 0x82
  89. #define WFC_DOWNLOAD_SAMPLE_ALIAS 0x83
  90. #define WFC_DELETE_SAMPLE 0x84
  91. #define WFC_REPORT_FREE_MEMORY 0x85
  92. #define WFC_DOWNLOAD_PATCH 0x86
  93. #define WFC_DOWNLOAD_PROGRAM 0x87
  94. #define WFC_SET_SYNTHVOL 0x89
  95. #define WFC_SET_NVOICES 0x8B
  96. #define WFC_DOWNLOAD_DRUM 0x90
  97. #define WFC_GET_SYNTHVOL 0x92
  98. #define WFC_GET_NVOICES 0x94
  99. #define WFC_DISABLE_CHANNEL 0x9A
  100. #define WFC_ENABLE_CHANNEL 0x9B
  101. #define WFC_MISYNTH_OFF 0x9D
  102. #define WFC_MISYNTH_ON 0x9E
  103. #define WFC_FIRMWARE_VERSION 0x9F
  104. #define WFC_GET_NSAMPLES 0xA0
  105. #define WFC_DISABLE_DRUM_PROGRAM 0xA2
  106. #define WFC_UPLOAD_PATCH 0xA3
  107. #define WFC_UPLOAD_PROGRAM 0xA4
  108. #define WFC_SET_TUNING 0xA6
  109. #define WFC_GET_TUNING 0xA7
  110. #define WFC_VMIDI_ON 0xA8
  111. #define WFC_VMIDI_OFF 0xA9
  112. #define WFC_MIDI_STATUS 0xAA
  113. #define WFC_GET_CHANNEL_STATUS 0xAB
  114. #define WFC_DOWNLOAD_SAMPLE_HEADER 0xAC
  115. #define WFC_UPLOAD_SAMPLE_HEADER 0xAD
  116. #define WFC_UPLOAD_MULTISAMPLE 0xAE
  117. #define WFC_UPLOAD_SAMPLE_ALIAS 0xAF
  118. #define WFC_IDENTIFY_SAMPLE_TYPE 0xB0
  119. #define WFC_DOWNLOAD_EDRUM_PROGRAM 0xB1
  120. #define WFC_UPLOAD_EDRUM_PROGRAM 0xB2
  121. #define WFC_SET_EDRUM_CHANNEL 0xB3
  122. #define WFC_INSTOUT_LEVELS 0xB4
  123. #define WFC_PEAKOUT_LEVELS 0xB5
  124. #define WFC_REPORT_CHANNEL_PROGRAMS 0xB6
  125. #define WFC_HARDWARE_VERSION 0xCF
  126. #define WFC_UPLOAD_SAMPLE_PARAMS 0xD7
  127. #define WFC_DOWNLOAD_OS 0xF1
  128. #define WFC_NOOP 0xFF
  129. #define WF_MAX_SAMPLE 512
  130. #define WF_MAX_PATCH 256
  131. #define WF_MAX_PROGRAM 128
  132. #define WF_SECTION_MAX 44 /* longest OS section length */
  133. /* # of bytes we send to the board when sending it various kinds of
  134. substantive data, such as samples, patches and programs.
  135. */
  136. #define WF_PROGRAM_BYTES 32
  137. #define WF_PATCH_BYTES 132
  138. #define WF_SAMPLE_BYTES 27
  139. #define WF_SAMPLE_HDR_BYTES 25
  140. #define WF_ALIAS_BYTES 25
  141. #define WF_DRUM_BYTES 9
  142. #define WF_MSAMPLE_BYTES 259 /* (MIDI_KEYS * 2) + 3 */
  143. #define WF_ACK 0x80
  144. #define WF_DMA_ACK 0x81
  145. /* OR-values for MIDI status bits */
  146. #define WF_MIDI_VIRTUAL_ENABLED 0x1
  147. #define WF_MIDI_VIRTUAL_IS_EXTERNAL 0x2
  148. #define WF_MIDI_IN_TO_SYNTH_DISABLED 0x4
  149. /* slot indexes for struct address_info: makes code a little more mnemonic */
  150. #define WF_SYNTH_SLOT 0
  151. #define WF_INTERNAL_MIDI_SLOT 1
  152. #define WF_EXTERNAL_MIDI_SLOT 2
  153. /* Magic MIDI bytes used to switch I/O streams on the ICS2115 MPU401
  154. emulation. Note these NEVER show up in output from the device and
  155. should NEVER be used in input unless Virtual MIDI mode has been
  156. disabled. If they do show up as input, the results are unpredictable.
  157. */
  158. #define WF_EXTERNAL_SWITCH 0xFD
  159. #define WF_INTERNAL_SWITCH 0xF9
  160. /* Debugging flags */
  161. #define WF_DEBUG_CMD 0x1
  162. #define WF_DEBUG_DATA 0x2
  163. #define WF_DEBUG_LOAD_PATCH 0x4
  164. #define WF_DEBUG_IO 0x8
  165. /* WavePatch file format stuff */
  166. #define WF_WAVEPATCH_VERSION 120; /* Current version number (1.2) */
  167. #define WF_MAX_COMMENT 64 /* Comment length */
  168. #define WF_NUM_LAYERS 4
  169. #define WF_NAME_LENGTH 32
  170. #define WF_SOURCE_LENGTH 260
  171. #define BankFileID "Bank"
  172. #define DrumkitFileID "DrumKit"
  173. #define ProgramFileID "Program"
  174. struct wf_envelope
  175. {
  176. u8 attack_time:7;
  177. u8 Unused1:1;
  178. u8 decay1_time:7;
  179. u8 Unused2:1;
  180. u8 decay2_time:7;
  181. u8 Unused3:1;
  182. u8 sustain_time:7;
  183. u8 Unused4:1;
  184. u8 release_time:7;
  185. u8 Unused5:1;
  186. u8 release2_time:7;
  187. u8 Unused6:1;
  188. s8 attack_level;
  189. s8 decay1_level;
  190. s8 decay2_level;
  191. s8 sustain_level;
  192. s8 release_level;
  193. u8 attack_velocity:7;
  194. u8 Unused7:1;
  195. u8 volume_velocity:7;
  196. u8 Unused8:1;
  197. u8 keyboard_scaling:7;
  198. u8 Unused9:1;
  199. };
  200. typedef struct wf_envelope wavefront_envelope;
  201. struct wf_lfo
  202. {
  203. u8 sample_number;
  204. u8 frequency:7;
  205. u8 Unused1:1;
  206. u8 am_src:4;
  207. u8 fm_src:4;
  208. s8 fm_amount;
  209. s8 am_amount;
  210. s8 start_level;
  211. s8 end_level;
  212. u8 ramp_delay:7;
  213. u8 wave_restart:1; /* for LFO2 only */
  214. u8 ramp_time:7;
  215. u8 Unused2:1;
  216. };
  217. typedef struct wf_lfo wavefront_lfo;
  218. struct wf_patch
  219. {
  220. s16 frequency_bias; /* ** THIS IS IN MOTOROLA FORMAT!! ** */
  221. u8 amplitude_bias:7;
  222. u8 Unused1:1;
  223. u8 portamento:7;
  224. u8 Unused2:1;
  225. u8 sample_number;
  226. u8 pitch_bend:4;
  227. u8 sample_msb:1;
  228. u8 Unused3:3;
  229. u8 mono:1;
  230. u8 retrigger:1;
  231. u8 nohold:1;
  232. u8 restart:1;
  233. u8 filterconfig:2; /* SDK says "not used" */
  234. u8 reuse:1;
  235. u8 reset_lfo:1;
  236. u8 fm_src2:4;
  237. u8 fm_src1:4;
  238. s8 fm_amount1;
  239. s8 fm_amount2;
  240. u8 am_src:4;
  241. u8 Unused4:4;
  242. s8 am_amount;
  243. u8 fc1_mode:4;
  244. u8 fc2_mode:4;
  245. s8 fc1_mod_amount;
  246. s8 fc1_keyboard_scaling;
  247. s8 fc1_bias;
  248. s8 fc2_mod_amount;
  249. s8 fc2_keyboard_scaling;
  250. s8 fc2_bias;
  251. u8 randomizer:7;
  252. u8 Unused5:1;
  253. struct wf_envelope envelope1;
  254. struct wf_envelope envelope2;
  255. struct wf_lfo lfo1;
  256. struct wf_lfo lfo2;
  257. };
  258. typedef struct wf_patch wavefront_patch;
  259. struct wf_layer
  260. {
  261. u8 patch_number;
  262. u8 mix_level:7;
  263. u8 mute:1;
  264. u8 split_point:7;
  265. u8 play_below:1;
  266. u8 pan_mod_src:2;
  267. u8 pan_or_mod:1;
  268. u8 pan:4;
  269. u8 split_type:1;
  270. };
  271. typedef struct wf_layer wavefront_layer;
  272. struct wf_program
  273. {
  274. struct wf_layer layer[WF_NUM_LAYERS];
  275. };
  276. typedef struct wf_program wavefront_program;
  277. struct wf_sample_offset
  278. {
  279. s32 Fraction:4;
  280. s32 Integer:20;
  281. s32 Unused:8;
  282. };
  283. typedef struct wf_sample_offset wavefront_sample_offset;
  284. /* Sample slot types */
  285. #define WF_ST_SAMPLE 0
  286. #define WF_ST_MULTISAMPLE 1
  287. #define WF_ST_ALIAS 2
  288. #define WF_ST_EMPTY 3
  289. /* pseudo's */
  290. #define WF_ST_DRUM 4
  291. #define WF_ST_PROGRAM 5
  292. #define WF_ST_PATCH 6
  293. #define WF_ST_SAMPLEHDR 7
  294. #define WF_ST_MASK 0xf
  295. /* Flags for slot status. These occupy the upper bits of the same byte
  296. as a sample type.
  297. */
  298. #define WF_SLOT_USED 0x80 /* XXX don't rely on this being accurate */
  299. #define WF_SLOT_FILLED 0x40
  300. #define WF_SLOT_ROM 0x20
  301. #define WF_SLOT_MASK 0xf0
  302. /* channel constants */
  303. #define WF_CH_MONO 0
  304. #define WF_CH_LEFT 1
  305. #define WF_CH_RIGHT 2
  306. /* Sample formats */
  307. #define LINEAR_16BIT 0
  308. #define WHITE_NOISE 1
  309. #define LINEAR_8BIT 2
  310. #define MULAW_8BIT 3
  311. #define WF_SAMPLE_IS_8BIT(smpl) ((smpl)->SampleResolution&2)
  312. /*
  313. Because most/all of the sample data we pass in via pointers has
  314. never been copied (just mmap-ed into user space straight from the
  315. disk), it would be nice to allow handling of multi-channel sample
  316. data without forcing user-level extraction of the relevant bytes.
  317. So, we need a way of specifying which channel to use (the WaveFront
  318. only handles mono samples in a given slot), and the only way to do
  319. this without using some struct other than wavefront_sample as the
  320. interface is the awful hack of using the unused bits in a
  321. wavefront_sample:
  322. Val Meaning
  323. --- -------
  324. 0 no channel selection (use channel 1, sample is MONO)
  325. 1 use first channel, and skip one
  326. 2 use second channel, and skip one
  327. 3 use third channel, and skip two
  328. 4 use fourth channel, skip three
  329. 5 use fifth channel, skip four
  330. 6 use six channel, skip five
  331. This can handle up to 4 channels, and anyone downloading >4 channels
  332. of sample data just to select one of them needs to find some tools
  333. like sox ...
  334. NOTE: values 0, 1 and 2 correspond to WF_CH_* above. This is
  335. important.
  336. */
  337. #define WF_SET_CHANNEL(samp,chn) \
  338. (samp)->Unused1 = chn & 0x1; \
  339. (samp)->Unused2 = chn & 0x2; \
  340. (samp)->Unused3 = chn & 0x4
  341. #define WF_GET_CHANNEL(samp) \
  342. (((samp)->Unused3 << 2)|((samp)->Unused2<<1)|(samp)->Unused1)
  343. typedef struct wf_sample {
  344. struct wf_sample_offset sampleStartOffset;
  345. struct wf_sample_offset loopStartOffset;
  346. struct wf_sample_offset loopEndOffset;
  347. struct wf_sample_offset sampleEndOffset;
  348. s16 FrequencyBias;
  349. u8 SampleResolution:2; /* sample_format */
  350. u8 Unused1:1;
  351. u8 Loop:1;
  352. u8 Bidirectional:1;
  353. u8 Unused2:1;
  354. u8 Reverse:1;
  355. u8 Unused3:1;
  356. } wavefront_sample;
  357. typedef struct wf_multisample {
  358. s16 NumberOfSamples; /* log2 of the number of samples */
  359. s16 SampleNumber[NUM_MIDIKEYS];
  360. } wavefront_multisample;
  361. typedef struct wf_alias {
  362. s16 OriginalSample;
  363. struct wf_sample_offset sampleStartOffset;
  364. struct wf_sample_offset loopStartOffset;
  365. struct wf_sample_offset sampleEndOffset;
  366. struct wf_sample_offset loopEndOffset;
  367. s16 FrequencyBias;
  368. u8 SampleResolution:2;
  369. u8 Unused1:1;
  370. u8 Loop:1;
  371. u8 Bidirectional:1;
  372. u8 Unused2:1;
  373. u8 Reverse:1;
  374. u8 Unused3:1;
  375. /* This structure is meant to be padded only to 16 bits on their
  376. original. Of course, whoever wrote their documentation didn't
  377. realize that sizeof(struct) can be >=
  378. sum(sizeof(struct-fields)) and so thought that giving a C level
  379. description of the structs used in WavePatch files was
  380. sufficient. I suppose it was, as long as you remember the
  381. standard 16->32 bit issues.
  382. */
  383. u8 sixteen_bit_padding;
  384. } __attribute__((packed)) wavefront_alias;
  385. typedef struct wf_drum {
  386. u8 PatchNumber;
  387. u8 MixLevel:7;
  388. u8 Unmute:1;
  389. u8 Group:4;
  390. u8 Unused1:4;
  391. u8 PanModSource:2;
  392. u8 PanModulated:1;
  393. u8 PanAmount:4;
  394. u8 Unused2:1;
  395. } wavefront_drum;
  396. typedef struct wf_drumkit {
  397. struct wf_drum drum[NUM_MIDIKEYS];
  398. } wavefront_drumkit;
  399. typedef struct wf_channel_programs {
  400. u8 Program[NUM_MIDICHANNELS];
  401. } wavefront_channel_programs;
  402. /* How to get MIDI channel status from the data returned by
  403. a WFC_GET_CHANNEL_STATUS command (a struct wf_channel_programs)
  404. */
  405. #define WF_CHANNEL_STATUS(ch,wcp) (wcp)[(ch/7)] & (1<<((ch)%7))
  406. typedef union wf_any {
  407. wavefront_sample s;
  408. wavefront_multisample ms;
  409. wavefront_alias a;
  410. wavefront_program pr;
  411. wavefront_patch p;
  412. wavefront_drum d;
  413. } wavefront_any;
  414. /* Hannu Solvainen hoped that his "patch_info" struct in soundcard.h
  415. might work for other wave-table based patch loading situations.
  416. Alas, his fears were correct. The WaveFront doesn't even come with
  417. just "patches", but several different kind of structures that
  418. control the sound generation process.
  419. */
  420. typedef struct wf_patch_info {
  421. /* the first two fields are used by the OSS "patch loading" interface
  422. only, and are unused by the current user-level library.
  423. */
  424. s16 key; /* Use WAVEFRONT_PATCH here */
  425. u16 devno; /* fill in when sending */
  426. u8 subkey; /* WF_ST_{SAMPLE,ALIAS,etc.} */
  427. #define WAVEFRONT_FIND_FREE_SAMPLE_SLOT 999
  428. u16 number; /* patch/sample/prog number */
  429. u32 size; /* size of any data included in
  430. one of the fields in `hdrptr', or
  431. as `dataptr'.
  432. NOTE: for actual samples, this is
  433. the size of the *SELECTED CHANNEL*
  434. even if more data is actually available.
  435. So, a stereo sample (2 channels) of
  436. 6000 bytes total has `size' = 3000.
  437. See the macros and comments for
  438. WF_{GET,SET}_CHANNEL above.
  439. */
  440. wavefront_any __user *hdrptr; /* user-space ptr to hdr bytes */
  441. u16 __user *dataptr; /* actual sample data */
  442. wavefront_any hdr; /* kernel-space copy of hdr bytes */
  443. } wavefront_patch_info;
  444. /* The maximum number of bytes we will ever move to or from user space
  445. in response to a WFC_* command. This obviously doesn't cover
  446. actual sample data.
  447. */
  448. #define WF_MAX_READ sizeof(wavefront_multisample)
  449. #define WF_MAX_WRITE sizeof(wavefront_multisample)
  450. /*
  451. This allows us to execute any WF command except the download/upload
  452. ones, which are handled differently due to copyin/copyout issues as
  453. well as data-nybbling to/from the card.
  454. */
  455. typedef struct wavefront_control {
  456. int cmd; /* WFC_* */
  457. char status; /* return status to user-space */
  458. unsigned char rbuf[WF_MAX_READ]; /* bytes read from card */
  459. unsigned char wbuf[WF_MAX_WRITE]; /* bytes written to card */
  460. } wavefront_control;
  461. #define WFCTL_WFCMD 0x1
  462. #define WFCTL_LOAD_SPP 0x2
  463. /* Modulator table */
  464. #define WF_MOD_LFO1 0
  465. #define WF_MOD_LFO2 1
  466. #define WF_MOD_ENV1 2
  467. #define WF_MOD_ENV2 3
  468. #define WF_MOD_KEYBOARD 4
  469. #define WF_MOD_LOGKEY 5
  470. #define WF_MOD_VELOCITY 6
  471. #define WF_MOD_LOGVEL 7
  472. #define WF_MOD_RANDOM 8
  473. #define WF_MOD_PRESSURE 9
  474. #define WF_MOD_MOD_WHEEL 10
  475. #define WF_MOD_1 WF_MOD_MOD_WHEEL
  476. #define WF_MOD_BREATH 11
  477. #define WF_MOD_2 WF_MOD_BREATH
  478. #define WF_MOD_FOOT 12
  479. #define WF_MOD_4 WF_MOD_FOOT
  480. #define WF_MOD_VOLUME 13
  481. #define WF_MOD_7 WF_MOD_VOLUME
  482. #define WF_MOD_PAN 14
  483. #define WF_MOD_10 WF_MOD_PAN
  484. #define WF_MOD_EXPR 15
  485. #define WF_MOD_11 WF_MOD_EXPR
  486. /* FX-related material */
  487. typedef struct wf_fx_info {
  488. int request; /* see list below */
  489. long data[4]; /* we don't need much */
  490. } wavefront_fx_info;
  491. /* support for each of these will be forthcoming once I or someone
  492. else has figured out which of the addresses on page 6 and page 7 of
  493. the YSS225 control each parameter. Incidentally, these come from
  494. the Windows driver interface, but again, Turtle Beach didn't
  495. document the API to use them.
  496. */
  497. #define WFFX_SETOUTGAIN 0
  498. #define WFFX_SETSTEREOOUTGAIN 1
  499. #define WFFX_SETREVERBIN1GAIN 2
  500. #define WFFX_SETREVERBIN2GAIN 3
  501. #define WFFX_SETREVERBIN3GAIN 4
  502. #define WFFX_SETCHORUSINPORT 5
  503. #define WFFX_SETREVERBIN1PORT 6
  504. #define WFFX_SETREVERBIN2PORT 7
  505. #define WFFX_SETREVERBIN3PORT 8
  506. #define WFFX_SETEFFECTPORT 9
  507. #define WFFX_SETAUXPORT 10
  508. #define WFFX_SETREVERBTYPE 11
  509. #define WFFX_SETREVERBDELAY 12
  510. #define WFFX_SETCHORUSLFO 13
  511. #define WFFX_SETCHORUSPMD 14
  512. #define WFFX_SETCHORUSAMD 15
  513. #define WFFX_SETEFFECT 16
  514. #define WFFX_SETBASEALL 17
  515. #define WFFX_SETREVERBALL 18
  516. #define WFFX_SETCHORUSALL 20
  517. #define WFFX_SETREVERBDEF 22
  518. #define WFFX_SETCHORUSDEF 23
  519. #define WFFX_DELAYSETINGAIN 24
  520. #define WFFX_DELAYSETFBGAIN 25
  521. #define WFFX_DELAYSETFBLPF 26
  522. #define WFFX_DELAYSETGAIN 27
  523. #define WFFX_DELAYSETTIME 28
  524. #define WFFX_DELAYSETFBTIME 29
  525. #define WFFX_DELAYSETALL 30
  526. #define WFFX_DELAYSETDEF 32
  527. #define WFFX_SDELAYSETINGAIN 33
  528. #define WFFX_SDELAYSETFBGAIN 34
  529. #define WFFX_SDELAYSETFBLPF 35
  530. #define WFFX_SDELAYSETGAIN 36
  531. #define WFFX_SDELAYSETTIME 37
  532. #define WFFX_SDELAYSETFBTIME 38
  533. #define WFFX_SDELAYSETALL 39
  534. #define WFFX_SDELAYSETDEF 41
  535. #define WFFX_DEQSETINGAIN 42
  536. #define WFFX_DEQSETFILTER 43
  537. #define WFFX_DEQSETALL 44
  538. #define WFFX_DEQSETDEF 46
  539. #define WFFX_MUTE 47
  540. #define WFFX_FLANGESETBALANCE 48
  541. #define WFFX_FLANGESETDELAY 49
  542. #define WFFX_FLANGESETDWFFX_TH 50
  543. #define WFFX_FLANGESETFBGAIN 51
  544. #define WFFX_FLANGESETINGAIN 52
  545. #define WFFX_FLANGESETLFO 53
  546. #define WFFX_FLANGESETALL 54
  547. #define WFFX_FLANGESETDEF 56
  548. #define WFFX_PITCHSETSHIFT 57
  549. #define WFFX_PITCHSETBALANCE 58
  550. #define WFFX_PITCHSETALL 59
  551. #define WFFX_PITCHSETDEF 61
  552. #define WFFX_SRSSETINGAIN 62
  553. #define WFFX_SRSSETSPACE 63
  554. #define WFFX_SRSSETCENTER 64
  555. #define WFFX_SRSSETGAIN 65
  556. #define WFFX_SRSSETMODE 66
  557. #define WFFX_SRSSETDEF 68
  558. /* Allow direct user-space control over FX memory/coefficient data.
  559. In theory this could be used to download the FX microprogram,
  560. but it would be a little slower, and involve some weird code.
  561. */
  562. #define WFFX_MEMSET 69
  563. #endif /* __SOUND_WAVEFRONT_H__ */