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