source: sbliveos2/trunk/drv16/idc_vdd.h@ 144

Last change on this file since 144 was 142, checked in by ktk, 25 years ago

Import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
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
7extern "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
14ULONG FAR pascal IDCEntry_VDD (ULONG ulFunc, ULONG ul1, ULONG ul2); // ASM
15#endif
16
17typedef 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.
56typedef struct
57 {
58 ULONG ulPort;
59 ULONG ulRange;
60 } IORANGE;
61
62typedef 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
70extern ULONG pLincodec;
71extern ADAPTERINFO __far * pfcodec_info;
72extern ADAPTERINFO codec_info;
73extern USHORT usInUseCount;
74extern USHORT usVDDHasHardware;
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif
Note: See TracBrowser for help on using the repository browser.