1// ****************************************************************************
2//
3//		EchoGalsXface.H
4//
5//		Include file for interfacing with the CEchoGals generic driver class.
6//
7//		Set editor tabs to 3 for your viewing pleasure.
8//
9// ----------------------------------------------------------------------------
10//
11// This file is part of Echo Digital Audio's generic driver library.
12// Copyright Echo Digital Audio Corporation (c) 1998 - 2005
13// All rights reserved
14// www.echoaudio.com
15//
16// This library is free software; you can redistribute it and/or
17// modify it under the terms of the GNU Lesser General Public
18// License as published by the Free Software Foundation; either
19// version 2.1 of the License, or (at your option) any later version.
20//
21// This library is distributed in the hope that it will be useful,
22// but WITHOUT ANY WARRANTY; without even the implied warranty of
23// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24// Lesser General Public License for more details.
25//
26// You should have received a copy of the GNU Lesser General Public
27// License along with this library; if not, write to the Free Software
28// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29//
30// ****************************************************************************
31
32/*
33
34
35
36	Here's a block diagram of how most of the cards work:
37
38                  +-----------+
39         record   |           |<-------------------- Inputs
40          <-------|           |        |
41  PCI             | Transport |        |
42  bus             |  engine   |       \|/
43          ------->|           |    +-------+
44           play   |           |--->|monitor|-------> Outputs
45                  +-----------+    | mixer |
46                                   +-------+
47
48	The lines going to and from the PCI bus represent "pipes".  A pipe performs
49	audio transport - moving audio data to and from buffers on the host via
50	bus mastering.
51
52	The inputs and outputs on the right represent input and output "busses."
53	A bus is a physical, real connection to the outside world.  An example
54	of a bus would be the 1/4" analog connectors on the back of Layla or
55	an RCA S/PDIF connector.
56
57	For most cards, there is a one-to-one correspondence between outputs
58	and busses; that is, each individual pipe is hard-wired to a single bus.
59
60	Cards that work this way are Darla20, Gina20, Layla20, Darla24, Gina24,
61	Layla24, Mona, Indigo, Indigo io, and Indigo dj.
62
63
64	Mia has a feature called "virtual outputs."
65
66
67                  +-----------+
68           record |           |<----------------------------- Inputs
69          <-------|           |                  |
70     PCI          | Transport |                  |
71     bus          |  engine   |                 \|/
72          ------->|           |   +------+   +-------+
73            play  |           |-->|vmixer|-->|monitor|-------> Outputs
74                  +-----------+   +------+   | mixer |
75                                             +-------+
76
77
78	Obviously, the difference here is the box labeled "vmixer."  Vmixer is
79	short for "virtual output mixer."  For Mia, pipes are *not* hard-wired
80	to a single bus; the vmixer lets you mix any pipe to any bus in any
81	combination.
82
83	Note, however, that the left-hand side of the diagram is unchanged.
84	Transport works exactly the same way - the difference is in the mixer stage.
85
86
87	Pipes and busses are numbered starting at zero.
88
89
90
91	Pipe index
92	==========
93
94	A number of calls in CEchoGals refer to a "pipe index".  A pipe index is
95	a unique number for a pipe that unambiguously refers to a playback or record
96	pipe.  Pipe indices are numbered starting with analog outputs, followed by
97	digital outputs, then analog inputs, then digital inputs.
98
99	Take Gina24 as an example:
100
101	Pipe index
102
103	0-7				Analog outputs
104	8-15				Digital outputs
105	16-17				Analog inputs
106	18-25				Digital inputs
107
108
109	You get the pipe index by calling CEchoGals::OpenAudio; the other transport
110	functions take the pipe index as a parameter.  If you need a pipe index for
111	some other reason, use the handy MakePipeIndex method.
112
113
114	Some calls take a CChannelMask parameter; CChannelMask is a handy way to group
115	pipe indices.
116
117
118
119	Digital mode switch
120	===================
121
122	Some cards (right now, Gina24, Layla24, and Mona) have a Digital Mode Switch
123	or DMS.  Cards with a DMS can be set to one of three mutually exclusive
124	digital modes: S/PDIF RCA, S/PDIF optical, or ADAT optical.
125
126	This may create some confusion since ADAT optical is 8 channels wide and
127	S/PDIF is only two channels wide.  Gina24, Layla24, and Mona handle this
128	by acting as if they always have 8 digital outs and ins.  If you are in
129	either S/PDIF mode, the last 6 channels don't do anything - data sent
130	out these channels is thrown away and you will always record zeros.
131
132	Note that with Gina24, Layla24, and Mona, sample rates above 50 kHz are
133	only available if	you have the card configured for S/PDIF optical or S/PDIF RCA.
134
135
136
137	Double speed mode
138	=================
139
140	Some of the cards support 88.2 kHz and 96 kHz sampling (Darla24, Gina24, Layla24,
141	Mona, Mia, and Indigo).  For these cards, the driver sometimes has to worry about
142	"double speed mode"; double speed mode applies whenever the sampling rate is above
143	50 kHz.
144
145	For instance, Mona and Layla24 support word clock sync.  However, they actually
146	support two different word clock modes - single speed (below 50 kHz) and double
147	speed (above 50 kHz).  The hardware detects if a single or double speed word clock
148	signal is present; the generic code uses that information to determine which mode
149	to use.
150
151	The generic code takes care of all this for you.
152
153   For hardware that supports 176.4 and 192 kHz, there is a corresponding quad speed
154	mode.
155
156*/
157
158
159//	Prevent problems with multiple includes
160#ifndef _ECHOGALSXFACE_
161#define _ECHOGALSXFACE_
162
163
164//***********************************************************************
165//
166//	PCI configuration space
167//
168//***********************************************************************
169
170//
171// PCI vendor ID and device IDs for the hardware
172//
173#define VENDOR_ID						 0x1057
174#define DEVICE_ID_56301				 0x1801
175#define DEVICE_ID_56361				 0x3410
176#define SUBVENDOR_ID					 ((ULONG)0xECC0)
177
178
179//
180//	Valid Echo PCI subsystem card IDs
181//
182#define DARLA							0x0010
183#define GINA							0x0020
184#define LAYLA							0x0030
185#define DARLA24						0x0040
186#define GINA24					 		0x0050
187#define LAYLA24						0x0060
188#define MONA							0x0070
189#define MIA								0x0080
190#define INDIGO							0x0090
191#define INDIGO_IO						0x00a0
192#define INDIGO_DJ						0x00b0
193#define DC8								0x00c0
194#define ECHO3G							0x0100
195#define BASEPCI						0xfff0
196
197
198//***********************************************************************
199//
200//	Array sizes and so forth
201//
202//***********************************************************************
203
204//
205// Sizes
206//
207#define ECHO_MAXNAMELEN				128			// Max card name length
208															// (includes 0 terminator)
209#define ECHO_MAXAUDIOINPUTS		32				// Max audio input channels
210#define ECHO_MAXAUDIOOUTPUTS		32				// Max audio output channels
211#define ECHO_MAXAUDIOPIPES			32				// Max number of input and output pipes
212#define ECHO_MAXMIDIJACKS			1				// Max MIDI ports
213#define ECHO_MTC_QUEUE_SZ			32				// Max MIDI time code input queue entries
214
215//
216// MIDI activity indicator timeout
217//
218#define MIDI_ACTIVITY_TIMEOUT_USEC	200000
219
220
221//*****************************************************************************
222//
223// Clocks
224//
225//*****************************************************************************
226
227//
228// Clock numbers
229//
230#define ECHO_CLOCK_INTERNAL				0
231#define ECHO_CLOCK_WORD						1
232#define ECHO_CLOCK_SUPER					2
233#define ECHO_CLOCK_SPDIF					3
234#define ECHO_CLOCK_ADAT						4
235#define ECHO_CLOCK_ESYNC					5
236#define ECHO_CLOCK_ESYNC96					6
237#define ECHO_CLOCK_MTC						7
238#define ECHO_CLOCK_NONE						0xffff
239
240//
241// Clock bit numbers - used to report capabilities and whatever clocks
242// are being detected dynamically.
243//
244#define ECHO_CLOCK_BIT_INTERNAL			(1<<ECHO_CLOCK_INTERNAL)
245#define ECHO_CLOCK_BIT_WORD				(1<<ECHO_CLOCK_WORD)
246#define ECHO_CLOCK_BIT_SUPER				(1<<ECHO_CLOCK_SUPER)
247#define ECHO_CLOCK_BIT_SPDIF				(1<<ECHO_CLOCK_SPDIF)
248#define ECHO_CLOCK_BIT_ADAT				(1<<ECHO_CLOCK_ADAT)
249#define ECHO_CLOCK_BIT_ESYNC				(1<<ECHO_CLOCK_ESYNC)
250#define ECHO_CLOCK_BIT_ESYNC96			(1<<ECHO_CLOCK_ESYNC96)
251#define ECHO_CLOCK_BIT_MTC					(1<<ECHO_CLOCK_MTC)
252
253
254//*****************************************************************************
255//
256// Digital modes
257//
258//*****************************************************************************
259
260//
261// Digital modes for Mona, Layla24, and Gina24
262//
263#define DIGITAL_MODE_NONE					0xFF
264#define DIGITAL_MODE_SPDIF_RCA			0
265#define DIGITAL_MODE_SPDIF_OPTICAL		1
266#define DIGITAL_MODE_ADAT					2
267
268//
269//	Digital mode capability masks
270//
271#define ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA		(1<<DIGITAL_MODE_SPDIF_RCA)
272#define ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL	(1<<DIGITAL_MODE_SPDIF_OPTICAL)
273#define ECHOCAPS_HAS_DIGITAL_MODE_ADAT				(1<<DIGITAL_MODE_ADAT)
274
275
276//*****************************************************************************
277//
278// Driver flags
279//
280//*****************************************************************************
281
282//
283//	Note that some flags are read-only (look for ROFLAG as part of the name).
284// The read-only flags are used to tell you what the card can do; you can't
285// set or clear them.
286//
287// Some cards can only handle mono & stereo interleaved data in host audio buffers; that
288// is, you may only specify 1 or 2 in the wPipeWidth field when you open a pipe for
289// playing or recording.
290//
291// If the card has the super interleave flag set, that means that you can interleave
292// by more than 2.  For super interleave-capable cards, you can interleave by 1, 2,
293// 4, 6, 8, 10, 12, 14, or 16.  Note that you cannot interleave beyond the actual
294// number of pipes on the card - if the card has 16 pipes and you open pipe 6,
295// the maximum interleave would be 10.
296//
297//
298// Gina24, Layla24, and Mona support digital input auto-mute.  If the digital input
299// auto-mute is enabled, the DSP will only enable the digital inputs if the card
300// is syncing to a valid clock on the ADAT or S/PDIF inputs.
301//
302// If the auto-mute is disabled, the digital inputs are enabled regardless of
303// what the input clock is set or what is connected.
304//
305//
306
307#define ECHOGALS_FLAG_BADBOARD					0x0001	// Board could not be init or
308																		// stopped responding
309																		// (i.e. DSP crashed)
310
311#define ECHOGALS_FLAG_SYNCH_WAVE					0x0004	// Used to enable wave device
312																		// synchronization.  When set,
313																		// all open wave devices for
314																		// a single task start when the
315																		// start for the last channel
316																		// is received.
317
318#define ECHOGALS_FLAG_SAMPLE_RATE_LOCKED		0x0010	// Set true if the rate has been locked
319
320#define ECHOGALS_ROFLAG_DIGITAL_IN_AUTOMUTE	0x4000	// Set if the console needs to handle
321																		// the digital input auto-mute
322
323#define ECHOGALS_ROFLAG_SUPER_INTERLEAVE_OK	0x8000	// Set if this card can handle super
324																		// interleave
325
326#define ECHOGALS_FLAG_WRITABLE_MASK				0x3fff
327
328
329
330//*****************************************************************************
331//
332// ECHOSTATUS return type - most of the generic driver functions
333// return an ECHOSTATUS value
334//
335//*****************************************************************************
336
337typedef unsigned long	ECHOSTATUS;
338
339//
340// Return status values
341//
342//	Changes here require a change in pStatusStrs in CEchoGals.cpp
343//
344#define ECHOSTATUS_OK									0x00
345#define ECHOSTATUS_FIRST								0x00
346#define ECHOSTATUS_BAD_FORMAT							0x01
347#define ECHOSTATUS_BAD_BUFFER_SIZE					0x02
348#define ECHOSTATUS_CANT_OPEN							0x03
349#define ECHOSTATUS_CANT_CLOSE							0x04
350#define ECHOSTATUS_CHANNEL_NOT_OPEN					0x05
351#define ECHOSTATUS_BUSY									0x06
352#define ECHOSTATUS_BAD_LEVEL							0x07
353#define ECHOSTATUS_NO_MIDI								0x08
354#define ECHOSTATUS_CLOCK_NOT_SUPPORTED				0x09
355#define ECHOSTATUS_CLOCK_NOT_AVAILABLE				0x0A
356#define ECHOSTATUS_BAD_CARDID							0x0B
357#define ECHOSTATUS_NOT_SUPPORTED						0x0C
358#define ECHOSTATUS_BAD_NOTIFY_SIZE					0x0D
359#define ECHOSTATUS_INVALID_PARAM						0x0E
360#define ECHOSTATUS_NO_MEM								0x0F
361#define ECHOSTATUS_NOT_SHAREABLE						0x10
362#define ECHOSTATUS_FIRMWARE_LOADED					0x11
363#define ECHOSTATUS_DSP_DEAD							0x12
364#define ECHOSTATUS_DSP_TIMEOUT						0x13
365#define ECHOSTATUS_INVALID_CHANNEL					0x14
366#define ECHOSTATUS_CHANNEL_ALREADY_OPEN			0x15
367#define ECHOSTATUS_DUCK_FULL							0x16
368#define ECHOSTATUS_INVALID_INDEX						0x17
369#define ECHOSTATUS_BAD_CARD_NAME 					0x18
370#define ECHOSTATUS_IRQ_NOT_OURS						0x19
371#define ECHOSTATUS_NO_DATA								0x1E
372#define ECHOSTATUS_BUFFER_OVERFLOW					0x1F
373#define ECHOSTATUS_OPERATION_CANCELED				0x20
374#define ECHOSTATUS_EVENT_NOT_OPEN					0x21
375#define ECHOSTATUS_ASIC_NOT_LOADED					0x22
376#define ECHOSTATUS_DIGITAL_MODE_NOT_SUPPORTED	0x23
377#define ECHOSTATUS_RESERVED							0x24
378#define ECHOSTATUS_BAD_COOKIE							0x25
379#define ECHOSTATUS_MIXER_DISABLED					0x26
380#define ECHOSTATUS_NO_SUPER_INTERLEAVE				0x27
381#define ECHOSTATUS_DUCK_NOT_WRAPPED					0x28
382#define ECHOSTATUS_NO_3G_BOX							0x29
383#define ECHOSTATUS_LAST									0x2a
384
385
386//*****************************************************************************
387//
388// ECHOGALS_AUDIOFORMAT describes the audio buffer format for a pipe
389//
390//
391// byMonoToStereo is used to resolve an ambiguity when wDataInterleave is set
392// to one.  Say you're writing a Windows driver and someone tells you to play mono data;
393// what they really mean is that they want the same signal sent out of both left
394// and right channels.
395//
396// Now, say you're writing an ASIO driver and the ASIO host wants mono data
397// sent out of a single output only.  byMonoToStereo is a flag used to resolve
398// this; if byMonoToStereo is non-zero, then the same signal is sent out both channels.
399// If byMonoToStereo is zero, then only one output channel is used.
400//
401//*****************************************************************************
402
403typedef struct tECHOGALS_AUDIOFORMAT
404{
405	WORD		wDataInterleave;				// How the data is arranged in memory
406													// Mono = 1, stereo = 2
407	WORD		wBitsPerSample;				// 8, 16, 32
408	BYTE		byMonoToStereo;				// Only used if wDataInterleave is 1 and
409													// if this is an output pipe.
410	BYTE		byDataAreBigEndian;			// 1 = Apple, 0 = Intel
411} ECHOGALS_AUDIOFORMAT, * PECHOGALS_AUDIOFORMAT;
412
413
414//
415//	All kinds of peak and VU meters.  Only cards with virtual outputs will
416// have output pipe meters.
417//
418//	All data are scaled integers in units of dB X 256
419//
420typedef struct tECHOGALS_METERS
421{
422	INT32	iNumPipesOut;	// These numbers only apply in the context of this structure;
423	INT32	iNumPipesIn;	// they indicate the number of entries in each of the arrays.
424	INT32	iNumBussesOut;
425	INT32	iNumBussesIn;
426
427	INT32	iPipeOutVU[ECHO_MAXAUDIOOUTPUTS];
428	INT32	iPipeOutPeak[ECHO_MAXAUDIOOUTPUTS];
429
430	INT32	iPipeInVU[ECHO_MAXAUDIOINPUTS];
431	INT32	iPipeInPeak[ECHO_MAXAUDIOINPUTS];
432
433	INT32	iBusOutVU[ECHO_MAXAUDIOOUTPUTS];
434	INT32	iBusOutPeak[ECHO_MAXAUDIOOUTPUTS];
435
436	INT32	iBusInVU[ECHO_MAXAUDIOINPUTS];
437	INT32	iBusInPeak[ECHO_MAXAUDIOINPUTS];
438} ECHOGALS_METERS, * PECHOGALS_METERS;
439
440//
441// ECHOGALS_AUDIO_PIPE describes a single pipe.
442//
443// Note that nPipe is *not* a pipe index; it's just the number for the pipe.
444// This is meant to make life easier for you, the driver developer; the code
445// is meant to be set up that you don't have to go around calculating the
446// pipe index.
447//
448// In other words, if you want to specify the first input pipe, do this:
449//
450// nPipe = 0
451// bIsInput = TRUE
452//
453// Don't set nPipe equal to the number of output pipes, since it's not a pipe
454// index.
455//
456
457typedef struct tECHOGALS_AUDIO_PIPE
458{
459	WORD		nPipe;					// Pipe number (not a pipe index!)
460	BOOL		bIsInput;				// Set TRUE for input pipe, FALSE for output
461	WORD		wInterleave;			// Interleave factor for this pipe
462											// Mono = 1, stereo = 2, 5.1 surround = 6
463} ECHOGALS_AUDIO_PIPE, * PECHOGALS_AUDIO_PIPE;
464
465
466//
467// This structure is used to open a pipe and reserve it for your exclusive use.
468//
469// Note that if you set wInterleave in the ECHOGALS_AUDIO_PIPE sub-struct
470// to greater than one, you are actually reserving more than one pipe; in fact
471// you are reserving the pipe specified by the nPipe field as well as
472// the next wInterleave-1 pipes.
473//
474// ProcessId is used in specific situations in the Windows driver where
475// several pipes are opened as different devices, but you want them all
476// to start synchronously.  The driver attempts to start the pipes in groups
477// based on the ProcessId field.
478//
479// If you don't want to hassle with this, just set ProcessId to NULL; the
480// generic code will then ignore the ProcessId.
481//
482// ProcessId is also ignored if you clear the ECHOGALS_FLAG_SYNCH_WAVE flag.
483//
484
485typedef struct tECHOGALS_OPENAUDIOPARAMETERS
486{
487	ECHOGALS_AUDIO_PIPE		Pipe;			// Pipe descriptor
488	BOOL							bIsCyclic;	// Set TRUE if using circular buffers
489													// Set FALSE for linked list of use
490													// once and discard buffers
491	PVOID							ProcessId;	// Caller process ID for implementing
492													// synchronous wave start
493} ECHOGALS_OPENAUDIOPARAMETERS, * PECHOGALS_OPENAUDIOPARAMETERS;
494
495
496//
497// Yes, it's the world's simplest structure.
498//
499typedef struct tECHOGALS_CLOSEAUDIOPARAMETERS
500{
501	WORD		wPipeIndex;
502} ECHOGALS_CLOSEAUDIOPARAMETERS, * PECHOGALS_CLOSEAUDIOPARAMETERS;
503
504//
505// Context info for MIDI input clients
506//
507typedef struct tECHOGALS_MIDI_IN_CONTEXT
508{
509	BOOL	fOpen;
510	DWORD dwDrain;
511} ECHOGALS_MIDI_IN_CONTEXT;
512
513//
514// One nifty feature is that the DSP is constantly writing the DMA position
515// for each pipe to the comm page without the driver having to do anything.
516// You can therefore obtain a pointer to this location and directly read
517// the position from anywhere.
518//
519// The pointer returned should be treated as a read-only pointer and is
520// kind of dangerous, since it points directly into the driver.
521//
522// Note that the value pointed to by pdwPosition will be in little-endian
523// format.
524//
525// The value pointed to by pdwPosition is the number of bytes transported
526// by the DSP; it will constantly increase until it hits the 32-bit boundary
527// and then wraps around.  It does *not* represent the offset into a circular
528// DMA buffer; this value is treated identically for cyclic and non-cyclic
529// buffer schemes.
530//
531typedef struct tECHOGALS_POSITION
532{
533	PDWORD	pdwPosition;
534} ECHOGALS_POSITION, * PECHOGALS_POSITION;
535
536
537/*
538
539	ECHOGALS_CAPS
540
541	This structure is used to differentiate one card from another.
542
543	szName					Zero-terinated char string; unique name for
544								this card.
545
546	wCardType				One of the DARLA, GINA, etc. card IDs at the
547								top of this header file
548
549	dwOutClockTypes		This is a bit mask describing all the different
550								output clock types that can be set.  If the bit mask
551								is zero, then the output clock cannot be set on this
552								card.  The bits will be one of the ECHO_CLOCK_BIT_???
553								defines above.
554
555	dwInClockTypes			Again, a bit mask describing what this card can
556								sync to.  This mask is fixed, regardless of what is
557								or is not currently connected to the hardware.  Again,
558								this uses the ECHO_CLOCK_BIT_??? defines.
559
560	dwDigitalModes			Some cards (right now, Gina24, Layla24 and Mona) have
561								what we call a Digital Mode Switch or DMS.
562								Use the ECHOCAPS_HAS_DIGITAL_MODE_??? defines to determine
563								which digital modes this card supports.
564
565	fHasVmixer				Boolean flag- if this field is non-zero, then this card
566								supports virtual outputs.
567
568	wNumPipesOut			Should be self-explanatory, given the definitions of
569	wNumPipesIn				pipes and busses above.  Note that these are all in terms
570	wNumBussesOut			of mono pipes and busses.
571	wNumBussesIn
572
573	wFirstDigitalBusOut	Gives you the number of, well, the first bus that
574								goes out an S/PDIF or ADAT output.  If this card has
575								no digital outputs, wFirstDigitalBusOut will be equal
576								to wNumBussesOut.  This may seem strange, but remember
577								that the busses are numbered starting at zero and that
578								valid bus numbers therefore range from zero to
579								(wNumBussesOut - 1).  Doing it this way actually
580								turned out to simplify writing consoles and so forth.
581
582	wFirstDigitalBusIn	Just like the last one, but for inputs
583
584	wFirstDigitalPipeOut	Gives you the number of the first pipe that is connected
585								to a digital output bus.  If this card has no digital output
586								busses, this will be equal to wNumPipesOut.  Cards with
587								virtual outputs will always have this member set equal
588								to wNumPipesOut.
589
590	wFirstDigitalPipeIn	Again, just like wFirstDigitalPipeOut, but for inputs.
591
592	dwPipeOutCaps[]		Array of bit fields with information about each output
593								pipe.  This tells you what controls are available for
594								each output pipe, as well as whether or not this pipe
595								is connected to a digital output.  Use the ECHOCAPS_???
596								bits above to parse this bit field.
597
598	dwPipeInCaps[]			More arrays for the other busses and pipes; works
599	dwBusOutCaps[]			just like dwPipeOutCaps.
600	dwBusInCaps[]
601
602	wNumMidiOut				Number of MIDI inputs and outputs on this card.
603	wNumMidiIn
604
605 */
606
607enum
608{
609	ECHOCAPS_GAIN 				= 0x00000001,
610	ECHOCAPS_MUTE				= 0x00000004,
611	ECHOCAPS_PAN				= 0x00000010,
612	ECHOCAPS_PEAK_METER		= 0x00000020,
613	ECHOCAPS_VU_METER 		= 0x00000040,
614	ECHOCAPS_NOMINAL_LEVEL	= 0x00000080,	// aka +4/-10
615	ECHOCAPS_PHANTOM_POWER	= 0x20000000,
616	ECHOCAPS_DUMMY				= 0x40000000,	// Used for Indigo; indicates
617														// a dummy input or output
618	ECHOCAPS_DIGITAL			= 0x80000000 	// S/PDIF or ADAT connection
619};
620
621
622typedef struct tECHOGALS_CAPS
623{
624	CHAR 		szName[ ECHO_MAXNAMELEN ];	// Name of this card
625	WORD		wCardType;						// Type of card
626	DWORD		dwOutClockTypes;				// Types of output clocks
627	DWORD		dwInClockTypes;				// Types of input clocks
628	DWORD		dwDigitalModes;				// Digital modes supported
629	BOOL		fHasVmixer;
630
631	WORD		wNumPipesOut;
632	WORD		wNumPipesIn;
633	WORD		wNumBussesOut;
634	WORD		wNumBussesIn;
635
636	WORD		wFirstDigitalBusOut;			// Equal to wNumBussesOut if this card has
637													// no digital output busses
638
639	WORD		wFirstDigitalBusIn;			// Equal to wNumBussesIn if this card has
640													// no digital input busses
641
642	WORD		wFirstDigitalPipeOut;		// Works just like wFirstDigitalBus... above
643	WORD		wFirstDigitalPipeIn;
644
645	DWORD		dwPipeOutCaps[ ECHO_MAXAUDIOOUTPUTS ];
646	DWORD		dwPipeInCaps[ ECHO_MAXAUDIOINPUTS ];
647	DWORD		dwBusOutCaps[ ECHO_MAXAUDIOOUTPUTS ];
648	DWORD		dwBusInCaps[ ECHO_MAXAUDIOINPUTS ];
649
650	WORD		wNumMidiOut;					// Number of MIDI out jacks
651	WORD		wNumMidiIn;						// Number of MIDI in jacks
652} ECHOGALS_CAPS, *PECHOGALS_CAPS;
653
654
655/*
656
657	Echo3G box types
658
659*/
660
661//
662// 3G external box types
663//
664#define GINA3G									0x00
665#define LAYLA3G								0x10
666#define NO3GBOX								0xffff
667
668
669#endif // _ECHOGALSXFACE_
670
671
672// end file EchoGalsXface.h
673