Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

353 lines
12 KiB

  1. /*++
  2. Copyright (c) 1997-2000 Microsoft Corporation All Rights Reserved
  3. Module Name:
  4. toptable.h
  5. Abstract:
  6. Declaration of topology tables.
  7. --*/
  8. #ifndef _MSVAD_TOPTABLE_H_
  9. #define _MSVAD_TOPTABLE_H_
  10. //=============================================================================
  11. static
  12. KSDATARANGE PinDataRangesBridge[] =
  13. {
  14. {
  15. sizeof(KSDATARANGE),
  16. 0,
  17. 0,
  18. 0,
  19. STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
  20. STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
  21. STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
  22. }
  23. };
  24. //=============================================================================
  25. static
  26. PKSDATARANGE PinDataRangePointersBridge[] =
  27. {
  28. &PinDataRangesBridge[0]
  29. };
  30. //=============================================================================
  31. static
  32. PCPIN_DESCRIPTOR MiniportPins[] =
  33. {
  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. // KSPIN_TOPO_SYNTHOUT_SOURCE
  55. {
  56. 0,
  57. 0,
  58. 0, // InstanceCount
  59. NULL, // AutomationTable
  60. { // KsPinDescriptor
  61. 0, // InterfacesCount
  62. NULL, // Interfaces
  63. 0, // MediumsCount
  64. NULL, // Mediums
  65. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  66. PinDataRangePointersBridge, // DataRanges
  67. KSPIN_DATAFLOW_IN, // DataFlow
  68. KSPIN_COMMUNICATION_NONE, // Communication
  69. &KSNODETYPE_SYNTHESIZER, // Category
  70. &KSAUDFNAME_MIDI, // Name
  71. 0 // Reserved
  72. }
  73. },
  74. // KSPIN_TOPO_SYNTHIN_SOURCE
  75. {
  76. 0,
  77. 0,
  78. 0, // InstanceCount
  79. NULL, // AutomationTable
  80. { // KsPinDescriptor
  81. 0, // InterfacesCount
  82. NULL, // Interfaces
  83. 0, // MediumsCount
  84. NULL, // Mediums
  85. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  86. PinDataRangePointersBridge, // DataRanges
  87. KSPIN_DATAFLOW_IN, // DataFlow
  88. KSPIN_COMMUNICATION_NONE, // Communication
  89. &KSNODETYPE_SYNTHESIZER, // Category
  90. &KSAUDFNAME_MIDI, // Name
  91. 0 // Reserved
  92. }
  93. },
  94. // KSPIN_TOPO_MIC_SOURCE
  95. {
  96. 0,
  97. 0,
  98. 0, // InstanceCount
  99. NULL, // AutomationTable
  100. { // KsPinDescriptor
  101. 0, // InterfacesCount
  102. NULL, // Interfaces
  103. 0, // MediumsCount
  104. NULL, // Mediums
  105. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  106. PinDataRangePointersBridge, // DataRanges
  107. KSPIN_DATAFLOW_IN, // DataFlow
  108. KSPIN_COMMUNICATION_NONE, // Communication
  109. &KSNODETYPE_MICROPHONE, // Category
  110. NULL, // Name
  111. 0 // Reserved
  112. }
  113. },
  114. // KSPIN_TOPO_LINEOUT_DEST
  115. {
  116. 0,
  117. 0,
  118. 0, // InstanceCount
  119. NULL, // AutomationTable
  120. { // KsPinDescriptor
  121. 0, // InterfacesCount
  122. NULL, // Interfaces
  123. 0, // MediumsCount
  124. NULL, // Mediums
  125. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  126. PinDataRangePointersBridge, // DataRanges
  127. KSPIN_DATAFLOW_OUT, // DataFlow
  128. KSPIN_COMMUNICATION_NONE, // Communication
  129. &KSNODETYPE_SPEAKER, // Category
  130. &KSAUDFNAME_VOLUME_CONTROL, // Name (this name shows up as
  131. // the playback panel name in SoundVol)
  132. 0 // Reserved
  133. }
  134. },
  135. // KSPIN_TOPO_WAVEIN_DEST
  136. {
  137. 0,
  138. 0,
  139. 0, // InstanceCount
  140. NULL, // AutomationTable
  141. { // KsPinDescriptor
  142. 0, // InterfacesCount
  143. NULL, // Interfaces
  144. 0, // MediumsCount
  145. NULL, // Mediums
  146. SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount
  147. PinDataRangePointersBridge, // DataRanges
  148. KSPIN_DATAFLOW_OUT, // DataFlow
  149. KSPIN_COMMUNICATION_NONE, // Communication
  150. &KSCATEGORY_AUDIO, // Category
  151. NULL, // Name
  152. 0 // Reserved
  153. }
  154. }
  155. };
  156. //=============================================================================
  157. static
  158. PCPROPERTY_ITEM PropertiesVolume[] =
  159. {
  160. {
  161. &KSPROPSETID_Audio,
  162. KSPROPERTY_AUDIO_VOLUMELEVEL,
  163. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
  164. PropertyHandler_Topology
  165. },
  166. {
  167. &KSPROPSETID_Audio,
  168. KSPROPERTY_AUDIO_CPU_RESOURCES,
  169. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  170. PropertyHandler_Topology
  171. }
  172. };
  173. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationVolume, PropertiesVolume);
  174. //=============================================================================
  175. static
  176. PCPROPERTY_ITEM PropertiesMute[] =
  177. {
  178. {
  179. &KSPROPSETID_Audio,
  180. KSPROPERTY_AUDIO_MUTE,
  181. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
  182. PropertyHandler_Topology
  183. },
  184. {
  185. &KSPROPSETID_Audio,
  186. KSPROPERTY_AUDIO_CPU_RESOURCES,
  187. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  188. PropertyHandler_Topology
  189. }
  190. };
  191. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMute, PropertiesMute);
  192. //=============================================================================
  193. static
  194. PCPROPERTY_ITEM PropertiesMux[] =
  195. {
  196. {
  197. &KSPROPSETID_Audio,
  198. KSPROPERTY_AUDIO_MUX_SOURCE,
  199. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
  200. PropertyHandler_Topology
  201. },
  202. {
  203. &KSPROPSETID_Audio,
  204. KSPROPERTY_AUDIO_CPU_RESOURCES,
  205. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  206. PropertyHandler_Topology
  207. }
  208. };
  209. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMux, PropertiesMux);
  210. //=============================================================================
  211. static
  212. PCNODE_DESCRIPTOR TopologyNodes[] =
  213. {
  214. // KSNODE_TOPO_WAVEOUT_VOLUME
  215. {
  216. 0, // Flags
  217. &AutomationVolume, // AutomationTable
  218. &KSNODETYPE_VOLUME, // Type
  219. &KSAUDFNAME_WAVE_VOLUME // Name
  220. },
  221. // KSNODE_TOPO_WAVEOUT_MUTE
  222. {
  223. 0, // Flags
  224. &AutomationMute, // AutomationTable
  225. &KSNODETYPE_MUTE, // Type
  226. &KSAUDFNAME_WAVE_MUTE // Name
  227. },
  228. // KSNODE_TOPO_SYNTHOUT_VOLUME
  229. {
  230. 0, // Flags
  231. &AutomationVolume, // AutomationTable
  232. &KSNODETYPE_VOLUME, // Type
  233. &KSAUDFNAME_MIDI_VOLUME // Name
  234. },
  235. // KSNODE_TOPO_SYNTHOUT_MUTE
  236. {
  237. 0, // Flags
  238. &AutomationMute, // AutomationTable
  239. &KSNODETYPE_MUTE, // Type
  240. &KSAUDFNAME_MIDI_MUTE // Name
  241. },
  242. // KSNODE_TOPO_MIC_VOLUME
  243. {
  244. 0, // Flags
  245. &AutomationVolume, // AutomationTable
  246. &KSNODETYPE_VOLUME, // Type
  247. &KSAUDFNAME_MIC_VOLUME // Name
  248. },
  249. // KSNODE_TOPO_SYNTHIN_VOLUME
  250. {
  251. 0, // Flags
  252. &AutomationVolume, // AutomationTable
  253. &KSNODETYPE_VOLUME, // Type
  254. &KSAUDFNAME_MIDI_VOLUME // Name
  255. },
  256. // KSNODE_TOPO_LINEOUT_MIX
  257. {
  258. 0, // Flags
  259. NULL, // AutomationTable
  260. &KSNODETYPE_SUM, // Type
  261. NULL // Name
  262. },
  263. // KSNODE_TOPO_LINEOUT_VOLUME
  264. {
  265. 0, // Flags
  266. &AutomationVolume, // AutomationTable
  267. &KSNODETYPE_VOLUME, // Type
  268. &KSAUDFNAME_MASTER_VOLUME // Name
  269. },
  270. // KSNODE_TOPO_WAVEIN_MUX
  271. {
  272. 0, // Flags
  273. &AutomationMux, // AutomationTable
  274. &KSNODETYPE_MUX, // Type
  275. &KSAUDFNAME_RECORDING_SOURCE // Name
  276. },
  277. };
  278. //=============================================================================
  279. static
  280. PCCONNECTION_DESCRIPTOR MiniportConnections[] =
  281. {
  282. // FromNode, FromPin, ToNode, ToPin
  283. { PCFILTER_NODE, KSPIN_TOPO_WAVEOUT_SOURCE, KSNODE_TOPO_WAVEOUT_VOLUME, 1 },
  284. { KSNODE_TOPO_WAVEOUT_VOLUME, 0, KSNODE_TOPO_WAVEOUT_MUTE, 1 },
  285. { KSNODE_TOPO_WAVEOUT_MUTE, 0, KSNODE_TOPO_LINEOUT_MIX, 1 },
  286. { PCFILTER_NODE, KSPIN_TOPO_SYNTHOUT_SOURCE, KSNODE_TOPO_SYNTHOUT_VOLUME, 1 },
  287. { KSNODE_TOPO_SYNTHOUT_VOLUME, 0, KSNODE_TOPO_SYNTHOUT_MUTE, 1 },
  288. { KSNODE_TOPO_SYNTHOUT_MUTE, 0, KSNODE_TOPO_LINEOUT_MIX, 1 },
  289. { PCFILTER_NODE, KSPIN_TOPO_SYNTHIN_SOURCE, KSNODE_TOPO_SYNTHIN_VOLUME, 1 },
  290. { KSNODE_TOPO_SYNTHIN_VOLUME, 0, KSNODE_TOPO_WAVEIN_MUX, 4 },
  291. { PCFILTER_NODE, KSPIN_TOPO_MIC_SOURCE, KSNODE_TOPO_MIC_VOLUME, 1 },
  292. { KSNODE_TOPO_MIC_VOLUME, 0, KSNODE_TOPO_WAVEIN_MUX, 4 },
  293. { KSNODE_TOPO_LINEOUT_MIX, 0, KSNODE_TOPO_LINEOUT_VOLUME, 1 },
  294. { KSNODE_TOPO_LINEOUT_VOLUME, 0, PCFILTER_NODE, KSPIN_TOPO_LINEOUT_DEST },
  295. { KSNODE_TOPO_WAVEIN_MUX, 0, PCFILTER_NODE, KSPIN_TOPO_WAVEIN_DEST }
  296. };
  297. //=============================================================================
  298. static
  299. PCFILTER_DESCRIPTOR MiniportFilterDescriptor =
  300. {
  301. 0, // Version
  302. NULL, // AutomationTable
  303. sizeof(PCPIN_DESCRIPTOR), // PinSize
  304. SIZEOF_ARRAY(MiniportPins), // PinCount
  305. MiniportPins, // Pins
  306. sizeof(PCNODE_DESCRIPTOR), // NodeSize
  307. SIZEOF_ARRAY(TopologyNodes), // NodeCount
  308. TopologyNodes, // Nodes
  309. SIZEOF_ARRAY(MiniportConnections), // ConnectionCount
  310. MiniportConnections, // Connections
  311. 0, // CategoryCount
  312. NULL // Categories
  313. };
  314. #endif