From 9c2afb04a0883b1888b983773b9e22f89ca1b74c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 26 May 2018 00:33:23 +0300 Subject: 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 Reviewed-by: Kieran Bingham --- uvc-gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3