1 | /************************* START OF SPECIinCATIONS ***
|
---|
2 | *
|
---|
3 | * SOURCE FILE NAME: VSDCAP.C
|
---|
4 | *
|
---|
5 | * DESCRIPTIVE NAME: Ring 3 Amp/Mixer AUDIO Interface Driver
|
---|
6 | *
|
---|
7 | * COPYRIGHT: IBM Confidential
|
---|
8 | * Copyright (c) IBM Corporation 1991
|
---|
9 | * All Rights Reserved
|
---|
10 | *
|
---|
11 | * STATUS: OS/2 Release 2.0
|
---|
12 | *
|
---|
13 | * FUNCTION: This source module contains the ring 3 (DLL) entry point for
|
---|
14 | * MCD Amp/Mixer calls from the Amp/Mixer or Waveform handler
|
---|
15 | *
|
---|
16 | * NOTES:
|
---|
17 | * DEPENDENCIES: ACPA PDD
|
---|
18 | * RESTRICTIONS: Runs in 32 bit protect mode (OS/2 2.0)
|
---|
19 | *
|
---|
20 | * ENTRY POINT:
|
---|
21 | * AUDIOIFDriverEntry
|
---|
22 | *
|
---|
23 | * EXTERNAL REFERENCES: Sends IOCTL request to ACPA audio board
|
---|
24 | *
|
---|
25 | * Change History:
|
---|
26 | * DATE DEVELOPER CHANGE DESCRIPTION
|
---|
27 | * 12/07/92 Linden deCarmo File created
|
---|
28 | * 1/6/94 VMN Changes for setting volume info for WPOS
|
---|
29 | * 06/29/95 Linden deCarmo Cleanup Hardware mixer support (15552).
|
---|
30 | ************************** END OF SPECIFICATIONS **************************/
|
---|
31 |
|
---|
32 | #define INCL_NOPMAPI
|
---|
33 | #define INCL_DOS
|
---|
34 | #define INCL_ERRORS
|
---|
35 | #define INCL_AUDIO_VSD
|
---|
36 | #include <os2.h>
|
---|
37 | #include <os2me.h>
|
---|
38 | #include <mcd.h>
|
---|
39 | #include <audio.h>
|
---|
40 | #include <stdio.h>
|
---|
41 | #include <string.h>
|
---|
42 | #include <hhpheap.h>
|
---|
43 |
|
---|
44 |
|
---|
45 | #include <vsdcmds.h> // generic vsd include file
|
---|
46 | #include <vsdaud.h> // local vsd include file
|
---|
47 | #include <os2mixer.h>
|
---|
48 | #include <vsdmix.h>
|
---|
49 |
|
---|
50 | #ifdef MMDEBUG
|
---|
51 | #include <stdio.h>
|
---|
52 | #endif
|
---|
53 |
|
---|
54 | /************************ START OF SPECIFICATIONS **************************
|
---|
55 | *
|
---|
56 | * SUBROUTINE NAME: Device_Caps
|
---|
57 | *
|
---|
58 | * FUNCTION: Returns device capabilities
|
---|
59 | *
|
---|
60 | * INPUT: lParam1 - type of capability
|
---|
61 | * lParam2 - pointer to LONG variable to receive capability
|
---|
62 | *
|
---|
63 | * OUTPUT: returns VSDERR_SUCCESS if successful, otherwise it returns an
|
---|
64 | * MCI error code.
|
---|
65 | *
|
---|
66 | * OS/2 CALLS: None.
|
---|
67 | *
|
---|
68 | * C CALLS: None.
|
---|
69 | *
|
---|
70 | * INTERNAL CALLS: None.
|
---|
71 | *
|
---|
72 | *************************** END OF SPECIFICATIONS *************************/
|
---|
73 |
|
---|
74 | LONG VSDCaps( PVSD_INSTANCE pInstance,
|
---|
75 | ULONG ulFlags,
|
---|
76 | PVSD_GETDEVCAPS_PARMS pCapsParms )
|
---|
77 |
|
---|
78 |
|
---|
79 | {
|
---|
80 |
|
---|
81 | LONG lError = VSDERR_SUCCESS;
|
---|
82 | // 15552
|
---|
83 | PDRIVER_LINECAPS pdriverLineCaps;
|
---|
84 | // 15552
|
---|
85 |
|
---|
86 | #ifdef INCL_MM_WPOS
|
---|
87 | MIXERLINEINFO mixerInfo;
|
---|
88 | #endif
|
---|
89 |
|
---|
90 | // if ( !pCapsParms || pCapsParms->ulLength < VSD_GETDEVCAPS_Len )
|
---|
91 | // {
|
---|
92 | // return ( VSDERR_REQUEST_BUF_TOO_SMALL );
|
---|
93 | // }
|
---|
94 |
|
---|
95 | // MIXER info
|
---|
96 | // if ( ulFlags == VSD_MIXCAPS )
|
---|
97 | // {
|
---|
98 |
|
---|
99 | // *********************************
|
---|
100 | // LAD--need define for mixer device
|
---|
101 | // rather than 0.
|
---|
102 | // *********************************
|
---|
103 |
|
---|
104 | // lError = mixGetDevCaps( ( PMIXERCAPS ) pCapsParms );
|
---|
105 | // }
|
---|
106 | // else
|
---|
107 | // if ( ulFlags == VSD_MIXLINECAPS )
|
---|
108 | // {
|
---|
109 | //
|
---|
110 | // lError = mixGetLineInfo( pInstance->hMix, ( PMIXERLINEINFO ) pCapsParms );
|
---|
111 | //
|
---|
112 | // }
|
---|
113 | // MIXER info
|
---|
114 | // else
|
---|
115 | // {
|
---|
116 | pCapsParms->ulMax_Caps = 7;
|
---|
117 | pCapsParms->ulNum_Caps = 7;
|
---|
118 |
|
---|
119 | pCapsParms->bSupports[ DC_HASAUDIO ] = DC_TRUE;
|
---|
120 | pCapsParms->bSupports[ DC_HASAUDIOATTRIBUTES ] = DC_TRUE;
|
---|
121 | pCapsParms->bSupports[ DC_HASAUDIOCAPABILITIES ] = DC_TRUE;
|
---|
122 | #ifdef INCL_MM_WPOS
|
---|
123 |
|
---|
124 | FindDeviceCaps( pInstance, &pdriverLineCaps );
|
---|
125 | if ( !pdriverLineCaps )
|
---|
126 | {
|
---|
127 | // mixerInfo.ulLine = SINK_LINE_OUT;
|
---|
128 | // lError = mixGetLineInfo( pInstance->hMix, &mixerInfo );
|
---|
129 | pCapsParms->bSupports[ DC_HASVOLUME ] = DC_FALSE;
|
---|
130 | }
|
---|
131 | else
|
---|
132 | {
|
---|
133 | // line out is element 6 currently, need to make a define
|
---|
134 |
|
---|
135 | pCapsParms->bSupports[ DC_HASVOLUME ] =
|
---|
136 | (pdriverLineCaps->lineCaps[ 6 ].ulSupport & MIX_VOLUME )
|
---|
137 | ? DC_TRUE : DC_FALSE;
|
---|
138 |
|
---|
139 | }
|
---|
140 | #endif
|
---|
141 | #ifdef INCL_MM_OS2
|
---|
142 | pCapsParms->bSupports[ DC_HASVOLUME ] = pInstance->ulVolControl;
|
---|
143 | #endif
|
---|
144 | pCapsParms->bSupports[ DC_HASINPUTLEVEL ] = DC_TRUE;
|
---|
145 | pCapsParms->bSupports[ DC_HASMONITOR ] = DC_TRUE;
|
---|
146 | pCapsParms->bSupports[ DC_CANPLAY ] = DC_TRUE;
|
---|
147 | pCapsParms->bSupports[ DC_CANRECORD ] = pInstance->ulCanRecord;
|
---|
148 | // } /* if no error */
|
---|
149 |
|
---|
150 | return(lError);
|
---|
151 |
|
---|
152 | } /* VSDCaps */
|
---|
153 |
|
---|