aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-cards.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2008-08-12 12:30:03 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:55 -0400
commit4c56b04af67211c4311dd9961ce5aba86b96ba9c (patch)
tree6583324cd8f0c7033a14a2493383809190788cac /drivers/media/video/cx23885/cx23885-cards.c
parentba77531f51d59a4ca4e5f9b5960301f7dc7a5390 (diff)
V4L/DVB (8807): Add DVB support for the Leadtek Winfast PxDVR3200 H
This patch is on behalf of Stephen Backway <stev391@email.com>, and represents two patches I received (and some subsequent whitespace cleanup I had due to how I pulled the patches). From the original author: a) Add DVB support for the Leadtek Winfast PxDVR3200 H. b) The tuner callback previously checked the command 3 times: 1) To see if it was the XC2028_RESET_CLK 2) To see if it was not the XC2028_RESET_TUNER 3) To see if it was the XC2028_RESET_TUNER This patch removes the third check. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Stephen Backway <stev391@email.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c42
1 files changed, 31 insertions, 11 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index 0daffc3dbec..ccea8de7c7d 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -154,6 +154,10 @@ struct cx23885_board cx23885_boards[] = {
154 .portb = CX23885_MPEG_DVB, 154 .portb = CX23885_MPEG_DVB,
155 .portc = CX23885_MPEG_DVB, 155 .portc = CX23885_MPEG_DVB,
156 }, 156 },
157 [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H] = {
158 .name = "Leadtek Winfast PxDVR3200 H",
159 .portc = CX23885_MPEG_DVB,
160 },
157}; 161};
158const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); 162const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
159 163
@@ -229,6 +233,10 @@ struct cx23885_subid cx23885_subids[] = {
229 .subvendor = 0x18ac, 233 .subvendor = 0x18ac,
230 .subdevice = 0xdb78, 234 .subdevice = 0xdb78,
231 .card = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP, 235 .card = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP,
236 }, {
237 .subvendor = 0x107d,
238 .subdevice = 0x6681,
239 .card = CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H,
232 }, 240 },
233}; 241};
234const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); 242const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -348,21 +356,18 @@ int cx23885_tuner_callback(void *priv, int command, int arg)
348 case CX23885_BOARD_HAUPPAUGE_HVR1400: 356 case CX23885_BOARD_HAUPPAUGE_HVR1400:
349 case CX23885_BOARD_HAUPPAUGE_HVR1500: 357 case CX23885_BOARD_HAUPPAUGE_HVR1500:
350 case CX23885_BOARD_HAUPPAUGE_HVR1500Q: 358 case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
359 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
351 /* Tuner Reset Command */ 360 /* Tuner Reset Command */
352 if (command == 0) 361 bitmask = 0x04;
353 bitmask = 0x04;
354 break; 362 break;
355 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: 363 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:
356 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: 364 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
357 if (command == 0) { 365 /* Two identical tuners on two different i2c buses,
358 366 * we need to reset the correct gpio. */
359 /* Two identical tuners on two different i2c buses, 367 if (port->nr == 0)
360 * we need to reset the correct gpio. */ 368 bitmask = 0x01;
361 if (port->nr == 0) 369 else if (port->nr == 1)
362 bitmask = 0x01; 370 bitmask = 0x04;
363 else if (port->nr == 1)
364 bitmask = 0x04;
365 }
366 break; 371 break;
367 } 372 }
368 373
@@ -491,6 +496,19 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
491 mdelay(20); 496 mdelay(20);
492 cx_set(GP0_IO, 0x000f000f); 497 cx_set(GP0_IO, 0x000f000f);
493 break; 498 break;
499 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
500 /* GPIO-2 xc3028 tuner reset */
501
502 /* The following GPIO's are on the internal AVCore (cx25840) */
503 /* GPIO-? zl10353 demod reset */
504
505 /* Put the parts into reset and back */
506 cx_set(GP0_IO, 0x00040000);
507 mdelay(20);
508 cx_clear(GP0_IO, 0x00000004);
509 mdelay(20);
510 cx_set(GP0_IO, 0x00040004);
511 break;
494 } 512 }
495} 513}
496 514
@@ -578,6 +596,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
578 case CX23885_BOARD_HAUPPAUGE_HVR1200: 596 case CX23885_BOARD_HAUPPAUGE_HVR1200:
579 case CX23885_BOARD_HAUPPAUGE_HVR1700: 597 case CX23885_BOARD_HAUPPAUGE_HVR1700:
580 case CX23885_BOARD_HAUPPAUGE_HVR1400: 598 case CX23885_BOARD_HAUPPAUGE_HVR1400:
599 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
581 default: 600 default:
582 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ 601 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
583 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ 602 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
@@ -591,6 +610,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
591 case CX23885_BOARD_HAUPPAUGE_HVR1800: 610 case CX23885_BOARD_HAUPPAUGE_HVR1800:
592 case CX23885_BOARD_HAUPPAUGE_HVR1800lp: 611 case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
593 case CX23885_BOARD_HAUPPAUGE_HVR1700: 612 case CX23885_BOARD_HAUPPAUGE_HVR1700:
613 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:
594 request_module("cx25840"); 614 request_module("cx25840");
595 break; 615 break;
596 } 616 }