Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 419 lines (372 sloc) 15.566 kb
561ae61 @02strich initial import based on MSVAD simple sample
authored
1 /*++
2 Copyright (c) 1997-2000 Microsoft Corporation All Rights Reserved
3
4 Module Name:
5 toptable.h
6
7 Abstract:
8 Declaration of topology tables.
9 --*/
10
11 #ifndef _MSVAD_TOPTABLE_H_
12 #define _MSVAD_TOPTABLE_H_
13
14 //=============================================================================
15 static KSDATARANGE PinDataRangesBridge[] = {
16 {
17 sizeof(KSDATARANGE),
18 0,
19 0,
20 0,
21 STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
22 STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
23 STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
24 }
25 };
26
27 //=============================================================================
28 static PKSDATARANGE PinDataRangePointersBridge[] = {
29 &PinDataRangesBridge[0]
30 };
31
32 //=============================================================================
33 static PCPIN_DESCRIPTOR MiniportPins[] = {
34 // KSPIN_TOPO_WAVEOUT_SOURCE
35 {
36 0,
37 0,
38 0, // InstanceCount
39 NULL, // AutomationTable
40 { // KsPinDescriptor
41 0, // InterfacesCount
42 NULL, // Interfaces
43 0, // MediumsCount
44 NULL, // Mediums
45 SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
46 PinDataRangePointersBridge, // DataRanges
47 KSPIN_DATAFLOW_IN, // DataFlow
48 KSPIN_COMMUNICATION_NONE, // Communication
49 &KSCATEGORY_AUDIO, // Category
50 NULL, // Name
51 0 // Reserved
52 }
53 },
54
55 // KSPIN_TOPO_SYNTHOUT_SOURCE
56 {
57 0,
58 0,
59 0, // InstanceCount
60 NULL, // AutomationTable
61 { // KsPinDescriptor
62 0, // InterfacesCount
63 NULL, // Interfaces
64 0, // MediumsCount
65 NULL, // Mediums
66 SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
67 PinDataRangePointersBridge, // DataRanges
68 KSPIN_DATAFLOW_IN, // DataFlow
69 KSPIN_COMMUNICATION_NONE, // Communication
70 &KSNODETYPE_SYNTHESIZER, // Category
71 &KSAUDFNAME_MIDI, // Name
72 0 // Reserved
73 }
74 },
75
76 // KSPIN_TOPO_SYNTHIN_SOURCE
77 {
78 0,
79 0,
80 0, // InstanceCount
81 NULL, // AutomationTable
82 { // KsPinDescriptor
83 0, // InterfacesCount
84 NULL, // Interfaces
85 0, // MediumsCount
86 NULL, // Mediums
87 SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
88 PinDataRangePointersBridge, // DataRanges
89 KSPIN_DATAFLOW_IN, // DataFlow
90 KSPIN_COMMUNICATION_NONE, // Communication
91 &KSNODETYPE_SYNTHESIZER, // Category
92 &KSAUDFNAME_MIDI, // Name
93 0 // Reserved
94 }
95 },
96
97 // KSPIN_TOPO_MIC_SOURCE
98 {
99 0,
100 0,
101 0, // InstanceCount
102 NULL, // AutomationTable
103 { // KsPinDescriptor
104 0, // InterfacesCount
105 NULL, // Interfaces
106 0, // MediumsCount
107 NULL, // Mediums
108 SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
109 PinDataRangePointersBridge, // DataRanges
110 KSPIN_DATAFLOW_IN, // DataFlow
111 KSPIN_COMMUNICATION_NONE, // Communication
112 &KSNODETYPE_MICROPHONE, // Category
113 NULL, // Name
114 0 // Reserved
115 }
116 },
117
118 // KSPIN_TOPO_LINEOUT_DEST
119 {
120 0,
121 0,
122 0, // InstanceCount
123 NULL, // AutomationTable
124 { // KsPinDescriptor
125 0, // InterfacesCount
126 NULL, // Interfaces
127 0, // MediumsCount
128 NULL, // Mediums
129 SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
130 PinDataRangePointersBridge, // DataRanges
131 KSPIN_DATAFLOW_OUT, // DataFlow
132 KSPIN_COMMUNICATION_NONE, // Communication
133 &KSNODETYPE_SPEAKER, // Category
134 NULL, // Name
135 0 // Reserved
136 }
137 },
138
139 // KSPIN_TOPO_WAVEIN_DEST
140 {
141 0,
142 0,
143 0, // InstanceCount
144 NULL, // AutomationTable
145 { // KsPinDescriptor
146 0, // InterfacesCount
147 NULL, // Interfaces
148 0, // MediumsCount
149 NULL, // Mediums
150 SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
151 PinDataRangePointersBridge, // DataRanges
152 KSPIN_DATAFLOW_OUT, // DataFlow
153 KSPIN_COMMUNICATION_NONE, // Communication
154 &KSCATEGORY_AUDIO, // Category
155 NULL, // Name
156 0 // Reserved
157 }
158 }
159 };
160
161 //=============================================================================
162 static KSJACK_DESCRIPTION JackDescSpeakers = {
163 KSAUDIO_SPEAKER_STEREO,
164 0xB3C98C, // HDAudio color spec for green
165 eConnType3Point5mm,
166 eGeoLocRear,
167 eGenLocPrimaryBox,
168 ePortConnJack,
169 TRUE
170 };
171
172 static PKSJACK_DESCRIPTION JackDescriptions[] = {
173 NULL,
174 NULL,
175 NULL,
02f8ea0 @02strich remove recording device and make the nodes run on HOST cpu
authored
176 NULL,
561ae61 @02strich initial import based on MSVAD simple sample
authored
177 &JackDescSpeakers,
178 NULL
179 };
180
181 //=============================================================================
182 static PCPROPERTY_ITEM PropertiesVolume[] = {
183 {
184 &KSPROPSETID_Audio,
185 KSPROPERTY_AUDIO_VOLUMELEVEL,
186 KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
187 PropertyHandler_Topology
188 },
189 {
190 &KSPROPSETID_Audio,
191 KSPROPERTY_AUDIO_CPU_RESOURCES,
192 KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
193 PropertyHandler_Topology
194 }
195 };
196
197 DEFINE_PCAUTOMATION_TABLE_PROP(AutomationVolume, PropertiesVolume);
198
199 //=============================================================================
200 static PCPROPERTY_ITEM PropertiesMute[] = {
201 {
202 &KSPROPSETID_Audio,
203 KSPROPERTY_AUDIO_MUTE,
204 KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
205 PropertyHandler_Topology
206 },
207 {
208 &KSPROPSETID_Audio,
209 KSPROPERTY_AUDIO_CPU_RESOURCES,
210 KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
211 PropertyHandler_Topology
212 }
213 };
214
215 DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMute, PropertiesMute);
216
217 //=============================================================================
218 static PCPROPERTY_ITEM PropertiesMux[] = {
219 {
220 &KSPROPSETID_Audio,
221 KSPROPERTY_AUDIO_MUX_SOURCE,
222 KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
223 PropertyHandler_Topology
224 },
225 {
226 &KSPROPSETID_Audio,
227 KSPROPERTY_AUDIO_CPU_RESOURCES,
228 KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
229 PropertyHandler_Topology
230 }
231 };
232
233 DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMux, PropertiesMux);
234
235 //=============================================================================
236 static PCPROPERTY_ITEM PropertiesDevSpecific[] = {
237 {
238 &KSPROPSETID_Audio,
239 KSPROPERTY_AUDIO_DEV_SPECIFIC,
240 KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
241 PropertyHandler_Topology
242 }
243 };
244
245 DEFINE_PCAUTOMATION_TABLE_PROP(AutomationDevSpecific, PropertiesDevSpecific);
246
247 //=============================================================================
248 static PCNODE_DESCRIPTOR TopologyNodes[] = {
249 // KSNODE_TOPO_WAVEOUT_VOLUME
250 {
251 0, // Flags
252 &AutomationVolume, // AutomationTable
253 &KSNODETYPE_VOLUME, // Type
254 &KSAUDFNAME_WAVE_VOLUME // Name
255 },
256
257 // KSNODE_TOPO_WAVEOUT_MUTE
258 {
259 0, // Flags
260 &AutomationMute, // AutomationTable
261 &KSNODETYPE_MUTE, // Type
262 &KSAUDFNAME_WAVE_MUTE // Name
263 },
264
265 // KSNODE_TOPO_SYNTHOUT_VOLUME
266 {
267 0, // Flags
268 &AutomationVolume, // AutomationTable
269 &KSNODETYPE_VOLUME, // Type
270 &KSAUDFNAME_MIDI_VOLUME // Name
271 },
272
273 // KSNODE_TOPO_SYNTHOUT_MUTE
274 {
275 0, // Flags
276 &AutomationMute, // AutomationTable
277 &KSNODETYPE_MUTE, // Type
278 &KSAUDFNAME_MIDI_MUTE // Name
279 },
280
281 // KSNODE_TOPO_MIC_VOLUME
282 {
283 0, // Flags
284 &AutomationVolume, // AutomationTable
285 &KSNODETYPE_VOLUME, // Type
286 &KSAUDFNAME_MIC_VOLUME // Name
287 },
288
289 // KSNODE_TOPO_SYNTHIN_VOLUME
290 {
291 0, // Flags
292 &AutomationVolume, // AutomationTable
293 &KSNODETYPE_VOLUME, // Type
294 &KSAUDFNAME_MIDI_VOLUME // Name
295 },
296
297 // KSNODE_TOPO_LINEOUT_MIX
298 {
299 0, // Flags
300 NULL, // AutomationTable
301 &KSNODETYPE_SUM, // Type
302 NULL // Name
303 },
304
305 // KSNODE_TOPO_LINEOUT_VOLUME
306 {
307 0, // Flags
308 &AutomationVolume, // AutomationTable
309 &KSNODETYPE_VOLUME, // Type
310 &KSAUDFNAME_MASTER_VOLUME // Name
311 },
312
313 // KSNODE_TOPO_WAVEIN_MUX
314 {
315 0, // Flags
316 &AutomationMux, // AutomationTable
317 &KSNODETYPE_MUX, // Type
318 &KSAUDFNAME_RECORDING_SOURCE // Name
319 },
320
321 // KSNODE_TOPO_DEV_SPECIFIC_BOOL
322 {
323 0, // Flags
324 &AutomationDevSpecific, // AutomationTable
325 &KSNODETYPE_DEV_SPECIFIC,// Type
326 NULL // Name
327 },
328
329 // KSNODE_TOPO_DEV_SPECIFIC_INT
330 {
331 0, // Flags
332 &AutomationDevSpecific, // AutomationTable
333 &KSNODETYPE_DEV_SPECIFIC,// Type
334 NULL // Name
335 },
336
337 // KSNODE_TOPO_DEV_SPECIFIC_UINT
338 {
339 0, // Flags
340 &AutomationDevSpecific, // AutomationTable
341 &KSNODETYPE_DEV_SPECIFIC,// Type
342 NULL // Name
343 },
344 };
345
346 C_ASSERT( KSNODE_TOPO_WAVEOUT_VOLUME == 0 );
347 C_ASSERT( KSNODE_TOPO_WAVEOUT_MUTE == 1 );
348 C_ASSERT( KSNODE_TOPO_SYNTHOUT_VOLUME == 2 );
349 C_ASSERT( KSNODE_TOPO_SYNTHOUT_MUTE == 3 );
350 C_ASSERT( KSNODE_TOPO_MIC_VOLUME == 4 );
351 C_ASSERT( KSNODE_TOPO_SYNTHIN_VOLUME == 5 );
352 C_ASSERT( KSNODE_TOPO_LINEOUT_MIX == 6 );
353 C_ASSERT( KSNODE_TOPO_LINEOUT_VOLUME == 7 );
354 C_ASSERT( KSNODE_TOPO_WAVEIN_MUX == 8 );
355
356 // The structures all need to line up. Thus, node 9 is DEV_SPECIFIC which is also
357 // KSNODE_TOPO_DEV_SPECIFIC_BOOL ... etc.
358 C_ASSERT( KSNODE_TOPO_DEV_SPECIFIC_BOOL == DEV_SPECIFIC_VT_BOOL );
359 C_ASSERT( KSNODE_TOPO_DEV_SPECIFIC_BOOL == DEV_SPECIFIC_VT_BOOL );
360 C_ASSERT( KSNODE_TOPO_DEV_SPECIFIC_INT == DEV_SPECIFIC_VT_I4 );
361 C_ASSERT( KSNODE_TOPO_DEV_SPECIFIC_UINT == DEV_SPECIFIC_VT_UI4 );
362
363 //=============================================================================
364 static PCCONNECTION_DESCRIPTOR MiniportConnections[] = {
365 // FromNode, FromPin, ToNode, ToPin
02f8ea0 @02strich remove recording device and make the nodes run on HOST cpu
authored
366 { PCFILTER_NODE, KSPIN_TOPO_WAVEOUT_SOURCE, KSNODE_TOPO_WAVEOUT_VOLUME, 1 },
367 { KSNODE_TOPO_WAVEOUT_VOLUME, 0, KSNODE_TOPO_WAVEOUT_MUTE, 1 },
368 { KSNODE_TOPO_WAVEOUT_MUTE, 0, KSNODE_TOPO_LINEOUT_MIX, 1 },
561ae61 @02strich initial import based on MSVAD simple sample
authored
369
02f8ea0 @02strich remove recording device and make the nodes run on HOST cpu
authored
370 { PCFILTER_NODE, KSPIN_TOPO_SYNTHOUT_SOURCE, KSNODE_TOPO_SYNTHOUT_VOLUME, 1 },
371 { KSNODE_TOPO_SYNTHOUT_VOLUME, 0, KSNODE_TOPO_SYNTHOUT_MUTE, 1 },
372 { KSNODE_TOPO_SYNTHOUT_MUTE, 0, KSNODE_TOPO_LINEOUT_MIX, 2 },
561ae61 @02strich initial import based on MSVAD simple sample
authored
373
02f8ea0 @02strich remove recording device and make the nodes run on HOST cpu
authored
374 { PCFILTER_NODE, KSPIN_TOPO_SYNTHIN_SOURCE, KSNODE_TOPO_SYNTHIN_VOLUME, 1 },
375 { KSNODE_TOPO_SYNTHIN_VOLUME, 0, KSNODE_TOPO_WAVEIN_MUX, 2 },
561ae61 @02strich initial import based on MSVAD simple sample
authored
376
02f8ea0 @02strich remove recording device and make the nodes run on HOST cpu
authored
377 { PCFILTER_NODE, KSPIN_TOPO_MIC_SOURCE, KSNODE_TOPO_MIC_VOLUME, 1 },
378 { KSNODE_TOPO_MIC_VOLUME, 0, KSNODE_TOPO_WAVEIN_MUX, 1 },
561ae61 @02strich initial import based on MSVAD simple sample
authored
379
380 { KSNODE_TOPO_LINEOUT_MIX, 0, KSNODE_TOPO_DEV_SPECIFIC_BOOL, 1 },
381 { KSNODE_TOPO_DEV_SPECIFIC_BOOL,0, KSNODE_TOPO_DEV_SPECIFIC_INT, 1 },
382 { KSNODE_TOPO_DEV_SPECIFIC_INT, 0, KSNODE_TOPO_DEV_SPECIFIC_UINT, 1 },
383 { KSNODE_TOPO_DEV_SPECIFIC_UINT,0, KSNODE_TOPO_LINEOUT_VOLUME, 1 },
384 { KSNODE_TOPO_LINEOUT_VOLUME, 0, PCFILTER_NODE, KSPIN_TOPO_LINEOUT_DEST },
385
02f8ea0 @02strich remove recording device and make the nodes run on HOST cpu
authored
386 { KSNODE_TOPO_WAVEIN_MUX, 0, PCFILTER_NODE, KSPIN_TOPO_WAVEIN_DEST }
561ae61 @02strich initial import based on MSVAD simple sample
authored
387 };
388
389
390 //=============================================================================
391 static PCPROPERTY_ITEM PropertiesTopoFilter[] = {
392 {
393 &KSPROPSETID_Jack,
394 KSPROPERTY_JACK_DESCRIPTION,
395 KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
396 PropertyHandler_TopoFilter
397 }
398 };
399 DEFINE_PCAUTOMATION_TABLE_PROP(AutomationTopoFilter, PropertiesTopoFilter);
400
401 //=============================================================================
402 static PCFILTER_DESCRIPTOR MiniportFilterDescriptor = {
403 0, // Version
404 &AutomationTopoFilter, // AutomationTable
405 sizeof(PCPIN_DESCRIPTOR), // PinSize
406 SIZEOF_ARRAY(MiniportPins), // PinCount
407 MiniportPins, // Pins
408 sizeof(PCNODE_DESCRIPTOR), // NodeSize
409 SIZEOF_ARRAY(TopologyNodes), // NodeCount
410 TopologyNodes, // Nodes
411 SIZEOF_ARRAY(MiniportConnections), // ConnectionCount
412 MiniportConnections, // Connections
413 0, // CategoryCount
414 NULL // Categories
415 };
416
417 #endif
418
Something went wrong with that request. Please try again.