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

Commit a2603b99 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_uvc: Correct SS Companion descriptors"

parents ac013074 32ccb257
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ static struct usb_gadget_strings *uvc_function_strings[] = {
#define UVC_INTF_VIDEO_STREAMING		1

#define UVC_STATUS_MAX_PACKET_SIZE		16	/* 16 bytes status */
#define UVC_STREAMING_SS_MAX_PACKET_SIZE	1024

static struct usb_interface_assoc_descriptor uvc_iad = {
	.bLength		= sizeof(uvc_iad),
@@ -640,12 +641,13 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
		cpu_to_le16(max_packet_size | ((max_packet_mult - 1) << 11));
	uvc_hs_streaming_ep.bInterval = opts->streaming_interval;

	uvc_ss_streaming_ep.wMaxPacketSize = cpu_to_le16(max_packet_size);
	uvc_ss_streaming_ep.wMaxPacketSize =
			UVC_STREAMING_SS_MAX_PACKET_SIZE;
	uvc_ss_streaming_ep.bInterval = opts->streaming_interval;
	uvc_ss_streaming_comp.bmAttributes = max_packet_mult - 1;
	uvc_ss_streaming_comp.bmAttributes = 0;
	uvc_ss_streaming_comp.bMaxBurst = opts->streaming_maxburst;
	uvc_ss_streaming_comp.wBytesPerInterval =
		cpu_to_le16(max_packet_size * max_packet_mult *
		cpu_to_le16(UVC_STREAMING_SS_MAX_PACKET_SIZE * 1 *
			    (opts->streaming_maxburst + 1));

	/* Allocate endpoints. */
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
	module_param(streaming_maxpacket, uint, S_IRUGO|S_IWUSR);	\
	MODULE_PARM_DESC(streaming_maxpacket, "1-1023 (FS), 1-3072 (hs/ss)"); \
									\
	static unsigned int streaming_maxburst;				\
	static unsigned int streaming_maxburst = 2;			\
	module_param(streaming_maxburst, uint, S_IRUGO|S_IWUSR);	\
	MODULE_PARM_DESC(streaming_maxburst, "0 - 15 (ss only)");	\
									\