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

Commit c237f033 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: uvc: Update frame size as per frame type"

parents a413619a f62c4824
Loading
Loading
Loading
Loading
+20 −5
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ static struct usb_interface_descriptor uvc_control_intf = {
	.bNumEndpoints		= 1,
	.bInterfaceClass	= USB_CLASS_VIDEO,
	.bInterfaceSubClass	= UVC_SC_VIDEOCONTROL,
	.bInterfaceProtocol	= 0x00,
	.bInterfaceProtocol	= 0x01,
	.iInterface		= 0,
};

@@ -826,16 +826,18 @@ static struct usb_function_instance *uvc_alloc_inst(void)
	cd->bmControls[2]		= 0;

	pd = &opts->uvc_processing;
	pd->bLength			= UVC_DT_PROCESSING_UNIT_SIZE(2);
	pd->bLength			= UVC_DT_PROCESSING_UNIT_SIZE(3);
	pd->bDescriptorType		= USB_DT_CS_INTERFACE;
	pd->bDescriptorSubType		= UVC_VC_PROCESSING_UNIT;
	pd->bUnitID			= 2;
	pd->bSourceID			= 1;
	pd->wMaxMultiplier		= cpu_to_le16(16*1024);
	pd->bControlSize		= 2;
	pd->bmControls[0]		= 1;
	pd->bmControls[1]		= 0;
	pd->bControlSize		= 3;
	pd->bmControls[0]		= 64;
	pd->bmControls[1]		= 16;
	pd->bmControls[2]		= 1;
	pd->iProcessing			= 0;
	pd->bmVideoStandards		= 0;

	od = &opts->uvc_output_terminal;
	od->bLength			= UVC_DT_OUTPUT_TERMINAL_SIZE;
@@ -962,5 +964,18 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
}

DECLARE_USB_FUNCTION_INIT(uvc, uvc_alloc_inst, uvc_alloc);

static int uvc_init(void)
{
	return usb_function_register(&uvcusb_func);
}
module_init(uvc_init);

static void __exit uvc_exit(void)
{
	usb_function_unregister(&uvcusb_func);
}
module_exit(uvc_exit);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Laurent Pinchart");
+449 −67

File changed.

Preview size limit exceeded, changes collapsed.

+96 −2

File changed.

Preview size limit exceeded, changes collapsed.