summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-05-26 00:33:23 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-06-01 10:08:00 +0300
commit9c2afb04a0883b1888b983773b9e22f89ca1b74c (patch)
treef3f93591f94656ecf35dbd3d36571a0bc46a7fec
parent935901094584886cef78d0d81b85f8781fc29bf9 (diff)
uvc-gadget: Don't hardcode the maximum payload transfer size
Use the streaming endpoint maximum packet size parsed from ConfigFS instead of hardcoding an arbitrary value. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--uvc-gadget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/uvc-gadget.c b/uvc-gadget.c
index 5ec81fb..8ccfa07 100644
--- a/uvc-gadget.c
+++ b/uvc-gadget.c
@@ -298,7 +298,7 @@ uvc_fill_streaming_control(struct uvc_device *dev,
break;
}
- ctrl->dwMaxPayloadTransferSize = 512; /* TODO this should be filled by the driver. */
+ ctrl->dwMaxPayloadTransferSize = dev->fc->streaming.ep.wMaxPacketSize;
ctrl->bmFramingInfo = 3;
ctrl->bPreferedVersion = 1;
ctrl->bMaxVersion = 1;