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
CommitLineData
8218b0b2
MK
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
c996899d
MK
22#ifndef __TUNER_DRIVER_H__
23#define __TUNER_DRIVER_H__
8218b0b2
MK
24
25#include <linux/videodev2.h>
26#include <linux/i2c.h>
e18f9444 27#include "dvb_frontend.h"
8218b0b2
MK
28
29extern unsigned const int tuner_count;
30
a55db8cd
MK
31struct analog_demod_info {
32 char name[128];
33};
34
1dde7a4f 35struct analog_tuner_ops {
a55db8cd
MK
36
37 struct analog_demod_info info;
38
c7919d52
MK
39 void (*set_params)(struct dvb_frontend *fe,
40 struct analog_parameters *params);
4e9154b8
MK
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);
2be1b48f 47 int (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable);
8218b0b2
MK
48};
49
50struct tuner {
51 /* device */
1cba97d7 52 struct i2c_client *i2c;
159ffe77 53 struct list_head list; /* list of tuners */
8218b0b2
MK
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;
8218b0b2
MK
62 unsigned int audmode;
63 v4l2_std_id std;
64
65 int using_v4l2;
8218b0b2 66
e18f9444
MK
67 struct dvb_frontend fe;
68
8218b0b2
MK
69 /* used by tda9887 */
70 unsigned int tda9887_config;
71
72 unsigned int config;
73 int (*tuner_callback) (void *dev, int command,int arg);
8218b0b2
MK
74};
75
c996899d 76#endif /* __TUNER_DRIVER_H__ */