V4L/DVB (6786): tuner: add struct analog_demod_info to struct analog_tuner_ops
[linux-2.6-block.git] / drivers / media / video / tuner-driver.h
1 /*
2     tuner-driver.h - interface for different tuners
3
4     Copyright (C) 1997 Markus Schroeder (schroedm@uni-duesseldorf.de)
5     minor modifications by Ralph Metzler (rjkm@thp.uni-koeln.de)
6
7     This program is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by
9     the Free Software Foundation; either version 2 of the License, or
10     (at your option) any later version.
11
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.
16
17     You should have received a copy of the GNU General Public License
18     along with this program; if not, write to the Free Software
19     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21
22 #ifndef __TUNER_DRIVER_H__
23 #define __TUNER_DRIVER_H__
24
25 #include <linux/videodev2.h>
26 #include <linux/i2c.h>
27 #include "dvb_frontend.h"
28
29 extern unsigned const int tuner_count;
30
31 struct analog_demod_info {
32         char name[128];
33 };
34
35 struct analog_tuner_ops {
36
37         struct analog_demod_info info;
38
39         void (*set_params)(struct dvb_frontend *fe,
40                            struct analog_parameters *params);
41         int  (*has_signal)(struct dvb_frontend *fe);
42         int  (*is_stereo)(struct dvb_frontend *fe);
43         int  (*get_afc)(struct dvb_frontend *fe);
44         void (*tuner_status)(struct dvb_frontend *fe);
45         void (*standby)(struct dvb_frontend *fe);
46         void (*release)(struct dvb_frontend *fe);
47         int  (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable);
48 };
49
50 struct tuner {
51         /* device */
52         struct i2c_client *i2c;
53         struct list_head list;  /* list of tuners */
54
55         unsigned int type;      /* chip type */
56
57         unsigned int mode;
58         unsigned int mode_mask; /* Combination of allowable modes */
59
60         unsigned int tv_freq;   /* keep track of the current settings */
61         unsigned int radio_freq;
62         unsigned int audmode;
63         v4l2_std_id  std;
64
65         int          using_v4l2;
66
67         struct dvb_frontend fe;
68
69         /* used by tda9887 */
70         unsigned int       tda9887_config;
71
72         unsigned int config;
73         int (*tuner_callback) (void *dev, int command,int arg);
74 };
75
76 #endif /* __TUNER_DRIVER_H__ */