diff options
author | Steven Toth <stoth@hauppauge.com> | 2008-08-04 20:39:53 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:36:49 -0400 |
commit | aef2d186e381816733fa15d67ad63bd99254cb9e (patch) | |
tree | 31f02a3b03a4aeb17f6e896cb094887d1f613a99 /drivers/media | |
parent | 90a71b1c1ab003dd4524afca44c2ad2519f4420c (diff) |
V4L/DVB (8644): Add support for DViCO FusionHDTV DVB-T Dual Express
Add support for the DViCO FusionHDTV DVB-T Dual Express card, based on
work by Chris Pascoe and Stephen Backway.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 24 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 34 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885.h | 1 |
3 files changed, 59 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 93ad7f8ce203..7caa2465e7fb 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -149,6 +149,11 @@ struct cx23885_board cx23885_boards[] = { | |||
149 | .portb = CX23885_MPEG_DVB, | 149 | .portb = CX23885_MPEG_DVB, |
150 | .portc = CX23885_MPEG_DVB, | 150 | .portc = CX23885_MPEG_DVB, |
151 | }, | 151 | }, |
152 | [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP] = { | ||
153 | .name = "DViCO FusionHDTV DVB-T Dual Express", | ||
154 | .portb = CX23885_MPEG_DVB, | ||
155 | .portc = CX23885_MPEG_DVB, | ||
156 | }, | ||
152 | }; | 157 | }; |
153 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); | 158 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); |
154 | 159 | ||
@@ -220,6 +225,10 @@ struct cx23885_subid cx23885_subids[] = { | |||
220 | .subvendor = 0x18ac, | 225 | .subvendor = 0x18ac, |
221 | .subdevice = 0xd618, | 226 | .subdevice = 0xd618, |
222 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP, | 227 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP, |
228 | },{ | ||
229 | .subvendor = 0x18ac, | ||
230 | .subdevice = 0xdb78, | ||
231 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP, | ||
223 | }, | 232 | }, |
224 | }; | 233 | }; |
225 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); | 234 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); |
@@ -340,6 +349,7 @@ static int cx23885_tuner_callback(struct cx23885_dev *dev, int port, | |||
340 | bitmask = 0x04; | 349 | bitmask = 0x04; |
341 | break; | 350 | break; |
342 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: | 351 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: |
352 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | ||
343 | if (command == 0) { | 353 | if (command == 0) { |
344 | 354 | ||
345 | /* Two identical tuners on two different i2c buses, | 355 | /* Two identical tuners on two different i2c buses, |
@@ -483,6 +493,19 @@ void cx23885_gpio_setup(struct cx23885_dev *dev) | |||
483 | mdelay(20); | 493 | mdelay(20); |
484 | cx_set(GP0_IO, 0x000f000f); | 494 | cx_set(GP0_IO, 0x000f000f); |
485 | break; | 495 | break; |
496 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | ||
497 | /* GPIO-0 portb xc3028 reset */ | ||
498 | /* GPIO-1 portb zl10353 reset */ | ||
499 | /* GPIO-2 portc xc3028 reset */ | ||
500 | /* GPIO-3 portc zl10353 reset */ | ||
501 | |||
502 | /* Put the parts into reset and back */ | ||
503 | cx_set(GP0_IO, 0x000f0000); | ||
504 | mdelay(20); | ||
505 | cx_clear(GP0_IO, 0x0000000f); | ||
506 | mdelay(20); | ||
507 | cx_set(GP0_IO, 0x000f000f); | ||
508 | break; | ||
486 | } | 509 | } |
487 | } | 510 | } |
488 | 511 | ||
@@ -534,6 +557,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
534 | 557 | ||
535 | switch (dev->board) { | 558 | switch (dev->board) { |
536 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: | 559 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: |
560 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | ||
537 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ | 561 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
538 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ | 562 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
539 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; | 563 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index 45670051e7d5..dbbbf5b0d2e1 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include "tuner-simple.h" | 42 | #include "tuner-simple.h" |
43 | #include "dib7000p.h" | 43 | #include "dib7000p.h" |
44 | #include "dibx000_common.h" | 44 | #include "dibx000_common.h" |
45 | #include "zl10353.h" | ||
45 | 46 | ||
46 | static unsigned int debug; | 47 | static unsigned int debug; |
47 | 48 | ||
@@ -303,6 +304,12 @@ static struct dib7000p_config hauppauge_hvr1400_dib7000_config = { | |||
303 | .output_mode = OUTMODE_MPEG2_SERIAL, | 304 | .output_mode = OUTMODE_MPEG2_SERIAL, |
304 | }; | 305 | }; |
305 | 306 | ||
307 | static struct zl10353_config dvico_fusionhdtv_xc3028 = { | ||
308 | .demod_address = 0x0f, | ||
309 | .if2 = 45600, | ||
310 | .no_tuner = 1, | ||
311 | }; | ||
312 | |||
306 | static int dvb_register(struct cx23885_tsport *port) | 313 | static int dvb_register(struct cx23885_tsport *port) |
307 | { | 314 | { |
308 | struct cx23885_dev *dev = port->dev; | 315 | struct cx23885_dev *dev = port->dev; |
@@ -465,6 +472,33 @@ static int dvb_register(struct cx23885_tsport *port) | |||
465 | &i2c_bus->i2c_adap, | 472 | &i2c_bus->i2c_adap, |
466 | &dvico_xc5000_tunerconfig, i2c_bus); | 473 | &dvico_xc5000_tunerconfig, i2c_bus); |
467 | break; | 474 | break; |
475 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: { | ||
476 | i2c_bus = &dev->i2c_bus[port->nr - 1]; | ||
477 | |||
478 | port->dvb.frontend = dvb_attach(zl10353_attach, | ||
479 | &dvico_fusionhdtv_xc3028, | ||
480 | &i2c_bus->i2c_adap); | ||
481 | if (port->dvb.frontend != NULL) { | ||
482 | struct dvb_frontend *fe; | ||
483 | struct xc2028_config cfg = { | ||
484 | .i2c_adap = &i2c_bus->i2c_adap, | ||
485 | .i2c_addr = 0x61, | ||
486 | .video_dev = port, | ||
487 | .callback = cx23885_xc3028_tuner_callback, | ||
488 | }; | ||
489 | static struct xc2028_ctrl ctl = { | ||
490 | .fname = "xc3028-v27.fw", | ||
491 | .max_len = 64, | ||
492 | .demod = XC3028_FE_ZARLINK456, | ||
493 | }; | ||
494 | |||
495 | fe = dvb_attach(xc2028_attach, port->dvb.frontend, | ||
496 | &cfg); | ||
497 | if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) | ||
498 | fe->ops.tuner_ops.set_config(fe, &ctl); | ||
499 | } | ||
500 | break; | ||
501 | } | ||
468 | default: | 502 | default: |
469 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", | 503 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", |
470 | dev->name); | 504 | dev->name); |
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index 64827fb669a2..08b4c1390e16 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h | |||
@@ -64,6 +64,7 @@ | |||
64 | #define CX23885_BOARD_HAUPPAUGE_HVR1700 8 | 64 | #define CX23885_BOARD_HAUPPAUGE_HVR1700 8 |
65 | #define CX23885_BOARD_HAUPPAUGE_HVR1400 9 | 65 | #define CX23885_BOARD_HAUPPAUGE_HVR1400 9 |
66 | #define CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP 10 | 66 | #define CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP 10 |
67 | #define CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP 11 | ||
67 | 68 | ||
68 | /* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */ | 69 | /* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */ |
69 | #define CX23885_NORMS (\ | 70 | #define CX23885_NORMS (\ |