3 * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
5 * SPDX-License-Identifier: GPL-2.0+
8 #ifndef _VIDEO_AD7176_H_
9 #define _VIDEO_AD7176_H_
11 #define VIDEO_ENCODER_NAME "Analog Devices AD7176"
13 #define VIDEO_ENCODER_I2C_RATE 100000 /* Max rate is 100 kHz */
14 #define VIDEO_ENCODER_CB_Y_CR_Y /* Use CB Y CR Y format... */
16 #define VIDEO_MODE_YUYV /* The only mode supported by this encoder */
18 #define VIDEO_MODE_BPP 16
21 #define VIDEO_ACTIVE_COLS 720
22 #define VIDEO_ACTIVE_ROWS 576
23 #define VIDEO_VISIBLE_COLS 640
24 #define VIDEO_VISIBLE_ROWS 480
27 #ifdef VIDEO_MODE_NTSC
28 #define VIDEO_ACTIVE_COLS 720
29 #define VIDEO_ACTIVE_ROWS 525
30 #define VIDEO_VISIBLE_COLS 640
31 #define VIDEO_VISIBLE_ROWS 400
34 static unsigned char video_encoder_data[] = {
35 #ifdef VIDEO_MODE_NTSC
36 0x04, /* Mode Register 0 */
37 #ifdef VIDEO_DEBUG_COLORBARS
40 0x02, /* Mode Register 1 */
41 #endif /* VIDEO_DEBUG_COLORBARS */
42 0x16, /* Subcarrier Freq 0 */
43 0x7c, /* Subcarrier Freq 1 */
44 0xf0, /* Subcarrier Freq 2 */
45 0x21, /* Subcarrier Freq 3 */
46 0x00, /* Subcarrier phase */
47 0x02, /* Timing Register 0 */
48 0x00, /* Extended Captioning 0 */
49 0x00, /* Extended Captioning 1 */
50 0x00, /* Closed Captioning 0 */
51 0x00, /* Closed Captioning 1 */
52 0x00, /* Timing Register 1 */
53 0x08, /* Mode Register 2 */
54 0x00, /* Pedestal Register 0 */
55 0x00, /* Pedestal Register 1 */
56 0x00, /* Pedestal Register 2 */
57 0x00, /* Pedestal Register 3 */
58 0x00 /* Mode Register 3 */
60 #endif /* VIDEO_MODE_NTSC */
63 0x05, /* Mode Register 0 */
64 #ifdef VIDEO_DEBUG_COLORBARS
67 0x02, /* Mode Register 1 (2) */
68 #endif /* VIDEO_DEBUG_COLORBARS */
69 0xcb, /* Subcarrier Freq 0 */
70 0x8a, /* Subcarrier Freq 1 */
71 0x09, /* Subcarrier Freq 2 */
72 0x2a, /* Subcarrier Freq 3 */
73 0x00, /* Subcarrier phase */
74 0x0a, /* Timing Register 0 (a) */
75 0x00, /* Extended Captioning 0 */
76 0x00, /* Extended Captioning 1 */
77 0x00, /* Closed Captioning 0 */
78 0x00, /* Closed Captioning 1 */
79 0x00, /* Timing Register 1 */
80 0x08, /* Mode Register 2 (8) */
81 0x00, /* Pedestal Register 0 */
82 0x00, /* Pedestal Register 1 */
83 0x00, /* Pedestal Register 2 */
84 0x00, /* Pedestal Register 3 */
85 0x00 /* Mode Register 3 */
86 #endif /* VIDEO_MODE_PAL */
89 #endif /* _VIDEO_AD7176_H_ */