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