hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/usb/uvc/uvcvideo.h
....@@ -157,12 +157,19 @@
157157 #define UVC_GUID_FORMAT_INVI \
158158 { 'I', 'N', 'V', 'I', 0xdb, 0x57, 0x49, 0x5e, \
159159 0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
160
+#define UVC_GUID_FORMAT_CNF4 \
161
+ { 'C', ' ', ' ', ' ', 0x00, 0x00, 0x10, 0x00, \
162
+ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
160163
161164 #define UVC_GUID_FORMAT_D3DFMT_L8 \
162165 {0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, \
163166 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
164167 #define UVC_GUID_FORMAT_KSMEDIA_L8_IR \
165168 {0x32, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, \
169
+ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
170
+
171
+#define UVC_GUID_FORMAT_HEVC \
172
+ { 'H', 'E', 'V', 'C', 0x00, 0x00, 0x10, 0x00, \
166173 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
167174
168175
....@@ -198,6 +205,7 @@
198205 #define UVC_QUIRK_RESTRICT_FRAME_RATE 0x00000200
199206 #define UVC_QUIRK_RESTORE_CTRLS_ON_INIT 0x00000400
200207 #define UVC_QUIRK_FORCE_Y8 0x00000800
208
+#define UVC_QUIRK_FORCE_BPP 0x00001000
201209
202210 /* Format flags */
203211 #define UVC_FMT_FLAG_COMPRESSED 0x00000001
....@@ -237,7 +245,7 @@
237245 enum v4l2_ctrl_type v4l2_type;
238246 u32 data_type;
239247
240
- struct uvc_menu_info *menu_info;
248
+ const struct uvc_menu_info *menu_info;
241249 u32 menu_count;
242250
243251 u32 master_id;
....@@ -369,7 +377,9 @@
369377 u8 type;
370378 u8 index;
371379 u8 bpp;
372
- u8 colorspace;
380
+ enum v4l2_colorspace colorspace;
381
+ enum v4l2_xfer_func xfer_func;
382
+ enum v4l2_ycbcr_encoding ycbcr_enc;
373383 u32 fcc;
374384 u32 flags;
375385
....@@ -491,7 +501,7 @@
491501 unsigned int max_sof; /* Maximum STC.SOF value */
492502 };
493503
494
-#define UVC_METATADA_BUF_SIZE 1024
504
+#define UVC_METADATA_BUF_SIZE 1024
495505
496506 /**
497507 * struct uvc_copy_op: Context structure to schedule asynchronous memcpy
....@@ -619,6 +629,11 @@
619629 for ((uvc_urb) = &(uvc_streaming)->uvc_urb[0]; \
620630 (uvc_urb) < &(uvc_streaming)->uvc_urb[UVC_URBS]; \
621631 ++(uvc_urb))
632
+
633
+static inline u32 uvc_urb_index(const struct uvc_urb *uvc_urb)
634
+{
635
+ return uvc_urb - &uvc_urb->stream->uvc_urb[0];
636
+}
622637
623638 struct uvc_device_info {
624639 u32 quirks;
....@@ -748,6 +763,7 @@
748763 int uvc_create_buffers(struct uvc_video_queue *queue,
749764 struct v4l2_create_buffers *v4l2_cb);
750765 int uvc_queue_buffer(struct uvc_video_queue *queue,
766
+ struct media_device *mdev,
751767 struct v4l2_buffer *v4l2_buf);
752768 int uvc_export_buffer(struct uvc_video_queue *queue,
753769 struct v4l2_exportbuffer *exp);
....@@ -786,7 +802,8 @@
786802 int uvc_video_init(struct uvc_streaming *stream);
787803 int uvc_video_suspend(struct uvc_streaming *stream);
788804 int uvc_video_resume(struct uvc_streaming *stream, int reset);
789
-int uvc_video_enable(struct uvc_streaming *stream, int enable);
805
+int uvc_video_start_streaming(struct uvc_streaming *stream);
806
+void uvc_video_stop_streaming(struct uvc_streaming *stream);
790807 int uvc_probe_video(struct uvc_streaming *stream,
791808 struct uvc_streaming_control *probe);
792809 int uvc_query_ctrl(struct uvc_device *dev, u8 query, u8 unit,