aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/tuner.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/tuner.h')
-rw-r--r--include/media/tuner.h71
1 files changed, 1 insertions, 70 deletions
diff --git a/include/media/tuner.h b/include/media/tuner.h
index 6dcf3c45707d..160381c72e4b 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -23,8 +23,6 @@
23#define _TUNER_H 23#define _TUNER_H
24 24
25#include <linux/videodev2.h> 25#include <linux/videodev2.h>
26#include <linux/i2c.h>
27#include <media/tuner-types.h>
28 26
29extern int tuner_debug; 27extern int tuner_debug;
30 28
@@ -124,6 +122,7 @@ extern int tuner_debug;
124#define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ 122#define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */
125#define TUNER_SAMSUNG_TCPG_6121P30A 73 /* Hauppauge PVR-500 PAL */ 123#define TUNER_SAMSUNG_TCPG_6121P30A 73 /* Hauppauge PVR-500 PAL */
126#define TUNER_TDA9887 74 /* This tuner should be used only internally */ 124#define TUNER_TDA9887 74 /* This tuner should be used only internally */
125#define TUNER_TEA5761 75 /* Only FM Radio Tuner */
127 126
128/* tv card specific */ 127/* tv card specific */
129#define TDA9887_PRESENT (1<<0) 128#define TDA9887_PRESENT (1<<0)
@@ -182,74 +181,6 @@ struct tuner_setup {
182 int (*tuner_callback) (void *dev, int command,int arg); 181 int (*tuner_callback) (void *dev, int command,int arg);
183}; 182};
184 183
185struct tuner {
186 /* device */
187 struct i2c_client i2c;
188
189 unsigned int type; /* chip type */
190
191 unsigned int mode;
192 unsigned int mode_mask; /* Combination of allowable modes */
193
194 unsigned int tv_freq; /* keep track of the current settings */
195 unsigned int radio_freq;
196 u16 last_div;
197 unsigned int audmode;
198 v4l2_std_id std;
199
200 int using_v4l2;
201
202 /* used by tda9887 */
203 unsigned int tda9887_config;
204 unsigned char tda9887_data[4];
205
206 /* used by MT2032 */
207 unsigned int xogc;
208 unsigned int radio_if2;
209
210 /* used by tda8290 */
211 unsigned char tda8290_easy_mode;
212 unsigned char tda827x_lpsel;
213 unsigned char tda827x_addr;
214 unsigned char tda827x_ver;
215 unsigned int sgIF;
216
217 unsigned int config;
218 int (*tuner_callback) (void *dev, int command,int arg);
219
220 /* function ptrs */
221 void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);
222 void (*set_radio_freq)(struct i2c_client *c, unsigned int freq);
223 int (*has_signal)(struct i2c_client *c);
224 int (*is_stereo)(struct i2c_client *c);
225 int (*get_afc)(struct i2c_client *c);
226 void (*tuner_status)(struct i2c_client *c);
227 void (*standby)(struct i2c_client *c);
228};
229
230extern unsigned const int tuner_count;
231
232extern int microtune_init(struct i2c_client *c);
233extern int xc3028_init(struct i2c_client *c);
234extern int tda8290_init(struct i2c_client *c);
235extern int tda8290_probe(struct i2c_client *c);
236extern int tea5767_tuner_init(struct i2c_client *c);
237extern int default_tuner_init(struct i2c_client *c);
238extern int tea5767_autodetection(struct i2c_client *c);
239extern int tda9887_tuner_init(struct i2c_client *c);
240
241#define tuner_warn(fmt, arg...) do {\
242 printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \
243 i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0)
244#define tuner_info(fmt, arg...) do {\
245 printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \
246 i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0)
247#define tuner_dbg(fmt, arg...) do {\
248 extern int tuner_debug; \
249 if (tuner_debug) \
250 printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \
251 i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0)
252
253#endif /* __KERNEL__ */ 184#endif /* __KERNEL__ */
254 185
255#endif /* _TUNER_H */ 186#endif /* _TUNER_H */