]> err.no Git - linux-2.6/blob - drivers/media/video/tuner-xc2028.h
V4L/DVB (6675): Allow selecting the proper SCode table for DTV
[linux-2.6] / drivers / media / video / tuner-xc2028.h
1 /* tuner-xc2028
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 #ifndef __TUNER_XC2028_H__
8 #define __TUNER_XC2028_H__
9
10 #include "dvb_frontend.h"
11
12 #define XC2028_DEFAULT_FIRMWARE "xc3028-v27.fw"
13
14 enum xc2028_demod_types
15 {
16         XC3028_FE_DEFAULT = 0,
17         XC3028_FE_LG60,         /* IF = 6.00 MHz */
18         XC3028_FE_ATI638,       /* IF = 6.38 MHz */
19         XC3028_FE_OREN538,      /* IF = 5.38 MHz */
20         XC3028_FE_OREN36,       /* IF = 3.60 MHz */
21         XC3028_FE_TOYOTA388,    /* IF = 3.88 MHz */
22         XC3028_FE_TOYOTA794,    /* IF = 7.94 MHz */
23         XC3028_FE_DIBCOM52,     /* IF = 5.20 MHz */
24         XC3028_FE_ZARLINK456,   /* IF = 4.56 MHz */
25         XC3028_FE_CHINA,        /* IF = 5.20 MHz */
26 };
27
28 struct xc2028_ctrl {
29         char                    *fname;
30         int                     max_len;
31         unsigned int            scode_table;
32         unsigned int            mts   :1;
33         unsigned int            d2633 :1;
34         unsigned int            input1:1;
35         enum xc2028_demod_types demod;
36 };
37
38 struct xc2028_config {
39         struct i2c_adapter *i2c_adap;
40         u8                 i2c_addr;
41         void               *video_dev;
42         struct xc2028_ctrl *ctrl;
43         int                (*callback) (void *dev, int command, int arg);
44 };
45
46 /* xc2028 commands for callback */
47 #define XC2028_TUNER_RESET      0
48 #define XC2028_RESET_CLK        1
49
50 #if defined(CONFIG_TUNER_XC2028) || (defined(CONFIG_TUNER_XC2028_MODULE) && defined(MODULE))
51 void *xc2028_attach(struct dvb_frontend *fe, struct xc2028_config *cfg);
52 #else
53 void *xc2028_attach(struct dvb_frontend *fe,
54                                 struct xc2028_config *cfg)
55 {
56         printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
57                __FUNCTION__);
58         return -EINVAL;
59 }
60 #endif
61
62 #endif /* __TUNER_XC2028_H__ */