blob: 74e37d405208030b929219b658122a2050a35e39 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* saa7121.h - saa7121 initializations
2 Copyright (C) 1999 Nathan Laredo (laredo@gnu.org)
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19#ifndef __SAA7121_H__
20#define __SAA7121_H__
21
22#define NTSC_BURST_START 0x19 /* 28 */
23#define NTSC_BURST_END 0x1d /* 29 */
24#define NTSC_CHROMA_PHASE 0x67 /* 5a */
25#define NTSC_GAINU 0x76 /* 5b */
26#define NTSC_GAINV 0xa5 /* 5c */
27#define NTSC_BLACK_LEVEL 0x2a /* 5d */
28#define NTSC_BLANKING_LEVEL 0x2e /* 5e */
29#define NTSC_VBI_BLANKING 0x2e /* 5f */
30#define NTSC_DAC_CONTROL 0x11 /* 61 */
31#define NTSC_BURST_AMP 0x3f /* 62 */
32#define NTSC_SUBC3 0x1f /* 63 */
33#define NTSC_SUBC2 0x7c /* 64 */
34#define NTSC_SUBC1 0xf0 /* 65 */
35#define NTSC_SUBC0 0x21 /* 66 */
36#define NTSC_HTRIG 0x72 /* 6c */
37#define NTSC_VTRIG 0x00 /* 6c */
38#define NTSC_MULTI 0x30 /* 6e */
39#define NTSC_CCTTX 0x11 /* 6f */
40#define NTSC_FIRST_ACTIVE 0x12 /* 7a */
41#define NTSC_LAST_ACTIVE 0x02 /* 7b */
42#define NTSC_MSB_VERTICAL 0x40 /* 7c */
43
44#define PAL_BURST_START 0x21 /* 28 */
45#define PAL_BURST_END 0x1d /* 29 */
46#define PAL_CHROMA_PHASE 0x3f /* 5a */
47#define PAL_GAINU 0x7d /* 5b */
48#define PAL_GAINV 0xaf /* 5c */
49#define PAL_BLACK_LEVEL 0x23 /* 5d */
50#define PAL_BLANKING_LEVEL 0x35 /* 5e */
51#define PAL_VBI_BLANKING 0x35 /* 5f */
52#define PAL_DAC_CONTROL 0x02 /* 61 */
53#define PAL_BURST_AMP 0x2f /* 62 */
54#define PAL_SUBC3 0xcb /* 63 */
55#define PAL_SUBC2 0x8a /* 64 */
56#define PAL_SUBC1 0x09 /* 65 */
57#define PAL_SUBC0 0x2a /* 66 */
58#define PAL_HTRIG 0x86 /* 6c */
59#define PAL_VTRIG 0x04 /* 6d */
60#define PAL_MULTI 0x20 /* 6e */
61#define PAL_CCTTX 0x15 /* 6f */
62#define PAL_FIRST_ACTIVE 0x16 /* 7a */
63#define PAL_LAST_ACTIVE 0x36 /* 7b */
64#define PAL_MSB_VERTICAL 0x40 /* 7c */
65
66/* Initialization Sequence */
67
68static __u8 init7121ntsc[] = {
69 0x26, 0x0, 0x27, 0x0,
70 0x28, NTSC_BURST_START, 0x29, NTSC_BURST_END,
71 0x2a, 0x0, 0x2b, 0x0, 0x2c, 0x0, 0x2d, 0x0,
72 0x2e, 0x0, 0x2f, 0x0, 0x30, 0x0, 0x31, 0x0,
73 0x32, 0x0, 0x33, 0x0, 0x34, 0x0, 0x35, 0x0,
74 0x36, 0x0, 0x37, 0x0, 0x38, 0x0, 0x39, 0x0,
75 0x3a, 0x03, 0x3b, 0x0, 0x3c, 0x0, 0x3d, 0x0,
76 0x3e, 0x0, 0x3f, 0x0, 0x40, 0x0, 0x41, 0x0,
77 0x42, 0x0, 0x43, 0x0, 0x44, 0x0, 0x45, 0x0,
78 0x46, 0x0, 0x47, 0x0, 0x48, 0x0, 0x49, 0x0,
79 0x4a, 0x0, 0x4b, 0x0, 0x4c, 0x0, 0x4d, 0x0,
80 0x4e, 0x0, 0x4f, 0x0, 0x50, 0x0, 0x51, 0x0,
81 0x52, 0x0, 0x53, 0x0, 0x54, 0x0, 0x55, 0x0,
82 0x56, 0x0, 0x57, 0x0, 0x58, 0x0, 0x59, 0x0,
83 0x5a, NTSC_CHROMA_PHASE, 0x5b, NTSC_GAINU,
84 0x5c, NTSC_GAINV, 0x5d, NTSC_BLACK_LEVEL,
85 0x5e, NTSC_BLANKING_LEVEL, 0x5f, NTSC_VBI_BLANKING,
86 0x60, 0x0, 0x61, NTSC_DAC_CONTROL,
87 0x62, NTSC_BURST_AMP, 0x63, NTSC_SUBC3,
88 0x64, NTSC_SUBC2, 0x65, NTSC_SUBC1,
89 0x66, NTSC_SUBC0, 0x67, 0x80, 0x68, 0x80,
90 0x69, 0x80, 0x6a, 0x80, 0x6b, 0x29,
91 0x6c, NTSC_HTRIG, 0x6d, NTSC_VTRIG,
92 0x6e, NTSC_MULTI, 0x6f, NTSC_CCTTX,
93 0x70, 0xc9, 0x71, 0x68, 0x72, 0x60, 0x73, 0x0,
94 0x74, 0x0, 0x75, 0x0, 0x76, 0x0, 0x77, 0x0,
95 0x78, 0x0, 0x79, 0x0, 0x7a, NTSC_FIRST_ACTIVE,
96 0x7b, NTSC_LAST_ACTIVE, 0x7c, NTSC_MSB_VERTICAL,
97 0x7d, 0x0, 0x7e, 0x0, 0x7f, 0x0
98};
99#define INIT7121LEN (sizeof(init7121ntsc)/2)
100
101static __u8 init7121pal[] = {
102 0x26, 0x0, 0x27, 0x0,
103 0x28, PAL_BURST_START, 0x29, PAL_BURST_END,
104 0x2a, 0x0, 0x2b, 0x0, 0x2c, 0x0, 0x2d, 0x0,
105 0x2e, 0x0, 0x2f, 0x0, 0x30, 0x0, 0x31, 0x0,
106 0x32, 0x0, 0x33, 0x0, 0x34, 0x0, 0x35, 0x0,
107 0x36, 0x0, 0x37, 0x0, 0x38, 0x0, 0x39, 0x0,
108 0x3a, 0x03, 0x3b, 0x0, 0x3c, 0x0, 0x3d, 0x0,
109 0x3e, 0x0, 0x3f, 0x0, 0x40, 0x0, 0x41, 0x0,
110 0x42, 0x0, 0x43, 0x0, 0x44, 0x0, 0x45, 0x0,
111 0x46, 0x0, 0x47, 0x0, 0x48, 0x0, 0x49, 0x0,
112 0x4a, 0x0, 0x4b, 0x0, 0x4c, 0x0, 0x4d, 0x0,
113 0x4e, 0x0, 0x4f, 0x0, 0x50, 0x0, 0x51, 0x0,
114 0x52, 0x0, 0x53, 0x0, 0x54, 0x0, 0x55, 0x0,
115 0x56, 0x0, 0x57, 0x0, 0x58, 0x0, 0x59, 0x0,
116 0x5a, PAL_CHROMA_PHASE, 0x5b, PAL_GAINU,
117 0x5c, PAL_GAINV, 0x5d, PAL_BLACK_LEVEL,
118 0x5e, PAL_BLANKING_LEVEL, 0x5f, PAL_VBI_BLANKING,
119 0x60, 0x0, 0x61, PAL_DAC_CONTROL,
120 0x62, PAL_BURST_AMP, 0x63, PAL_SUBC3,
121 0x64, PAL_SUBC2, 0x65, PAL_SUBC1,
122 0x66, PAL_SUBC0, 0x67, 0x80, 0x68, 0x80,
123 0x69, 0x80, 0x6a, 0x80, 0x6b, 0x29,
124 0x6c, PAL_HTRIG, 0x6d, PAL_VTRIG,
125 0x6e, PAL_MULTI, 0x6f, PAL_CCTTX,
126 0x70, 0xc9, 0x71, 0x68, 0x72, 0x60, 0x73, 0x0,
127 0x74, 0x0, 0x75, 0x0, 0x76, 0x0, 0x77, 0x0,
128 0x78, 0x0, 0x79, 0x0, 0x7a, PAL_FIRST_ACTIVE,
129 0x7b, PAL_LAST_ACTIVE, 0x7c, PAL_MSB_VERTICAL,
130 0x7d, 0x0, 0x7e, 0x0, 0x7f, 0x0
131};
132#endif