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.

319 lines
8.3 KiB

  1. /*++
  2. Copyright (c) 1997-2000 Microsoft Corporation All Rights Reserved
  3. Module Name:
  4. wavtable.h
  5. Abstract:
  6. Declaration of wave miniport tables.
  7. --*/
  8. #ifndef _MSVAD_WAVTABLE_H_
  9. #define _MSVAD_WAVTABLE_H_
  10. //=============================================================================
  11. static
  12. KSDATARANGE_AUDIO PinDataRangesStream[] =
  13. {
  14. {
  15. {
  16. sizeof(KSDATARANGE_AUDIO),
  17. 0,
  18. 0,
  19. 0,
  20. STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
  21. STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
  22. STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
  23. },
  24. MAX_CHANNELS_PCM,
  25. MIN_BITS_PER_SAMPLE_PCM,
  26. MAX_BITS_PER_SAMPLE_PCM,
  27. MIN_SAMPLE_RATE,
  28. MAX_SAMPLE_RATE
  29. },
  30. };
  31. static
  32. PKSDATARANGE PinDataRangePointersStream[] =
  33. {
  34. PKSDATARANGE(&PinDataRangesStream[0])
  35. };
  36. //=============================================================================
  37. static
  38. KSDATARANGE PinDataRangesBridge[] =
  39. {
  40. {
  41. sizeof(KSDATARANGE),
  42. 0,
  43. 0,
  44. 0,
  45. STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
  46. STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
  47. STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
  48. }
  49. };
  50. static
  51. PKSDATARANGE PinDataRangePointersBridge[] =
  52. {
  53. &PinDataRangesBridge[0]
  54. };
  55. //=============================================================================
  56. static
  57. PCPIN_DESCRIPTOR MiniportPins[] =
  58. {
  59. // Wave In Streaming Pin (Capture) KSPIN_WAVE_CAPTURE_SINK
  60. {
  61. MAX_OUTPUT_STREAMS,
  62. MAX_OUTPUT_STREAMS,
  63. 0,
  64. NULL,
  65. {
  66. 0,
  67. NULL,
  68. 0,
  69. NULL,
  70. SIZEOF_ARRAY(PinDataRangePointersStream),
  71. PinDataRangePointersStream,
  72. KSPIN_DATAFLOW_OUT,
  73. KSPIN_COMMUNICATION_SINK,
  74. &KSCATEGORY_AUDIO,
  75. &KSAUDFNAME_RECORDING_CONTROL,
  76. 0
  77. }
  78. },
  79. // Wave In Bridge Pin (Capture - From Topology) KSPIN_WAVE_CAPTURE_SOURCE
  80. {
  81. 0,
  82. 0,
  83. 0,
  84. NULL,
  85. {
  86. 0,
  87. NULL,
  88. 0,
  89. NULL,
  90. SIZEOF_ARRAY(PinDataRangePointersBridge),
  91. PinDataRangePointersBridge,
  92. KSPIN_DATAFLOW_IN,
  93. KSPIN_COMMUNICATION_NONE,
  94. &KSCATEGORY_AUDIO,
  95. NULL,
  96. 0
  97. }
  98. },
  99. // Wave Out Streaming Pin (Renderer) KSPIN_WAVE_RENDER_SINK
  100. {
  101. MAX_INPUT_STREAMS,
  102. MAX_INPUT_STREAMS,
  103. 0,
  104. NULL,
  105. {
  106. 0,
  107. NULL,
  108. 0,
  109. NULL,
  110. SIZEOF_ARRAY(PinDataRangePointersStream),
  111. PinDataRangePointersStream,
  112. KSPIN_DATAFLOW_IN,
  113. KSPIN_COMMUNICATION_SINK,
  114. &KSCATEGORY_AUDIO,
  115. &KSAUDFNAME_VOLUME_CONTROL,
  116. 0
  117. }
  118. },
  119. // Wave Out Bridge Pin (Renderer) KSPIN_WAVE_RENDER_SOURCE
  120. {
  121. 0,
  122. 0,
  123. 0,
  124. NULL,
  125. {
  126. 0,
  127. NULL,
  128. 0,
  129. NULL,
  130. SIZEOF_ARRAY(PinDataRangePointersBridge),
  131. PinDataRangePointersBridge,
  132. KSPIN_DATAFLOW_OUT,
  133. KSPIN_COMMUNICATION_NONE,
  134. &KSCATEGORY_AUDIO,
  135. NULL,
  136. 0
  137. }
  138. },
  139. };
  140. //=============================================================================
  141. static
  142. PCPROPERTY_ITEM PropertiesVolume[] =
  143. {
  144. {
  145. &KSPROPSETID_Audio,
  146. KSPROPERTY_AUDIO_VOLUMELEVEL,
  147. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
  148. PropertyHandler_Wave
  149. },
  150. {
  151. &KSPROPSETID_Audio,
  152. KSPROPERTY_AUDIO_CPU_RESOURCES,
  153. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  154. PropertyHandler_Wave
  155. }
  156. };
  157. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationVolume, PropertiesVolume);
  158. //=============================================================================
  159. // TODO This needs more properties.
  160. static
  161. PCPROPERTY_ITEM PropertiesSuperMix[] =
  162. {
  163. {
  164. &KSPROPSETID_Audio,
  165. KSPROPERTY_AUDIO_CPU_RESOURCES,
  166. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  167. PropertyHandler_Wave
  168. }
  169. };
  170. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSuperMix, PropertiesSuperMix);
  171. //=============================================================================
  172. // TODO This needs more properties.
  173. static
  174. PCPROPERTY_ITEM PropertiesSrc[] =
  175. {
  176. {
  177. &KSPROPSETID_Audio,
  178. KSPROPERTY_AUDIO_SAMPLING_RATE,
  179. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  180. PropertyHandler_Wave
  181. },
  182. {
  183. &KSPROPSETID_Audio,
  184. KSPROPERTY_AUDIO_CPU_RESOURCES,
  185. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  186. PropertyHandler_Wave
  187. }
  188. };
  189. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSrc, PropertiesSrc);
  190. //=============================================================================
  191. static
  192. PCPROPERTY_ITEM PropertiesSum[] =
  193. {
  194. {
  195. &KSPROPSETID_Audio,
  196. KSPROPERTY_AUDIO_CPU_RESOURCES,
  197. KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
  198. PropertyHandler_Wave
  199. }
  200. };
  201. DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSum, PropertiesSum);
  202. //=============================================================================
  203. static
  204. PCNODE_DESCRIPTOR MiniportNodes[] =
  205. {
  206. // KSNODE_WAVE_ADC
  207. {
  208. 0, // Flags
  209. NULL, // AutomationTable
  210. &KSNODETYPE_ADC, // Type
  211. NULL // Name
  212. },
  213. // KSNODE_WAVE_DAC
  214. {
  215. 0, // Flags
  216. NULL, // AutomationTable
  217. &KSNODETYPE_DAC, // Type
  218. NULL // Name
  219. },
  220. // KSNODE_WAVE_VOLUME1
  221. {
  222. 0, // Flags
  223. &AutomationVolume, // AutomationTable
  224. &KSNODETYPE_VOLUME, // Type
  225. NULL // Name
  226. },
  227. // KSNODE_WAVE_SUPERMIX
  228. {
  229. 0, // Flags
  230. &AutomationSuperMix, // AutomationTable
  231. &KSNODETYPE_SUPERMIX, // Type
  232. NULL // Name
  233. },
  234. // KSNODE_WAVE_VOLUME2
  235. {
  236. 0, // Flags
  237. &AutomationVolume, // AutomationTable
  238. &KSNODETYPE_VOLUME, // Type
  239. NULL // Name
  240. },
  241. // KSNODE_WAVE_SRC
  242. {
  243. 0, // Flags
  244. &AutomationSrc, // AutomationTable
  245. &KSNODETYPE_SRC, // Type
  246. NULL // Name
  247. },
  248. // KSNODE_WAVE_SUM
  249. {
  250. 0, // Flags
  251. &AutomationSum, // AutomationTable
  252. &KSNODETYPE_SUM, // Type
  253. NULL // Name
  254. },
  255. };
  256. //=============================================================================
  257. static
  258. PCCONNECTION_DESCRIPTOR MiniportConnections[] =
  259. {
  260. { PCFILTER_NODE, KSPIN_WAVE_CAPTURE_SOURCE, KSNODE_WAVE_ADC, 1 },
  261. { KSNODE_WAVE_ADC, 0, PCFILTER_NODE, KSPIN_WAVE_CAPTURE_SINK },
  262. { PCFILTER_NODE, KSPIN_WAVE_RENDER_SINK, KSNODE_WAVE_VOLUME1, 1 },
  263. { KSNODE_WAVE_VOLUME1, 0, KSNODE_WAVE_SUPERMIX,1 },
  264. { KSNODE_WAVE_SUPERMIX, 0, KSNODE_WAVE_VOLUME2, 1 },
  265. { KSNODE_WAVE_VOLUME2, 0, KSNODE_WAVE_SRC, 1 },
  266. { KSNODE_WAVE_SRC, 0, KSNODE_WAVE_SUM, 1 },
  267. { KSNODE_WAVE_SUM, 0, KSNODE_WAVE_DAC, 1 },
  268. { KSNODE_WAVE_DAC, 0, PCFILTER_NODE, KSPIN_WAVE_RENDER_SOURCE },
  269. };
  270. //=============================================================================
  271. static
  272. PCFILTER_DESCRIPTOR MiniportFilterDescriptor =
  273. {
  274. 0, // Version
  275. NULL, // AutomationTable
  276. sizeof(PCPIN_DESCRIPTOR), // PinSize
  277. SIZEOF_ARRAY(MiniportPins), // PinCount
  278. MiniportPins, // Pins
  279. sizeof(PCNODE_DESCRIPTOR), // NodeSize
  280. SIZEOF_ARRAY(MiniportNodes), // NodeCount
  281. MiniportNodes, // Nodes
  282. SIZEOF_ARRAY(MiniportConnections), // ConnectionCount
  283. MiniportConnections, // Connections
  284. 0, // CategoryCount
  285. NULL // Categories - NULL->use defaults (AUDIO RENDER CAPTURE)
  286. };
  287. #endif