]> err.no Git - linux-2.6/blob - drivers/media/video/tuner-xc2028-types.h
V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
[linux-2.6] / drivers / media / video / tuner-xc2028-types.h
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
10 /* xc3028 firmware types */
11
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)
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  */
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)
43
44 #define DTV_TYPES       (D2620|D2633|DTV6|QAM|DTV7|DTV78|DTV8|ATSC)
45
46 /* There's a FM | BASE firmware + FM specific firmware (std=0) */
47 #define FM              (1<<10)
48
49 #define STD_SPECIFIC_TYPES (MTS|FM|LCD|NOGD)
50
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
60  */
61 #define LCD             (1<<12)
62
63 /* NOGD firmwares exist only for MTS STD/MN (PAL or NTSC/M)
64         and for non-MTS STD/MN (PAL, NTSC/M or NTSC/Kr)
65  */
66 #define NOGD            (1<<13)
67
68 /* Old firmwares were broken into init0 and init1 */
69 #define INIT1           (1<<14)
70
71 /* SCODE firmware selects particular behaviours */
72 #define MONO           (1 << 15)
73 #define ATSC           (1 << 16)
74 #define IF             (1 << 17)
75 #define LG60           (1 << 18)
76 #define ATI638         (1 << 19)
77 #define OREN538        (1 << 20)
78 #define OREN36         (1 << 21)
79 #define TOYOTA388      (1 << 22)
80 #define TOYOTA794      (1 << 23)
81 #define DIBCOM52       (1 << 24)
82 #define ZARLINK456     (1 << 25)
83 #define CHINA          (1 << 26)
84 #define F6MHZ          (1 << 27)
85 #define INPUT2         (1 << 28)
86 #define SCODE          (1 << 29)
87
88 /* This flag identifies that the scode table has a new format */
89 #define HAS_IF         (1 << 30)
90
91 #define SCODE_TYPES SCODE
92
93
94 /* Newer types not defined on videodev2.h.
95    The original idea were to move all those types to videodev2.h, but
96    it seemed overkill, since, with the exception of SECAM/K3, the other
97    types seem to be autodetected.
98    It is not clear where secam/k3 is used, nor we have a feedback of this
99    working or being autodetected by the standard secam firmware.
100  */
101
102 #define V4L2_STD_SECAM_K3       (0x04000000)
103
104 /* Audio types */
105
106 #define V4L2_STD_A2_A           (1LL<<32)
107 #define V4L2_STD_A2_B           (1LL<<33)
108 #define V4L2_STD_NICAM_A        (1LL<<34)
109 #define V4L2_STD_NICAM_B        (1LL<<35)
110 #define V4L2_STD_AM             (1LL<<36)
111 #define V4L2_STD_BTSC           (1LL<<37)
112 #define V4L2_STD_EIAJ           (1LL<<38)
113
114 #define V4L2_STD_A2             (V4L2_STD_A2_A    | V4L2_STD_A2_B)
115 #define V4L2_STD_NICAM          (V4L2_STD_NICAM_A | V4L2_STD_NICAM_B)
116
117 /* To preserve backward compatibilty,
118    (std & V4L2_STD_AUDIO) = 0 means that ALL audio stds are supported
119  */
120
121 #define V4L2_STD_AUDIO          (V4L2_STD_A2    | \
122                                  V4L2_STD_NICAM | \
123                                  V4L2_STD_AM    | \
124                                  V4L2_STD_BTSC  | \
125                                  V4L2_STD_EIAJ)
126
127 /* Used standards with audio restrictions */
128
129 #define V4L2_STD_PAL_BG_A2_A    (V4L2_STD_PAL_BG | V4L2_STD_A2_A)
130 #define V4L2_STD_PAL_BG_A2_B    (V4L2_STD_PAL_BG | V4L2_STD_A2_B)
131 #define V4L2_STD_PAL_BG_NICAM_A (V4L2_STD_PAL_BG | V4L2_STD_NICAM_A)
132 #define V4L2_STD_PAL_BG_NICAM_B (V4L2_STD_PAL_BG | V4L2_STD_NICAM_B)
133 #define V4L2_STD_PAL_DK_A2      (V4L2_STD_PAL_DK | V4L2_STD_A2)
134 #define V4L2_STD_PAL_DK_NICAM   (V4L2_STD_PAL_DK | V4L2_STD_NICAM)
135 #define V4L2_STD_SECAM_L_NICAM  (V4L2_STD_SECAM_L | V4L2_STD_NICAM)
136 #define V4L2_STD_SECAM_L_AM     (V4L2_STD_SECAM_L | V4L2_STD_AM)