mirror of https://github.com/OpenIPC/firmware.git
43 lines
1.1 KiB
Diff
43 lines
1.1 KiB
Diff
--- linux-4.9.37/drivers/usb/gadget/function/uvc.h 2017-07-12 16:42:41.000000000 +0300
|
|
+++ linux-4.9.y/drivers/usb/gadget/function/uvc.h 2021-06-07 13:01:34.000000000 +0300
|
|
@@ -17,6 +17,7 @@
|
|
#include <linux/types.h>
|
|
#include <linux/usb/ch9.h>
|
|
|
|
+#define UVC_SG_REQ
|
|
#define UVC_EVENT_FIRST (V4L2_EVENT_PRIVATE_START + 0)
|
|
#define UVC_EVENT_CONNECT (V4L2_EVENT_PRIVATE_START + 0)
|
|
#define UVC_EVENT_DISCONNECT (V4L2_EVENT_PRIVATE_START + 1)
|
|
@@ -95,8 +96,11 @@
|
|
/* ------------------------------------------------------------------------
|
|
* Driver specific constants
|
|
*/
|
|
-
|
|
-#define UVC_NUM_REQUESTS 4
|
|
+#ifdef UVC_SG_REQ
|
|
+#define UVC_NUM_REQUESTS 1
|
|
+#else
|
|
+#define UVC_NUM_REQUESTS 32
|
|
+#endif
|
|
#define UVC_MAX_REQUEST_SIZE 64
|
|
#define UVC_MAX_EVENTS 4
|
|
|
|
@@ -106,6 +110,7 @@
|
|
|
|
struct uvc_video
|
|
{
|
|
+ struct uvc_device *uvc;
|
|
struct usb_ep *ep;
|
|
|
|
/* Frame parameters */
|
|
@@ -116,6 +121,9 @@
|
|
unsigned int imagesize;
|
|
struct mutex mutex; /* protects frame parameters */
|
|
|
|
+ unsigned int num_sgs; /* record base */
|
|
+ __u8 *sg_buf;
|
|
+
|
|
/* Requests */
|
|
unsigned int req_size;
|
|
struct usb_request *req[UVC_NUM_REQUESTS];
|