ReactOS 0.4.16-dev-237-gd6eebaa
mintopo.cpp
Go to the documentation of this file.
1/********************************************************************************
2** Copyright (c) 1998-2000 Microsoft Corporation. All Rights Reserved.
3**
4** Portions Copyright (c) 1998-1999 Intel Corporation
5**
6********************************************************************************/
7
8/* The file mintopo.cpp was reviewed by LCA in June 2011 and is acceptable for use by Microsoft. */
9
10// Every debug output has "Modulname text".
11#define STR_MODULENAME "AC97 Topology: "
12
13#include "mintopo.h"
14
15/*****************************************************************************
16 * AC97 topology miniport tables
17 */
18
19/*****************************************************************************
20 * PinDataRangesBridge
21 *****************************************************************************
22 * Structures indicating range of valid format values for bridge pins.
23 */
25{
26 {
27 sizeof(KSDATARANGE),
28 0,
29 0,
30 0,
34 }
35};
36
37/*****************************************************************************
38 * PinDataRangePointersBridge
39 *****************************************************************************
40 * List of pointers to structures indicating range of valid format values
41 * for audio bridge pins.
42 */
44{
46};
47
48
49/*****************************************************************************
50 * PropertiesVolume
51 *****************************************************************************
52 * Properties for volume controls.
53 */
55{
56 {
61 },
62 {
67 }
68};
69
70/*****************************************************************************
71 * AutomationVolume
72 *****************************************************************************
73 * Automation table for volume controls.
74 */
76
77/*****************************************************************************
78 * PropertiesMute
79 *****************************************************************************
80 * Properties for mute controls.
81 */
83{
84 {
89 },
90 {
95 }
96};
97
98/*****************************************************************************
99 * AutomationMute
100 *****************************************************************************
101 * Automation table for mute controls.
102 */
104
105/*****************************************************************************
106 * PropertiesMux
107 *****************************************************************************
108 * Properties for mux controls.
109 */
111{
112 {
117 },
118 {
123 }
124};
125
126/*****************************************************************************
127 * AutomationMux
128 *****************************************************************************
129 * Automation table for mux controls.
130 */
132
133/*****************************************************************************
134 * PropertiesSpecial
135 *****************************************************************************
136 * Properties for Special controls like fake loudness and fake agc.
137 */
139{
140 {
145 },
146 {
151 },
152 {
157 }
158};
159
160/*****************************************************************************
161 * AutomationAgc
162 *****************************************************************************
163 * Automation table for agc controls.
164 */
166
167/*****************************************************************************
168 * PropertiesTone
169 *****************************************************************************
170 * Properties for tone controls.
171 */
173{
174 {
179 },
180 {
185 },
186 {
191 }
192};
193
194/*****************************************************************************
195 * AutomationTone
196 *****************************************************************************
197 * Automation table for tone controls.
198 */
200
201/*****************************************************************************
202 * Properties3D
203 *****************************************************************************
204 * Properties for 3D controls.
205 */
207{
208 // are faky volume controls.
209 {
214 },
215 {
220 }
221};
222
223/*****************************************************************************
224 * Automation3D
225 *****************************************************************************
226 * Automation table for 3D controls.
227 */
229
230#ifdef INCLUDE_PRIVATE_PROPERTY
231/*****************************************************************************
232 * FilterPropertiesPrivate
233 *****************************************************************************
234 * Properties for AC97 features.
235 */
236static PCPROPERTY_ITEM FilterPropertiesPrivate[] =
237{
238 // This is a private property for getting the AC97 codec features.
239 {
240 &KSPROPSETID_Private,
241 KSPROPERTY_AC97_FEATURES,
243 CAC97MiniportTopology::PropertyHandler_Private
244 }
245#ifdef PROPERTY_SHOW_SET
246 ,
247 // This is a private property for getting the AC97 codec features.
248 {
249 &KSPROPSETID_Private,
250 KSPROPERTY_AC97_SAMPLE_SET,
252 CAC97MiniportTopology::PropertyHandler_Private
253 }
254#endif
255};
256
257/*****************************************************************************
258 * FilterAutomationPrivate
259 *****************************************************************************
260 * Filter's automation table for private property controls.
261 */
262DEFINE_PCAUTOMATION_TABLE_PROP (FilterAutomationPrivate, FilterPropertiesPrivate);
263#endif
264
265#ifdef _MSC_VER
266#pragma code_seg("PAGE")
267#endif
268
269/*****************************************************************************
270 * CreateAC97MiniportTopology
271 *****************************************************************************
272 * Creates a topology miniport object for the AC97 audio adapter. This uses a
273 * macro from STDUNK.H to do all the work.
274 */
276(
278 IN REFCLSID,
279 IN PUNKNOWN UnknownOuter OPTIONAL,
281 __drv_reportError("Must succeed pool allocations are forbidden. "
282 "Allocation failures cause a system crash"))
284)
285{
286 PAGED_CODE ();
287
288 ASSERT (Unknown);
289
290 STD_CREATE_BODY_WITH_TAG_(CAC97MiniportTopology,Unknown,UnknownOuter,PoolType,
292}
293
294/*****************************************************************************
295 * CAC97MiniportTopology::NonDelegatingQueryInterface
296 *****************************************************************************
297 * Obtains an interface. This function works just like a COM QueryInterface
298 * call and is used if the object is not being aggregated.
299 * We basically just check any GUID we know and return this object in case we
300 * know it.
301 */
302STDMETHODIMP_(NTSTATUS) CAC97MiniportTopology::NonDelegatingQueryInterface
303(
306)
307{
308 PAGED_CODE ();
309
310 ASSERT (Object);
311
312 DOUT (DBG_PRINT, ("[CAC97MiniportTopology::NonDelegatingQueryInterface]"));
313
314 // Is it IID_IUnknown?
316 {
317 *Object = (PVOID)(PUNKNOWN)this;
318 }
319 else
320 // or IID_IMiniport ...
321 if (IsEqualGUIDAligned (Interface, IID_IMiniport))
322 {
323 *Object = (PVOID)(PMINIPORT)this;
324 }
325 else
326 // or IID_IMiniportTopology ...
327 if (IsEqualGUIDAligned (Interface, IID_IMiniportTopology))
328 {
330 }
331 else
332 // or maybe our IID_IAC97MiniportTopology ...
333 if (IsEqualGUIDAligned (Interface, IID_IAC97MiniportTopology))
334 {
336 }
337 else
338 {
339 // nothing found, must be an unknown interface.
340 *Object = NULL;
342 }
343
344 //
345 // We reference the interface for the caller.
346 //
347 ((PUNKNOWN)(*Object))->AddRef ();
348 return STATUS_SUCCESS;
349}
350
351/*****************************************************************************
352 * CAC97MiniportTopology::~CAC97MiniportTopology
353 *****************************************************************************
354 * Destructor.
355 */
357{
358 PAGED_CODE ();
359
360 DOUT (DBG_PRINT, ("[CAC97MiniportTopology::~CAC97MiniportTopology]"));
361
362 // release all the stuff that we had referenced or allocated.
363 if (AdapterCommon)
364 {
365 // Notify the AdapterCommon that we go away.
366 AdapterCommon->SetMiniportTopology (NULL);
367 AdapterCommon->Release ();
369 }
370
372 {
375 }
376
378 {
381 }
382
383 if (NodeDescriptors)
384 {
387 }
388
389 if (PinDescriptors)
390 {
393 }
394}
395
396/*****************************************************************************
397 * CAC97MiniportTopology::DataRangeIntersection
398 *****************************************************************************
399 * Is defined in the IMiniportTopology interface. We just return
400 * STATUS_NOT_IMPLEMENTED and portcls will use a default handler for this.
401 */
402STDMETHODIMP_(NTSTATUS) CAC97MiniportTopology::DataRangeIntersection
403(
404 _In_ ULONG PinId,
405 _In_ PKSDATARANGE DataRange,
406 _In_ PKSDATARANGE MatchingDataRange,
408 _Out_writes_bytes_to_opt_(OutputBufferLength, *ResultantFormatLength)
409 PVOID ResultantFormat,
410 _Out_ PULONG ResultantFormatLength
411)
412{
413 PAGED_CODE();
414
416 UNREFERENCED_PARAMETER(DataRange);
417 UNREFERENCED_PARAMETER(MatchingDataRange);
419 UNREFERENCED_PARAMETER(ResultantFormat);
420 UNREFERENCED_PARAMETER(ResultantFormatLength);
421
423};
424
425/*****************************************************************************
426 * CAC97MiniportTopology::Init
427 *****************************************************************************
428 * Initializes the miniport.
429 * We initialize the translation tables, add reference to the port driver and
430 * build the topology.
431 */
432STDMETHODIMP_(NTSTATUS) CAC97MiniportTopology::Init
433(
434 _In_ PUNKNOWN UnknownAdapter,
436 _In_ PPORTTOPOLOGY Port_
437)
438{
439 PAGED_CODE ();
440
441 ASSERT (UnknownAdapter);
442 ASSERT (Port_);
443
444 DOUT (DBG_PRINT, ("[CAC97MiniportTopology::Init]"));
445
448
449 //
450 // Set the copy protect flag to FALSE.
451 //
453
454 //
455 // get the IAC97AdapterCommon interface from the adapter.
456 //
457 NTSTATUS ntStatus = UnknownAdapter->QueryInterface (IID_IAC97AdapterCommon,
458 (PVOID *) &AdapterCommon);
459
460 //
461 // initialize translation tables
462 //
463 int i;
464 for (i = 0; i < PIN_TOP_ELEMENT; i++)
465 {
467 stPinTrans[i].PinNr = -1;
468 }
469
470 for (i = 0; i < NODE_TOP_ELEMENT; i++)
471 {
473 stNodeTrans[i].NodeNr = -1;
474 }
475
476 // build the topology (means register pins, nodes, connections).
477 if (NT_SUCCESS (ntStatus))
478 {
479 ntStatus = BuildTopology ();
480 }
481
482 if (NT_SUCCESS (ntStatus))
483 {
484 //
485 // Notify AdapterCommon that we are ready now.
486 //
487 AdapterCommon->SetMiniportTopology (this);
488 }
489 else
490 {
491 //
492 // clean up our mess
493 //
494
495 // clean up AdapterCommon
496 if (AdapterCommon)
497 {
498 AdapterCommon->Release ();
500 }
501 }
502
503 return ntStatus;
504}
505
506/*****************************************************************************
507 * CAC97MiniportTopology::GetDescription
508 *****************************************************************************
509 * Gets/returns the topology to the system.
510 */
511STDMETHODIMP_(NTSTATUS) CAC97MiniportTopology::GetDescription
512(
513 _Out_ PPCFILTER_DESCRIPTOR * OutFilterDescriptor
514)
515{
516 PAGED_CODE ();
517
518 ASSERT (OutFilterDescriptor);
519
520 DOUT (DBG_PRINT, ("[CAC97MiniportTopology::GetDescription]"));
521
522#if (DBG)
523 // Dump it here. The system requests the topology only once.
524 DumpTopology ();
525#endif
526
528 {
529 *OutFilterDescriptor = FilterDescriptor;
530 return STATUS_SUCCESS;
531 }
532 else
534}
535
536#if (DBG)
537/*****************************************************************************
538 * CAC97MiniportTopology::DumpTopology
539 *****************************************************************************
540 * Dumps the topology for debugging.
541 * See the defines at the beginning of this file?
542 */
543void CAC97MiniportTopology::DumpTopology (void)
544{
545 PAGED_CODE ();
546
548 {
549 // dump the pins
550 DOUT (DBG_PINS, ("TOPOLOGY MINIPORT PINS"));
551
552 ULONG index;
554 {
555 DOUT (DBG_PINS, (" %2d %s", index,
556 TopoPinStrings[TransPinNrToPinDef (index)]));
557 }
558
559 // dump the nodes
560 DOUT (DBG_NODES, ("TOPOLOGY MINIPORT NODES"));
562 {
563 DOUT (DBG_NODES, (" %2d %s", index,
564 NodeStrings[TransNodeNrToNodeDef (index)]));
565 }
566
567 // dump the connections
568 DOUT (DBG_CONNS, ("TOPOLOGY MINIPORT CONNECTIONS"));
570 {
571 DOUT (DBG_CONNS, (" %2d (%d,%d)->(%d,%d)", index,
576 }
577 }
578}
579#endif
580
581
582/*****************************************************************************
583 * Miniport Topology V = Volume, M = Mute, L = Loudness, A = AGC
584 *==================== T = Treble, B = Bass, 0-9 = PinNr of node
585 *
586 * PCBEEP ---> V ---> M -----------------------------\
587 * PHONE ---> V ---> M ----------------------------\ \
588 * \ \
589 * WaveOut -------> V --> M --------------> 1+-----+ \ \
590 * MIC1 or MIC2 --> L --> A --> V --> M --> 2| SUM | \ \
591 * LineIn -------> V --> M --------------> 3| | \ \
592 * CD -------> V --> M --------------> 4| |0--->SUM--> T --> B --> L --> V --> M (MasterOut)
593 * Video -------> V --> M --------------> 5| |
594 * AUX -------> V --> M --------------> 6| |
595 * 3D Depth -----> V --> L --> A --------> 7| |
596 * 3D Center -----> V --> L --> A --------> 8| |
597 * Headphone -----> V --> M --------------> 9| |
598 * Front Speaker -> V --> M -------------->10| |
599 * Surround ------> V --> M -------------->11| |
600 * Center ------> V --> M -------------->12| |
601 * LFE ------> V --> M -------------->13+-----+
602 *
603 *
604 * virt. Pin: Tone mix mono ---> V --> M ---> 7+-------+
605 * virt. Pin: Tone mix stereo ---> V --> M ---> 6| |
606 * Phone ---> V --> M ---> 8| M |
607 * Mic (after AGC) ---> V --> M ---> 1| |0-----> (WaveIn)
608 * LineIn ---> V --> M ---> 5| U |
609 * CD ---> V --> M ---> 2| |
610 * Video ---> V --> M ---> 3| X |
611 * AUX ---> V --> M ---> 4+-------+
612 *
613 *
614 * virt. Pin: 3D mix mono ---> V ---> M ---> 1+-----+
615 * | MUX |0----> (MonoOut)
616 * Mic (after AGC) ---> V ---> M ---> 2+-----+
617 *
618 *
619 * Mic (after AGC) ----> V ----> M -----> (MicIn)
620 *
621 *----------------------------------------------------------------------------
622 *
623 * As you can see, the exposed topology is somewhat different from the real AC97
624 * topology. This is because the system that translates the topology to "mixer
625 * lines" gets confused if it has to deal with all the mess. So we have to make it
626 * plain and simple for the system.
627 * Some issues block us from exposing a nice plain and simple topology. The prg.
628 * which displayes the "Volume Control Panel" (sndvol32) does _only_ display
629 * Volumes, Mutes (only one "in a row"), Treble, Bass, Loudness and AGC under
630 * Advanced control panel. We don't have 3D controls, and before we go into a
631 * Muxer, there has to be Volume controls in front.
632 * So what do we do?
633 * 1) We fake 3D controls as Volume controls. The Mutes represent 3D bypass and
634 * 3D on/off
635 * 2) All inputs (including the 3D controls) go staight into a SUM. Important is
636 * that there are not 2 Volumes, Mutes in a row, e.g. ---> V ---> M ---> V ---> M
637 * In that case, only one Volume/Mute would be displayed.
638 * 3) We can't make a connection from the tone controls to the Wave In muxer (even
639 * with Volumes in front), so we create fake pins that we name user friendly.
640 * Same with the connection from the 3D mixer to the Mono output.
641 * 4) We discard all supermixer controls that would convert stereo to mono or vice
642 * versa. Instead, we just connect the lines and when the control is queried we
643 * fail a right channel request (mono has only left channel).
644 * 5) We have to make virtual volume and mute controls in front of each muxer.
645 * As you can see, these controls can be mono or stereo and there is only one
646 * HW register for them, so we have to cache the values and prg. the register
647 * each time the select changes or the selected volume control changes.
648 */
649
650/*****************************************************************************
651 * CAC97MiniportTopology::BuildTopology
652 *****************************************************************************
653 * Builds the topology descriptors based on hardware configuration info
654 * obtained from the adapter.
655 */
657{
658 PAGED_CODE ();
659
660 NTSTATUS ntStatus = STATUS_SUCCESS;
661
662 DOUT (DBG_PRINT, ("[CAC97MiniportTopology::BuildTopology]"));
663
664 // allocate our filter descriptor
668 {
669 // clear out the filter descriptor
671
672#ifdef INCLUDE_PRIVATE_PROPERTY
673 // Set the Filter automation table.
674 FilterDescriptor->AutomationTable = &FilterAutomationPrivate;
675#endif
676
677 // build the pin list
678 ntStatus = BuildPinDescriptors ();
679 if (NT_SUCCESS (ntStatus))
680 {
681 // build the node list
682 ntStatus = BuildNodeDescriptors ();
683 if (NT_SUCCESS (ntStatus))
684 {
685 // build the connection list
686 ntStatus = BuildConnectionDescriptors ();
687 }
688 }
689 }
690 else
691 {
693 }
694
695 // that's whatever one of these build... functions returned.
696 return ntStatus;
697}
698
699/*****************************************************************************
700 * CAC97MiniportTopology::BuildPinDescriptors
701 *****************************************************************************
702 * Builds the topology pin descriptors.
703 */
705{
706// Improvement would be to not use a Macro, use (inline) function instead.
707#define INIT_PIN( pin, pinptr, category, name, index ) \
708 pinptr->KsPinDescriptor.Category = (GUID*) category; \
709 pinptr->KsPinDescriptor.Name = (GUID*) name; \
710 SetPinTranslation (index++, pin); \
711 pinptr++
712
713 PAGED_CODE ();
714
715 ULONG Index;
716 PPCPIN_DESCRIPTOR CurrentPin;
717
718 DOUT (DBG_PRINT, ("[CAC97MiniportTopology::BuildPinDescriptors]"));
719
720 // allocate our descriptor memory
723 if (!PinDescriptors)
725
726 //
727 // set default pin descriptor parameters
728 //
730
731 // spend some more time and set the pin descriptors to expected values.
732 for (CurrentPin = PinDescriptors, Index = 0; Index < PIN_TOP_ELEMENT;
733 CurrentPin++, Index++)
734 {
736 CurrentPin->KsPinDescriptor.DataRanges = PinDataRangePointersAnalogBridge;
737 CurrentPin->KsPinDescriptor.DataFlow = KSPIN_DATAFLOW_IN;
738 CurrentPin->KsPinDescriptor.Communication = KSPIN_COMMUNICATION_NONE;
739 }
740
741 //
742 // modify the individual pin descriptors
743 //
744 CurrentPin = PinDescriptors;
745 Index = 0;
746
747 // add the PIN_WAVEOUT_SOURCE pin descriptor (not optional)
749 CurrentPin,
751 NULL,
752 Index);
753
754 // add the PIN_PCBEEP_SOURCE pin descriptor (optional)
755 if (AdapterCommon->GetPinConfig (PINC_PCBEEP_PRESENT))
756 {
758 CurrentPin,
761 Index);
762 }
763
764 // add the PIN_PHONE_SOURCE pin descriptor (optional)
765 if (AdapterCommon->GetPinConfig (PINC_PHONE_PRESENT))
766 {
768 CurrentPin,
770 NULL,
771 Index);
772 }
773
774 // add the PIN_MIC_SOURCE pin descriptor (could be disabled)
775 if (AdapterCommon->GetPinConfig (PINC_MIC_PRESENT))
776 {
778 CurrentPin,
780 NULL,
781 Index);
782 }
783
784 // add the PIN_LINEIN_SOURCE pin descriptor (could be disabled)
785 if (AdapterCommon->GetPinConfig (PINC_LINEIN_PRESENT))
786 {
788 CurrentPin,
791 Index);
792 }
793
794 // add the PIN_CD_SOURCE pin descriptor (could be disabled)
795 if (AdapterCommon->GetPinConfig (PINC_CD_PRESENT))
796 {
798 CurrentPin,
801 Index);
802 }
803
804 // add the PIN_VIDEO_SOURCE pin descriptor (optional)
805 if (AdapterCommon->GetPinConfig (PINC_VIDEO_PRESENT))
806 {
808 CurrentPin,
811 Index);
812 }
813
814 // add the PIN_AUX_SOURCE pin descriptor (optional)
815 if (AdapterCommon->GetPinConfig (PINC_AUX_PRESENT))
816 {
818 CurrentPin,
821 Index);
822 }
823
824 // add the PIN_VIRT_TONE_MIX_SOURCE pin descriptor (not optional)
826 CurrentPin,
829 Index);
830
831 // add the PIN_VIRT_TONE_MIX_MONO_SOURCE pin descriptor (not optional)
833 CurrentPin,
836 Index);
837
838 // create a virt. pin for the 3D controls
839 if (AdapterCommon->GetNodeConfig (NODEC_3D_PRESENT))
840 {
841 if (AdapterCommon->GetNodeConfig (NODEC_3D_CENTER_ADJUSTABLE))
842 {
844 CurrentPin,
847 Index);
848 }
849
850 // A weird way would be to have 3D but only fixed sliders. In that case,
851 // display one fixed slider (3D depth).
852 if (AdapterCommon->GetNodeConfig (NODEC_3D_DEPTH_ADJUSTABLE) ||
853 (!AdapterCommon->GetNodeConfig (NODEC_3D_CENTER_ADJUSTABLE) &&
854 !AdapterCommon->GetNodeConfig (NODEC_3D_DEPTH_ADJUSTABLE)))
855 {
857 CurrentPin,
860 Index);
861 }
862 }
863
864 // Add a "Front speaker" pin if we have multichannel or headphones.
865 // We use a master mono then ...
866 if (AdapterCommon->GetPinConfig (PINC_SURROUND_PRESENT) ||
867 AdapterCommon->GetPinConfig (PINC_HPOUT_PRESENT))
868 {
869 // Add a "Front speaker" pin, because in multichannel we want
870 // to display a master mono that effects all channels.
872 CurrentPin,
875 Index);
876 }
877
878 // check for multichannel
879 if (AdapterCommon->GetPinConfig (PINC_SURROUND_PRESENT))
880 {
881 // Add the Rear Speaker Volume pin.
883 CurrentPin,
886 Index);
887
888 // add the Center Volume pin if we support at least 6 channel.
889 if (AdapterCommon->GetPinConfig (PINC_CENTER_LFE_PRESENT))
890 {
892 CurrentPin,
895 Index);
896
898 CurrentPin,
901 Index);
902 }
903 }
904
905 // add the PIN_MASTEROUT_DEST pin descriptor (not optional)
906 CurrentPin->KsPinDescriptor.DataFlow = KSPIN_DATAFLOW_OUT;
908 CurrentPin,
911 Index);
912
913 // add the PIN_HPOUT_SOURCE pin descriptor (optional)
914 if (AdapterCommon->GetPinConfig (PINC_HPOUT_PRESENT))
915 {
917 CurrentPin,
919 NULL,
920 Index);
921 }
922
923 // add the PIN_WAVEIN_DEST pin descriptor (not optional)
924 CurrentPin->KsPinDescriptor.DataFlow = KSPIN_DATAFLOW_OUT;
926 CurrentPin,
928 NULL,
929 Index);
930
931 // add the PIN_MICIN_DEST pin descriptor (optional)
932 if (AdapterCommon->GetPinConfig (PINC_MICIN_PRESENT) &&
933 AdapterCommon->GetPinConfig (PINC_MIC_PRESENT))
934 {
935 CurrentPin->KsPinDescriptor.DataFlow = KSPIN_DATAFLOW_OUT;
937 CurrentPin,
939 NULL,
940 Index);
941 }
942
943 // add the PIN_MONOOUT_DEST pin descriptor (optional)
944 if (AdapterCommon->GetPinConfig (PINC_MONOOUT_PRESENT))
945 {
946 // add the PIN_VIRT_3D_MIX_MONO_SOURCE pin descriptor
948 CurrentPin,
951 Index);
952
953 CurrentPin->KsPinDescriptor.DataFlow = KSPIN_DATAFLOW_OUT;
954 // and the normal output pin
956 CurrentPin,
959 Index);
960 }
961
962 // add the pin descriptor informatin to the filter descriptor
966
967
968 return STATUS_SUCCESS;
969
970#undef INIT_PIN
971}
972
973/*****************************************************************************
974 * CAC97MiniportTopology::BuildNodeDescriptors
975 *****************************************************************************
976 * Builds the topology node descriptors.
977 */
979{
980// Improvement would be to not use a Macro, use (inline) function instead.
981#define INIT_NODE( node, nodeptr, type, name, automation, index ) \
982 nodeptr->Type = (GUID*) type; \
983 nodeptr->Name = (GUID*) name; \
984 nodeptr->AutomationTable = automation; \
985 SetNodeTranslation (index++, node); \
986 nodeptr++
987
988 PAGED_CODE ();
989
990 NTSTATUS ntStatus = STATUS_SUCCESS;
991
992 DOUT (DBG_PRINT, ("[CAC97MiniportTopology::BuildNodeDescriptors]"));
993
994 // allocate our descriptor memory
997 if (NodeDescriptors)
998 {
1000 ULONG Index = 0;
1001
1002 //
1003 // set default node descriptor parameters
1004 //
1006 sizeof(PCNODE_DESCRIPTOR));
1007
1008 // We don't have loopback mode currently. It is only used for testing anyway.
1009
1010 // Add the NODE_WAVEOUT_VOLUME node
1012 CurrentNode,
1015 &AutomationVolume,
1016 Index);
1017
1018 // add the NODE_WAVEOUT_MUTE node
1020 CurrentNode,
1023 &AutomationMute,
1024 Index);
1025
1026 // add the PCBEEP nodes
1027 if (AdapterCommon->GetPinConfig (PINC_PCBEEP_PRESENT))
1028 {
1029 // add the NODE_PCBEEP_VOLUME node
1031 CurrentNode,
1034 &AutomationVolume,
1035 Index);
1036
1037 // add the NODE_PCBEEP_MUTE node
1039 CurrentNode,
1042 &AutomationMute,
1043 Index);
1044 }
1045
1046 // add the PHONE nodes
1047 if (AdapterCommon->GetPinConfig (PINC_PHONE_PRESENT))
1048 {
1049 // add the NODE_PHONE_VOLUME node
1051 CurrentNode,
1054 &AutomationVolume,
1055 Index);
1056
1057 // add the NODE_PHONE_MUTE node
1059 CurrentNode,
1062 &AutomationMute,
1063 Index);
1064 }
1065
1066 // add the MIC nodes
1067 if (AdapterCommon->GetPinConfig (PINC_MIC_PRESENT))
1068 {
1069 if (AdapterCommon->GetPinConfig (PINC_MIC2_PRESENT))
1070 {
1071 // add the NODE_MIC_SELECT node
1073 CurrentNode,
1076 &AutomationSpecial,
1077 Index);
1078 }
1079
1080 // add the NODE_MIC_BOOST node
1082 CurrentNode,
1085 &AutomationSpecial,
1086 Index);
1087
1088 // add the NODE_MIC_VOLUME node
1090 CurrentNode,
1093 &AutomationVolume,
1094 Index);
1095
1096 // add the NODE_MIC_MUTE node
1098 CurrentNode,
1101 &AutomationMute,
1102 Index);
1103 }
1104
1105 if (AdapterCommon->GetPinConfig (PINC_LINEIN_PRESENT))
1106 {
1107 // add the NODE_LINEIN_VOLUME node
1109 CurrentNode,
1112 &AutomationVolume,
1113 Index);
1114
1115 // add the NODE_LINEIN_MUTE node
1117 CurrentNode,
1120 &AutomationMute,
1121 Index);
1122 }
1123
1124 if (AdapterCommon->GetPinConfig (PINC_CD_PRESENT))
1125 {
1126 // add the NODE_CD_VOLUME node
1128 CurrentNode,
1131 &AutomationVolume,
1132 Index);
1133
1134 // add the NODE_CD_MUTE node
1136 CurrentNode,
1139 &AutomationMute,
1140 Index);
1141 }
1142
1143 // add the VIDEO nodes
1144 if (AdapterCommon->GetPinConfig (PINC_VIDEO_PRESENT))
1145 {
1146 // add the NODE_VIDEO_VOLUME node
1148 CurrentNode,
1151 &AutomationVolume,
1152 Index);
1153
1154 // add the NODE_VIDEO_MUTE node
1156 CurrentNode,
1159 &AutomationMute,
1160 Index);
1161 }
1162
1163 // add the AUX nodes
1164 if (AdapterCommon->GetPinConfig (PINC_AUX_PRESENT))
1165 {
1166 // add the NODE_AUX_VOLUME node
1168 CurrentNode,
1171 &AutomationVolume,
1172 Index);
1173
1174 // add the NODE_AUX_MUTE node
1176 CurrentNode,
1179 &AutomationMute,
1180 Index);
1181 }
1182
1183 // add the NODE_MAIN_MIX node
1185 CurrentNode,
1188 NULL,
1189 Index);
1190
1191 // add the 3D nodes
1192 if (AdapterCommon->GetNodeConfig (NODEC_3D_PRESENT))
1193 {
1194 if (AdapterCommon->GetNodeConfig (NODEC_3D_CENTER_ADJUSTABLE))
1195 {
1196 // add the NODE_VIRT_3D_CENTER node
1198 CurrentNode,
1201 &Automation3D,
1202 Index);
1203 }
1204
1205 if (AdapterCommon->GetNodeConfig (NODEC_3D_DEPTH_ADJUSTABLE) ||
1206 (!AdapterCommon->GetNodeConfig (NODEC_3D_DEPTH_ADJUSTABLE) &&
1207 !AdapterCommon->GetNodeConfig (NODEC_3D_CENTER_ADJUSTABLE)))
1208 {
1209 // add the NODE_VIRT_3D_DEPTH node
1211 CurrentNode,
1214 &Automation3D,
1215 Index);
1216 }
1217
1218 // add the NODE_VIRT_3D_ENABLE node
1220 CurrentNode,
1223 &AutomationSpecial,
1224 Index);
1225
1226 // add the NODE_VIRT_WAVEOUT_3D_BYPASS node
1228 CurrentNode,
1231 &AutomationSpecial,
1232 Index);
1233 }
1234
1235 if (AdapterCommon->GetPinConfig (PINC_PCBEEP_PRESENT) ||
1236 AdapterCommon->GetPinConfig (PINC_PHONE_PRESENT))
1237 {
1238 // add the NODE_BEEP_MIX node
1240 CurrentNode,
1243 NULL,
1244 Index);
1245 }
1246
1247 // add the tone nodes
1248 if (AdapterCommon->GetNodeConfig (NODEC_TONE_PRESENT))
1249 {
1250 // add the NODE_BASS node
1252 CurrentNode,
1255 &AutomationTone,
1256 Index);
1257
1258 // add the NODE_TREBLE node
1260 CurrentNode,
1263 &AutomationTone,
1264 Index);
1265
1266 if (AdapterCommon->GetNodeConfig (NODEC_LOUDNESS_PRESENT))
1267 {
1268 // add the NODE_LOUDNESS node
1270 CurrentNode,
1272 NULL,
1273 &AutomationSpecial,
1274 Index);
1275 }
1276
1277 if (AdapterCommon->GetNodeConfig (NODEC_SIMUL_STEREO_PRESENT))
1278 {
1279 // add the NODE_SIMUL_STEREO node
1281 CurrentNode,
1284 &AutomationSpecial,
1285 Index);
1286 }
1287 }
1288
1289 // Add a "Front Speaker" volume/mute if we have surround or headphones.
1290 // The "Master" volume/mute will be mono then
1291 if (AdapterCommon->GetPinConfig (PINC_SURROUND_PRESENT) ||
1292 AdapterCommon->GetPinConfig (PINC_HPOUT_PRESENT))
1293 {
1294 // Add the front speaker volume.
1296 CurrentNode,
1299 &AutomationVolume,
1300 Index);
1301
1302 // Add the front speaker mute.
1304 CurrentNode,
1307 &AutomationMute,
1308 Index);
1309
1310 // Add the master mono out volume.
1312 CurrentNode,
1315 &AutomationVolume,
1316 Index);
1317
1318 // Add the master mono out volume.
1320 CurrentNode,
1323 &AutomationMute,
1324 Index);
1325 }
1326 else
1327 {
1328 // add the NODE_MASTEROUT_VOLUME node
1330 CurrentNode,
1333 &AutomationVolume,
1334 Index);
1335
1336 // add the NODE_MASTEROUT_MUTE node
1338 CurrentNode,
1341 &AutomationMute,
1342 Index);
1343 }
1344
1345 // Add the surround control if we have one.
1346 if (AdapterCommon->GetPinConfig (PINC_SURROUND_PRESENT))
1347 {
1348 // Add the surround volume.
1350 CurrentNode,
1353 &AutomationVolume,
1354 Index);
1355
1356 // Add the surround mute.
1358 CurrentNode,
1361 &AutomationMute,
1362 Index);
1363
1364 // Add the center and LFE control if we have one.
1365 if (AdapterCommon->GetPinConfig (PINC_CENTER_LFE_PRESENT))
1366 {
1367 // Add the center volume.
1369 CurrentNode,
1372 &AutomationVolume,
1373 Index);
1374
1375 // Add the center mute.
1377 CurrentNode,
1380 &AutomationMute,
1381 Index);
1382
1383 // Add the LFE volume.
1385 CurrentNode,
1388 &AutomationVolume,
1389 Index);
1390
1391 // Add the LFE mute.
1393 CurrentNode,
1396 &AutomationMute,
1397 Index);
1398 }
1399 }
1400
1401 // add the HPOUT nodes
1402 if (AdapterCommon->GetPinConfig (PINC_HPOUT_PRESENT))
1403 {
1404 // add the NODE_HPOUT_VOLUME node
1406 CurrentNode,
1409 &AutomationVolume,
1410 Index);
1411
1412 // add the NODE_HPOUT_MUTE node
1414 CurrentNode,
1417 &AutomationMute,
1418 Index);
1419 }
1420
1421 // add the NODE_WAVEIN_SELECT node
1423 CurrentNode,
1426 &AutomationMux,
1427 Index);
1428
1429 if (AdapterCommon->GetPinConfig (PINC_MIC_PRESENT))
1430 {
1431 // add the NODE_VIRT_MASTER_INPUT_VOLUME1 node
1433 CurrentNode,
1436 &AutomationVolume,
1437 Index);
1438 }
1439
1440 if (AdapterCommon->GetPinConfig (PINC_CD_PRESENT))
1441 {
1442 // add the NODE_VIRT_MASTER_INPUT_VOLUME2 node
1444 CurrentNode,
1447 &AutomationVolume,
1448 Index);
1449 }
1450
1451 if (AdapterCommon->GetPinConfig (PINC_VIDEO_PRESENT))
1452 {
1453 // add the NODE_VIRT_MASTER_INPUT_VOLUME3 node
1455 CurrentNode,
1458 &AutomationVolume,
1459 Index);
1460 }
1461
1462 if (AdapterCommon->GetPinConfig (PINC_AUX_PRESENT))
1463 {
1464 // add the NODE_VIRT_MASTER_INPUT_VOLUME4 node
1466 CurrentNode,
1469 &AutomationVolume,
1470 Index);
1471 }
1472
1473 if (AdapterCommon->GetPinConfig (PINC_LINEIN_PRESENT))
1474 {
1475 // add the NODE_VIRT_MASTER_INPUT_VOLUME5 node
1477 CurrentNode,
1480 &AutomationVolume,
1481 Index);
1482 }
1483
1484 // add the NODE_VIRT_MASTER_INPUT_VOLUME6 node
1486 CurrentNode,
1489 &AutomationVolume,
1490 Index);
1491
1492 // add the NODE_VIRT_MASTER_INPUT_VOLUME7 node
1494 CurrentNode,
1497 &AutomationVolume,
1498 Index);
1499
1500 if (AdapterCommon->GetPinConfig (PINC_PHONE_PRESENT))
1501 {
1502 // add the NODE_VIRT_MASTER_INPUT_VOLUME8 node
1504 CurrentNode,
1507 &AutomationVolume,
1508 Index);
1509 }
1510
1511 // add the MICIN nodes
1512 if (AdapterCommon->GetPinConfig (PINC_MIC_PRESENT) &&
1513 AdapterCommon->GetPinConfig (PINC_MICIN_PRESENT))
1514 {
1515 // add the NODE_MICIN_VOLUME node
1517 CurrentNode,
1520 &AutomationVolume,
1521 Index);
1522
1523 // add the NODE_MICIN_MUTE node
1525 CurrentNode,
1528 &AutomationMute,
1529 Index);
1530 }
1531
1532 // add the MONOOUT nodes
1533 if (AdapterCommon->GetPinConfig (PINC_MONOOUT_PRESENT))
1534 {
1535 // add the NODE_MONOOUT_SELECT node
1537 CurrentNode,
1540 &AutomationMux,
1541 Index);
1542
1543 // add the NODE_VIRT_MONOOUT_VOLUME1 node
1545 CurrentNode,
1548 &AutomationVolume,
1549 Index);
1550
1551 // add the NODE_VIRT_MONOOUT_VOLUME2 node
1553 CurrentNode,
1556 &AutomationVolume,
1557 Index);
1558 }
1559
1560 // add the nodes to the filter descriptor
1564 }
1565 else
1566 {
1568 }
1569
1570 return ntStatus;
1571
1572#undef INIT_NODE
1573}
1574
1575/*****************************************************************************
1576 * CAC97MiniportTopology::BuildConnectionDescriptors
1577 *****************************************************************************
1578 * Builds the topology connection descriptors.
1579 */
1581{
1582// Improvement would be to not use a Macro, use (inline) function instead.
1583
1584// for node to node connections
1585#define INIT_NN_CONN( cptr, fnode, fpin, tnode, tpin ) \
1586 cptr->FromNode = TransNodeDefToNodeNr (fnode); \
1587 cptr->FromNodePin = fpin; \
1588 cptr->ToNode = TransNodeDefToNodeNr (tnode); \
1589 cptr->ToNodePin = tpin; \
1590 cptr++,ConnectionCount++
1591
1592// for filter pin to node connections
1593#define INIT_FN_CONN( cptr, fpin, tnode, tpin ) \
1594 cptr->FromNode = KSFILTER_NODE; \
1595 cptr->FromNodePin = TransPinDefToPinNr (fpin); \
1596 cptr->ToNode = TransNodeDefToNodeNr (tnode); \
1597 cptr->ToNodePin = tpin; \
1598 cptr++,ConnectionCount++
1599
1600// for node to filter pin connections
1601#define INIT_NF_CONN( cptr, fnode, fpin, tpin ) \
1602 cptr->FromNode = TransNodeDefToNodeNr (fnode); \
1603 cptr->FromNodePin = fpin; \
1604 cptr->ToNode = KSFILTER_NODE; \
1605 cptr->ToNodePin = TransPinDefToPinNr (tpin); \
1606 cptr++,ConnectionCount++
1607
1608 PAGED_CODE ();
1609
1610 NTSTATUS ntStatus = STATUS_SUCCESS;
1611 ULONG ConnectionCount = 0;
1612
1613 DOUT (DBG_PRINT, ("[CAC97MiniportTopology::BuildConnectionDescriptors]"));
1614
1615 // allocate our descriptor memory
1619 {
1621
1622 // build the wave out (coming in) path
1623
1624 // PIN_WAVEOUT_SOURCE -> NODE_WAVEOUT_VOLUME
1625 INIT_FN_CONN (CurrentConnection, PIN_WAVEOUT_SOURCE, NODE_WAVEOUT_VOLUME, 1);
1626
1627 // NODE_WAVEOUT_VOLUME -> NODE_WAVEOUT_MUTE
1628 INIT_NN_CONN (CurrentConnection, NODE_WAVEOUT_VOLUME, 0, NODE_WAVEOUT_MUTE, 1);
1629
1630 // NODE_WAVEOUT_MUTE -> NODE_MAIN_MIX
1631 INIT_NN_CONN (CurrentConnection, NODE_WAVEOUT_MUTE, 0, NODE_MAIN_MIX, 1);
1632
1633 // build the PC beeper path
1634 if (AdapterCommon->GetPinConfig (PINC_PCBEEP_PRESENT))
1635 {
1636 // PIN_PCBEEP_SOURCE -> NODE_PCBEEP_VOLUME
1637 INIT_FN_CONN (CurrentConnection, PIN_PCBEEP_SOURCE, NODE_PCBEEP_VOLUME, 1);
1638
1639 // NODE_PCBEEP_VOLUME -> NODE_PCBEEP_MUTE
1640 INIT_NN_CONN (CurrentConnection, NODE_PCBEEP_VOLUME, 0, NODE_PCBEEP_MUTE, 1);
1641
1642 // NODE_PCBEEP_MUTE -> NODE_BEEP_MIX
1643 INIT_NN_CONN (CurrentConnection, NODE_PCBEEP_MUTE, 0, NODE_BEEP_MIX, 2);
1644 }
1645
1646 // build the phone path
1647 if (AdapterCommon->GetPinConfig (PINC_PHONE_PRESENT))
1648 {
1649 // PIN_PHONE_SOURCE -> NODE_PHONE_VOLUME
1650 INIT_FN_CONN (CurrentConnection, PIN_PHONE_SOURCE, NODE_PHONE_VOLUME, 1);
1651
1652 // NODE_PHONE_VOLUME -> NODE_PHONE_MUTE
1653 INIT_NN_CONN (CurrentConnection, NODE_PHONE_VOLUME, 0, NODE_PHONE_MUTE, 1);
1654
1655 // NODE_PHONE_MUTE -> LINEOUT_BEEP_MIX
1656 INIT_NN_CONN (CurrentConnection, NODE_PHONE_MUTE, 0, NODE_BEEP_MIX, 3);
1657
1658 // PIN_PHONE_SOURCE pin -> NODE_VIRT_MASTER_INPUT_VOLUME8
1660
1661 // NODE_VIRT_MASTER_INPUT_VOLUME8 -> NODE_WAVEIN_SELECT
1663 }
1664
1665 // build MIC path
1666 if (AdapterCommon->GetPinConfig (PINC_MIC_PRESENT))
1667 {
1668 // build the MIC selector in case we have 2 MICs
1669 if (AdapterCommon->GetPinConfig (PINC_MIC2_PRESENT))
1670 {
1671 // PIN_MIC_SOURCE pin -> NODE_MIC_SELECT
1672 INIT_FN_CONN (CurrentConnection, PIN_MIC_SOURCE, NODE_MIC_SELECT, 1);
1673
1674 // NODE_MIC_SELECT -> NODE_MIC_BOOST
1675 INIT_NN_CONN (CurrentConnection, NODE_MIC_SELECT, 0, NODE_MIC_BOOST, 1);
1676 }
1677 else
1678 {
1679 // PIN_MIC_SOURCE pin -> NODE_MIC_SELECT
1680 INIT_FN_CONN (CurrentConnection, PIN_MIC_SOURCE, NODE_MIC_BOOST, 1);
1681 }
1682
1683 // NODE_MIC_BOOST -> NODE_MIC_VOLUME
1684 INIT_NN_CONN (CurrentConnection, NODE_MIC_BOOST, 0, NODE_MIC_VOLUME, 1);
1685
1686 // NODE_MIC_VOLUME -> NODE_MIC_MUTE
1687 INIT_NN_CONN (CurrentConnection, NODE_MIC_VOLUME, 0, NODE_MIC_MUTE, 1);
1688
1689 // NODE_MIC_MUTE -> NODE_MAIN_MIX
1690 INIT_NN_CONN (CurrentConnection, NODE_MIC_MUTE, 0, NODE_MAIN_MIX, 2);
1691
1692 // NODE_MIC_BOOST -> NODE_VIRT_MASTER_INPUT_VOLUME1
1694
1695 // NODE_VIRT_MASTER_INPUT_VOLUME1 -> NODE_WAVEIN_SELECT
1697 }
1698
1699 // build the line in path
1700 if (AdapterCommon->GetPinConfig (PINC_LINEIN_PRESENT))
1701 {
1702 // PIN_LINEIN_SOURCE -> NODE_LINEIN_VOLUME
1703 INIT_FN_CONN (CurrentConnection, PIN_LINEIN_SOURCE, NODE_LINEIN_VOLUME, 1);
1704
1705 // NODE_LINEIN_VOLUME -> NODE_LINEIN_MUTE
1706 INIT_NN_CONN (CurrentConnection, NODE_LINEIN_VOLUME, 0, NODE_LINEIN_MUTE, 1);
1707
1708 // NODE_LINEIN_MUTE -> NODE_MAIN_MIX
1709 INIT_NN_CONN (CurrentConnection, NODE_LINEIN_MUTE, 0, NODE_MAIN_MIX, 3);
1710
1711 // PIN_LINEIN_SOURCE pin -> NODE_VIRT_MASTER_INPUT_VOLUME5
1713
1714 // NODE_VIRT_MASTER_INPUT_VOLUME5 -> NODE_WAVEIN_SELECT
1716 }
1717
1718 // build the CD path
1719 if (AdapterCommon->GetPinConfig (PINC_CD_PRESENT))
1720 {
1721 // PIN_CD_SOURCE -> NODE_CD_VOLUME
1722 INIT_FN_CONN (CurrentConnection, PIN_CD_SOURCE, NODE_CD_VOLUME, 1);
1723
1724 // NODE_CD_VOLUME -> NODE_CD_MUTE
1725 INIT_NN_CONN (CurrentConnection, NODE_CD_VOLUME, 0, NODE_CD_MUTE, 1);
1726
1727 // NODE_CD_MUTE -> NODE_MAIN_MIX
1728 INIT_NN_CONN (CurrentConnection, NODE_CD_MUTE, 0, NODE_MAIN_MIX, 4);
1729
1730 // PIN_CD_SOURCE pin -> NODE_VIRT_MASTER_INPUT_VOLUME2
1732
1733 // NODE_VIRT_MASTER_INPUT_VOLUME2 -> NODE_WAVEIN_SELECT
1735 }
1736
1737 // build the video path
1738 if (AdapterCommon->GetPinConfig (PINC_VIDEO_PRESENT))
1739 {
1740 // PIN_VIDEO_SOURCE -> NODE_VIDEO_VOLUME
1741 INIT_FN_CONN (CurrentConnection, PIN_VIDEO_SOURCE, NODE_VIDEO_VOLUME, 1);
1742
1743 // NODE_VIDEO_VOLUME -> NODE_VIDEO_MUTE
1744 INIT_NN_CONN (CurrentConnection, NODE_VIDEO_VOLUME, 0, NODE_VIDEO_MUTE, 1);
1745
1746 // NODE_VIDEO_MUTE -> NODE_MAIN_MIX
1747 INIT_NN_CONN (CurrentConnection, NODE_VIDEO_MUTE, 0, NODE_MAIN_MIX, 5);
1748
1749 // PIN_VIDEO_SOURCE pin -> NODE_VIRT_MASTER_INPUT_VOLUME3
1751
1752 // NODE_VIRT_MASTER_INPUT_VOLUME3 -> NODE_WAVEIN_SELECT
1754 }
1755
1756 // build the AUX path
1757 if (AdapterCommon->GetPinConfig (PINC_AUX_PRESENT))
1758 {
1759 // PIN_AUX_SOURCE pin -> NODE_AUX_VOLUME
1760 INIT_FN_CONN (CurrentConnection, PIN_AUX_SOURCE, NODE_AUX_VOLUME, 1);
1761
1762 // NODE_AUX_VOLUME -> NODE_AUX_MUTE
1763 INIT_NN_CONN (CurrentConnection, NODE_AUX_VOLUME, 0, NODE_AUX_MUTE, 1);
1764
1765 // NODE_AUX_MUTE -> NODE_MAIN_MIX
1766 INIT_NN_CONN (CurrentConnection, NODE_AUX_MUTE, 0, NODE_MAIN_MIX, 6);
1767
1768 // PIN_AUX_SOURCE pin -> NODE_VIRT_MASTER_INPUT_VOLUME4
1770
1771 // NODE_VIRT_MASTER_INPUT_VOLUME4 -> NODE_WAVEIN_SELECT
1773 }
1774
1775 // and build the head phone output.
1776 // we connect the headphones like an input so that it's in the playback panel.
1777 if (AdapterCommon->GetPinConfig (PINC_HPOUT_PRESENT))
1778 {
1779 // from whatever -> NODE_HPOUT_VOLUME
1780 INIT_FN_CONN (CurrentConnection, PIN_HPOUT_SOURCE, NODE_HPOUT_VOLUME, 1);
1781
1782 // NODE_HPOUT_VOLUME -> NODE_HPOUT_MUTE
1783 INIT_NN_CONN (CurrentConnection, NODE_HPOUT_VOLUME, 0, NODE_HPOUT_MUTE, 1);
1784
1785 // NODE_HPOUT_MUTE -> PIN_HPOUT_DEST pin
1786 INIT_NN_CONN( CurrentConnection, NODE_HPOUT_MUTE, 0, NODE_MAIN_MIX, 9);
1787 }
1788
1789 // build the 3D path
1790 if (AdapterCommon->GetNodeConfig (NODEC_3D_PRESENT))
1791 {
1792 // Figure out what the main 3D line is.
1793 if (AdapterCommon->GetNodeConfig (NODEC_3D_CENTER_ADJUSTABLE))
1794 {
1795 if (AdapterCommon->GetNodeConfig (NODEC_3D_DEPTH_ADJUSTABLE))
1796 {
1797 // PIN_VIRT_3D_DEPTH_SOURCE -> NODE_VIRT_3D_ENABLE
1799
1800 // NODE_VIRT_3D_ENABLE -> NODE_VIRT_WAVEOUT_3D_BYPASS
1802
1803 // NODE_VIRT_WAVEOUT_3D_BYPASS -> NODE_VIRT_3D_DEPTH
1805
1806 // NODE_VIRT_3D_DEPTH -> NODE_MAIN_MIX
1807 INIT_NN_CONN (CurrentConnection, NODE_VIRT_3D_DEPTH, 0, NODE_MAIN_MIX, 7);
1808
1809 // PIN_VIRT_3D_CENTER_SOURCE -> NODE_VIRT_3D_CENTER
1811
1812 // NODE_VIRT_3D_CENTER -> NODE_MAIN_MIX
1813 INIT_NN_CONN (CurrentConnection, NODE_VIRT_3D_CENTER, 0, NODE_MAIN_MIX, 8);
1814 }
1815 else
1816 {
1817 // PIN_VIRT_3D_CENTER_SOURCE -> NODE_VIRT_3D_ENABLE
1819
1820 // NODE_VIRT_3D_ENABLE -> NODE_VIRT_WAVEOUT_3D_BYPASS
1822
1823 // NODE_VIRT_WAVEOUT_3D_BYPASS -> NODE_VIRT_3D_CENTER
1825
1826 // NODE_VIRT_3D_CENTER -> NODE_MAIN_MIX
1827 INIT_NN_CONN (CurrentConnection, NODE_VIRT_3D_CENTER, 0, NODE_MAIN_MIX, 8);
1828 }
1829 }
1830 else
1831 {
1832 // PIN_VIRT_3D_DEPTH_SOURCE -> NODE_VIRT_3D_ENABLE
1834
1835 // NODE_VIRT_3D_ENABLE -> NODE_VIRT_WAVEOUT_3D_BYPASS
1837
1838 // NODE_VIRT_WAVEOUT_3D_BYPASS -> NODE_VIRT_3D_DEPTH
1840
1841 // NODE_VIRT_3D_DEPTH -> NODE_MAIN_MIX
1842 INIT_NN_CONN (CurrentConnection, NODE_VIRT_3D_DEPTH, 0, NODE_MAIN_MIX, 7);
1843 }
1844 }
1845
1846 // build the 4 or 6 channel controls
1847
1848 // In case of multichannel or headphone we have "front speakers" volume/mute.
1849 if (AdapterCommon->GetPinConfig (PINC_SURROUND_PRESENT) ||
1850 AdapterCommon->GetPinConfig (PINC_HPOUT_PRESENT))
1851 {
1852 // PIN_VIRT_FRONT_SOURCE -> NODE_FRONT_VOLUME
1853 INIT_FN_CONN (CurrentConnection, PIN_VIRT_FRONT_SOURCE, NODE_FRONT_VOLUME, 1);
1854
1855 // NODE_FRONT_VOLUME -> NODE_FRONT_MUTE
1856 INIT_NN_CONN (CurrentConnection, NODE_FRONT_VOLUME, 0, NODE_FRONT_MUTE, 1);
1857
1858 // NODE_FRONT_MUTE -> NODE_MAIN_MIX
1859 INIT_NN_CONN (CurrentConnection, NODE_FRONT_MUTE, 0, NODE_MAIN_MIX, 10);
1860 }
1861
1862 // Check for surround volumes
1863 if (AdapterCommon->GetPinConfig (PINC_SURROUND_PRESENT))
1864 {
1865 // PIN_VIRT_SURROUND -> NODE_SURROUND_VOLUME
1867
1868 // NODE_SURROUND_VOLUME -> NODE_SURROUND_MUTE
1869 INIT_NN_CONN (CurrentConnection, NODE_SURROUND_VOLUME, 0, NODE_SURROUND_MUTE, 1);
1870
1871 // NODE_SURROUND_MUTE -> NODE_MAIN_MIX
1872 INIT_NN_CONN (CurrentConnection, NODE_SURROUND_MUTE, 0, NODE_MAIN_MIX, 11);
1873
1874 // check also for the center and LFE volumes
1875 if (AdapterCommon->GetPinConfig (PINC_CENTER_LFE_PRESENT))
1876 {
1877 // PIN_VIRT_CENTER -> NODE_CENTER_VOLUME
1879
1880 // NODE_CENTER_VOLUME -> NODE_CENTER_MUTE
1881 INIT_NN_CONN (CurrentConnection, NODE_CENTER_VOLUME, 0, NODE_CENTER_MUTE, 1);
1882
1883 // NODE_CENTER_MUTE -> NODE_MAIN_MIX
1884 INIT_NN_CONN (CurrentConnection, NODE_CENTER_MUTE, 0, NODE_MAIN_MIX, 12);
1885
1886 // PIN_VIRT_LFE -> NODE_LFE_VOLUME
1887 INIT_FN_CONN (CurrentConnection, PIN_VIRT_LFE_SOURCE, NODE_LFE_VOLUME, 1);
1888
1889 // NODE_LFE_VOLUME -> NODE_LFE_MUTE
1890 INIT_NN_CONN (CurrentConnection, NODE_LFE_VOLUME, 0, NODE_LFE_MUTE, 1);
1891
1892 // NODE_LFE_MUTE -> NODE_MAIN_MIX
1893 INIT_NN_CONN (CurrentConnection, NODE_LFE_MUTE, 0, NODE_MAIN_MIX, 13);
1894 }
1895 }
1896
1897 // helper node variable.
1898 TopoNodes ConnectFromNode;
1899
1900 // all connections go from this one
1901 ConnectFromNode = NODE_MAIN_MIX;
1902
1903 // build the beeper & phone mix
1904 if (AdapterCommon->GetPinConfig (PINC_PCBEEP_PRESENT) ||
1905 AdapterCommon->GetPinConfig (PINC_PHONE_PRESENT))
1906 {
1907 // last node -> NODE_BEEP_MIX
1908 INIT_NN_CONN (CurrentConnection, ConnectFromNode, 0, NODE_BEEP_MIX, 1);
1909
1910 // next connection from this point.
1911 ConnectFromNode = NODE_BEEP_MIX;
1912 }
1913
1914 // build the tone control path
1915 if (AdapterCommon->GetNodeConfig (NODEC_TONE_PRESENT))
1916 {
1917 // last node -> NODE_BASS
1918 INIT_NN_CONN (CurrentConnection, ConnectFromNode, 0, NODE_BASS, 1);
1919
1920 // NODE_BASS -> NODE_TREBLE
1921 INIT_NN_CONN (CurrentConnection, NODE_BASS, 0, NODE_TREBLE, 1);
1922
1923 // remember the last node
1924 ConnectFromNode = NODE_TREBLE;
1925
1926 // build the loudness control
1927 if (AdapterCommon->GetNodeConfig (NODEC_LOUDNESS_PRESENT))
1928 {
1929 // last node -> NODE_LOUDNESS
1930 INIT_NN_CONN (CurrentConnection, ConnectFromNode, 0, NODE_LOUDNESS, 1);
1931
1932 // remember the last node
1933 ConnectFromNode = NODE_LOUDNESS;
1934 }
1935
1936 // build the simulated stereo control
1937 if (AdapterCommon->GetNodeConfig (NODEC_SIMUL_STEREO_PRESENT))
1938 {
1939 // last node -> NODE_SIMUL_STEREO
1940 INIT_NN_CONN (CurrentConnection, ConnectFromNode, 0, NODE_SIMUL_STEREO, 1);
1941
1942 // remember the last node
1943 ConnectFromNode = NODE_SIMUL_STEREO;
1944 }
1945 }
1946
1947 //build the master volume output.
1948
1949 // In case of multichannel or headphone we use a master mono control.
1950 if (AdapterCommon->GetPinConfig (PINC_SURROUND_PRESENT) ||
1951 AdapterCommon->GetPinConfig (PINC_HPOUT_PRESENT))
1952 {
1953 // build the connection from whatever to NODE_VIRT_MASTERMONO_VOLUME
1954 INIT_NN_CONN (CurrentConnection, ConnectFromNode, 0, NODE_VIRT_MASTERMONO_VOLUME, 1);
1955
1956 // NODE_VIRT_MASTERMONO_VOLUME -> NODE_VIRT_MASTERMONO_MUTE
1958
1959 // NODE_VIRT_MASTERMONO_MUTE -> PIN_MASTEROUT_DEST pin
1961 }
1962 else
1963 {
1964 // build the connection from whatever to NODE_MASTEROUT_VOLUME
1965 INIT_NN_CONN (CurrentConnection, ConnectFromNode, 0, NODE_MASTEROUT_VOLUME, 1);
1966
1967 // NODE_MASTEROUT_VOLUME -> NODE_MASTEROUT_MUTE
1968 INIT_NN_CONN (CurrentConnection, NODE_MASTEROUT_VOLUME, 0, NODE_MASTEROUT_MUTE, 1);
1969
1970 // NODE_MASTEROUT_MUTE -> PIN_MASTEROUT_DEST pin
1971 INIT_NF_CONN( CurrentConnection, NODE_MASTEROUT_MUTE, 0, PIN_MASTEROUT_DEST);
1972 }
1973
1974 // now complete the input muxer path
1975
1976 // PIN_VIRT_TONE_MIX_MONO_SOURCE -> NODE_VIRT_MASTER_INPUT_VOLUME7
1978
1979 // NODE_VIRT_MASTER_INPUT_VOLUME7 -> NODE_WAVEIN_SELECT
1981
1982 // PIN_VIRT_TONE_MIX_SOURCE -> NODE_VIRT_MASTER_INPUT_VOLUME6
1984
1985 // NODE_VIRT_MASTER_INPUT_VOLUME6 -> NODE_WAVEIN_SELECT
1987
1988 // NODE_WAVEIN_SELECT -> PIN_WAVEIN_DEST
1989 INIT_NF_CONN( CurrentConnection, NODE_WAVEIN_SELECT, 0, PIN_WAVEIN_DEST);
1990
1991 // build the mic output path (for record control)
1992 if (AdapterCommon->GetPinConfig (PINC_MIC_PRESENT) &&
1993 AdapterCommon->GetPinConfig (PINC_MICIN_PRESENT))
1994 {
1995 // NODE_MIC_BOOST -> NODE_MICIN_VOLUME
1996 INIT_NN_CONN (CurrentConnection, NODE_MIC_BOOST, 0, NODE_MICIN_VOLUME, 1);
1997
1998 // NODE_MICIN_VOLUME -> NODE_MICIN_MUTE
1999 INIT_NN_CONN (CurrentConnection, NODE_MICIN_VOLUME, 0, NODE_MICIN_MUTE, 1);
2000
2001 // NODE_MICIN_MUTE -> PIN_MICIN_DEST
2002 INIT_NF_CONN( CurrentConnection, NODE_MICIN_MUTE, 0, PIN_MICIN_DEST);
2003 }
2004
2005 // build the mono path
2006 if (AdapterCommon->GetPinConfig (PINC_MONOOUT_PRESENT))
2007 {
2008 // PIN_VIRT_3D_MIX_MONO_SOURCE -> NODE_MONOOUT_SMIX
2010
2011 // NODE_VIRT_MONOOUT_VOLUME1 -> NODE_MONOOUT_SELECT
2013
2014 if (AdapterCommon->GetPinConfig (PINC_MIC_PRESENT))
2015 {
2016 // NODE_MIC_BOOST -> NODE_VIRT_MONOOUT_VOLUME2
2017 INIT_NN_CONN (CurrentConnection, NODE_MIC_BOOST, 0, NODE_VIRT_MONOOUT_VOLUME2, 1);
2018
2019 // NODE_VIRT_MONOOUT_VOLUME2 -> NODE_MONOOUT_SELECT
2021 }
2022
2023 // NODE_MONOOUT_SELECT -> PIN_MONOOUT_DEST
2024 INIT_NF_CONN( CurrentConnection, NODE_MONOOUT_SELECT, 0, PIN_MONOOUT_DEST);
2025 }
2026
2027 // add the connections to the filter descriptor
2028 FilterDescriptor->ConnectionCount = ConnectionCount;
2030 } else
2031 {
2033 }
2034
2035 return ntStatus;
2036
2037#undef INIT_NN_CONN
2038#undef INIT_FN_CONN
2039#undef INIT_NF_CONN
2040}
2041
2042
2043/*****************************************************************************
2044 * CAC97MiniportTopology::UpdateRecordMute
2045 *****************************************************************************
2046 * Updates the record mute control. This is used to have DRM functionality.
2047 * In the case that we play a DRM file that is copy protected, we have to
2048 * mute the record if stereo or mono mix is selected. We also have to update
2049 * the record mute every time the DRM content changes or the playback stream
2050 * goes away. The property handler also calls this function to update the
2051 * record mute in case stereo or mono mix is selected.
2052 */
2054{
2055 PAGED_CODE ();
2056
2057 WORD wRegister;
2058 //TopoNodes Node;
2059
2060 DOUT (DBG_PRINT, ("[CAC97MiniportTopology::UpdateRecordMute]"));
2061
2062 // Get the record muxer setting.
2063 if (!NT_SUCCESS (AdapterCommon->ReadCodecRegister (
2064 AdapterCommon->GetNodeReg (NODE_WAVEIN_SELECT), &wRegister)))
2065 return;
2066
2067 // Mask out every unused bit.
2068 wRegister &= (AdapterCommon->GetNodeMask (NODE_WAVEIN_SELECT) & AC97REG_MASK_RIGHT);
2069
2070#if 0
2071 // Calculate how we would program the mute.
2072 switch (wRegister)
2073 {
2074 // This is stereo mix.
2075 case 5:
2077 break;
2078
2079 // This is mono mix.
2080 case 6:
2082 break;
2083
2084 // Something else selected than stereo mix or mono mix.
2085 default:
2086 return;
2087 }
2088#endif
2089
2090 // Program the mute.
2091 AdapterCommon->WriteCodecRegister (AC97REG_RECORD_GAIN,
2093}
2094
2095
2096/*****************************************************************************
2097 * CAC97MiniportTopology::GetPhysicalConnectionPins
2098 *****************************************************************************
2099 * Returns the system pin IDs of the bridge pins that are connected with the
2100 * wave miniport.
2101 * If one pin is not used, the value is -1, that could only happen for MinInDest.
2102 */
2103STDMETHODIMP CAC97MiniportTopology::GetPhysicalConnectionPins
2104(
2105 OUT PULONG WaveOutSource,
2106 OUT PULONG WaveInDest,
2107 OUT PULONG MicInDest
2108)
2109{
2110 PAGED_CODE ();
2111
2112 ASSERT (WaveOutSource);
2114 ASSERT (MicInDest);
2115
2116 DOUT (DBG_PRINT, ("[CAC97MiniportTopology::GetPhysicalConnectionPins]"));
2117
2118 // set the pin IDs.
2119 *WaveOutSource = TransPinDefToPinNr (PIN_WAVEOUT_SOURCE);
2121 // this is optional
2122 if (AdapterCommon->GetPinConfig (PINC_MICIN_PRESENT))
2124 else
2125 *MicInDest = (ULONG)-1;
2126
2127 return STATUS_SUCCESS;
2128}
2129
#define PAGED_CODE()
#define INIT_NN_CONN(cptr, fnode, fpin, tnode, tpin)
static PCPROPERTY_ITEM Properties3D[]
Definition: mintopo.cpp:206
#define INIT_NF_CONN(cptr, fnode, fpin, tpin)
static PCPROPERTY_ITEM PropertiesVolume[]
Definition: mintopo.cpp:54
static PCPROPERTY_ITEM PropertiesTone[]
Definition: mintopo.cpp:172
static PCPROPERTY_ITEM PropertiesMux[]
Definition: mintopo.cpp:110
static PCPROPERTY_ITEM PropertiesSpecial[]
Definition: mintopo.cpp:138
#define INIT_PIN(pin, pinptr, category, name, index)
static PKSDATARANGE PinDataRangePointersAnalogBridge[]
Definition: mintopo.cpp:43
NTSTATUS CreateAC97MiniportTopology(OUT PUNKNOWN *Unknown, IN REFCLSID, IN PUNKNOWN UnknownOuter OPTIONAL, _When_((PoolType &NonPagedPoolMustSucceed) !=0, __drv_reportError("Must succeed pool allocations are forbidden. " "Allocation failures cause a system crash")) IN POOL_TYPE PoolType)
Definition: mintopo.cpp:276
#define INIT_NODE(node, nodeptr, type, name, automation, index)
static KSDATARANGE PinDataRangesAnalogBridge[]
Definition: mintopo.cpp:24
#define INIT_FN_CONN(cptr, fpin, tnode, tpin)
static PCPROPERTY_ITEM PropertiesMute[]
Definition: mintopo.cpp:82
@ AC97REG_RECORD_GAIN
Definition: ac97reg.h:32
LONG NTSTATUS
Definition: precomp.h:26
#define index(s, c)
Definition: various.h:29
#define STDMETHODIMP
Definition: basetyps.h:43
#define STDMETHODIMP_(t)
Definition: basetyps.h:44
const GUID IID_IUnknown
#define SIZEOF_ARRAY(ar)
Definition: cdrom.h:1482
OUT PULONG OUT PULONG MicInDest
Definition: mintopo.h:248
TopoPins TransPinNrToPinDef(IN int Pin)
Definition: mintopo.h:169
PPCNODE_DESCRIPTOR NodeDescriptors
Definition: mintopo.h:101
PPCFILTER_DESCRIPTOR FilterDescriptor
Definition: mintopo.h:99
TopoNodes TransNodeNrToNodeDef(IN int Node)
Definition: mintopo.h:135
PPCPIN_DESCRIPTOR PinDescriptors
Definition: mintopo.h:100
OUT PULONG WaveInDest
Definition: mintopo.h:246
NTSTATUS BuildPinDescriptors(void)
Definition: mintopo.cpp:704
NTSTATUS BuildNodeDescriptors(void)
Definition: mintopo.cpp:978
NTSTATUS BuildTopology(void)
Definition: mintopo.cpp:656
int TransPinDefToPinNr(IN TopoPins Pin)
Definition: mintopo.h:186
PADAPTERCOMMON AdapterCommon
Definition: mintopo.h:98
tNodeTranslationTable stNodeTrans[NODE_TOP_ELEMENT]
Definition: mintopo.h:105
static NTSTATUS NTAPI PropertyHandler_Ulong(IN PPCPROPERTY_REQUEST PropertyRequest)
Definition: prophnd.cpp:1380
NTSTATUS BuildConnectionDescriptors(void)
Definition: mintopo.cpp:1580
static NTSTATUS NTAPI PropertyHandler_Level(IN PPCPROPERTY_REQUEST PropertyRequest)
Definition: prophnd.cpp:689
PPCCONNECTION_DESCRIPTOR ConnectionDescriptors
Definition: mintopo.h:102
void UpdateRecordMute(void)
Definition: mintopo.cpp:2053
tPinTranslationTable stPinTrans[PIN_TOP_ELEMENT]
Definition: mintopo.h:104
static NTSTATUS NTAPI PropertyHandler_Tone(IN PPCPROPERTY_REQUEST PropertyRequest)
Definition: prophnd.cpp:1176
static NTSTATUS NTAPI PropertyHandler_OnOff(IN PPCPROPERTY_REQUEST PropertyRequest)
Definition: prophnd.cpp:334
static NTSTATUS NTAPI PropertyHandler_CpuResources(IN PPCPROPERTY_REQUEST PropertyRequest)
Definition: prophnd.cpp:1632
IUnknown * PUNKNOWN
Definition: com_apitest.h:45
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
static PKSDATARANGE PinDataRangePointersAnalogBridge[]
Definition: miniport.cpp:49
const int DBG_NODES
Definition: debug.h:32
#define DOUT(lvl, strings)
Definition: debug.h:82
const int DBG_CONNS
Definition: debug.h:33
const int DBG_PINS
Definition: debug.h:31
@ PINC_LINEIN_PRESENT
Definition: shared.h:72
@ PINC_MONOOUT_PRESENT
Definition: shared.h:69
@ PINC_VIDEO_PRESENT
Definition: shared.h:66
@ PINC_MIC2_PRESENT
Definition: shared.h:65
@ PINC_PCBEEP_PRESENT
Definition: shared.h:63
@ PINC_PHONE_PRESENT
Definition: shared.h:64
@ PINC_AUX_PRESENT
Definition: shared.h:67
@ PINC_SURROUND_PRESENT
Definition: shared.h:74
@ PINC_CENTER_LFE_PRESENT
Definition: shared.h:75
@ PINC_HPOUT_PRESENT
Definition: shared.h:68
@ PINC_CD_PRESENT
Definition: shared.h:73
@ PINC_MICIN_PRESENT
Definition: shared.h:70
@ PINC_MIC_PRESENT
Definition: shared.h:71
IAC97MiniportTopology * PAC97MINIPORTTOPOLOGY
Definition: shared.h:380
TopoNodes
Definition: shared.h:186
@ NODE_MASTEROUT_VOLUME
Definition: shared.h:215
@ NODE_HPOUT_MUTE
Definition: shared.h:218
@ NODE_TREBLE
Definition: shared.h:212
@ NODE_WAVEOUT_MUTE
Definition: shared.h:188
@ NODE_PHONE_VOLUME
Definition: shared.h:192
@ NODE_VIRT_MASTER_INPUT_VOLUME1
Definition: shared.h:223
@ NODE_MICIN_MUTE
Definition: shared.h:232
@ NODE_LFE_MUTE
Definition: shared.h:238
@ NODE_BEEP_MIX
Definition: shared.h:210
@ NODE_VIRT_MONOOUT_VOLUME1
Definition: shared.h:220
@ NODE_PHONE_MUTE
Definition: shared.h:193
@ NODE_MIC_BOOST
Definition: shared.h:195
@ NODE_WAVEIN_SELECT
Definition: shared.h:222
@ NODE_HPOUT_VOLUME
Definition: shared.h:217
@ NODE_VIRT_MONOOUT_VOLUME2
Definition: shared.h:221
@ NODE_CENTER_MUTE
Definition: shared.h:236
@ NODE_LFE_VOLUME
Definition: shared.h:237
@ NODE_VIRT_MASTER_INPUT_VOLUME3
Definition: shared.h:225
@ NODE_VIRT_MASTER_INPUT_VOLUME8
Definition: shared.h:230
@ NODE_SIMUL_STEREO
Definition: shared.h:214
@ NODE_VIRT_MASTERMONO_MUTE
Definition: shared.h:242
@ NODE_AUX_VOLUME
Definition: shared.h:204
@ NODE_PCBEEP_MUTE
Definition: shared.h:191
@ NODE_VIRT_3D_CENTER
Definition: shared.h:207
@ NODE_LINEIN_VOLUME
Definition: shared.h:198
@ NODE_MIC_MUTE
Definition: shared.h:197
@ NODE_VIRT_WAVEOUT_3D_BYPASS
Definition: shared.h:189
@ NODE_VIRT_3D_ENABLE
Definition: shared.h:209
@ NODE_TOP_ELEMENT
Definition: shared.h:243
@ NODE_VIRT_MASTER_INPUT_VOLUME2
Definition: shared.h:224
@ NODE_CD_VOLUME
Definition: shared.h:200
@ NODE_FRONT_VOLUME
Definition: shared.h:239
@ NODE_MIC_VOLUME
Definition: shared.h:196
@ NODE_BASS
Definition: shared.h:211
@ NODE_LINEIN_MUTE
Definition: shared.h:199
@ NODE_VIRT_MASTER_INPUT_VOLUME6
Definition: shared.h:228
@ NODE_PCBEEP_VOLUME
Definition: shared.h:190
@ NODE_VIRT_MASTER_INPUT_VOLUME5
Definition: shared.h:227
@ NODE_LOUDNESS
Definition: shared.h:213
@ NODE_VIDEO_MUTE
Definition: shared.h:203
@ NODE_CENTER_VOLUME
Definition: shared.h:235
@ NODE_CD_MUTE
Definition: shared.h:201
@ NODE_VIRT_MASTER_INPUT_VOLUME7
Definition: shared.h:229
@ NODE_WAVEOUT_VOLUME
Definition: shared.h:187
@ NODE_FRONT_MUTE
Definition: shared.h:240
@ NODE_INVALID
Definition: shared.h:244
@ NODE_VIRT_MASTERMONO_VOLUME
Definition: shared.h:241
@ NODE_VIRT_3D_DEPTH
Definition: shared.h:208
@ NODE_SURROUND_VOLUME
Definition: shared.h:233
@ NODE_MASTEROUT_MUTE
Definition: shared.h:216
@ NODE_SURROUND_MUTE
Definition: shared.h:234
@ NODE_VIDEO_VOLUME
Definition: shared.h:202
@ NODE_MONOOUT_SELECT
Definition: shared.h:219
@ NODE_AUX_MUTE
Definition: shared.h:205
@ NODE_MICIN_VOLUME
Definition: shared.h:231
@ NODE_VIRT_MASTER_INPUT_VOLUME4
Definition: shared.h:226
@ NODE_MIC_SELECT
Definition: shared.h:194
@ NODE_MAIN_MIX
Definition: shared.h:206
@ NODEC_3D_DEPTH_ADJUSTABLE
Definition: shared.h:95
@ NODEC_TONE_PRESENT
Definition: shared.h:86
@ NODEC_3D_CENTER_ADJUSTABLE
Definition: shared.h:94
@ NODEC_LOUDNESS_PRESENT
Definition: shared.h:87
@ NODEC_3D_PRESENT
Definition: shared.h:85
@ NODEC_SIMUL_STEREO_PRESENT
Definition: shared.h:88
@ PIN_LINEIN_SOURCE
Definition: shared.h:118
@ PIN_VIRT_CENTER_SOURCE
Definition: shared.h:128
@ PIN_VIRT_3D_CENTER_SOURCE
Definition: shared.h:122
@ PIN_PCBEEP_SOURCE
Definition: shared.h:115
@ PIN_VIRT_TONE_MIX_SOURCE
Definition: shared.h:125
@ PIN_MICIN_DEST
Definition: shared.h:135
@ PIN_TOP_ELEMENT
Definition: shared.h:136
@ PIN_VIRT_LFE_SOURCE
Definition: shared.h:129
@ PIN_MIC_SOURCE
Definition: shared.h:117
@ PIN_VIDEO_SOURCE
Definition: shared.h:120
@ PIN_VIRT_TONE_MIX_MONO_SOURCE
Definition: shared.h:126
@ PIN_AUX_SOURCE
Definition: shared.h:121
@ PIN_CD_SOURCE
Definition: shared.h:119
@ PIN_INVALID
Definition: shared.h:137
@ PIN_WAVEOUT_SOURCE
Definition: shared.h:114
@ PIN_VIRT_SURROUND_SOURCE
Definition: shared.h:127
@ PIN_PHONE_SOURCE
Definition: shared.h:116
@ PIN_MONOOUT_DEST
Definition: shared.h:133
@ PIN_VIRT_3D_MIX_MONO_SOURCE
Definition: shared.h:124
@ PIN_VIRT_FRONT_SOURCE
Definition: shared.h:130
@ PIN_VIRT_3D_DEPTH_SOURCE
Definition: shared.h:123
@ PIN_WAVEIN_DEST
Definition: shared.h:134
@ PIN_HPOUT_SOURCE
Definition: shared.h:132
@ PIN_MASTEROUT_DEST
Definition: shared.h:131
#define __drv_reportError(why)
Definition: driverspecs.h:320
#define KSPROPERTY_TYPE_SET
Definition: dmksctrl.h:43
#define STATICGUIDOF(guid)
Definition: dmksctrl.h:25
#define KSPROPERTY_TYPE_BASICSUPPORT
Definition: dmksctrl.h:45
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PagedPool
Definition: env_spec_w32.h:308
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint index
Definition: glext.h:6031
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define MYKSNAME_MAIN_MIX
Definition: guids.h:42
#define MYKSNAME_PHONE_VOLUME
Definition: guids.h:24
#define MYKSNAME_FRONT_VOLUME
Definition: guids.h:156
#define MYKSNAME_CENTER
Definition: guids.h:174
#define MYKSNAME_HPOUT_VOLUME
Definition: guids.h:66
#define MYKSNAME_MONOOUT_SELECT
Definition: guids.h:78
#define MYKSNAME_CENTER_VOLUME
Definition: guids.h:132
#define MYKSNAME_LFE
Definition: guids.h:180
#define MYKSNAME_MICIN_MUTE
Definition: guids.h:108
#define MYKSNAME_WAVEIN_SELECT
Definition: guids.h:84
#define MYKSNAME_SURROUND
Definition: guids.h:168
#define MYKSNAME_BEEP_MIX
Definition: guids.h:60
#define MYKSNAME_PHONE_MUTE
Definition: guids.h:30
#define MYKSNAME_HPOUT_MUTE
Definition: guids.h:72
#define MYKSNAME_SIMUL_STEREO
Definition: guids.h:114
#define MYKSNAME_WAVEOUT_3D_BYPASS
Definition: guids.h:48
#define MYKSNAME_MASTER_INPUT_VOLUME
Definition: guids.h:90
#define MYKSNAME_CENTER_MUTE
Definition: guids.h:138
#define MYKSNAME_3D_ENABLE
Definition: guids.h:54
#define MYKSNAME_FRONT
Definition: guids.h:186
#define MYKSNAME_MICIN_VOLUME
Definition: guids.h:102
#define MYKSNAME_LFE_MUTE
Definition: guids.h:150
#define MYKSNAME_LFE_VOLUME
Definition: guids.h:144
#define MYKSNAME_LINEIN_MUTE
Definition: guids.h:36
#define MYKSNAME_SURROUND_VOLUME
Definition: guids.h:120
#define MYKSNAME_SURROUND_MUTE
Definition: guids.h:126
#define MYKSNAME_FRONT_MUTE
Definition: guids.h:162
@ Unknown
Definition: i8042prt.h:114
#define KSDATAFORMAT_SPECIFIER_NONE
Definition: ks.h:1157
union KSDATAFORMAT KSDATARANGE
@ KSPIN_DATAFLOW_IN
Definition: ks.h:1249
@ KSPIN_DATAFLOW_OUT
Definition: ks.h:1250
@ KSPIN_COMMUNICATION_NONE
Definition: ks.h:1254
union KSDATAFORMAT * PKSDATARANGE
#define KSAUDFNAME_MONO_MIX_VOLUME
Definition: ksmedia.h:564
#define KSNODETYPE_TONE
Definition: ksmedia.h:453
#define KSAUDFNAME_PC_SPEAKER_VOLUME
Definition: ksmedia.h:514
#define KSAUDFNAME_MIC_MUTE
Definition: ksmedia.h:418
@ KSPROPERTY_AUDIO_BASS
Definition: ksmedia.h:1067
@ KSPROPERTY_AUDIO_VOLUMELEVEL
Definition: ksmedia.h:1057
@ KSPROPERTY_AUDIO_MUTE
Definition: ksmedia.h:1066
@ KSPROPERTY_AUDIO_TREBLE
Definition: ksmedia.h:1069
@ KSPROPERTY_AUDIO_AGC
Definition: ksmedia.h:1074
@ KSPROPERTY_AUDIO_LOUDNESS
Definition: ksmedia.h:1076
@ KSPROPERTY_AUDIO_CPU_RESOURCES
Definition: ksmedia.h:1086
@ KSPROPERTY_AUDIO_MUX_SOURCE
Definition: ksmedia.h:1065
#define KSAUDFNAME_MICROPHONE_BOOST
Definition: ksmedia.h:403
#define KSAUDFNAME_LINE_IN
Definition: ksmedia.h:534
#define KSNODETYPE_SUM
Definition: ksmedia.h:363
#define KSNODETYPE_CD_PLAYER
Definition: ksmedia.h:302
#define KSNODETYPE_LOUDNESS
Definition: ksmedia.h:398
#define KSAUDFNAME_VIDEO_MUTE
Definition: ksmedia.h:609
#define KSNODETYPE_MICROPHONE
Definition: ksmedia.h:297
#define KSNODETYPE_MUX
Definition: ksmedia.h:433
#define KSAUDFNAME_AUX_MUTE
Definition: ksmedia.h:423
#define KSAUDFNAME_CD_AUDIO
Definition: ksmedia.h:524
#define KSNODETYPE_ANALOG_CONNECTOR
Definition: ksmedia.h:323
#define KSAUDFNAME_MONO_OUT
Definition: ksmedia.h:594
#define KSAUDFNAME_MASTER_VOLUME
Definition: ksmedia.h:368
#define KSAUDFNAME_STEREO_MIX_VOLUME
Definition: ksmedia.h:569
#define KSAUDFNAME_VIDEO_VOLUME
Definition: ksmedia.h:574
#define KSAUDFNAME_MONO_MIX
Definition: ksmedia.h:554
#define KSAUDFNAME_VOLUME_CONTROL
Definition: ksmedia.h:428
#define KSAUDFNAME_AUX
Definition: ksmedia.h:544
#define KSNODETYPE_VOLUME
Definition: ksmedia.h:338
#define KSAUDFNAME_CD_MUTE
Definition: ksmedia.h:408
#define KSNODETYPE_MUTE
Definition: ksmedia.h:348
#define KSAUDFNAME_LINE_IN_VOLUME
Definition: ksmedia.h:383
#define KSDATAFORMAT_SUBTYPE_ANALOG
Definition: ksmedia.h:993
#define KSAUDFNAME_MASTER_MUTE
Definition: ksmedia.h:438
#define KSAUDFNAME_STEREO_MIX
Definition: ksmedia.h:549
#define KSNODETYPE_AGC
Definition: ksmedia.h:267
#define KSAUDFNAME_BASS
Definition: ksmedia.h:584
#define KSAUDFNAME_WAVE_VOLUME
Definition: ksmedia.h:343
#define KSAUDFNAME_TREBLE
Definition: ksmedia.h:579
#define KSAUDFNAME_AUX_VOLUME
Definition: ksmedia.h:388
#define KSDATAFORMAT_TYPE_AUDIO
Definition: ksmedia.h:983
#define KSNODETYPE_LINE_CONNECTOR
Definition: ksmedia.h:318
#define KSAUDFNAME_PC_SPEAKER
Definition: ksmedia.h:529
#define KSAUDFNAME_MIC_VOLUME
Definition: ksmedia.h:358
#define KSAUDFNAME_ALTERNATE_MICROPHONE
Definition: ksmedia.h:604
#define KSAUDFNAME_PC_SPEAKER_MUTE
Definition: ksmedia.h:599
#define KSCATEGORY_AUDIO
Definition: ksmedia.h:172
#define KSAUDFNAME_CD_VOLUME
Definition: ksmedia.h:373
#define KSAUDFNAME_3D_DEPTH
Definition: ksmedia.h:589
#define KSNODETYPE_HEADPHONES
Definition: ksmedia.h:484
#define KSAUDFNAME_WAVE_MUTE
Definition: ksmedia.h:353
#define KSAUDFNAME_VIDEO
Definition: ksmedia.h:539
#define KSPROPSETID_Audio
Definition: ksmedia.h:1051
#define KSNODETYPE_SPEAKER
Definition: ksmedia.h:328
#define KSNODETYPE_PHONE_LINE
Definition: ksmedia.h:519
#define KSAUDFNAME_3D_CENTER
Definition: ksmedia.h:559
const WORD AC97REG_MASK_RIGHT
Definition: mintopo.h:49
const WORD AC97REG_MASK_MUTE
Definition: mintopo.h:50
const int TOPO_MAX_CONNECTIONS
Definition: mintopo.h:42
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
#define _Out_
Definition: no_sal2.h:160
#define _COM_Outptr_
Definition: no_sal2.h:278
#define _In_
Definition: no_sal2.h:158
#define _Out_writes_bytes_to_opt_(s, c)
Definition: no_sal2.h:240
#define _When_(c, a)
Definition: no_sal2.h:38
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define STATUS_DEVICE_CONFIGURATION_ERROR
Definition: ntstatus.h:619
struct PCCONNECTION_DESCRIPTOR * PPCCONNECTION_DESCRIPTOR
IMiniportTopology * PMINIPORTTOPOLOGY
Definition: portcls.h:1443
IResourceList * PRESOURCELIST
Definition: portcls.h:442
#define DEFINE_PCAUTOMATION_TABLE_PROP(AutomationTable, PropertyTable)
Definition: portcls.h:368
struct PCFILTER_DESCRIPTOR * PPCFILTER_DESCRIPTOR
struct PCNODE_DESCRIPTOR * PPCNODE_DESCRIPTOR
struct PCPIN_DESCRIPTOR * PPCPIN_DESCRIPTOR
IPortTopology * PPORTTOPOLOGY
Definition: portcls.h:1415
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
#define STATUS_SUCCESS
Definition: shellext.h:65
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
ULONG ConnectionCount
Definition: portcls.h:362
const PCNODE_DESCRIPTOR * Nodes
Definition: portcls.h:361
const PCCONNECTION_DESCRIPTOR * Connections
Definition: portcls.h:363
const PCPIN_DESCRIPTOR * Pins
Definition: portcls.h:358
const PCAUTOMATION_TABLE * AutomationTable
Definition: portcls.h:355
KSPIN_DESCRIPTOR KsPinDescriptor
Definition: portcls.h:343
TopoNodes NodeDef
Definition: mintopo.h:37
TopoPins PinDef
Definition: mintopo.h:28
uint32_t * PULONG
Definition: typedefs.h:59
INT POOL_TYPE
Definition: typedefs.h:78
void * PVOID
Definition: typedefs.h:50
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
Definition: dlist.c:348
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:320
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG PoolTag
Definition: wdfmemory.h:164
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:309
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235
#define DBG_PRINT(ppi, ch, level)
Definition: win32kdebug.h:169
@ NonPagedPoolMustSucceed
Definition: ketypes.h:880