V4L/DVB (10287): af9015: fix second FE

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.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Antti Palosaari 2009-01-13 13:08:29 -03:00 committed by Mauro Carvalho Chehab
parent ba3ed4c57f
commit f0830ebec9
1 changed files with 18 additions and 5 deletions

View File

@ -835,18 +835,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;
}
}
@ -1254,6 +1255,12 @@ static struct dvb_usb_device_properties af9015_properties[] = {
.type = USB_BULK,
.count = 6,
.endpoint = 0x85,
.u = {
.bulk = {
.buffersize =
TS_USB20_MAX_PACKET_SIZE,
}
}
},
}
},
@ -1353,6 +1360,12 @@ static struct dvb_usb_device_properties af9015_properties[] = {
.type = USB_BULK,
.count = 6,
.endpoint = 0x85,
.u = {
.bulk = {
.buffersize =
TS_USB20_MAX_PACKET_SIZE,
}
}
},
}
},