summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2005-03-29 23:32:46 +0000
committerPatrick Boettcher <devnull@localhost>2005-03-29 23:32:46 +0000
commit68d4a468a95777934e2659e8f4bb4095a55969ca (patch)
treed79731dc5ce2ef3bfc19c45c3c7816cd4c6bb257 /linux/drivers/media
parent41b92ab47d63d0d87a02f9e8efd469282e61a2ef (diff)
downloadmediapointer-dvb-s2-68d4a468a95777934e2659e8f4bb4095a55969ca.tar.gz
mediapointer-dvb-s2-68d4a468a95777934e2659e8f4bb4095a55969ca.tar.bz2
added support for the AVerMedia DVB-T USB2.0 device (slightly modified clone of the USB2.0 device by DiBcom)
Thanks to Glen Harris for his patience and to Jiun-Kuei Jung from AVerMedia.
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c59
-rw-r--r--linux/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c4
-rw-r--r--linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c9
-rw-r--r--linux/drivers/media/dvb/dibusb/dvb-dibusb.h1
4 files changed, 48 insertions, 25 deletions
diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c
index 67fe74515..464b31c6e 100644
--- a/linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c
+++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c
@@ -52,7 +52,8 @@ MODULE_PARM_DESC(rc_key_repeat_count, "how many key repeats will be dropped befo
/* Vendor IDs */
#define USB_VID_ADSTECH 0x06e1
#define USB_VID_ANCHOR 0x0547
-#define USB_VID_AVERMEDIA 0x14aa
+#define USB_VID_AVERMEDIA_UNK 0x14aa
+#define USB_VID_AVERMEDIA 0x07ca
#define USB_VID_COMPRO 0x185b
#define USB_VID_COMPRO_UNK 0x145f
#define USB_VID_CYPRESS 0x04b4
@@ -71,6 +72,8 @@ MODULE_PARM_DESC(rc_key_repeat_count, "how many key repeats will be dropped befo
#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_AVERMEDIA_DVBT_USB2_COLD 0xa800
+#define USB_PID_AVERMEDIA_DVBT_USB2_WARM 0xa801
#define USB_PID_COMPRO_DVBU2000_COLD 0xd000
#define USB_PID_COMPRO_DVBU2000_WARM 0xd001
#define USB_PID_COMPRO_DVBU2000_UNK_COLD 0x010c
@@ -115,10 +118,10 @@ MODULE_PARM_DESC(rc_key_repeat_count, "how many key repeats will be dropped befo
* vendor and product id is done, here.
*/
static struct usb_device_id dib_table [] = {
-/* 00 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_DVBT_USB_COLD)},
-/* 01 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_DVBT_USB_WARM)},
-/* 02 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_YAKUMO_DTT200U_COLD) },
-/* 03 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_YAKUMO_DTT200U_WARM) },
+/* 00 */ { USB_DEVICE(USB_VID_AVERMEDIA_UNK, USB_PID_AVERMEDIA_DVBT_USB_COLD)},
+/* 01 */ { USB_DEVICE(USB_VID_AVERMEDIA_UNK, USB_PID_AVERMEDIA_DVBT_USB_WARM)},
+/* 02 */ { USB_DEVICE(USB_VID_AVERMEDIA_UNK, USB_PID_YAKUMO_DTT200U_COLD) },
+/* 03 */ { USB_DEVICE(USB_VID_AVERMEDIA_UNK, USB_PID_YAKUMO_DTT200U_WARM) },
/* 04 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_COLD) },
/* 05 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_WARM) },
@@ -152,16 +155,18 @@ static struct usb_device_id dib_table [] = {
/* 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) },
+/* 34 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_DVBT_USB2_COLD) },
+/* 35 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_DVBT_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
+// #define CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES
#ifdef CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES
-/* 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) },
+/* 36 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) },
+/* 37 */ { USB_DEVICE(USB_VID_CYPRESS, USB_PID_ULTIMA_TVBOX_USB2_FX_COLD) },
+/* 38 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_USB2_FX_WARM) },
+/* 39 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_DIBCOM_ANCHOR_2135_COLD) },
#endif
{ } /* Terminating entry */
};
@@ -257,6 +262,14 @@ static struct dibusb_device_class dibusb_device_classes[] = {
&dibusb_demod[DIBUSB_DIB3000MC],
&dibusb_tuner[DIBUSB_TUNER_COFDM_PANASONIC_ENV57H1XD5],
},
+ { AVERTV_USB2,&dibusb_usb_ctrl[2],
+ "dvb-dibusb-avertv-usb2-1.fw",
+ 0x01, 0x06,
+ 7, 4096,
+ DIBUSB_RC_NO,
+ &dibusb_demod[DIBUSB_DIB3000MC],
+ &dibusb_tuner[DIBUSB_TUNER_COFDM_PANASONIC_ENV57H1XD5],
+ },
{ DTT200U,&dibusb_usb_ctrl[2],
"dvb-dtt200u-1.fw",
0x01, 0x02,
@@ -298,7 +311,7 @@ static struct dibusb_usb_device dibusb_devices[] = {
{ &dib_table[25], NULL },
{ &dib_table[26], NULL },
},
- { "Avermedia AverTV DVBT USB1.1",
+ { "AVerMedia AverTV DVBT USB1.1",
&dibusb_device_classes[DIBUSB1_1],
{ &dib_table[0], NULL },
{ &dib_table[1], NULL },
@@ -343,20 +356,25 @@ static struct dibusb_usb_device dibusb_devices[] = {
{ &dib_table[32], NULL },
{ &dib_table[33], NULL }, /* device ID with default DIBUSB2_0-firmware */
},
+ { "AVerMedia AverTV DVB-T USB 2.0 (A800)",
+ &dibusb_device_classes[AVERTV_USB2],
+ { &dib_table[34], NULL },
+ { &dib_table[35], NULL },
+ },
#ifdef CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES
{ "Artec T1 USB1.1 TVBOX with AN2235 (misdesigned)",
&dibusb_device_classes[DIBUSB1_1_AN2235],
- { &dib_table[34], NULL },
+ { &dib_table[36], NULL },
{ NULL },
},
{ "Artec T1 USB2.0 TVBOX with FX2 IDs (misdesigned, please report the warm ID)",
&dibusb_device_classes[DTT200U],
- { &dib_table[35], NULL },
- { &dib_table[36], NULL }, /* undefined, it could be that the device will get another USB ID in warm state */
+ { &dib_table[37], NULL },
+ { &dib_table[38], 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[37], NULL },
+ { &dib_table[39], NULL },
{ NULL },
},
#endif
@@ -400,13 +418,14 @@ 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)
+static struct dibusb_usb_device * dibusb_device_class_quirk(struct usb_device
+ *udev, struct dibusb_usb_device *dev, int *cold)
{
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.
+ /* Quirk-handling 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.");
@@ -453,7 +472,7 @@ static struct dibusb_usb_device * dibusb_find_device (struct usb_device *udev,in
}
if (dev != NULL)
- dev = dibusb_device_class_quirk(udev,dev);
+ dev = dibusb_device_class_quirk(udev,dev,cold);
return dev;
}
diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c
index 60c0ff50c..d527d0bfc 100644
--- a/linux/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c
+++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c
@@ -126,8 +126,8 @@ int dibusb_dvb_init(struct usb_dibusb *dib)
urb_compl_count = 0;
- if ((ret = dvb_register_adapter(&dib->adapter, DRIVER_DESC,
- THIS_MODULE)) < 0) {
+ if ((ret = dvb_register_adapter(&dib->adapter,
+ DRIVER_DESC,THIS_MODULE)) < 0) {
deb_info("dvb_register_adapter failed: error %d", ret);
goto err;
}
diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c
index ba43c2add..62e82b13e 100644
--- a/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c
+++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c
@@ -103,7 +103,7 @@ int dibusb_hw_wakeup(struct dvb_frontend *fe)
struct usb_dibusb *dib = (struct usb_dibusb *) fe->dvb->priv;
u8 b[1] = { DIBUSB_IOCTL_POWER_WAKEUP };
deb_info("dibusb-device is getting up.\n");
-
+
switch (dib->dibdev->dev_cl->id) {
case DTT200U:
break;
@@ -129,6 +129,8 @@ int dibusb_hw_sleep(struct dvb_frontend *fe)
case NOVAT_USB2:
case DTT200U:
break;
+ case AVERTV_USB2:
+ return 0;
default:
dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_POWER_MODE, b,1);
break;
@@ -148,7 +150,6 @@ int dibusb_set_streaming_mode(struct usb_dibusb *dib,u8 mode)
static int dibusb_urb_kill(struct usb_dibusb *dib)
{
int i;
-deb_info("trying to kill urbs\n");
if (dib->init_state & DIBUSB_STATE_URB_SUBMIT) {
for (i = 0; i < dib->dibdev->dev_cl->urb_count; i++) {
deb_info("killing URB no. %d.\n",i);
@@ -190,6 +191,7 @@ int dibusb_streaming(struct usb_dibusb *dib,int onoff)
case DIBUSB2_0:
case DIBUSB2_0B:
case NOVAT_USB2:
+ case AVERTV_USB2:
case UMT2_0:
if (onoff)
return dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_ENABLE_STREAM,NULL,0);
@@ -247,7 +249,7 @@ int dibusb_urb_init(struct usb_dibusb *dib)
dibusb_urb_complete, dib);
dib->urb_list[i]->transfer_flags = 0;
-
+
dib->init_state |= DIBUSB_STATE_URB_INIT;
}
@@ -258,6 +260,7 @@ int dibusb_urb_init(struct usb_dibusb *dib)
switch (dib->dibdev->dev_cl->id) {
case DIBUSB2_0:
case DIBUSB2_0B:
+ case AVERTV_USB2:
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 a8d4f6171..d1645048c 100644
--- a/linux/drivers/media/dvb/dibusb/dvb-dibusb.h
+++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb.h
@@ -74,6 +74,7 @@ typedef enum {
UMT2_0,
DIBUSB2_0B,
NOVAT_USB2,
+ AVERTV_USB2,
DTT200U,
} dibusb_class_t;