1 | /* $Id: idc_vdd.h 142 2000-04-23 14:55:46Z ktk $ */
|
---|
2 |
|
---|
3 | #ifndef VDDIDC_INCLUDED
|
---|
4 | #define VDDIDC_INCLUDED
|
---|
5 |
|
---|
6 | #ifdef __cplusplus
|
---|
7 | extern "C" {
|
---|
8 | #endif
|
---|
9 |
|
---|
10 |
|
---|
11 | #pragma pack (1) // Force byte structure alignment
|
---|
12 |
|
---|
13 | #ifndef __IBMC__ // Following is only for the PDD and VDD
|
---|
14 | ULONG FAR pascal IDCEntry_VDD (ULONG ulFunc, ULONG ul1, ULONG ul2); // ASM
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | typedef enum
|
---|
18 | {
|
---|
19 | IDCOPENPDD,
|
---|
20 | IDCQUERYPROTOCOL,
|
---|
21 | IDCASSIGNHANDLE,
|
---|
22 | IDCOPENDEVICE,
|
---|
23 | IDCCLOSEDEVICE,
|
---|
24 | IDCGETIOPORTINFO,
|
---|
25 | IDCTRUSTEDOPEN
|
---|
26 | } IDCFUNCS;
|
---|
27 |
|
---|
28 | #pragma pack ()
|
---|
29 |
|
---|
30 | //
|
---|
31 | // Define ulFuncs for communicaiton between
|
---|
32 | // PDD and VDD IDC entrypoints.
|
---|
33 | // Also define version constant to indicate the highest
|
---|
34 | // functions we will send and can receive.
|
---|
35 | //
|
---|
36 |
|
---|
37 | #define PDDFUNC_OPENPDD 0 // Open request sent to PDD by OS
|
---|
38 | #define PDDFUNC_QUERYPROTOCOL 1 // Insure PDD & VDD are of same level
|
---|
39 | #define PDDFUNC_ASSIGNHANDLE 2 // Inform PDD of its IDC handle
|
---|
40 | #define PDDFUNC_OPENDEVICE 3 // Request adapter owndership
|
---|
41 | #define PDDFUNC_CLOSEDEVICE 4 // Relinquish HW back to PDD control
|
---|
42 | #define PDDFUNC_GETIOPORTINFO 5 // Provide address of port I/O info
|
---|
43 | #define PDDFUNC_TRUSTEDOPEN 6 // Trusted Open to PDD
|
---|
44 |
|
---|
45 | // Inter-Device Communication (IDC) function
|
---|
46 | // codes for calls from PDD
|
---|
47 | #define VDDFUNC_INTERRUPT 0 // (not used)
|
---|
48 | #define VDDFUNC_CLOSE 1 // Audio PDD is done with hardware
|
---|
49 | #define VDDFUNC_SHUTDOWN 2 // PDD informs VDD of shutdown
|
---|
50 |
|
---|
51 | #define IDC_PROTOCOL_LEVEL 0xDEADBEEF
|
---|
52 | #define NUMIORANGES 4 // 4 io ranges on the card WSS,OPL3,SB and SYNTH
|
---|
53 |
|
---|
54 | // PDD returns a pointer to ADAPTERINFO data structure
|
---|
55 | // to describe its hardware.
|
---|
56 | typedef struct
|
---|
57 | {
|
---|
58 | ULONG ulPort;
|
---|
59 | ULONG ulRange;
|
---|
60 | } IORANGE;
|
---|
61 |
|
---|
62 | typedef struct
|
---|
63 | {
|
---|
64 | USHORT usIRQLevel;
|
---|
65 | USHORT usDMALevel;
|
---|
66 | ULONG ulNumPorts; // number of port ranges
|
---|
67 | IORANGE Range[NUMIORANGES]; // Unbounded array holding IORANGEs
|
---|
68 | } ADAPTERINFO, *PADAPTERINFO;
|
---|
69 |
|
---|
70 | extern ULONG pLincodec;
|
---|
71 | extern ADAPTERINFO __far * pfcodec_info;
|
---|
72 | extern ADAPTERINFO codec_info;
|
---|
73 | extern USHORT usInUseCount;
|
---|
74 | extern USHORT usVDDHasHardware;
|
---|
75 |
|
---|
76 | #ifdef __cplusplus
|
---|
77 | }
|
---|
78 | #endif
|
---|
79 |
|
---|
80 | #endif
|
---|