blob: 7e4798783db733cc139e557444f12d4bddb820b5 [file] [log] [blame]
Mauro Carvalho Chehabde3fe212007-10-24 09:22:08 -03001/* tuner-xc2028_types
2 *
Mauro Carvalho Chehab33e53162008-04-21 06:58:48 -03003 * 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 Chehabde3fe212007-10-24 09:22:08 -03007 * 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 Pascoee0f0b372007-11-19 11:22:03 -030014#define BASE_TYPES (BASE|F8MHZ|MTS|FM|INPUT1|INPUT2|INIT1)
Mauro Carvalho Chehabde3fe212007-10-24 09:22:08 -030015
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 Chehab43efe702007-11-14 19:30:28 -030038#define DTV6 (1 << 5)
39#define QAM (1 << 6)
Mauro Carvalho Chehabde3fe212007-10-24 09:22:08 -030040#define DTV7 (1<<7)
41#define DTV78 (1<<8)
42#define DTV8 (1<<9)
43
Chris Pascoee0f0b372007-11-19 11:22:03 -030044#define DTV_TYPES (D2620|D2633|DTV6|QAM|DTV7|DTV78|DTV8|ATSC)
45
Mauro Carvalho Chehabde3fe212007-10-24 09:22:08 -030046/* There's a FM | BASE firmware + FM specific firmware (std=0) */
47#define FM (1<<10)
48
Chris Pascoe11a9eff2007-11-19 23:18:36 -030049#define STD_SPECIFIC_TYPES (MTS|FM|LCD|NOGD)
50
Mauro Carvalho Chehabde3fe212007-10-24 09:22:08 -030051/* 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 Chehabc21f1e22008-04-24 10:56:41 -030060 Those firmwares produce better result with LCD displays
Mauro Carvalho Chehabde3fe212007-10-24 09:22:08 -030061 */
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 Chehabc21f1e22008-04-24 10:56:41 -030066 The NOGD firmwares don't have group delay compensation filter
Mauro Carvalho Chehabde3fe212007-10-24 09:22:08 -030067 */
68#define NOGD (1<<13)
69
70/* Old firmwares were broken into init0 and init1 */
71#define INIT1 (1<<14)
72
Chris Pascoee0f0b372007-11-19 11:22:03 -030073/* SCODE firmware selects particular behaviours */
Mauro Carvalho Chehab43efe702007-11-14 19:30:28 -030074#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 Chehab66c2d532007-11-25 19:26:36 -030090/* This flag identifies that the scode table has a new format */
91#define HAS_IF (1 << 30)
92
Mauro Carvalho Chehabc21f1e22008-04-24 10:56:41 -030093/* 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 Pascoee0f0b372007-11-19 11:22:03 -030097
Mauro Carvalho Chehab33e53162008-04-21 06:58:48 -030098
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 Chehabde3fe212007-10-24 09:22:08 -0300106
Mauro Carvalho Chehab43efe702007-11-14 19:30:28 -0300107#define V4L2_STD_SECAM_K3 (0x04000000)
Mauro Carvalho Chehabde3fe212007-10-24 09:22:08 -0300108
109/* Audio types */
110
Mauro Carvalho Chehabef8c1882007-11-16 16:28:21 -0300111#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 Chehabde3fe212007-10-24 09:22:08 -0300118
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 McCrohanf58c91c2013-10-20 21:34:01 -0300122/* To preserve backward compatibility,
Mauro Carvalho Chehabde3fe212007-10-24 09:22:08 -0300123 (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)