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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
|
/*++
Copyright (c) Microsoft Corporation All Rights Reserved
Module Name:
cellulartoptable.h
Abstract:
Declaration of topology tables for the cellular endpoint.
--*/
#ifndef _SYSVAD_CELLULARTOPTABLE_H_
#define _SYSVAD_CELLULARTOPTABLE_H_
// {896BC350-BF57-4039-A6B6-64DCEC3AEEB8}
DEFINE_GUID(CELLULARBIDI1_CUSTOM_NAME,
0x896bc350, 0xbf57, 0x4039, 0xa6, 0xb6, 0x64, 0xdc, 0xec, 0x3a, 0xee, 0xb8);
// {80CC64DA-166A-4A2C-ADF7-1464C49D3B0E}
DEFINE_GUID(CELLULARBIDI2_CUSTOM_NAME,
0x80cc64da, 0x166a, 0x4a2c, 0xad, 0xf7, 0x14, 0x64, 0xc4, 0x9d, 0x3b, 0xe);
//=============================================================================
static
KSDATARANGE CellularTopoPinDataRangesBridge[] =
{
{
sizeof(KSDATARANGE),
0,
0,
0,
STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
}
};
//=============================================================================
static
PKSDATARANGE CellularTopoPinDataRangePointersBridge[] =
{
&CellularTopoPinDataRangesBridge[0]
};
//=============================================================================
static
PCPIN_DESCRIPTOR CellularTopoMiniportPins[] =
{
// KSPIN_TOPO_BIDI1
{
0,
0,
0, // InstanceCount
NULL, // AutomationTable
{ // KsPinDescriptor
0, // InterfacesCount
NULL, // Interfaces
0, // MediumsCount
NULL, // Mediums
SIZEOF_ARRAY(CellularTopoPinDataRangePointersBridge), // DataRangesCount
CellularTopoPinDataRangePointersBridge, // DataRanges
KSPIN_DATAFLOW_IN, // DataFlow
KSPIN_COMMUNICATION_NONE, // Communication
&KSNODETYPE_TELEPHONY_BIDI, // Category
&CELLULARBIDI1_CUSTOM_NAME, // Name
0 // Reserved
}
},
// KSPIN_TOPO_BIDI1_BRIDGE
{
0,
0,
0, // InstanceCount
NULL, // AutomationTable
{ // KsPinDescriptor
0, // InterfacesCount
NULL, // Interfaces
0, // MediumsCount
NULL, // Mediums
SIZEOF_ARRAY(CellularTopoPinDataRangePointersBridge), // DataRangesCount
CellularTopoPinDataRangePointersBridge, // DataRanges
KSPIN_DATAFLOW_OUT, // DataFlow
KSPIN_COMMUNICATION_NONE, // Communication
&KSCATEGORY_AUDIO, // Category
NULL, // Name
0 // Reserved
}
},
// KSPIN_TOPO_BIDI2
{
0,
0,
0, // InstanceCount
NULL, // AutomationTable
{ // KsPinDescriptor
0, // InterfacesCount
NULL, // Interfaces
0, // MediumsCount
NULL, // Mediums
SIZEOF_ARRAY(CellularTopoPinDataRangePointersBridge), // DataRangesCount
CellularTopoPinDataRangePointersBridge, // DataRanges
KSPIN_DATAFLOW_IN, // DataFlow
KSPIN_COMMUNICATION_NONE, // Communication
&KSNODETYPE_TELEPHONY_BIDI, // Category
&CELLULARBIDI2_CUSTOM_NAME, // Name
0 // Reserved
}
},
// KSPIN_TOPO_BIDI2_BRIDGE
{
0,
0,
0, // InstanceCount
NULL, // AutomationTable
{ // KsPinDescriptor
0, // InterfacesCount
NULL, // Interfaces
0, // MediumsCount
NULL, // Mediums
SIZEOF_ARRAY(CellularTopoPinDataRangePointersBridge), // DataRangesCount
CellularTopoPinDataRangePointersBridge, // DataRanges
KSPIN_DATAFLOW_OUT, // DataFlow
KSPIN_COMMUNICATION_NONE, // Communication
&KSCATEGORY_AUDIO, // Category
NULL, // Name
0 // Reserved
}
}
};
//=============================================================================
static
KSJACK_DESCRIPTION CellularJackDesc =
{
KSAUDIO_SPEAKER_MONO,
0x0000, // no color
eConnTypeUnknown,
eGeoLocNotApplicable,
eGenLocInternal,
ePortConnUnknown,
TRUE // NOTE: cellular jacks should be "unplugged" at boot, and only changed to active during a call.
// However, for convienience during development, the jack state is set to active at boot for this milestone.
};
static
KSJACK_DESCRIPTION CellularJackDesc2 =
{
KSAUDIO_SPEAKER_MONO,
0x0000, // no color
eConnTypeUnknown,
eGeoLocNotApplicable,
eGenLocInternal,
ePortConnUnknown,
TRUE // NOTE: cellular jacks should be "unplugged" at boot, and only changed to active during a call.
// However, for convienience during development, the jack state is set to active at boot for this milestone.
};
// Only return a KSJACK_DESCRIPTION for the physical bridge pin.
static
PKSJACK_DESCRIPTION CellularJackDescriptions[] =
{
&CellularJackDesc,
NULL,
&CellularJackDesc2,
NULL
};
//=============================================================================
static
PCCONNECTION_DESCRIPTOR CellularTopoMiniportConnections[] =
{
// FromNode, FromPin, ToNode, ToPin
{ PCFILTER_NODE, KSPIN_TOPO_BIDI1, PCFILTER_NODE, KSPIN_TOPO_BIDI1_BRIDGE},
{ PCFILTER_NODE, KSPIN_TOPO_BIDI2, PCFILTER_NODE, KSPIN_TOPO_BIDI2_BRIDGE}
};
//=============================================================================
static
PCPROPERTY_ITEM PropertiesCellularTopoFilter[] =
{
{
&KSPROPSETID_Jack,
KSPROPERTY_JACK_DESCRIPTION,
KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
PropertyHandler_CellularTopoFilter
},
{
&KSPROPSETID_Jack,
KSPROPERTY_JACK_DESCRIPTION2,
KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
PropertyHandler_CellularTopoFilter
},
{
&KSPROPSETID_TelephonyTopology,
KSPROPERTY_TELEPHONY_ENDPOINTIDPAIR,
KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
PropertyHandler_CellularTopoFilter
},
{
&KSPROPSETID_TelephonyTopology,
KSPROPERTY_TELEPHONY_VOLUME,
KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
PropertyHandler_CellularTopoFilter
}
};
NTSTATUS CCellularMiniportWaveRT_EventHandler_JackState
(
_In_ PPCEVENT_REQUEST EventRequest
);
NTSTATUS CCellularMiniportWaveRT_EventHandler_Telephony
(
_In_ PPCEVENT_REQUEST EventRequest
);
static PCEVENT_ITEM TelephonyEvents[] =
{
{
&KSEVENTSETID_PinCapsChange, // Something changed
KSEVENT_PINCAPS_JACKINFOCHANGE, // Jack Info Changes
KSEVENT_TYPE_ENABLE | KSEVENT_TYPE_BASICSUPPORT,
CCellularMiniportWaveRT_EventHandler_JackState
},
{
&KSEVENTSETID_Telephony,
KSEVENT_TELEPHONY_ENDPOINTPAIRS_CHANGED,
KSEVENT_TYPE_ENABLE | KSEVENT_TYPE_BASICSUPPORT,
CCellularMiniportWaveRT_EventHandler_Telephony
}
};
/*****************************************************************************
* PropertiesTopologyFilter
*****************************************************************************
* Automation table for jack descripton/detection.
*/
DEFINE_PCAUTOMATION_TABLE_PROP_EVENT(AutomationCellularTopoFilter, PropertiesCellularTopoFilter, TelephonyEvents);
//=============================================================================
static
PCFILTER_DESCRIPTOR CellularTopoMiniportFilterDescriptor =
{
0, // Version
&AutomationCellularTopoFilter, // AutomationTable
sizeof(PCPIN_DESCRIPTOR), // PinSize
SIZEOF_ARRAY(CellularTopoMiniportPins), // PinCount
CellularTopoMiniportPins, // Pins
sizeof(PCNODE_DESCRIPTOR), // NodeSize
0, // NodeCount
NULL, // Nodes
SIZEOF_ARRAY(CellularTopoMiniportConnections), // ConnectionCount
CellularTopoMiniportConnections, // Connections
0, // CategoryCount
NULL // Categories
};
#endif // _SYSVAD_CELLULARTOPTABLE_H_
|