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.

235 lines
6.4 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Philips Semiconductors-CSU 1999
  4. // All rights are reserved. Reproduction in whole or in part is prohibited
  5. // without the written consent of the copyright owner.
  6. //
  7. // Philips reserves the right to make changes without notice at any time.
  8. // Philips makes no warranty, expressed, implied or statutory, including but
  9. // not limited to any implied warranty of merchantibility or fitness for any
  10. // particular purpose, or that the use will not infringe any third party
  11. // patent, copyright or trademark. Philips must not be liable for any loss
  12. // or damage arising from its use.
  13. //
  14. // KSVSB.H
  15. // Constants and structures for the VSB which wll also be used in the
  16. // user mode
  17. //////////////////////////////////////////////////////////////////////////////
  18. #ifndef _KSVSB_H_
  19. #define _KSVSB_H_
  20. #ifndef REGISTER_SETS
  21. #define REGISTER_SETS
  22. // Register Types
  23. #define CONTROL_REGISTER 0x0
  24. #define STATUS_REGISTER 0x1
  25. // Register Access structures
  26. typedef struct
  27. {
  28. UINT Address; // Register address
  29. UINT Length; // Length
  30. } RegisterListType;
  31. #endif
  32. // Coefficient IDs
  33. #define EQUALIZER_ID 0x2
  34. #define EQUALIZER_CLUSTER_ID 0x1
  35. #define SYNC_ENHANCER_ID 0x8
  36. #define NTSC_COCHANNEL_REJECTION_ID 0x4
  37. #define CORRELATOR_ID 0x10
  38. // Constants for resets .
  39. // The various resets that can be applied to VSB
  40. #define VSB_GENERAL_RESET 0x02
  41. #define VSB_INITIAL_RESET 0x01
  42. #define HARDWARE_RESET 0x1000
  43. // Constants for Hang Check
  44. #define VSB_HANG_CHECK_ENABLE 0x1
  45. // VSB output modes
  46. #define VSB_OUTPUT_MODE_NORMAL 0
  47. #define VSB_OUTPUT_MODE_DIAGNOSTIC 1
  48. #define VSB_OUTPUT_MODE_ITU656 2 // applicable only for VSB2
  49. #define VSB_OUTPUT_MODE_SERIAL_INPUT 3 // applicable only for VSB2
  50. #define VSB_OUTPUT_MODE_BYPASS 4 // applicable only for VSB1
  51. #define VSB1_TS_OUT_MODE_MASK 0x3F
  52. #define VSB2_TS_OUT_MODE_MASK 0xF3
  53. #define VSB1_DIAG_MODE_MASK 0xC7
  54. #define VSB2_DIAG_MODE_MASK 0xF0
  55. // Register addresses
  56. // Common
  57. #define VSB_REG_RESET 0x00
  58. #define VSB_REG_STATE 0x00
  59. // VSB1
  60. #define VSB1_CTRL_REG_EQUALIZER_COEFF 0x12
  61. #define VSB1_STATUS_REG_EQUALIZER_COEFF 0x05
  62. //Control Registers
  63. #define VSB1_REG_OUTPUT 0x02
  64. // VSB2
  65. // Status Registers
  66. #define VSB2_REG_CARRIER_OFFSET 0x01
  67. #define VSB2_REG_MSE_1 0x04
  68. #define VSB2_REG_MSE_2 0x05
  69. #define VSB2_REG_CORRELATOR 0x08
  70. #define VSB2_REG_SER_1 0x0B
  71. #define VSB2_REG_SER_2 0x0C
  72. // Control registers
  73. #define VSB2_REG_COEFFICIENT_ENABLE 0x02
  74. #define VSB2_REG_SYN_ENHANCER_0 0x0B
  75. #define VSB2_REG_SYN_ENHANCER_1 0x0C
  76. #define VSB2_REG_SYN_ENHANCER_2 0x0D
  77. #define VSB2_REG_SYN_ENHANCER_3 0x0E
  78. #define VSB2_CTRL_REG_CORRELATOR 0x1F
  79. #define VSB2_REG_TS_OUT_1 0x31
  80. #define VSB2_REG_DIAG_SELECT 0x34
  81. // Coefficient registers
  82. #define VSB2_CTRL_REG_EQUALIZER_COEFF 0x1A
  83. #define VSB2_CTRL_REG_EQUALIZER_CLUSTER_COEFF 0x1E
  84. #define VSB2_CTRL_REG_COCHANNEL_REJECTION_COEFF 0x2E
  85. #define VSB2_CTRL_REG_SYNC_ENHANCER_COEFF 0x0F
  86. #define VSB2_STATUS_REG_EQUALIZER_COEFF 0x06
  87. #define VSB2_STATUS_REG_EQUALIZER_CLUSTER_COEFF 0x07
  88. #define VSB2_STATUS_REG_COCHANNEL_REJECTION_COEFF 0x09
  89. #define VSB2_STATUS_REG_SYNC_ENHANCER_COEFF 0x02
  90. #define VSB2_REG_CORRELATOR_COEFF 0x0A
  91. #define MAX_VSB_BUF_SIZE 3000
  92. #define MAX_VSB_REGISTERS 54
  93. #define MAX_VSB_REG_BUF_SIZE 100
  94. #define MAX_COEFFICIENTS 4
  95. // Register Access structures
  96. typedef struct
  97. {
  98. UINT ID; // Coefficient ID
  99. UINT Length; // Length
  100. } CoeffListType;
  101. // VSB Modulation scheme
  102. typedef enum
  103. {
  104. VSB8, // VSB- 8
  105. VSB16 // VSB-16
  106. }VSBMODULATIONTYPE;
  107. // VSB Chip type
  108. typedef enum
  109. {
  110. VSB1, // VSB 1 (version 1)
  111. VSB2 // VSB 2 (version 2)
  112. }VSBCHIPTYPE;
  113. // Diagnostic Enumeration
  114. typedef enum
  115. {
  116. EQUALIZER_OUT = 0,
  117. CR_ERROR,
  118. TR_ERROR,
  119. EQUALIZER_IN,
  120. TRELLIS_DEC_DIAG_OUT,
  121. TRELLIS_DEC_OUT = 6,
  122. REED_SOLOMON_DIAG_OUT,
  123. SYNC_ENHANCER_REAL_IN,
  124. SRC_OUT
  125. } VSBDIAGTYPE;
  126. // Operation Mode enumeration
  127. typedef enum
  128. {
  129. VSB_OPERATION_MODE_DIAG,
  130. VSB_OPERATION_MODE_DATA,
  131. VSB_OPERATION_MODE_INVALID
  132. } VSBDIAGOPNMODETYPE;
  133. #define STATIC_PROPSETID_VSB\
  134. 0xb96e0100L, 0xce52, 0x11d2, 0x8a, 0x11, 0x00, 0x60, 0x94, 0x05, 0x30, 0x6e
  135. DEFINE_GUIDSTRUCT("b96e0100-ce52-11d2-8a11-00609405306e", PROPSETID_VSB);
  136. #define PROPSETID_VSB DEFINE_GUIDNAMED(PROPSETID_VSB)
  137. // The properties defined for VSB
  138. typedef enum
  139. {
  140. KSPROPERTY_VSB_CAP, // RW - VSB Driver Capabilities
  141. KSPROPERTY_VSB_REG_CTRL, // RW - Register access control
  142. KSPROPERTY_VSB_COEFF_CTRL, // RW - Coefficient access control
  143. KSPROPERTY_VSB_RESET_CTRL, // RW - Reset control
  144. KSPROPERTY_VSB_DIAG_CTRL, // RW - Diagnostic control
  145. KSPROPERTY_VSB_QUALITY_CTRL, // W - Quality control . For VSB1 its hangcheck control
  146. } KSPROPERTY_VSB;
  147. // The Property structure for Register settings.
  148. typedef struct
  149. {
  150. UINT NumRegisters; // Number of registers to be written or read
  151. UINT RegisterSize; // Size of the register data in bytes
  152. RegisterListType RegisterList[MAX_VSB_REGISTERS]; // List of register
  153. // addresses and length
  154. UCHAR Buffer[MAX_VSB_REG_BUF_SIZE]; // The buffer to be filled or passed
  155. UINT RegisterType; // Type of register (CONTROL/STATUS)
  156. } KSPROPERTY_VSB_REG_CTRL_S, *PKSPROPERTY_VSB_REG_CTRL_S;
  157. // The Property structure for Coefficient settings.
  158. typedef struct
  159. {
  160. UINT NumRegisters; // Number of coefficients to be written or read
  161. UINT RegisterSize; // Size of the coefficient data in bytes
  162. CoeffListType CoeffList[MAX_COEFFICIENTS]; // List of register
  163. // addresses and length
  164. UCHAR Buffer[MAX_VSB_BUF_SIZE]; // The buffer to be filled or passed
  165. } KSPROPERTY_VSB_COEFF_CTRL_S, *PKSPROPERTY_VSB_COEFF_CTRL_S;
  166. // The Property structure for VSB control such as reset, disable.
  167. typedef struct
  168. {
  169. UINT Value;
  170. } KSPROPERTY_VSB_CTRL_S, *PKSPROPERTY_VSB_CTRL_S;
  171. // The Property structure for VSB capabilities
  172. typedef struct
  173. {
  174. VSBMODULATIONTYPE Modulation; // The modulation scheme. Currently VSB-8 but
  175. // support for VSB-16
  176. VSBCHIPTYPE ChipVersion; // Chip version - 1 = VSB1, 2= VSB2
  177. UINT BoardID; // Board ID.
  178. } KSPROPERTY_VSB_CAP_S, *PKSPROPERTY_VSB_CAP_S;
  179. // The Property structure for VSB diagnostic ontrol
  180. typedef struct
  181. {
  182. ULONG OperationMode; // The operation mode (enumeration VSBDIAGOPNMODETYPE)
  183. ULONG Type; // Diagnostic type (enumeration VSBDIAGTYPE)
  184. } KSPROPERTY_VSB_DIAG_CTRL_S, *PKSPROPERTY_VSB_DIAG_CTRL_S;
  185. #endif // _KSVSB_H_