diff options
Diffstat (limited to 'include/media/tuner.h')
-rw-r--r-- | include/media/tuner.h | 54 |
1 files changed, 42 insertions, 12 deletions
diff --git a/include/media/tuner.h b/include/media/tuner.h index 156a9c51ffec..eeaa15ddee85 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -1,5 +1,6 @@ | |||
1 | 1 | ||
2 | /* | 2 | /* $Id: tuner.h,v 1.45 2005/07/28 18:41:21 mchehab Exp $ |
3 | * | ||
3 | tuner.h - definition for different tuners | 4 | tuner.h - definition for different tuners |
4 | 5 | ||
5 | Copyright (C) 1997 Markus Schroeder (schroedm@uni-duesseldorf.de) | 6 | Copyright (C) 1997 Markus Schroeder (schroedm@uni-duesseldorf.de) |
@@ -23,7 +24,9 @@ | |||
23 | #ifndef _TUNER_H | 24 | #ifndef _TUNER_H |
24 | #define _TUNER_H | 25 | #define _TUNER_H |
25 | 26 | ||
26 | #include "id.h" | 27 | #include <linux/videodev2.h> |
28 | |||
29 | #define ADDR_UNSET (255) | ||
27 | 30 | ||
28 | #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ | 31 | #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ |
29 | #define TUNER_PHILIPS_PAL_I 1 | 32 | #define TUNER_PHILIPS_PAL_I 1 |
@@ -86,7 +89,7 @@ | |||
86 | #define TUNER_LG_NTSC_TAPE 47 | 89 | #define TUNER_LG_NTSC_TAPE 47 |
87 | 90 | ||
88 | #define TUNER_TNF_8831BGFF 48 | 91 | #define TUNER_TNF_8831BGFF 48 |
89 | #define TUNER_MICROTUNE_4042FI5 49 /* FusionHDTV 3 Gold - 4042 FI5 (3X 8147) */ | 92 | #define TUNER_MICROTUNE_4042FI5 49 /* DViCO FusionHDTV 3 Gold-Q - 4042 FI5 (3X 8147) */ |
90 | #define TUNER_TCL_2002N 50 | 93 | #define TUNER_TCL_2002N 50 |
91 | #define TUNER_PHILIPS_FM1256_IH3 51 | 94 | #define TUNER_PHILIPS_FM1256_IH3 51 |
92 | 95 | ||
@@ -96,7 +99,17 @@ | |||
96 | #define TUNER_LG_PAL_TAPE 55 /* Hauppauge PVR-150 PAL */ | 99 | #define TUNER_LG_PAL_TAPE 55 /* Hauppauge PVR-150 PAL */ |
97 | 100 | ||
98 | #define TUNER_PHILIPS_FQ1216AME_MK4 56 /* Hauppauge PVR-150 PAL */ | 101 | #define TUNER_PHILIPS_FQ1216AME_MK4 56 /* Hauppauge PVR-150 PAL */ |
99 | #define TUNER_PHILIPS_FQ1236A_MK4 57 /* Hauppauge PVR-500MCE NTSC */ | 102 | #define TUNER_PHILIPS_FQ1236A_MK4 57 /* Hauppauge PVR-500MCE NTSC */ |
103 | |||
104 | #define TUNER_YMEC_TVF_8531MF 58 | ||
105 | #define TUNER_YMEC_TVF_5533MF 59 /* Pixelview Pro Ultra NTSC */ | ||
106 | #define TUNER_THOMSON_DTT7611 60 /* DViCO FusionHDTV 3 Gold-T */ | ||
107 | #define TUNER_TENA_9533_DI 61 | ||
108 | |||
109 | #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ | ||
110 | #define TUNER_PHILIPS_FMD1216ME_MK3 63 | ||
111 | #define TUNER_LG_TDVS_H062F 64 /* DViCO FusionHDTV 5 */ | ||
112 | #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ | ||
100 | 113 | ||
101 | #define NOTUNER 0 | 114 | #define NOTUNER 0 |
102 | #define PAL 1 /* PAL_BG */ | 115 | #define PAL 1 /* PAL_BG */ |
@@ -104,6 +117,7 @@ | |||
104 | #define NTSC 3 | 117 | #define NTSC 3 |
105 | #define SECAM 4 | 118 | #define SECAM 4 |
106 | #define ATSC 5 | 119 | #define ATSC 5 |
120 | #define RADIO 6 | ||
107 | 121 | ||
108 | #define NoTuner 0 | 122 | #define NoTuner 0 |
109 | #define Philips 1 | 123 | #define Philips 1 |
@@ -119,10 +133,9 @@ | |||
119 | #define TCL 11 | 133 | #define TCL 11 |
120 | #define THOMSON 12 | 134 | #define THOMSON 12 |
121 | 135 | ||
122 | #define TUNER_SET_TYPE _IOW('t',1,int) /* set tuner type */ | 136 | #define TUNER_SET_TYPE_ADDR _IOW('T',3,int) |
123 | #define TUNER_SET_TVFREQ _IOW('t',2,int) /* set tv freq */ | 137 | #define TDA9887_SET_CONFIG _IOW('t',5,int) |
124 | 138 | ||
125 | #define TDA9887_SET_CONFIG _IOW('t',5,int) | ||
126 | /* tv card specific */ | 139 | /* tv card specific */ |
127 | # define TDA9887_PRESENT (1<<0) | 140 | # define TDA9887_PRESENT (1<<0) |
128 | # define TDA9887_PORT1_INACTIVE (1<<1) | 141 | # define TDA9887_PORT1_INACTIVE (1<<1) |
@@ -143,19 +156,34 @@ | |||
143 | #define I2C_ADDR_TDA8290 0x4b | 156 | #define I2C_ADDR_TDA8290 0x4b |
144 | #define I2C_ADDR_TDA8275 0x61 | 157 | #define I2C_ADDR_TDA8275 0x61 |
145 | 158 | ||
159 | enum tuner_mode { | ||
160 | T_UNINITIALIZED = 0, | ||
161 | T_RADIO = 1 << V4L2_TUNER_RADIO, | ||
162 | T_ANALOG_TV = 1 << V4L2_TUNER_ANALOG_TV, | ||
163 | T_DIGITAL_TV = 1 << V4L2_TUNER_DIGITAL_TV, | ||
164 | T_STANDBY = 1 << 31 | ||
165 | }; | ||
166 | |||
167 | struct tuner_setup { | ||
168 | unsigned short addr; | ||
169 | unsigned int type; | ||
170 | unsigned int mode_mask; | ||
171 | }; | ||
172 | |||
146 | struct tuner { | 173 | struct tuner { |
147 | /* device */ | 174 | /* device */ |
148 | struct i2c_client i2c; | 175 | struct i2c_client i2c; |
149 | 176 | ||
150 | /* state + config */ | ||
151 | unsigned int initialized; | ||
152 | unsigned int type; /* chip type */ | 177 | unsigned int type; /* chip type */ |
178 | |||
179 | unsigned int mode; | ||
180 | unsigned int mode_mask; /* Combination of allowable modes */ | ||
181 | |||
153 | unsigned int freq; /* keep track of the current settings */ | 182 | unsigned int freq; /* keep track of the current settings */ |
183 | unsigned int audmode; | ||
154 | v4l2_std_id std; | 184 | v4l2_std_id std; |
155 | int using_v4l2; | ||
156 | 185 | ||
157 | enum v4l2_tuner_type mode; | 186 | int using_v4l2; |
158 | unsigned int input; | ||
159 | 187 | ||
160 | /* used by MT2032 */ | 188 | /* used by MT2032 */ |
161 | unsigned int xogc; | 189 | unsigned int xogc; |
@@ -177,7 +205,9 @@ extern unsigned const int tuner_count; | |||
177 | 205 | ||
178 | extern int microtune_init(struct i2c_client *c); | 206 | extern int microtune_init(struct i2c_client *c); |
179 | extern int tda8290_init(struct i2c_client *c); | 207 | extern int tda8290_init(struct i2c_client *c); |
208 | extern int tea5767_tuner_init(struct i2c_client *c); | ||
180 | extern int default_tuner_init(struct i2c_client *c); | 209 | extern int default_tuner_init(struct i2c_client *c); |
210 | extern int tea5767_autodetection(struct i2c_client *c); | ||
181 | 211 | ||
182 | #define tuner_warn(fmt, arg...) \ | 212 | #define tuner_warn(fmt, arg...) \ |
183 | dev_printk(KERN_WARNING , &t->i2c.dev , fmt , ## arg) | 213 | dev_printk(KERN_WARNING , &t->i2c.dev , fmt , ## arg) |