aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevin Heitmueller <devin.heitmueller@gmail.com>2008-06-08 09:22:03 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:08:49 -0400
commit17d9d558e818530cc7d210ffea575a36f48eaa1a (patch)
tree16236b3103125712ecc8db90f233d84cf59d3fd3
parentbbc8995f9fa3f9cdd77aeb7c9bbf5bf526feca3c (diff)
V4L/DVB (8006): em28xx: Split HVR900 into two separate entries
- Separate the newer variant of the HVR-900 into its own device profile because it has a Micronas DRX397 instead of the Zarlink demod. This doesn't make the device work, but at least we don't try to initialize it as though it had the Zarlink device. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> [mchehab@infradead.org: avoid compilation breakage at mainstream, where drx397xD.h doesn't exist yet] Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx3
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c29
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c23
-rw-r--r--drivers/media/video/em28xx/em28xx.h1
4 files changed, 54 insertions, 2 deletions
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index 5d9d366038ff..c7e23942c1dc 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -8,7 +8,7 @@
8 7 -> Leadtek Winfast USB II (em2800) 8 7 -> Leadtek Winfast USB II (em2800)
9 8 -> Kworld USB2800 (em2800) 9 8 -> Kworld USB2800 (em2800)
10 9 -> Pinnacle Dazzle DVC 90/DVC 100 (em2820/em2840) [2304:0207,2304:021a] 10 9 -> Pinnacle Dazzle DVC 90/DVC 100 (em2820/em2840) [2304:0207,2304:021a]
11 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500,2040:6502] 11 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500]
12 11 -> Terratec Hybrid XS (em2880) [0ccd:0042] 12 11 -> Terratec Hybrid XS (em2880) [0ccd:0042]
13 12 -> Kworld PVR TV 2800 RF (em2820/em2840) 13 12 -> Kworld PVR TV 2800 RF (em2820/em2840)
14 13 -> Terratec Prodigy XS (em2880) [0ccd:0047] 14 13 -> Terratec Prodigy XS (em2880) [0ccd:0047]
@@ -16,3 +16,4 @@
16 15 -> V-Gear PocketTV (em2800) 16 15 -> V-Gear PocketTV (em2800)
17 16 -> Hauppauge WinTV HVR 950 (em2880) [2040:6513,2040:6517,2040:651b,2040:651f] 17 16 -> Hauppauge WinTV HVR 950 (em2880) [2040:6513,2040:6517,2040:651b,2040:651f]
18 17 -> Pinnacle PCTV HD Pro Stick (em2880) [2304:0227] 18 17 -> Pinnacle PCTV HD Pro Stick (em2880) [2304:0227]
19 18 -> Hauppauge WinTV HVR 900 (R2) (em2880) [2040:6502]
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index c22c90301d85..938c51e1c86d 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -173,6 +173,27 @@ struct em28xx_board em28xx_boards[] = {
173 .amux = 1, 173 .amux = 1,
174 } }, 174 } },
175 }, 175 },
176 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = {
177 .name = "Hauppauge WinTV HVR 900 (R2)",
178 .vchannels = 3,
179 .tda9887_conf = TDA9887_PRESENT,
180 .tuner_type = TUNER_XC2028,
181 .mts_firmware = 1,
182 .decoder = EM28XX_TVP5150,
183 .input = { {
184 .type = EM28XX_VMUX_TELEVISION,
185 .vmux = TVP5150_COMPOSITE0,
186 .amux = 0,
187 }, {
188 .type = EM28XX_VMUX_COMPOSITE1,
189 .vmux = TVP5150_COMPOSITE1,
190 .amux = 1,
191 }, {
192 .type = EM28XX_VMUX_SVIDEO,
193 .vmux = TVP5150_SVIDEO,
194 .amux = 1,
195 } },
196 },
176 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950] = { 197 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950] = {
177 .name = "Hauppauge WinTV HVR 950", 198 .name = "Hauppauge WinTV HVR 950",
178 .vchannels = 3, 199 .vchannels = 3,
@@ -445,7 +466,7 @@ struct usb_device_id em28xx_id_table [] = {
445 { USB_DEVICE(0x2040, 0x6500), 466 { USB_DEVICE(0x2040, 0x6500),
446 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, 467 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 },
447 { USB_DEVICE(0x2040, 0x6502), 468 { USB_DEVICE(0x2040, 0x6502),
448 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, 469 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 },
449 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */ 470 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
450 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 }, 471 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 },
451 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */ 472 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
@@ -567,6 +588,7 @@ void em28xx_pre_card_setup(struct em28xx *dev)
567 switch (dev->model) { 588 switch (dev->model) {
568 case EM2880_BOARD_TERRATEC_PRODIGY_XS: 589 case EM2880_BOARD_TERRATEC_PRODIGY_XS:
569 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: 590 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
591 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
570 case EM2880_BOARD_TERRATEC_HYBRID_XS: 592 case EM2880_BOARD_TERRATEC_HYBRID_XS:
571 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950: 593 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950:
572 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: 594 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
@@ -602,6 +624,10 @@ static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
602 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: 624 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
603 ctl->demod = XC3028_FE_ZARLINK456; 625 ctl->demod = XC3028_FE_ZARLINK456;
604 break; 626 break;
627 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
628 /* djh - Not sure which demod we need here */
629 ctl->demod = XC3028_FE_DEFAULT;
630 break;
605 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950: 631 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950:
606 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: 632 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
607 /* FIXME: Better to specify the needed IF */ 633 /* FIXME: Better to specify the needed IF */
@@ -781,6 +807,7 @@ void em28xx_card_setup(struct em28xx *dev)
781 switch (dev->model) { 807 switch (dev->model) {
782 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2: 808 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
783 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: 809 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
810 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
784 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950: 811 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950:
785 { 812 {
786 struct tveeprom tv; 813 struct tveeprom tv;
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 9327d78fcf43..cc61cfb23a4a 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -27,6 +27,9 @@
27 27
28#include "lgdt330x.h" 28#include "lgdt330x.h"
29#include "zl10353.h" 29#include "zl10353.h"
30#ifdef EM28XX_DRX397XD_SUPPORT
31#include "drx397xD.h"
32#endif
30 33
31MODULE_DESCRIPTION("driver for em28xx based DVB cards"); 34MODULE_DESCRIPTION("driver for em28xx based DVB cards");
32MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>"); 35MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");
@@ -228,6 +231,13 @@ static struct zl10353_config em28xx_zl10353_with_xc3028 = {
228 .if2 = 45600, 231 .if2 = 45600,
229}; 232};
230 233
234#ifdef EM28XX_DRX397XD_SUPPORT
235/* [TODO] djh - not sure yet what the device config needs to contain */
236static struct drx397xD_config em28xx_drx397xD_with_xc3028 = {
237 .demod_address = (0xe0 >> 1),
238};
239#endif
240
231/* ------------------------------------------------------------------ */ 241/* ------------------------------------------------------------------ */
232 242
233static int attach_xc3028(u8 addr, struct em28xx *dev) 243static int attach_xc3028(u8 addr, struct em28xx *dev)
@@ -418,6 +428,19 @@ static int dvb_init(struct em28xx *dev)
418 goto out_free; 428 goto out_free;
419 } 429 }
420 break; 430 break;
431 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
432#ifdef EM28XX_DRX397XD_SUPPORT
433 /* We don't have the config structure properly populated, so
434 this is commented out for now */
435 dvb->frontend = dvb_attach(drx397xD_attach,
436 &em28xx_drx397xD_with_xc3028,
437 &dev->i2c_adap);
438 if (attach_xc3028(0x61, dev) < 0) {
439 result = -EINVAL;
440 goto out_free;
441 }
442 break;
443#endif
421 default: 444 default:
422 printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" 445 printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card"
423 " isn't supported yet\n", 446 " isn't supported yet\n",
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index c3b5f460b211..cff618b2d13c 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -56,6 +56,7 @@
56#define EM2800_BOARD_VGEAR_POCKETTV 15 56#define EM2800_BOARD_VGEAR_POCKETTV 15
57#define EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 16 57#define EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 16
58#define EM2880_BOARD_PINNACLE_PCTV_HD_PRO 17 58#define EM2880_BOARD_PINNACLE_PCTV_HD_PRO 17
59#define EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 18
59 60
60/* Limits minimum and default number of buffers */ 61/* Limits minimum and default number of buffers */
61#define EM28XX_MIN_BUF 4 62#define EM28XX_MIN_BUF 4