Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / drivers / media / common / tuners / tuner-xc2028-types.h
blob74dc46a71f64555c07bb67be9ee09facf822ad41
1 /* tuner-xc2028_types
3 * This file includes internal tipes to be used inside tuner-xc2028.
4 * Shouldn't be included outside tuner-xc2028
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 */
10 /* xc3028 firmware types */
12 /* BASE firmware should be loaded before any other firmware */
13 #define BASE (1<<0)
14 #define BASE_TYPES (BASE|F8MHZ|MTS|FM|INPUT1|INPUT2|INIT1)
16 /* F8MHZ marks BASE firmwares for 8 MHz Bandwidth */
17 #define F8MHZ (1<<1)
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
26 #define MTS (1<<2)
28 /* FIXME: I have no idea what's the difference between
29 D2620 and D2633 firmwares
31 #define D2620 (1<<3)
32 #define D2633 (1<<4)
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
38 #define DTV6 (1 << 5)
39 #define QAM (1 << 6)
40 #define DTV7 (1<<7)
41 #define DTV78 (1<<8)
42 #define DTV8 (1<<9)
44 #define DTV_TYPES (D2620|D2633|DTV6|QAM|DTV7|DTV78|DTV8|ATSC)
46 /* There's a FM | BASE firmware + FM specific firmware (std=0) */
47 #define FM (1<<10)
49 #define STD_SPECIFIC_TYPES (MTS|FM|LCD|NOGD)
51 /* Applies only for FM firmware
52 Makes it use RF input 1 (pin #2) instead of input 2 (pin #4)
54 #define INPUT1 (1<<11)
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
60 Those firmwares produce better result with LCD displays
62 #define LCD (1<<12)
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)
66 The NOGD firmwares don't have group delay compensation filter
68 #define NOGD (1<<13)
70 /* Old firmwares were broken into init0 and init1 */
71 #define INIT1 (1<<14)
73 /* SCODE firmware selects particular behaviours */
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)
90 /* This flag identifies that the scode table has a new format */
91 #define HAS_IF (1 << 30)
93 /* There are different scode tables for MTS and non-MTS.
94 The MTS firmwares support mono only
96 #define SCODE_TYPES (SCODE | MTS)
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.
107 #define V4L2_STD_SECAM_K3 (0x04000000)
109 /* Audio types */
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)
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)
122 /* To preserve backward compatibilty,
123 (std & V4L2_STD_AUDIO) = 0 means that ALL audio stds are supported
126 #define V4L2_STD_AUDIO (V4L2_STD_A2 | \
127 V4L2_STD_NICAM | \
128 V4L2_STD_AM | \
129 V4L2_STD_BTSC | \
130 V4L2_STD_EIAJ)
132 /* Used standards with audio restrictions */
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)