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.

1042 lines
31 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. ObjDesc.cpp
  5. Abstract:
  6. Static object description data structures.
  7. This file includes initial descriptors for all filter, pin, and node
  8. objects exposed by this driver. It also include descriptors for the
  9. properties, methods, and events on those objects.
  10. --*/
  11. #include "PhilTune.h"
  12. #ifdef ALLOC_DATA_PRAGMA
  13. #pragma const_seg("PAGECONST")
  14. #endif // ALLOC_DATA_PRAGMA
  15. #ifdef ALLOC_PRAGMA
  16. #pragma code_seg("PAGE")
  17. #endif // ALLOC_PRAGMA
  18. //===========================================================================
  19. //
  20. // Node definitions
  21. //
  22. // Nodes are special in that, though they are defined at the filter level,
  23. // they are actually associated with a pin type. The filter's node
  24. // descriptor list is actually a list of node types.
  25. //
  26. // You will notice that the dispatch routines actually point to
  27. // pin specific methods. This is because the context data associated with
  28. // a node is stored in the pin context.
  29. //
  30. // Node properties and methods should only be used on the appropriate
  31. // pin.
  32. //
  33. //===========================================================================
  34. //===========================================================================
  35. //
  36. // RF Tuner Node definitions
  37. //
  38. // This structure defines the Properties, Methods, and Events
  39. // available on the BDA RF Tuner Node.
  40. //
  41. // The properties are used to set the center frequency and frequency range
  42. // as well as to report signal strength.
  43. //
  44. // This node is associated with an antenna input pin and thus the node
  45. // properties should be set/put using the antenna input pin.
  46. //
  47. //===========================================================================
  48. //
  49. // BDA RF Tune Frequency Filter
  50. //
  51. // Defines the dispatch routines for the Frequency Filter Properties
  52. // on the RF Tuner Node
  53. //
  54. DEFINE_KSPROPERTY_TABLE(RFNodeFrequencyProperties)
  55. {
  56. DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_FREQUENCY(
  57. CAntennaPin::GetCenterFrequency,
  58. CAntennaPin::PutCenterFrequency
  59. ),
  60. DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_POLARITY(
  61. NULL, NULL
  62. ),
  63. DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_RANGE(
  64. NULL, NULL
  65. ),
  66. DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_TRANSPONDER(
  67. NULL, NULL
  68. ),
  69. };
  70. //
  71. // RF Tuner Node Property Sets supported
  72. //
  73. // This table defines all property sets supported by the
  74. // RF Tuner Node associated with the antenna input pin.
  75. //
  76. DEFINE_KSPROPERTY_SET_TABLE(RFNodePropertySets)
  77. {
  78. DEFINE_KSPROPERTY_SET
  79. (
  80. &KSPROPSETID_BdaFrequencyFilter, // Set
  81. SIZEOF_ARRAY(RFNodeFrequencyProperties), // PropertiesCount
  82. RFNodeFrequencyProperties, // PropertyItems
  83. 0, // FastIoCount
  84. NULL // FastIoTable
  85. )
  86. };
  87. //
  88. // Radio Frequency Tuner Node Automation Table
  89. //
  90. //
  91. DEFINE_KSAUTOMATION_TABLE(RFTunerNodeAutomation) {
  92. DEFINE_KSAUTOMATION_PROPERTIES( RFNodePropertySets),
  93. DEFINE_KSAUTOMATION_METHODS_NULL,
  94. DEFINE_KSAUTOMATION_EVENTS_NULL
  95. };
  96. //===========================================================================
  97. //
  98. // QAM Demodulator Node definitions
  99. //
  100. // This structure defines the Properties, Methods, and Events
  101. // available on the BDA QAM Demodulator Node.
  102. //
  103. // This node is associated with a transport output pin and thus the node
  104. // properties should be set/put using the transport output pin.
  105. //
  106. //===========================================================================
  107. //
  108. // QAM Demodulator Node Automation Table
  109. //
  110. // This structure defines the Properties, Methods, and Events
  111. // available on the BDA QAM Demodulator Node.
  112. // These are used to set the symbol rate, and Viterbi rate,
  113. // as well as to report signal lock and signal quality.
  114. //
  115. DEFINE_KSAUTOMATION_TABLE(QAMDemodulatorNodeAutomation) {
  116. DEFINE_KSAUTOMATION_PROPERTIES_NULL,
  117. DEFINE_KSAUTOMATION_METHODS_NULL,
  118. DEFINE_KSAUTOMATION_EVENTS_NULL
  119. };
  120. //===========================================================================
  121. //
  122. // 8VSB Demodulator Node definitions
  123. //
  124. // This structure defines the Properties, Methods, and Events
  125. // available on the BDA 8VSB Demodulator Node.
  126. //
  127. // This node is associated with a transport output pin and thus the node
  128. // properties should be set/put using the transport output pin.
  129. //
  130. //===========================================================================
  131. //
  132. // 8VSB BDA Autodemodulate Properties
  133. //
  134. // Defines the dispatch routines for the Autodemodulate
  135. // on the 8VSB demodulator node.
  136. //
  137. DEFINE_KSPROPERTY_TABLE(VSB8NodeAutoDemodProperties)
  138. {
  139. DEFINE_KSPROPERTY_ITEM_BDA_AUTODEMODULATE_START(
  140. NULL,
  141. CTransportPin::StartDemodulation
  142. ),
  143. DEFINE_KSPROPERTY_ITEM_BDA_AUTODEMODULATE_STOP(
  144. NULL,
  145. CTransportPin::StopDemodulation
  146. )
  147. };
  148. // Define VSB property Table
  149. //
  150. // This is a private property set associated with the 8VSB node.
  151. // In this example it is used as a filter property set.
  152. //
  153. DEFINE_KSPROPERTY_TABLE (VSBProperties)
  154. {
  155. DEFINE_KSPROPERTY_ITEM
  156. (
  157. KSPROPERTY_VSB_CAP, // 1
  158. CFilter::GetVsbCapabilitiesProperty, // GetSupported or Handler
  159. sizeof(KSPROPERTY), // MinProperty
  160. sizeof(KSPROPERTY_VSB_CAP_S), // MinData
  161. CFilter::SetVsbCapabilitiesProperty, // SetSupported or Handler
  162. NULL, // Values
  163. 0, // RelationsCount
  164. NULL, // Relations
  165. NULL, // SupportHandler
  166. 0 // SerializedSize
  167. ),
  168. DEFINE_KSPROPERTY_ITEM
  169. (
  170. KSPROPERTY_VSB_REG_CTRL, // 2
  171. CFilter::GetVsbRegisterProperty, // GetSupported or Handler
  172. sizeof(KSPROPERTY), // MinProperty
  173. sizeof(KSPROPERTY_VSB_REG_CTRL_S), // MinData
  174. CFilter::SetVsbRegisterProperty, // SetSupported or Handler
  175. NULL, // Values
  176. 0, // RelationsCount
  177. NULL, // Relations
  178. NULL, // SupportHandler
  179. 0 // SerializedSize
  180. ),
  181. DEFINE_KSPROPERTY_ITEM
  182. (
  183. KSPROPERTY_VSB_COEFF_CTRL, // 3
  184. CFilter::GetVsbCoefficientProperty, // GetSupported or Handler
  185. sizeof(KSPROPERTY), // MinProperty
  186. sizeof(KSPROPERTY_VSB_COEFF_CTRL_S), // MinData
  187. CFilter::SetVsbCoefficientProperty, // SetSupported or Handler
  188. NULL, // Values
  189. 0, // RelationsCount
  190. NULL, // Relations
  191. NULL, // SupportHandler
  192. 0 // SerializedSize
  193. ),
  194. DEFINE_KSPROPERTY_ITEM
  195. (
  196. KSPROPERTY_VSB_RESET_CTRL, // 4
  197. FALSE, // GetSupported or Handler
  198. sizeof(KSPROPERTY), // MinProperty
  199. sizeof(KSPROPERTY_VSB_CTRL_S), // MinData
  200. CFilter::SetVsbResetProperty, // SetSupported or Handler
  201. NULL, // Values
  202. 0, // RelationsCount
  203. NULL, // Relations
  204. NULL, // SupportHandler
  205. 0 // SerializedSize
  206. ),
  207. DEFINE_KSPROPERTY_ITEM
  208. (
  209. KSPROPERTY_VSB_DIAG_CTRL, // 5
  210. CFilter::GetVsbDiagControlProperty, // GetSupported or Handler
  211. sizeof(KSPROPERTY), // MinProperty
  212. sizeof(KSPROPERTY_VSB_DIAG_CTRL_S), // MinData
  213. CFilter::SetVsbDiagControlProperty, // SetSupported or Handler
  214. NULL, // Values
  215. 0, // RelationsCount
  216. NULL, // Relations
  217. NULL, // SupportHandler
  218. 0 // SerializedSize
  219. ),
  220. DEFINE_KSPROPERTY_ITEM
  221. (
  222. KSPROPERTY_VSB_QUALITY_CTRL, // 6
  223. FALSE, // GetSupported or Handler
  224. sizeof(KSPROPERTY), // MinProperty
  225. sizeof(KSPROPERTY_VSB_CTRL_S), // MinData
  226. CFilter::SetVsbQualityControlProperty,// SetSupported or Handler
  227. NULL, // Values
  228. 0, // RelationsCount
  229. NULL, // Relations
  230. NULL, // SupportHandler
  231. 0 // SerializedSize
  232. ),
  233. };
  234. //
  235. // 8VSB Demodulator Node Property Sets supported
  236. //
  237. // This table defines all property sets supported by the
  238. // 8VSB Demodulator Node associated with the transport output pin.
  239. //
  240. DEFINE_KSPROPERTY_SET_TABLE(VSB8NodePropertySets)
  241. {
  242. DEFINE_KSPROPERTY_SET
  243. (
  244. &KSPROPSETID_BdaAutodemodulate, // Set
  245. SIZEOF_ARRAY(VSB8NodeAutoDemodProperties), // PropertiesCount
  246. VSB8NodeAutoDemodProperties, // PropertyItems
  247. 0, // FastIoCount
  248. NULL // FastIoTable
  249. )};
  250. //
  251. // VSB8 Demodulator Node Automation Table
  252. //
  253. // This structure defines the Properties, Methods, and Events
  254. // available on the BDA 8VSB Demodulator Node.
  255. // These are used to set the symbol rate, and Viterbi rate,
  256. // as well as to report signal lock and signal quality.
  257. //
  258. DEFINE_KSAUTOMATION_TABLE(VSB8DemodulatorNodeAutomation) {
  259. DEFINE_KSAUTOMATION_PROPERTIES( VSB8NodePropertySets),
  260. DEFINE_KSAUTOMATION_METHODS_NULL,
  261. DEFINE_KSAUTOMATION_EVENTS_NULL
  262. };
  263. //===========================================================================
  264. //
  265. // Antenna Pin Definitions
  266. //
  267. //===========================================================================
  268. //
  269. // Antenna Pin Property Sets supported
  270. //
  271. // This table defines all property sets supported by the
  272. // antenna input pin exposed by this filter.
  273. //
  274. DEFINE_KSPROPERTY_SET_TABLE(AntennaPropertySets)
  275. {
  276. DEFINE_KSPROPERTY_SET
  277. (
  278. &KSPROPSETID_BdaFrequencyFilter, // Set
  279. SIZEOF_ARRAY(RFNodeFrequencyProperties), // PropertiesCount
  280. RFNodeFrequencyProperties, // PropertyItems
  281. 0, // FastIoCount
  282. NULL // FastIoTable
  283. )
  284. };
  285. //
  286. // Antenna Pin Automation Table
  287. //
  288. // Lists all Property, Method, and Event Set tables for the antenna pin
  289. //
  290. DEFINE_KSAUTOMATION_TABLE(AntennaAutomation) {
  291. DEFINE_KSAUTOMATION_PROPERTIES(AntennaPropertySets),
  292. DEFINE_KSAUTOMATION_METHODS_NULL,
  293. DEFINE_KSAUTOMATION_EVENTS_NULL
  294. };
  295. //
  296. // Dispatch Table for the Antenna Input Pin
  297. //
  298. // This pin does not process any data. A connection
  299. // on this pin enables the driver to determine which
  300. // Tuning Space is connected to the input. This information
  301. // may then be used to select a physical antenna jack
  302. // on the card.
  303. //
  304. const
  305. KSPIN_DISPATCH
  306. AntennaPinDispatch =
  307. {
  308. CAntennaPin::PinCreate, // Create
  309. CAntennaPin::PinClose, // Close
  310. NULL, // Process
  311. NULL, // Reset
  312. NULL, // SetDataFormat
  313. CAntennaPin::PinSetDeviceState, // SetDeviceState
  314. NULL, // Connect
  315. NULL, // Disconnect
  316. NULL, // Clock
  317. NULL // Allocator
  318. };
  319. //
  320. // Format of an Antenna Connection
  321. //
  322. // Used when connecting the antenna input pin to the Network Provider.
  323. //
  324. const KS_DATARANGE_BDA_ANTENNA AntennaPinRange =
  325. {
  326. // KSDATARANGE
  327. {
  328. sizeof( KS_DATARANGE_BDA_ANTENNA), // FormatSize
  329. 0, // Flags - (N/A)
  330. 0, // SampleSize - (N/A)
  331. 0, // Reserved
  332. { STATIC_KSDATAFORMAT_TYPE_BDA_ANTENNA }, // MajorFormat
  333. { STATIC_KSDATAFORMAT_SUBTYPE_NONE }, // SubFormat
  334. { STATIC_KSDATAFORMAT_SPECIFIER_NONE } // Specifier
  335. }
  336. };
  337. // Format Ranges of Antenna Input Pin.
  338. //
  339. static PKSDATAFORMAT AntennaPinRanges[] =
  340. {
  341. (PKSDATAFORMAT) &AntennaPinRange,
  342. // Add more formats here if additional antenna signal formats are supported.
  343. //
  344. };
  345. //===========================================================================
  346. //
  347. // Tranport Pin Definitions
  348. //
  349. //===========================================================================
  350. //
  351. // Transport Pin Automation Table
  352. //
  353. // Lists all Property, Method, and Event Set tables for the transport pin
  354. //
  355. DEFINE_KSAUTOMATION_TABLE(TransportAutomation) {
  356. DEFINE_KSAUTOMATION_PROPERTIES_NULL,
  357. DEFINE_KSAUTOMATION_METHODS_NULL,
  358. DEFINE_KSAUTOMATION_EVENTS_NULL
  359. };
  360. //
  361. // Dispatch Table for the ATSC transport Output pin.
  362. //
  363. // Since data on the transport is actually delivered to the
  364. // PCI bridge in hardware, this pin does not need to process
  365. // data.
  366. //
  367. // Connection of, and state transitions on, this pin help the
  368. // driver to determine when to allocate hardware resources for
  369. // the tuner and demodulator.
  370. //
  371. const
  372. KSPIN_DISPATCH
  373. TransportPinDispatch =
  374. {
  375. CTransportPin::PinCreate, // Create
  376. NULL, // Close
  377. NULL, // Process
  378. NULL, // Reset
  379. NULL, // SetDataFormat
  380. PinSetDeviceState, // SetDeviceState
  381. NULL, // Connect
  382. NULL, // Disconnect
  383. NULL, // Clock
  384. NULL // Allocator
  385. };
  386. //
  387. // Format of an ATSC Transport Stream Connection
  388. //
  389. // Used to connect the Transport Stream output pin to the
  390. // Capture Filter.
  391. //
  392. #ifdef NEW_BDA_TRANSPORT_FORMAT
  393. const KS_DATARANGE_BDA_TRANSPORT TransportPinRange =
  394. {
  395. // KSDATARANGE
  396. {
  397. sizeof( KS_DATARANGE_BDA_TRANSPORT), // FormatSize
  398. 0, // Flags - (N/A)
  399. 0, // SampleSize - (N/A)
  400. 0, // Reserved
  401. { STATIC_KSDATAFORMAT_TYPE_STREAM }, // MajorFormat
  402. { STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT }, // SubFormat
  403. { STATIC_KSDATAFORMAT_SPECIFIER_BDA_TRANSPORT } // Specifier
  404. },
  405. // BDA_TRANSPORT_INFO
  406. {
  407. 188, // ulcbPhyiscalPacket
  408. 312 * 188, // ulcbPhyiscalFrame
  409. 0, // ulcbPhyiscalFrameAlignment (no requirement)
  410. 0 // AvgTimePerFrame (not known)
  411. }
  412. };
  413. #else
  414. const KS_DATARANGE_ANALOGVIDEO TransportPinRange =
  415. {
  416. // KS_DATARANGE_ANALOGVIDEO
  417. {
  418. sizeof (KS_DATARANGE_ANALOGVIDEO), // FormatSize
  419. 0, // Flags
  420. sizeof (KS_TVTUNER_CHANGE_INFO), // SampleSize
  421. 0, // Reserved
  422. STATIC_KSDATAFORMAT_TYPE_ANALOGVIDEO, // aka MEDIATYPE_AnalogVideo
  423. STATIC_KSDATAFORMAT_SUBTYPE_NONE,
  424. STATIC_KSDATAFORMAT_SPECIFIER_ANALOGVIDEO, // aka FORMAT_AnalogVideo
  425. },
  426. // KS_ANALOGVIDEOINFO
  427. {
  428. 0, 0, 720, 480, // rcSource;
  429. 0, 0, 720, 480, // rcTarget;
  430. 720, // dwActiveWidth;
  431. 480, // dwActiveHeight;
  432. 0, // REFERENCE_TIME AvgTimePerFrame;
  433. }
  434. };
  435. #endif // NEW_BDA_TRANSPORT_FORMAT
  436. // Format Ranges of Transport Output Pin.
  437. //
  438. static PKSDATAFORMAT TransportPinRanges[] =
  439. {
  440. (PKSDATAFORMAT) &TransportPinRange,
  441. // Add more formats here if additional transport formats are supported.
  442. //
  443. };
  444. // Medium GUIDs for the Transport Output Pin.
  445. //
  446. // This insures contection to the correct Capture Filter pin.
  447. //
  448. const KSPIN_MEDIUM TransportPinMedium =
  449. {
  450. GUID_7146XPIN, 0, 0
  451. };
  452. //===========================================================================
  453. //
  454. // Filter definitions
  455. //
  456. //===========================================================================
  457. //
  458. // Template Node Descriptors
  459. //
  460. // This array describes all Node Types available in the template
  461. // topology of the filter.
  462. //
  463. const
  464. KSNODE_DESCRIPTOR
  465. NodeDescriptors[] =
  466. {
  467. {
  468. &RFTunerNodeAutomation, // PKSAUTOMATION_TABLE AutomationTable;
  469. &KSNODE_BDA_RF_TUNER, // Type
  470. NULL // Name
  471. },
  472. {
  473. &VSB8DemodulatorNodeAutomation, // PKSAUTOMATION_TABLE AutomationTable;
  474. &KSNODE_BDA_8VSB_DEMODULATOR, // Type
  475. NULL // Name
  476. }
  477. };
  478. //
  479. // Initial Pin Descriptors
  480. //
  481. // This data structure defines the pins that will appear on the filer
  482. // when it is first created.
  483. //
  484. const
  485. KSPIN_DESCRIPTOR_EX
  486. InitialPinDescriptors[] =
  487. {
  488. // Antenna Pin
  489. //
  490. {
  491. &AntennaPinDispatch,
  492. &AntennaAutomation, // AntennaPinAutomation
  493. {
  494. 0, // Interfaces
  495. NULL,
  496. 0, // Mediums
  497. NULL,
  498. SIZEOF_ARRAY(AntennaPinRanges),
  499. AntennaPinRanges,
  500. KSPIN_DATAFLOW_IN,
  501. KSPIN_COMMUNICATION_BOTH,
  502. NULL, // Name
  503. NULL, // Category
  504. 0
  505. },
  506. KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT | KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING | KSPIN_FLAG_FIXED_FORMAT,
  507. 1, // InstancesPossible
  508. 0, // InstancesNecessary
  509. NULL, // Allocator Framing
  510. NULL // PinIntersectHandler
  511. }
  512. };
  513. //
  514. // Template Pin Descriptors
  515. //
  516. // This data structure defines the pin types available in the filters
  517. // template topology. These structures will be used to create a
  518. // KDPinFactory for a pin type when BdaCreatePin is called.
  519. //
  520. const
  521. KSPIN_DESCRIPTOR_EX
  522. TemplatePinDescriptors[] =
  523. {
  524. // Antenna Pin
  525. //
  526. {
  527. &AntennaPinDispatch,
  528. &AntennaAutomation, // AntennaPinAutomation
  529. {
  530. 0, // Interfaces
  531. NULL,
  532. 0, // Mediums
  533. NULL,
  534. SIZEOF_ARRAY(AntennaPinRanges),
  535. AntennaPinRanges,
  536. KSPIN_DATAFLOW_IN,
  537. KSPIN_COMMUNICATION_BOTH,
  538. NULL, // Name
  539. NULL, // Category
  540. 0
  541. },
  542. KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT | KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING | KSPIN_FLAG_FIXED_FORMAT,
  543. 1, // InstancesPossible
  544. 0, // InstancesNecessary
  545. NULL, // Allocator Framing
  546. NULL // PinIntersectHandler
  547. },
  548. // Tranport Pin
  549. //
  550. {
  551. &TransportPinDispatch,
  552. &TransportAutomation, // TransportPinAutomation
  553. {
  554. 0, // Interfaces
  555. NULL,
  556. 1, // Mediums
  557. &TransportPinMedium,
  558. SIZEOF_ARRAY(TransportPinRanges),
  559. TransportPinRanges,
  560. KSPIN_DATAFLOW_OUT,
  561. KSPIN_COMMUNICATION_BOTH,
  562. (GUID *) &PINNAME_BDA_TRANSPORT, // Name
  563. (GUID *) &PINNAME_BDA_TRANSPORT, // Category
  564. 0
  565. },
  566. KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT | KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING | KSPIN_FLAG_FIXED_FORMAT,
  567. 1,
  568. 1, // InstancesNecessary
  569. NULL, // Allocator Framing
  570. NULL // PinIntersectHandler
  571. }
  572. };
  573. //
  574. // BDA Device Topology Property Set
  575. //
  576. // Defines the dispatch routines for the filter level
  577. // topology properties
  578. //
  579. DEFINE_KSPROPERTY_TABLE(FilterTopologyProperties)
  580. {
  581. DEFINE_KSPROPERTY_ITEM_BDA_NODE_TYPES(
  582. BdaPropertyNodeTypes,
  583. NULL
  584. ),
  585. DEFINE_KSPROPERTY_ITEM_BDA_PIN_TYPES(
  586. BdaPropertyPinTypes,
  587. NULL
  588. ),
  589. DEFINE_KSPROPERTY_ITEM_BDA_TEMPLATE_CONNECTIONS(
  590. BdaPropertyTemplateConnections,
  591. NULL
  592. ),
  593. DEFINE_KSPROPERTY_ITEM_BDA_CONTROLLING_PIN_ID(
  594. BdaPropertyGetControllingPinId,
  595. NULL
  596. )
  597. };
  598. //
  599. // Filter Level Property Sets supported
  600. //
  601. // This table defines all property sets supported by the
  602. // tuner filter exposed by this driver.
  603. //
  604. DEFINE_KSPROPERTY_SET_TABLE(FilterPropertySets)
  605. {
  606. DEFINE_KSPROPERTY_SET
  607. (
  608. &KSPROPSETID_BdaTopology, // Set
  609. SIZEOF_ARRAY(FilterTopologyProperties), // PropertiesCount
  610. FilterTopologyProperties, // PropertyItems
  611. 0, // FastIoCount
  612. NULL // FastIoTable
  613. ),
  614. //$REVIEW
  615. //
  616. // This property set should be moved to the 8VSB node. It works
  617. // here for a filter that only has one 8VSB demodulator. It works
  618. // for now because you only have one 8VSB demodulator on the board.
  619. //
  620. // - TCP
  621. //
  622. DEFINE_KSPROPERTY_SET
  623. (
  624. &PROPSETID_VSB, // Set
  625. SIZEOF_ARRAY(VSBProperties), // PropertiesCount
  626. VSBProperties, // PropertyItems
  627. 0, // FastIoCount
  628. NULL // FastIoTable
  629. ),
  630. };
  631. //
  632. // BDA Change Sync Method Set
  633. //
  634. // Defines the dispatch routines for the filter level
  635. // Change Sync methods
  636. //
  637. DEFINE_KSMETHOD_TABLE(BdaChangeSyncMethods)
  638. {
  639. DEFINE_KSMETHOD_ITEM_BDA_START_CHANGES(
  640. CFilter::StartChanges,
  641. NULL
  642. ),
  643. DEFINE_KSMETHOD_ITEM_BDA_CHECK_CHANGES(
  644. CFilter::CheckChanges,
  645. NULL
  646. ),
  647. DEFINE_KSMETHOD_ITEM_BDA_COMMIT_CHANGES(
  648. CFilter::CommitChanges,
  649. NULL
  650. ),
  651. DEFINE_KSMETHOD_ITEM_BDA_GET_CHANGE_STATE(
  652. CFilter::GetChangeState,
  653. NULL
  654. )
  655. };
  656. //
  657. // BDA Device Configuration Method Set
  658. //
  659. // Defines the dispatch routines for the filter level
  660. // Topology Configuration methods
  661. //
  662. DEFINE_KSMETHOD_TABLE(BdaDeviceConfigurationMethods)
  663. {
  664. DEFINE_KSMETHOD_ITEM_BDA_CREATE_PIN_FACTORY(
  665. BdaMethodCreatePin,
  666. NULL
  667. ),
  668. DEFINE_KSMETHOD_ITEM_BDA_DELETE_PIN_FACTORY(
  669. BdaMethodDeletePin,
  670. NULL
  671. ),
  672. DEFINE_KSMETHOD_ITEM_BDA_CREATE_TOPOLOGY(
  673. CFilter::CreateTopology,
  674. NULL
  675. )
  676. };
  677. //
  678. // Filter Level Method Sets supported
  679. //
  680. // This table defines all method sets supported by the
  681. // tuner filter exposed by this driver.
  682. //
  683. DEFINE_KSMETHOD_SET_TABLE(FilterMethodSets)
  684. {
  685. DEFINE_KSMETHOD_SET
  686. (
  687. &KSMETHODSETID_BdaChangeSync, // Set
  688. SIZEOF_ARRAY(BdaChangeSyncMethods), // PropertiesCount
  689. BdaChangeSyncMethods, // PropertyItems
  690. 0, // FastIoCount
  691. NULL // FastIoTable
  692. ),
  693. DEFINE_KSMETHOD_SET
  694. (
  695. &KSMETHODSETID_BdaDeviceConfiguration, // Set
  696. SIZEOF_ARRAY(BdaDeviceConfigurationMethods),// PropertiesCount
  697. BdaDeviceConfigurationMethods, // PropertyItems
  698. 0, // FastIoCount
  699. NULL // FastIoTable
  700. )
  701. };
  702. //
  703. // Filter Automation Table
  704. //
  705. // Lists all Property, Method, and Event Set tables for the filter
  706. //
  707. DEFINE_KSAUTOMATION_TABLE(FilterAutomation) {
  708. DEFINE_KSAUTOMATION_PROPERTIES(FilterPropertySets),
  709. DEFINE_KSAUTOMATION_METHODS(FilterMethodSets),
  710. DEFINE_KSAUTOMATION_EVENTS_NULL
  711. };
  712. //
  713. // Filter Dispatch Table
  714. //
  715. // Lists the dispatch routines for major events at the filter
  716. // level.
  717. //
  718. const
  719. KSFILTER_DISPATCH
  720. FilterDispatch =
  721. {
  722. CFilter::Create, // Create
  723. CFilter::FilterClose, // Close
  724. NULL, // Process
  725. NULL // Reset
  726. };
  727. //
  728. // Filter Factory Descriptor for the tuner filter
  729. //
  730. // This structure brings together all of the structures that define
  731. // the tuner filter as it appears when it is first instanciated.
  732. // Note that not all of the template pin and node types may be exposed as
  733. // pin and node factories when the filter is first instanciated.
  734. //
  735. DEFINE_KSFILTER_DESCRIPTOR(InitialTunerFilterDescriptor)
  736. {
  737. &FilterDispatch, // Dispatch
  738. &FilterAutomation, // AutomationTable
  739. KSFILTER_DESCRIPTOR_VERSION, // Version
  740. 0, // Flags
  741. &KSNAME_Filter, // ReferenceGuid
  742. DEFINE_KSFILTER_PIN_DESCRIPTORS(InitialPinDescriptors), // PinDescriptorsCount
  743. // PinDescriptorSize
  744. // PinDescriptors
  745. DEFINE_KSFILTER_CATEGORY(KSCATEGORY_BDA_RECEIVER_COMPONENT),// CategoriesCount
  746. // Categories
  747. DEFINE_KSFILTER_NODE_DESCRIPTORS_NULL, // NodeDescriptorsCount
  748. // NodeDescriptorSize
  749. // NodeDescriptors
  750. DEFINE_KSFILTER_DEFAULT_CONNECTIONS, // ConnectionsCount
  751. // Connections
  752. NULL // ComponentId
  753. };
  754. //===========================================================================
  755. //
  756. // Filter Template Topology definitions
  757. //
  758. //===========================================================================
  759. //
  760. // BDA Template Topology Connections
  761. //
  762. // Lists the Connections that are possible between pin types and
  763. // node types. This, together with the Template Filter Descriptor, and
  764. // the Pin Pairings, describe how topologies can be created in the filter.
  765. //
  766. const
  767. KSTOPOLOGY_CONNECTION TemplateTunerConnections[] =
  768. {
  769. { -1, 0, 0, 0},
  770. { 0, 1, 1, 0},
  771. { 1, 1, -1, 1},
  772. };
  773. //
  774. // Template Joints between the Antenna and Transport Pin Types.
  775. //
  776. // Lists the template joints between the Antenna Input Pin Type and
  777. // the Transport Output Pin Type.
  778. //
  779. // In this case the RF Node is considered to belong to the antennea input
  780. // pin and the 8VSB Demodulator Node is considered to belong to the
  781. // tranport stream output pin.
  782. //
  783. const
  784. ULONG AntennaTransportJoints[] =
  785. {
  786. 1
  787. };
  788. //
  789. // Template Pin Parings.
  790. //
  791. // These are indexes into the template connections structure that
  792. // are used to determine which nodes get duplicated when more than
  793. // one output pin type is connected to a single input pin type or when
  794. // more that one input pin type is connected to a single output pin
  795. // type.
  796. //
  797. const
  798. BDA_PIN_PAIRING TemplateTunerPinPairings[] =
  799. {
  800. // Antenna to Transport Topology Joints
  801. //
  802. {
  803. 0, // ulInputPin
  804. 1, // ulOutputPin
  805. 1, // ulcMaxInputsPerOutput
  806. 1, // ulcMinInputsPerOutput
  807. 1, // ulcMaxOutputsPerInput
  808. 1, // ulcMinOutputsPerInput
  809. SIZEOF_ARRAY(AntennaTransportJoints), // ulcTopologyJoints
  810. AntennaTransportJoints // pTopologyJoints
  811. }
  812. };
  813. //
  814. // Filter Factory Descriptor for the tuner filter template topology
  815. //
  816. // This structure brings together all of the structures that define
  817. // the topologies that the tuner filter can assume as a result of
  818. // pin factory and topology creation methods.
  819. // Note that not all of the template pin and node types may be exposed as
  820. // pin and node factories when the filter is first instanciated.
  821. //
  822. DEFINE_KSFILTER_DESCRIPTOR(TemplateTunerFilterDescriptor)
  823. {
  824. &FilterDispatch, // Dispatch
  825. &FilterAutomation, // AutomationTable
  826. KSFILTER_DESCRIPTOR_VERSION, // Version
  827. 0, // Flags
  828. &KSNAME_Filter, // ReferenceGuid
  829. DEFINE_KSFILTER_PIN_DESCRIPTORS(TemplatePinDescriptors),// PinDescriptorsCount
  830. // PinDescriptorSize
  831. // PinDescriptors
  832. DEFINE_KSFILTER_CATEGORY(KSCATEGORY_BDA_RECEIVER_COMPONENT),// CategoriesCount
  833. // Categories
  834. DEFINE_KSFILTER_NODE_DESCRIPTORS(NodeDescriptors), // NodeDescriptorsCount
  835. // NodeDescriptorSize
  836. // NodeDescriptors
  837. DEFINE_KSFILTER_CONNECTIONS(TemplateTunerConnections), // ConnectionsCount
  838. // Connections
  839. NULL // ComponentId
  840. };
  841. //
  842. // BDA Template Topology Descriptor for the filter.
  843. //
  844. // This structure define the pin and node types that may be created
  845. // on the filter.
  846. //
  847. const
  848. BDA_FILTER_TEMPLATE
  849. TunerBdaFilterTemplate =
  850. {
  851. &TemplateTunerFilterDescriptor,
  852. SIZEOF_ARRAY(TemplateTunerPinPairings),
  853. TemplateTunerPinPairings
  854. };
  855. //===========================================================================
  856. //
  857. // Device definitions
  858. //
  859. //===========================================================================
  860. //
  861. // Array containing descriptors for all of the filter factories
  862. // that are available on the device.
  863. //
  864. // Note! This only used when dynamic topology is not desired.
  865. // (i.e. filters and pins are fixed, usually there is also no
  866. // network provider in this case)
  867. //
  868. DEFINE_KSFILTER_DESCRIPTOR_TABLE(FilterDescriptors)
  869. {
  870. &TemplateTunerFilterDescriptor
  871. };
  872. //
  873. // Device Dispatch Table
  874. //
  875. // Lists the dispatch routines for the major events in the life
  876. // of the underlying device.
  877. //
  878. extern
  879. const
  880. KSDEVICE_DISPATCH
  881. DeviceDispatch =
  882. {
  883. CDevice::Create, // Add
  884. CDevice::Start, // Start
  885. NULL, // PostStart
  886. NULL, // QueryStop
  887. NULL, // CancelStop
  888. NULL, // Stop
  889. NULL, // QueryRemove
  890. NULL, // CancelRemove
  891. NULL, // Remove
  892. NULL, // QueryCapabilities
  893. NULL, // SurpriseRemoval
  894. NULL, // QueryPower
  895. NULL // SetPower
  896. };
  897. //
  898. // Device Descriptor
  899. //
  900. // Brings together all data structures that define the device and
  901. // the intial filter factories that can be created on it.
  902. // Note that this structure does not include the template topology
  903. // structures as they are specific to BDA.
  904. //
  905. extern
  906. const
  907. KSDEVICE_DESCRIPTOR
  908. DeviceDescriptor =
  909. {
  910. &DeviceDispatch, // Dispatch
  911. #ifdef DYNAMIC_TOPOLOGY
  912. 0, // SIZEOF_ARRAY( FilterDescriptors), // FilterDescriptorsCount
  913. NULL, // FilterDescriptors // FilterDescriptors
  914. #else
  915. SIZEOF_ARRAY( FilterDescriptors), // FilterDescriptorsCount
  916. FilterDescriptors // FilterDescriptors
  917. #endif // DYNAMIC_TOPOLOGY
  918. };