1 | #ifndef __BT829_H__
|
---|
2 | #define __BT829_H__
|
---|
3 |
|
---|
4 | #include "xf86i2c.h"
|
---|
5 |
|
---|
6 | typedef struct {
|
---|
7 | int tunertype; /* Must be set before init */
|
---|
8 | /* Private variables */
|
---|
9 | I2CDevRec d;
|
---|
10 |
|
---|
11 | CARD8 brightness;
|
---|
12 | CARD8 ccmode;
|
---|
13 | CARD8 code;
|
---|
14 | CARD16 contrast;
|
---|
15 | CARD8 format;
|
---|
16 | int height;
|
---|
17 | CARD8 hue;
|
---|
18 | CARD8 len;
|
---|
19 | CARD8 mux;
|
---|
20 | CARD8 out_en;
|
---|
21 | CARD8 p_io;
|
---|
22 | CARD16 sat_u;
|
---|
23 | CARD16 sat_v;
|
---|
24 | CARD8 vbien;
|
---|
25 | CARD8 vbifmt;
|
---|
26 | int width;
|
---|
27 |
|
---|
28 | CARD16 hdelay;
|
---|
29 | CARD16 hscale;
|
---|
30 | CARD16 vactive;
|
---|
31 | CARD16 vdelay;
|
---|
32 | CARD16 vscale;
|
---|
33 |
|
---|
34 | CARD16 htotal;
|
---|
35 | CARD8 id;
|
---|
36 | CARD8 svideo_mux;
|
---|
37 | } BT829Rec, *BT829Ptr;
|
---|
38 |
|
---|
39 | #define xf86_bt829_Detect bt829_Detect
|
---|
40 | extern _X_EXPORT BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr);
|
---|
41 |
|
---|
42 | /* ATI card specific initialization */
|
---|
43 | #define BT829_ATI_ADDR_1 0x8A
|
---|
44 | #define BT829_ATI_ADDR_2 0x88
|
---|
45 |
|
---|
46 | #define xf86_bt829_ATIInit bt829_ATIInit
|
---|
47 | extern _X_EXPORT int bt829_ATIInit(BT829Ptr bt);
|
---|
48 |
|
---|
49 | #define BT829_NTSC 1 /* NTSC-M */
|
---|
50 | #define BT829_NTSC_JAPAN 2 /* NTSC-Japan */
|
---|
51 | #define BT829_PAL 3 /* PAL-B,D,G,H,I */
|
---|
52 | #define BT829_PAL_M 4 /* PAL-M */
|
---|
53 | #define BT829_PAL_N 5 /* PAL-N */
|
---|
54 | #define BT829_SECAM 6 /* SECAM */
|
---|
55 | #define BT829_PAL_N_COMB 7 /* PAL-N combination */
|
---|
56 |
|
---|
57 | #define xf86_bt829_SetFormat bt829_SetFormat
|
---|
58 | extern _X_EXPORT int bt829_SetFormat(BT829Ptr bt, CARD8 format);
|
---|
59 |
|
---|
60 | #define BT829_MUX2 1 /* ATI -> composite video */
|
---|
61 | #define BT829_MUX0 2 /* ATI -> tv tuner */
|
---|
62 | #define BT829_MUX1 3 /* ATI -> s-video */
|
---|
63 |
|
---|
64 | #define xf86_bt829_SetMux bt829_SetMux
|
---|
65 | extern _X_EXPORT int bt829_SetMux(BT829Ptr bt, CARD8 mux);
|
---|
66 |
|
---|
67 | #define xf86_bt829_SetCaptSize bt829_SetCaptSize
|
---|
68 | extern _X_EXPORT int bt829_SetCaptSize(BT829Ptr bt, int width, int height);
|
---|
69 |
|
---|
70 | #define xf86_bt829_SetBrightness bt829_SetBrightness
|
---|
71 | extern _X_EXPORT void bt829_SetBrightness(BT829Ptr bt, int brightness);
|
---|
72 |
|
---|
73 | #define xf86_bt829_SetContrast bt829_SetContrast
|
---|
74 | extern _X_EXPORT void bt829_SetContrast(BT829Ptr bt, int contrast);
|
---|
75 |
|
---|
76 | #define xf86_bt829_SetSaturation bt829_SetSaturation
|
---|
77 | extern _X_EXPORT void bt829_SetSaturation(BT829Ptr bt, int saturation);
|
---|
78 |
|
---|
79 | #define xf86_bt829_SetTint bt829_SetTint
|
---|
80 | extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */
|
---|
81 |
|
---|
82 | #define xf86_bt829_SetOUT_EN bt829_SetOUT_EN
|
---|
83 | extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en); /* VPOLE register */
|
---|
84 |
|
---|
85 | #define xf86_bt829_SetP_IO bt829_SetP_IO
|
---|
86 | extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */
|
---|
87 |
|
---|
88 | extern _X_EXPORT int bt829_SetCC(BT829Ptr bt);
|
---|
89 |
|
---|
90 | #define BT829SymbolsList \
|
---|
91 | "bt829_Detect", \
|
---|
92 | "bt829_ATIInit", \
|
---|
93 | "bt829_SetFormat", \
|
---|
94 | "bt829_SetMux", \
|
---|
95 | "bt829_SetBrightness", \
|
---|
96 | "bt829_SetContrast", \
|
---|
97 | "bt829_SetSaturation", \
|
---|
98 | "bt829_SetTint", \
|
---|
99 | "bt829_SetCaptSize", \
|
---|
100 | "bt829_SetOUT_EN", \
|
---|
101 | "bt829_SetP_IO"
|
---|
102 |
|
---|
103 | #endif
|
---|