Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0830ebe authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab
Browse files

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: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ba3ed4c5
Loading
Loading
Loading
Loading
+18 −5
Original line number Diff line number Diff line
@@ -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,
						}
					}
				},
			}
		},