From 9b44f8cd38f922cc8ca126138dcdf4b9f9f187c4 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Tue, 13 Jan 2009 17:47:28 +0200 Subject: af9015: add new USB ID for KWorld DVB-T 395U From: Antti Palosaari Add new USB ID 1b80:e39b for KWorld DVB-T 395U. This device revision does have Quantek QT1010 silicon tuner. Priority: normal Signed-off-by: Antti Palosaari Thanks-to: Ray Chen --- linux/drivers/media/dvb/dvb-usb/af9015.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/dvb-usb/af9015.c') diff --git a/linux/drivers/media/dvb/dvb-usb/af9015.c b/linux/drivers/media/dvb/dvb-usb/af9015.c index f0b57c739..00d0b7583 100644 --- a/linux/drivers/media/dvb/dvb-usb/af9015.c +++ b/linux/drivers/media/dvb/dvb-usb/af9015.c @@ -1215,6 +1215,7 @@ static struct usb_device_id af9015_usb_table[] = { {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A309)}, /* 15 */{USB_DEVICE(USB_VID_MSI_2, USB_PID_MSI_DIGI_VOX_MINI_III)}, {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U)}, + {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_2)}, {0}, }; MODULE_DEVICE_TABLE(usb, af9015_usb_table); @@ -1402,7 +1403,8 @@ static struct dvb_usb_device_properties af9015_properties[] = { { .name = "KWorld USB DVB-T TV Stick II " \ "(VS-DVB-T 395U)", - .cold_ids = {&af9015_usb_table[16], NULL}, + .cold_ids = {&af9015_usb_table[16], + &af9015_usb_table[17], NULL}, .warm_ids = {NULL}, }, } -- cgit v1.2.3 From 35aac7250adaa130140a59e5681f0ee72bb706c2 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Tue, 13 Jan 2009 18:08:29 +0200 Subject: af9015: fix second FE From: Antti Palosaari Bug causes 2nd FE MPEG TS buffer size to be zero and therefore no picture when 2nd FE was enabled. Configure correct buffer size also for 2nd FE. Priority: high Signed-off-by: Antti Palosaari --- linux/drivers/media/dvb/dvb-usb/af9015.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'linux/drivers/media/dvb/dvb-usb/af9015.c') diff --git a/linux/drivers/media/dvb/dvb-usb/af9015.c b/linux/drivers/media/dvb/dvb-usb/af9015.c index 00d0b7583..af3e66a60 100644 --- a/linux/drivers/media/dvb/dvb-usb/af9015.c +++ b/linux/drivers/media/dvb/dvb-usb/af9015.c @@ -838,18 +838,19 @@ static int af9015_read_config(struct usb_device *udev) if (!dvb_usb_af9015_dual_mode) af9015_config.dual_mode = 0; - /* set buffer size according to USB port speed */ + /* Set adapter0 buffer size according to USB port speed, adapter1 buffer + size can be static because it is enabled only USB2.0 */ for (i = 0; i < af9015_properties_count; i++) { /* USB1.1 set smaller buffersize and disable 2nd adapter */ if (udev->speed == USB_SPEED_FULL) { - af9015_properties[i].adapter->stream.u.bulk.buffersize = - TS_USB11_MAX_PACKET_SIZE; + af9015_properties[i].adapter[0].stream.u.bulk.buffersize + = TS_USB11_MAX_PACKET_SIZE; /* disable 2nd adapter because we don't have PID-filters */ af9015_config.dual_mode = 0; } else { - af9015_properties[i].adapter->stream.u.bulk.buffersize = - TS_USB20_MAX_PACKET_SIZE; + af9015_properties[i].adapter[0].stream.u.bulk.buffersize + = TS_USB20_MAX_PACKET_SIZE; } } @@ -1258,6 +1259,12 @@ static struct dvb_usb_device_properties af9015_properties[] = { .type = USB_BULK, .count = 6, .endpoint = 0x85, + .u = { + .bulk = { + .buffersize = + TS_USB20_MAX_PACKET_SIZE, + } + } }, } }, @@ -1357,6 +1364,12 @@ static struct dvb_usb_device_properties af9015_properties[] = { .type = USB_BULK, .count = 6, .endpoint = 0x85, + .u = { + .bulk = { + .buffersize = + TS_USB20_MAX_PACKET_SIZE, + } + } }, } }, -- cgit v1.2.3 From 942a41fc50cf6a55b959fd4470ce7a1ace120dfb Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Tue, 20 Jan 2009 19:56:20 +0200 Subject: af9015: bug fix: stick does not work always when plugged From: Antti Palosaari First control messages to the stick timeouts very often due to probable hw bug. Repeat first message few times if it fails as workaround. Priority: high Signed-off-by: Antti Palosaari --- linux/drivers/media/dvb/dvb-usb/af9015.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/dvb-usb/af9015.c') diff --git a/linux/drivers/media/dvb/dvb-usb/af9015.c b/linux/drivers/media/dvb/dvb-usb/af9015.c index af3e66a60..b1f231781 100644 --- a/linux/drivers/media/dvb/dvb-usb/af9015.c +++ b/linux/drivers/media/dvb/dvb-usb/af9015.c @@ -697,7 +697,12 @@ static int af9015_read_config(struct usb_device *udev) /* IR remote controller */ req.addr = AF9015_EEPROM_IR_MODE; - ret = af9015_rw_udev(udev, &req); + /* first message will timeout often due to possible hw bug */ + for (i = 0; i < 4; i++) { + ret = af9015_rw_udev(udev, &req); + if (!ret) + break; + } if (ret) goto error; deb_info("%s: IR mode:%d\n", __func__, val); -- cgit v1.2.3