diff options
author | Patrick Boettcher <devnull@localhost> | 2005-02-11 18:51:32 +0000 |
---|---|---|
committer | Patrick Boettcher <devnull@localhost> | 2005-02-11 18:51:32 +0000 |
commit | 98a6c50cc8707941fbd7aedc49f9a81531959934 (patch) | |
tree | d067b6bdc6672512b447871a30b4031636c2e359 /linux/drivers | |
parent | 0c571d365d879f7112425038615542cc5fd4657a (diff) | |
download | mediapointer-dvb-s2-98a6c50cc8707941fbd7aedc49f9a81531959934.tar.gz mediapointer-dvb-s2-98a6c50cc8707941fbd7aedc49f9a81531959934.tar.bz2 |
- added a another firmware file for KWorld/ADSTech Instant DVB-T USB2.0 (DiB3000M-B)
- added support for KWorld/ADSTech Instant DVB-T USB2.0 (DiB3000M-B)
- added deactivation option of the pid parser for the DiB3000M-B (since there are USB2.0 devices and which now have the ability to deliver the complete Transport Stream)
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/dvb/dibusb/Kconfig | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c | 80 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dibusb/dvb-dibusb.h | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/dib3000mb.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/dib3000mc.c | 2 |
6 files changed, 73 insertions, 21 deletions
diff --git a/linux/drivers/media/dvb/dibusb/Kconfig b/linux/drivers/media/dvb/dibusb/Kconfig index 333359171..725926904 100644 --- a/linux/drivers/media/dvb/dibusb/Kconfig +++ b/linux/drivers/media/dvb/dibusb/Kconfig @@ -13,7 +13,7 @@ config DVB_DIBUSB TwinhanDTV USB-Ter (VP7041) TwinhanDTV Magic Box (VP7041e) - KWorld V-Stream XPERT DTV - DVB-T USB + KWorld/JetWay/ADSTech V-Stream XPERT DTV - DVB-T USB1.1 and USB2.0 Hama DVB-T USB-Box DiBcom reference devices (non-public) Ultima Electronic/Artec T1 USB TVBOX @@ -23,6 +23,7 @@ config DVB_DIBUSB Artec T1 USB1.1 and USB2.0 boxes Yakumo/Typhoon DVB-T USB2.0 Hanftek UMT-010 USB2.0 + Hauppauge WinTV NOVA-T USB2 The VP7041 seems to be identical to "CTS Portable" (Chinese Television System). diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c index 7b06588fc..f2eeff669 100644 --- a/linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c +++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c @@ -46,6 +46,7 @@ module_param(rc_query_interval, int, 0644); MODULE_PARM_DESC(rc_query_interval, "interval in msecs for remote control query (default: 100; min: 40)"); /* Vendor IDs */ +#define USB_VID_ADSTECH 0x06e1 #define USB_VID_ANCHOR 0x0547 #define USB_VID_AVERMEDIA 0x14aa #define USB_VID_COMPRO 0x185b @@ -62,6 +63,8 @@ MODULE_PARM_DESC(rc_query_interval, "interval in msecs for remote control query #define USB_VID_ULTIMA_ELECTRONIC 0x05d8 /* Product IDs */ +#define USB_PID_ADSTECH_USB2_COLD 0xa333 +#define USB_PID_ADSTECH_USB2_WARM 0xa334 #define USB_PID_AVERMEDIA_DVBT_USB_COLD 0x0001 #define USB_PID_AVERMEDIA_DVBT_USB_WARM 0x0002 #define USB_PID_COMPRO_DVBU2000_COLD 0xd000 @@ -147,16 +150,18 @@ static struct usb_device_id dib_table [] = { /* 30 */ { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_WINTV_NOVA_T_USB2_COLD) }, /* 31 */ { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_WINTV_NOVA_T_USB2_WARM) }, +/* 32 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_COLD) }, +/* 33 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_WARM) }, /* * activate the following define when you have one of the devices and want to * build it from build-2.6 in dvb-kernel */ // #define CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES #ifdef CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES -/* 32 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) }, -/* 33 */ { USB_DEVICE(USB_VID_CYPRESS, USB_PID_ULTIMA_TVBOX_USB2_FX_COLD) }, -/* 34 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_USB2_FX_WARM) }, -/* 35 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_DIBCOM_ANCHOR_2135_COLD) }, +/* 34 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) }, +/* 35 */ { USB_DEVICE(USB_VID_CYPRESS, USB_PID_ULTIMA_TVBOX_USB2_FX_COLD) }, +/* 36 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_USB2_FX_WARM) }, +/* 37 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_DIBCOM_ANCHOR_2135_COLD) }, #endif { } /* Terminating entry */ }; @@ -203,7 +208,7 @@ static struct dibusb_device_class dibusb_device_classes[] = { { .id = DIBUSB1_1, .usb_ctrl = &dibusb_usb_ctrl[0], .firmware = "dvb-dibusb-5.0.0.11.fw", .pipe_cmd = 0x01, .pipe_data = 0x02, - .urb_count = 5, .urb_buffer_size = 4096, + .urb_count = 7, .urb_buffer_size = 4096, DIBUSB_RC_NEC_PROTOCOL, &dibusb_demod[DIBUSB_DIB3000MB], &dibusb_tuner[DIBUSB_TUNER_CABLE_THOMSON], @@ -211,7 +216,7 @@ static struct dibusb_device_class dibusb_device_classes[] = { { DIBUSB1_1_AN2235, &dibusb_usb_ctrl[1], "dvb-dibusb-an2235-1.fw", 0x01, 0x02, - 5, 4096, + 7, 4096, DIBUSB_RC_NEC_PROTOCOL, &dibusb_demod[DIBUSB_DIB3000MB], &dibusb_tuner[DIBUSB_TUNER_CABLE_THOMSON], @@ -227,11 +232,19 @@ static struct dibusb_device_class dibusb_device_classes[] = { { UMT2_0, &dibusb_usb_ctrl[2], "dvb-dibusb-umt-1.fw", 0x01, 0x02, - 15, 188*21, + 7, 188*21, DIBUSB_RC_NO, &dibusb_demod[DIBUSB_MT352], &dibusb_tuner[DIBUSB_TUNER_CABLE_LG_TDTP_E102P], }, + { DIBUSB2_0B,&dibusb_usb_ctrl[2], + "dvb-dibusb-adstech-usb2-1.fw", + 0x01, 0x06, + 7, 4096, + DIBUSB_RC_NEC_PROTOCOL, + &dibusb_demod[DIBUSB_DIB3000MB], + &dibusb_tuner[DIBUSB_TUNER_CABLE_THOMSON], + }, }; static struct dibusb_usb_device dibusb_devices[] = { @@ -305,20 +318,25 @@ static struct dibusb_usb_device dibusb_devices[] = { { &dib_table[28], NULL }, { &dib_table[29], NULL }, }, + { "KWorld/ADSTech Instant DVB-T USB 2.0", + &dibusb_device_classes[DIBUSB2_0B], + { &dib_table[32], NULL }, + { NULL }, + }, #ifdef CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES { "Artec T1 USB1.1 TVBOX with AN2235 (misdesigned)", &dibusb_device_classes[DIBUSB1_1_AN2235], - { &dib_table[32], NULL }, + { &dib_table[34], NULL }, { NULL }, }, { "Artec T1 USB2.0 TVBOX with FX2 IDs (misdesigned, please report the warm ID)", &dibusb_device_classes[DIBUSB2_0], - { &dib_table[33], NULL }, - { &dib_table[34], NULL }, /* undefined, it could be that the device will get another USB ID in warm state */ + { &dib_table[35], NULL }, + { &dib_table[36], NULL }, /* undefined, it could be that the device will get another USB ID in warm state */ }, { "DiBcom USB1.1 DVB-T reference design (MOD3000) with AN2135 default IDs", &dibusb_device_classes[DIBUSB1_1], - { &dib_table[35], NULL }, + { &dib_table[37], NULL }, { NULL }, }, #endif @@ -364,30 +382,62 @@ static int dibusb_init(struct usb_dibusb *dib) return 0; } +static struct dibusb_usb_device * dibusb_device_class_quirk(struct usb_device *udev, struct dibusb_usb_device *dev) +{ + int i; + + /* Quirk for the Kworld/ADSTech Instant USB2.0 device. It has the same USB + * IDs like the USB1.1 KWorld after loading the firmware. Which is a bad + * idea and make this quirk necessary. + */ + if (dev->dev_cl->id == DIBUSB1_1 && udev->speed == USB_SPEED_HIGH) { + info("this seems to be the Kworld/ADSTech Instant USB2.0 device or equal."); + for (i = 0; i < sizeof(dibusb_devices)/sizeof(struct dibusb_usb_device); i++) { + if (dibusb_devices[i].dev_cl->id == DIBUSB2_0B) { + dev = &dibusb_devices[i]; + break; + } + } + } + + return dev; +} + static struct dibusb_usb_device * dibusb_find_device (struct usb_device *udev,int *cold) { int i,j; *cold = -1; + struct dibusb_usb_device *dev = NULL; + for (i = 0; i < sizeof(dibusb_devices)/sizeof(struct dibusb_usb_device); i++) { for (j = 0; j < DIBUSB_ID_MAX_NUM && dibusb_devices[i].cold_ids[j] != NULL; j++) { deb_info("check for cold %x %x\n",dibusb_devices[i].cold_ids[j]->idVendor, dibusb_devices[i].cold_ids[j]->idProduct); if (dibusb_devices[i].cold_ids[j]->idVendor == le16_to_cpu(udev->descriptor.idVendor) && dibusb_devices[i].cold_ids[j]->idProduct == le16_to_cpu(udev->descriptor.idProduct)) { *cold = 1; - return &dibusb_devices[i]; + dev = &dibusb_devices[i]; + break; } } - + + if (dev != NULL) + break; + for (j = 0; j < DIBUSB_ID_MAX_NUM && dibusb_devices[i].warm_ids[j] != NULL; j++) { deb_info("check for warm %x %x\n",dibusb_devices[i].warm_ids[j]->idVendor, dibusb_devices[i].warm_ids[j]->idProduct); if (dibusb_devices[i].warm_ids[j]->idVendor == le16_to_cpu(udev->descriptor.idVendor) && dibusb_devices[i].warm_ids[j]->idProduct == le16_to_cpu(udev->descriptor.idProduct)) { *cold = 0; - return &dibusb_devices[i]; + dev = &dibusb_devices[i]; + break; } } } - return NULL; + + if (dev != NULL) + dev = dibusb_device_class_quirk(udev,dev); + + return dev; } /* diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c index 1808d9e92..5457d25c7 100644 --- a/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c +++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c @@ -206,10 +206,11 @@ int dibusb_urb_init(struct usb_dibusb *dib) /* dib->pid_parse here contains the value of the module parameter */ /* decide if pid parsing can be deactivated: - * is possible (by speed) and wanted (by user) + * is possible (by device type) and wanted (by user) */ switch (dib->dibdev->dev_cl->id) { case DIBUSB2_0: + case DIBUSB2_0B: if (dib->udev->speed == USB_SPEED_HIGH && !dib->pid_parse) { def_pid_parse = 0; info("running at HIGH speed, will deliver the complete TS."); diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb.h b/linux/drivers/media/dvb/dibusb/dvb-dibusb.h index 56a8e29bb..8152aef79 100644 --- a/linux/drivers/media/dvb/dibusb/dvb-dibusb.h +++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb.h @@ -72,6 +72,7 @@ typedef enum { DIBUSB1_1_AN2235, DIBUSB2_0, UMT2_0, + DIBUSB2_0B, } dibusb_class_t; typedef enum { diff --git a/linux/drivers/media/dvb/frontends/dib3000mb.c b/linux/drivers/media/dvb/frontends/dib3000mb.c index 4a80fc421..71bd57705 100644 --- a/linux/drivers/media/dvb/frontends/dib3000mb.c +++ b/linux/drivers/media/dvb/frontends/dib3000mb.c @@ -683,8 +683,9 @@ static int dib3000mb_fifo_control(struct dvb_frontend *fe, int onoff) static int dib3000mb_pid_parse(struct dvb_frontend *fe, int onoff) { - //struct dib3000_state *state = fe->demodulator_priv; - /* switch it off and on */ + struct dib3000_state *state = fe->demodulator_priv; + deb_xfer("%s pid parsing\n",onoff ? "enabling" : "disabling"); + wr(DIB3000MB_REG_PID_PARSE,onoff); return 0; } diff --git a/linux/drivers/media/dvb/frontends/dib3000mc.c b/linux/drivers/media/dvb/frontends/dib3000mc.c index bc61ddd95..9bed3dd05 100644 --- a/linux/drivers/media/dvb/frontends/dib3000mc.c +++ b/linux/drivers/media/dvb/frontends/dib3000mc.c @@ -792,10 +792,8 @@ static int dib3000mc_pid_parse(struct dvb_frontend *fe, int onoff) deb_xfer("%s pid parsing\n",onoff ? "enabling" : "disabling"); if (onoff) { - deb_xfer("%d %x\n",tmp | DIB3000MC_SMO_MODE_PID_PARSE,tmp | DIB3000MC_SMO_MODE_PID_PARSE); wr(DIB3000MC_REG_SMO_MODE,tmp | DIB3000MC_SMO_MODE_PID_PARSE); } else { - deb_xfer("%d %x\n",tmp & DIB3000MC_SMO_MODE_NO_PID_PARSE,tmp & DIB3000MC_SMO_MODE_NO_PID_PARSE); wr(DIB3000MC_REG_SMO_MODE,tmp & DIB3000MC_SMO_MODE_NO_PID_PARSE); } return 0; |