1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
PURPOSE.
Module Name:
CircuitHelper.h
Abstract:
This module contains helper functions for render.cpp and capture.cpp files.
Environment:
Kernel mode
--*/
#include "AcpiReader.h"
using namespace ACPIREADER;
PAGED_CODE_SEG
NTSTATUS CreateCaptureCircuit(
_In_ PACXCIRCUIT_INIT CircuitInit,
_In_ UNICODE_STRING CircuitName,
_In_ WDFDEVICE Device,
_Out_ ACXCIRCUIT* Circuit
);
PAGED_CODE_SEG
NTSTATUS CreateRenderCircuit(
_In_ PACXCIRCUIT_INIT CircuitInit,
_In_ UNICODE_STRING CircuitName,
_In_ WDFDEVICE Device,
_Out_ ACXCIRCUIT* Circuit
);
PAGED_CODE_SEG
NTSTATUS AllocateFormat(
_In_ KSDATAFORMAT_WAVEFORMATEXTENSIBLE WaveFormat,
_In_ ACXCIRCUIT Circuit,
_In_ WDFDEVICE Device,
_Out_ ACXDATAFORMAT* Format
);
PAGED_CODE_SEG
NTSTATUS CreatePin(
_In_ ACX_PIN_TYPE PinType,
_In_ ACXCIRCUIT Circuit,
_In_ ACX_PIN_COMMUNICATION Communication,
_In_ const GUID* Category,
_In_ ACX_PIN_CALLBACKS* PinCallbacks,
_In_ ULONG PinStreamCount,
_In_ bool Mic,
_Out_ ACXPIN* Pin
);
PAGED_CODE_SEG
NTSTATUS RetrieveProperties(
_In_ PACX_FACTORY_CIRCUIT_ADD_CIRCUIT CircuitConfig,
_In_ PULONG EndpointID
);
PAGED_CODE_SEG
NTSTATUS
DetermineSpecialStreamDetailsFromVendorProperties(
_In_ ACXCIRCUIT Circuit,
_In_ AcpiReader * Acpi,
_In_ HANDLE CircuitPropertiesHandle
);
PAGED_CODE_SEG
NTSTATUS CreateStreamBridge(
_In_ ACX_STREAM_BRIDGE_CONFIG StreamCfg,
_In_ ACXCIRCUIT Circuit,
_In_ ACXPIN Pin,
_In_ DSP_PIN_CONTEXT* PinCtx,
_In_ ULONG BridgeDataPortNumber,
_In_ ULONG BridgeEndpointId,
_In_opt_ PSDCA_PATH_DESCRIPTORS2 PathDescriptors,
_In_ BOOL Render
);
PAGED_CODE_SEG
NTSTATUS ConnectCaptureCircuitElements(
_In_ ULONG ElementCount,
_In_reads_(ElementCount) ACXELEMENT* Elements,
_In_ ACXCIRCUIT Circuit
);
PAGED_CODE_SEG
NTSTATUS ConnectRenderCircuitElements(
_In_ ACXAUDIOENGINE AudioEngineElement,
_In_ ACXCIRCUIT Circuit
);
PAGED_CODE_SEG
NTSTATUS CreateAudioEngine(
_In_ ACXCIRCUIT Circuit,
_In_reads_(DspPinType_Count) ACXPIN* Pins,
_Out_ ACXAUDIOENGINE* AudioEngineElement
);
#pragma code_seg()
VOID CircuitRequestPreprocess(
_In_ ACXOBJECT Object,
_In_ ACXCONTEXT DriverContext,
_In_ WDFREQUEST Request
);
PAGED_CODE_SEG
NTSTATUS FindDownstreamVolumeMute(
_In_ ACXCIRCUIT Circuit,
_In_ ACXTARGETCIRCUIT TargetCircuit
);
PAGED_CODE_SEG
NTSTATUS
ReplicateFormatsForAudioEngine(
_In_ ACXAUDIOENGINE AudioEngine,
_In_ ACXTARGETCIRCUIT TargetCircuit,
_In_ ULONG TargetPinId
);
PAGED_CODE_SEG
NTSTATUS
ReplicateFormatsForPin(
_In_ ACXPIN Pin,
_In_ ACXTARGETCIRCUIT TargetCircuit,
_In_ ULONG TargetPinId
);
|