diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 66 |
1 files changed, 64 insertions, 2 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 1a259c3966cd..690477a67917 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: cx88-dvb.c,v 1.33 2005/06/12 04:19:19 mchehab Exp $ | 2 | * $Id: cx88-dvb.c,v 1.39 2005/07/02 20:00:46 mkrufky Exp $ |
3 | * | 3 | * |
4 | * device driver for Conexant 2388x based TV cards | 4 | * device driver for Conexant 2388x based TV cards |
5 | * MPEG Transport Stream (DVB) routines | 5 | * MPEG Transport Stream (DVB) routines |
@@ -30,9 +30,10 @@ | |||
30 | #include <linux/file.h> | 30 | #include <linux/file.h> |
31 | #include <linux/suspend.h> | 31 | #include <linux/suspend.h> |
32 | 32 | ||
33 | /* those two frontends need merging via linuxtv cvs ... */ | 33 | /* these three frontends need merging via linuxtv cvs ... */ |
34 | #define HAVE_CX22702 1 | 34 | #define HAVE_CX22702 1 |
35 | #define HAVE_OR51132 1 | 35 | #define HAVE_OR51132 1 |
36 | #define HAVE_LGDT3302 1 | ||
36 | 37 | ||
37 | #include "cx88.h" | 38 | #include "cx88.h" |
38 | #include "dvb-pll.h" | 39 | #include "dvb-pll.h" |
@@ -44,6 +45,9 @@ | |||
44 | #if HAVE_OR51132 | 45 | #if HAVE_OR51132 |
45 | # include "or51132.h" | 46 | # include "or51132.h" |
46 | #endif | 47 | #endif |
48 | #if HAVE_LGDT3302 | ||
49 | # include "lgdt3302.h" | ||
50 | #endif | ||
47 | 51 | ||
48 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); | 52 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); |
49 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); | 53 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); |
@@ -199,6 +203,32 @@ static struct or51132_config pchdtv_hd3000 = { | |||
199 | }; | 203 | }; |
200 | #endif | 204 | #endif |
201 | 205 | ||
206 | #if HAVE_LGDT3302 | ||
207 | static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured) | ||
208 | { | ||
209 | struct cx8802_dev *dev= fe->dvb->priv; | ||
210 | if (is_punctured) | ||
211 | dev->ts_gen_cntrl |= 0x04; | ||
212 | else | ||
213 | dev->ts_gen_cntrl &= ~0x04; | ||
214 | return 0; | ||
215 | } | ||
216 | |||
217 | static struct lgdt3302_config fusionhdtv_3_gold_q = { | ||
218 | .demod_address = 0x0e, | ||
219 | .pll_address = 0x61, | ||
220 | .pll_desc = &dvb_pll_microtune_4042, | ||
221 | .set_ts_params = lgdt3302_set_ts_param, | ||
222 | }; | ||
223 | |||
224 | static struct lgdt3302_config fusionhdtv_3_gold_t = { | ||
225 | .demod_address = 0x0e, | ||
226 | .pll_address = 0x61, | ||
227 | .pll_desc = &dvb_pll_thomson_dtt7611, | ||
228 | .set_ts_params = lgdt3302_set_ts_param, | ||
229 | }; | ||
230 | #endif | ||
231 | |||
202 | static int dvb_register(struct cx8802_dev *dev) | 232 | static int dvb_register(struct cx8802_dev *dev) |
203 | { | 233 | { |
204 | /* init struct videobuf_dvb */ | 234 | /* init struct videobuf_dvb */ |
@@ -212,6 +242,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
212 | dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config, | 242 | dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config, |
213 | &dev->core->i2c_adap); | 243 | &dev->core->i2c_adap); |
214 | break; | 244 | break; |
245 | case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: | ||
215 | case CX88_BOARD_CONEXANT_DVB_T1: | 246 | case CX88_BOARD_CONEXANT_DVB_T1: |
216 | dev->dvb.frontend = cx22702_attach(&connexant_refboard_config, | 247 | dev->dvb.frontend = cx22702_attach(&connexant_refboard_config, |
217 | &dev->core->i2c_adap); | 248 | &dev->core->i2c_adap); |
@@ -231,6 +262,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
231 | break; | 262 | break; |
232 | case CX88_BOARD_KWORLD_DVB_T: | 263 | case CX88_BOARD_KWORLD_DVB_T: |
233 | case CX88_BOARD_DNTV_LIVE_DVB_T: | 264 | case CX88_BOARD_DNTV_LIVE_DVB_T: |
265 | case CX88_BOARD_ADSTECH_DVB_T_PCI: | ||
234 | dev->core->pll_addr = 0x61; | 266 | dev->core->pll_addr = 0x61; |
235 | dev->core->pll_desc = &dvb_pll_unknown_1; | 267 | dev->core->pll_desc = &dvb_pll_unknown_1; |
236 | dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config, | 268 | dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config, |
@@ -242,6 +274,36 @@ static int dvb_register(struct cx8802_dev *dev) | |||
242 | &dev->core->i2c_adap); | 274 | &dev->core->i2c_adap); |
243 | break; | 275 | break; |
244 | #endif | 276 | #endif |
277 | #if HAVE_LGDT3302 | ||
278 | case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q: | ||
279 | dev->ts_gen_cntrl = 0x08; | ||
280 | { | ||
281 | /* Do a hardware reset of chip before using it. */ | ||
282 | struct cx88_core *core = dev->core; | ||
283 | |||
284 | cx_clear(MO_GP0_IO, 1); | ||
285 | mdelay(100); | ||
286 | cx_set(MO_GP0_IO, 9); // ANT connector too FIXME | ||
287 | mdelay(200); | ||
288 | dev->dvb.frontend = lgdt3302_attach(&fusionhdtv_3_gold_q, | ||
289 | &dev->core->i2c_adap); | ||
290 | } | ||
291 | break; | ||
292 | case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T: | ||
293 | dev->ts_gen_cntrl = 0x08; | ||
294 | { | ||
295 | /* Do a hardware reset of chip before using it. */ | ||
296 | struct cx88_core *core = dev->core; | ||
297 | |||
298 | cx_clear(MO_GP0_IO, 1); | ||
299 | mdelay(100); | ||
300 | cx_set(MO_GP0_IO, 9); /* ANT connector too FIXME */ | ||
301 | mdelay(200); | ||
302 | dev->dvb.frontend = lgdt3302_attach(&fusionhdtv_3_gold_t, | ||
303 | &dev->core->i2c_adap); | ||
304 | } | ||
305 | break; | ||
306 | #endif | ||
245 | default: | 307 | default: |
246 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", | 308 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", |
247 | dev->core->name); | 309 | dev->core->name); |