Leaked source code of windows server 2003
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.

105 lines
4.0 KiB

  1. //==========================================================================;
  2. //
  3. // WDMTuner.H
  4. // WDM Tuner MiniDriver.
  5. // CWDMTuner Class definition.
  6. // Copyright (c) 1996 - 1997 ATI Technologies Inc. All Rights Reserved.
  7. //
  8. //==========================================================================;
  9. #ifndef _WDMTUNER_H_
  10. #define _WDMTUNER_H_
  11. #include "i2script.h"
  12. #include "aticonfg.h"
  13. #include "pinmedia.h"
  14. #define KSPROPERTIES_TUNER_LAST ( KSPROPERTY_TUNER_STATUS + 1)
  15. typedef struct // this structure is derived from MS KSPROPERTY_TUNER_CAPS_S
  16. {
  17. ULONG ulStandardsSupported; // KS_AnalogVideo_*
  18. ULONG ulMinFrequency; // Hz
  19. ULONG ulMaxFrequency; // Hz
  20. ULONG ulTuningGranularity; // Hz
  21. ULONG ulNumberOfInputs; // count of inputs
  22. ULONG ulSettlingTime; // milliSeconds
  23. ULONG ulStrategy; // KS_TUNER_STRATEGY
  24. } ATI_KSPROPERTY_TUNER_CAPS, * PATI_KSPROPERTY_TUNER_CAPS;
  25. class CATIWDMTuner
  26. {
  27. public:
  28. CATIWDMTuner ( PPORT_CONFIGURATION_INFORMATION pConfigInfo, CI2CScript * pCScript, PUINT puiErrorCode);
  29. ~CATIWDMTuner ();
  30. PVOID operator new ( size_t stSize, PVOID pAllocation);
  31. // Attributes
  32. private:
  33. // pending device Srb
  34. PHW_STREAM_REQUEST_BLOCK m_pPendingDeviceSrb;
  35. // WDM global topology headers
  36. GUID m_wdmTunerTopologyCategory;
  37. KSTOPOLOGY m_wdmTunerTopology;
  38. // WDM global property headers
  39. PKSPIN_MEDIUM m_pTVTunerPinsMediumInfo;
  40. PBOOL m_pTVTunerPinsDirectionInfo;
  41. KSPROPERTY_ITEM m_wdmTunerProperties[KSPROPERTIES_TUNER_LAST];
  42. KSPROPERTY_SET m_wdmTunerPropertySet;
  43. // WDM global stream headers
  44. HW_STREAM_HEADER m_wdmTunerStreamHeader;
  45. // WDM adapter properties
  46. // configuration properties
  47. CATIHwConfiguration m_CATIConfiguration;
  48. ULONG m_ulNumberOfStandards;
  49. ATI_KSPROPERTY_TUNER_CAPS m_wdmTunerCaps;
  50. ULONG m_ulVideoStandard;
  51. ULONG m_ulTuningFrequency;
  52. ULONG m_ulSupportedModes;
  53. ULONG m_ulTunerMode;
  54. ULONG m_ulNumberOfPins;
  55. ULONG m_ulTunerInput;
  56. DEVICE_POWER_STATE m_ulPowerState;
  57. // configuration properties
  58. UINT m_uiTunerId;
  59. ULONG m_ulIntermediateFrequency;
  60. UCHAR m_uchTunerI2CAddress;
  61. // I2C client properties
  62. CI2CScript * m_pI2CScript;
  63. // Implementation
  64. public:
  65. BOOL AdapterUnInitialize ( PHW_STREAM_REQUEST_BLOCK pSrb);
  66. BOOL AdapterGetStreamInfo ( PHW_STREAM_REQUEST_BLOCK pSrb);
  67. BOOL AdapterQueryUnload ( PHW_STREAM_REQUEST_BLOCK pSrb);
  68. BOOL AdapterGetProperty ( PHW_STREAM_REQUEST_BLOCK pSrb);
  69. BOOL AdapterSetProperty ( PHW_STREAM_REQUEST_BLOCK pSrb);
  70. NTSTATUS AdapterSetPowerState ( PHW_STREAM_REQUEST_BLOCK pSrb);
  71. NTSTATUS AdapterCompleteInitialization ( PHW_STREAM_REQUEST_BLOCK pSrb);
  72. private:
  73. BOOL SetTunerWDMCapabilities ( UINT uiTunerId);
  74. void SetWDMTunerKSProperties ( void);
  75. void SetWDMTunerKSTopology ( void);
  76. BOOL SetTunerVideoStandard ( ULONG ulStandard);
  77. BOOL SetTunerInput ( ULONG nInput);
  78. BOOL SetTunerFrequency ( ULONG ulFrequency);
  79. BOOL SetTunerMode ( ULONG ulModeToSet);
  80. BOOL GetTunerPLLOffsetBusyStatus ( PLONG plPLLOffset, PBOOL pbBusyStatus);
  81. USHORT GetTunerControlCode ( ULONG ulFrequencyDivider);
  82. };
  83. #endif // _WDMTUNER_H_