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.

139 lines
3.7 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Philips Semiconductors 1998
  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. // MPOC.H
  15. // Constants for MPOC
  16. //////////////////////////////////////////////////////////////////////////////
  17. #ifndef _MPOC_H_
  18. #define _MPOC_H_
  19. #define MAX_MPOC_CONTROL_REGISTERS 18
  20. #define MAX_MPOC_STATUS_REGISTERS 4
  21. // I2C Address
  22. #define MPOC_I2C_ADDRESS 0x8A
  23. // Control registers
  24. #define MPOC_CONTROL_REG_OFFSET 0x1D
  25. #define MPOC_CONTROL_REG_AGCTAKEOVER 0x1E
  26. #define MPOC_CONTROL_REG_HUE 0x1F
  27. #define MPOC_CONTROL_REG_COLOR_DECODER_0 0x20
  28. #define MPOC_CONTROL_REG_COLOR_DECODER_1 0x21
  29. #define MPOC_CONTROL_REG_VIDEO_SWITCH 0x22
  30. #define MPOC_CONTROL_REG_AUDIO_SWITCH 0x23
  31. #define MPOC_CONTROL_REG_SYNC_0 0x24
  32. #define MPOC_CONTROL_REG_SYNC_1 0x25
  33. #define MPOC_CONTROL_REG_SOUND 0x26
  34. #define MPOC_CONTROL_REG_VISION_IF_0 0x27
  35. #define MPOC_CONTROL_REG_VISION_IF_1 0x28
  36. #define MPOC_CONTROL_REG_VIDEO_CONTROL 0x29
  37. #define MPOC_CONTROL_REG_VIDEO_ADC 0x2A
  38. #define MPOC_CONTROL_REG_SPARE 0x2B
  39. #define MPOC_CONTROL_REG_AUDIO_ADC 0x2C
  40. #define MPOC_CONTROL_REG_FEATURES 0x2D
  41. #define MPOC_CONTROL_REG_IO 0x2E
  42. // Status registers
  43. #define MPOC_STATUS_REG_0 0x00
  44. #define MPOC_STATUS_REG_1 0x01
  45. #define MPOC_STATUS_REG_2 0x02
  46. #define MPOC_STATUS_REG_3 0x03
  47. #define VIDEO 0x1
  48. #define AUDIO 0x2
  49. #define MAX_AUDIO_SOURCES 0x6
  50. #define MAX_SOURCES 0xB
  51. #define MAX_VIDEO_SOURCES 0x5
  52. #define EXTERNAL_AGC 0x10
  53. // PLL demodulator setting frequency for N1D and above
  54. // 1/25/2000
  55. #define MPOC_PLL_IF_FREQ_58_POINT_75 0x00
  56. #define MPOC_PLL_IF_FREQ_45_POINT_75 0x20
  57. #define MPOC_PLL_IF_FREQ_38_POINT_90 0x40
  58. #define MPOC_PLL_IF_FREQ_38_POINT_00 0x60
  59. #define MPOC_PLL_IF_FREQ_33_POINT_40 0x80
  60. #define MPOC_PLL_IF_FREQ_33_POINT_90 0xc0
  61. typedef enum
  62. {
  63. MPOC_SRC_COMPOSITE,
  64. MPOC_SRC_SVHS,
  65. MPOC_SRC_TUNER,
  66. MPOC_SRC_RGB,
  67. MPOC_SRC_DVD,
  68. MPOC_SRC_AUDIO_STEREO,
  69. MPOC_SRC_AUDIO_EXT
  70. } MPOC_SRC_ENUM;
  71. typedef enum
  72. {
  73. MPOC_STATUS_VIDEO_IDENT,
  74. MPOC_STATUS_IF_PLL_LOCK,
  75. MPOC_STATUS_PHASE_LOCK,
  76. MPOC_STATUS_COLOR_IDENT,
  77. MPOC_STATUS_STANDARD_VIDEO,
  78. MPOC_STATUS_REF_OSC_LOCK,
  79. MPOC_STATUS_SUPPLIES_OK,
  80. MPOC_STATUS_AGC,
  81. MPOC_STATUS_RGB_INSERT,
  82. MPOC_STATUS_PLL_OFFSET,
  83. MPOC_STATUS_FM_PLL_WINDOW,
  84. MPOC_STATUS_FM_PLL_LOCK,
  85. // Additional status bits for N1D and above
  86. // 1/25/2000
  87. MPOC_STATUS_MACROVISION_SIG,
  88. MPOC_STATUS_IO
  89. }MPOC_STATUSTYPE_ENUM;
  90. // MPOC Video ADC mode enumeration
  91. typedef enum
  92. {
  93. MPOC_VIDEOADC_TV27,
  94. MPOC_VIDEOADC_TV32,
  95. MPOC_VIDEOADC_TV36,
  96. MPOC_VIDEOADC_VSBI,
  97. MPOC_VIDEOADC_VSBIQ,
  98. MPOC_VIDEOADC_EXT1,
  99. MPOC_VIDEOADC_EXT2,
  100. MPOC_VIDEOADC_SVGA
  101. }MPOC_VIDEOADC_MODE_ENUM;
  102. typedef union
  103. {
  104. struct
  105. {
  106. char offset;
  107. char buffer[MAX_MPOC_CONTROL_REGISTERS];
  108. }reg_set;
  109. char array[MAX_MPOC_CONTROL_REGISTERS+1];
  110. }Register;
  111. #endif // _MPOC_H_