tuner-xc2028-types.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /* tuner-xc2028_types
  2. *
  3. * This file includes internal tipes to be used inside tuner-xc2028.
  4. * Shouldn't be included outside tuner-xc2028
  5. *
  6. * Copyright (c) 2007-2008 Mauro Carvalho Chehab (mchehab@infradead.org)
  7. * This code is placed under the terms of the GNU General Public License v2
  8. */
  9. /* xc3028 firmware types */
  10. /* BASE firmware should be loaded before any other firmware */
  11. #define BASE (1<<0)
  12. #define BASE_TYPES (BASE|F8MHZ|MTS|FM|INPUT1|INPUT2|INIT1)
  13. /* F8MHZ marks BASE firmwares for 8 MHz Bandwidth */
  14. #define F8MHZ (1<<1)
  15. /* Multichannel Television Sound (MTS)
  16. Those firmwares are capable of using xc2038 DSP to decode audio and
  17. produce a baseband audio output on some pins of the chip.
  18. There are MTS firmwares for the most used video standards. It should be
  19. required to use MTS firmwares, depending on the way audio is routed into
  20. the bridge chip
  21. */
  22. #define MTS (1<<2)
  23. /* FIXME: I have no idea what's the difference between
  24. D2620 and D2633 firmwares
  25. */
  26. #define D2620 (1<<3)
  27. #define D2633 (1<<4)
  28. /* DTV firmwares for 6, 7 and 8 MHz
  29. DTV6 - 6MHz - ATSC/DVB-C/DVB-T/ISDB-T/DOCSIS
  30. DTV8 - 8MHz - DVB-C/DVB-T
  31. */
  32. #define DTV6 (1 << 5)
  33. #define QAM (1 << 6)
  34. #define DTV7 (1<<7)
  35. #define DTV78 (1<<8)
  36. #define DTV8 (1<<9)
  37. #define DTV_TYPES (D2620|D2633|DTV6|QAM|DTV7|DTV78|DTV8|ATSC)
  38. /* There's a FM | BASE firmware + FM specific firmware (std=0) */
  39. #define FM (1<<10)
  40. #define STD_SPECIFIC_TYPES (MTS|FM|LCD|NOGD)
  41. /* Applies only for FM firmware
  42. Makes it use RF input 1 (pin #2) instead of input 2 (pin #4)
  43. */
  44. #define INPUT1 (1<<11)
  45. /* LCD firmwares exist only for MTS STD/MN (PAL or NTSC/M)
  46. and for non-MTS STD/MN (PAL, NTSC/M or NTSC/Kr)
  47. There are variants both with and without NOGD
  48. Those firmwares produce better result with LCD displays
  49. */
  50. #define LCD (1<<12)
  51. /* NOGD firmwares exist only for MTS STD/MN (PAL or NTSC/M)
  52. and for non-MTS STD/MN (PAL, NTSC/M or NTSC/Kr)
  53. The NOGD firmwares don't have group delay compensation filter
  54. */
  55. #define NOGD (1<<13)
  56. /* Old firmwares were broken into init0 and init1 */
  57. #define INIT1 (1<<14)
  58. /* SCODE firmware selects particular behaviours */
  59. #define MONO (1 << 15)
  60. #define ATSC (1 << 16)
  61. #define IF (1 << 17)
  62. #define LG60 (1 << 18)
  63. #define ATI638 (1 << 19)
  64. #define OREN538 (1 << 20)
  65. #define OREN36 (1 << 21)
  66. #define TOYOTA388 (1 << 22)
  67. #define TOYOTA794 (1 << 23)
  68. #define DIBCOM52 (1 << 24)
  69. #define ZARLINK456 (1 << 25)
  70. #define CHINA (1 << 26)
  71. #define F6MHZ (1 << 27)
  72. #define INPUT2 (1 << 28)
  73. #define SCODE (1 << 29)
  74. /* This flag identifies that the scode table has a new format */
  75. #define HAS_IF (1 << 30)
  76. /* There are different scode tables for MTS and non-MTS.
  77. The MTS firmwares support mono only
  78. */
  79. #define SCODE_TYPES (SCODE | MTS)
  80. /* Newer types not defined on videodev2.h.
  81. The original idea were to move all those types to videodev2.h, but
  82. it seemed overkill, since, with the exception of SECAM/K3, the other
  83. types seem to be autodetected.
  84. It is not clear where secam/k3 is used, nor we have a feedback of this
  85. working or being autodetected by the standard secam firmware.
  86. */
  87. #define V4L2_STD_SECAM_K3 (0x04000000)
  88. /* Audio types */
  89. #define V4L2_STD_A2_A (1LL<<32)
  90. #define V4L2_STD_A2_B (1LL<<33)
  91. #define V4L2_STD_NICAM_A (1LL<<34)
  92. #define V4L2_STD_NICAM_B (1LL<<35)
  93. #define V4L2_STD_AM (1LL<<36)
  94. #define V4L2_STD_BTSC (1LL<<37)
  95. #define V4L2_STD_EIAJ (1LL<<38)
  96. #define V4L2_STD_A2 (V4L2_STD_A2_A | V4L2_STD_A2_B)
  97. #define V4L2_STD_NICAM (V4L2_STD_NICAM_A | V4L2_STD_NICAM_B)
  98. /* To preserve backward compatibility,
  99. (std & V4L2_STD_AUDIO) = 0 means that ALL audio stds are supported
  100. */
  101. #define V4L2_STD_AUDIO (V4L2_STD_A2 | \
  102. V4L2_STD_NICAM | \
  103. V4L2_STD_AM | \
  104. V4L2_STD_BTSC | \
  105. V4L2_STD_EIAJ)
  106. /* Used standards with audio restrictions */
  107. #define V4L2_STD_PAL_BG_A2_A (V4L2_STD_PAL_BG | V4L2_STD_A2_A)
  108. #define V4L2_STD_PAL_BG_A2_B (V4L2_STD_PAL_BG | V4L2_STD_A2_B)
  109. #define V4L2_STD_PAL_BG_NICAM_A (V4L2_STD_PAL_BG | V4L2_STD_NICAM_A)
  110. #define V4L2_STD_PAL_BG_NICAM_B (V4L2_STD_PAL_BG | V4L2_STD_NICAM_B)
  111. #define V4L2_STD_PAL_DK_A2 (V4L2_STD_PAL_DK | V4L2_STD_A2)
  112. #define V4L2_STD_PAL_DK_NICAM (V4L2_STD_PAL_DK | V4L2_STD_NICAM)
  113. #define V4L2_STD_SECAM_L_NICAM (V4L2_STD_SECAM_L | V4L2_STD_NICAM)
  114. #define V4L2_STD_SECAM_L_AM (V4L2_STD_SECAM_L | V4L2_STD_AM)