| .. | .. |
|---|
| 157 | 157 | #define UVC_GUID_FORMAT_INVI \ |
|---|
| 158 | 158 | { 'I', 'N', 'V', 'I', 0xdb, 0x57, 0x49, 0x5e, \ |
|---|
| 159 | 159 | 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} |
|---|
| 160 | 163 | |
|---|
| 161 | 164 | #define UVC_GUID_FORMAT_D3DFMT_L8 \ |
|---|
| 162 | 165 | {0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, \ |
|---|
| 163 | 166 | 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} |
|---|
| 164 | 167 | #define UVC_GUID_FORMAT_KSMEDIA_L8_IR \ |
|---|
| 165 | 168 | {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, \ |
|---|
| 166 | 173 | 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} |
|---|
| 167 | 174 | |
|---|
| 168 | 175 | |
|---|
| .. | .. |
|---|
| 198 | 205 | #define UVC_QUIRK_RESTRICT_FRAME_RATE 0x00000200 |
|---|
| 199 | 206 | #define UVC_QUIRK_RESTORE_CTRLS_ON_INIT 0x00000400 |
|---|
| 200 | 207 | #define UVC_QUIRK_FORCE_Y8 0x00000800 |
|---|
| 208 | +#define UVC_QUIRK_FORCE_BPP 0x00001000 |
|---|
| 209 | +#define UVC_QUIRK_WAKE_AUTOSUSPEND 0x00002000 |
|---|
| 201 | 210 | |
|---|
| 202 | 211 | /* Format flags */ |
|---|
| 203 | 212 | #define UVC_FMT_FLAG_COMPRESSED 0x00000001 |
|---|
| .. | .. |
|---|
| 237 | 246 | enum v4l2_ctrl_type v4l2_type; |
|---|
| 238 | 247 | u32 data_type; |
|---|
| 239 | 248 | |
|---|
| 240 | | - struct uvc_menu_info *menu_info; |
|---|
| 249 | + const struct uvc_menu_info *menu_info; |
|---|
| 241 | 250 | u32 menu_count; |
|---|
| 242 | 251 | |
|---|
| 243 | 252 | u32 master_id; |
|---|
| .. | .. |
|---|
| 369 | 378 | u8 type; |
|---|
| 370 | 379 | u8 index; |
|---|
| 371 | 380 | u8 bpp; |
|---|
| 372 | | - u8 colorspace; |
|---|
| 381 | + enum v4l2_colorspace colorspace; |
|---|
| 382 | + enum v4l2_xfer_func xfer_func; |
|---|
| 383 | + enum v4l2_ycbcr_encoding ycbcr_enc; |
|---|
| 373 | 384 | u32 fcc; |
|---|
| 374 | 385 | u32 flags; |
|---|
| 375 | 386 | |
|---|
| .. | .. |
|---|
| 491 | 502 | unsigned int max_sof; /* Maximum STC.SOF value */ |
|---|
| 492 | 503 | }; |
|---|
| 493 | 504 | |
|---|
| 494 | | -#define UVC_METATADA_BUF_SIZE 1024 |
|---|
| 505 | +#define UVC_METADATA_BUF_SIZE 1024 |
|---|
| 495 | 506 | |
|---|
| 496 | 507 | /** |
|---|
| 497 | 508 | * struct uvc_copy_op: Context structure to schedule asynchronous memcpy |
|---|
| .. | .. |
|---|
| 620 | 631 | (uvc_urb) < &(uvc_streaming)->uvc_urb[UVC_URBS]; \ |
|---|
| 621 | 632 | ++(uvc_urb)) |
|---|
| 622 | 633 | |
|---|
| 634 | +static inline u32 uvc_urb_index(const struct uvc_urb *uvc_urb) |
|---|
| 635 | +{ |
|---|
| 636 | + return uvc_urb - &uvc_urb->stream->uvc_urb[0]; |
|---|
| 637 | +} |
|---|
| 638 | + |
|---|
| 623 | 639 | struct uvc_device_info { |
|---|
| 624 | 640 | u32 quirks; |
|---|
| 625 | 641 | u32 meta_format; |
|---|
| .. | .. |
|---|
| 657 | 673 | /* Status Interrupt Endpoint */ |
|---|
| 658 | 674 | struct usb_host_endpoint *int_ep; |
|---|
| 659 | 675 | struct urb *int_urb; |
|---|
| 676 | + bool flush_status; |
|---|
| 660 | 677 | u8 *status; |
|---|
| 661 | 678 | struct input_dev *input; |
|---|
| 662 | 679 | char input_phys[64]; |
|---|
| .. | .. |
|---|
| 748 | 765 | int uvc_create_buffers(struct uvc_video_queue *queue, |
|---|
| 749 | 766 | struct v4l2_create_buffers *v4l2_cb); |
|---|
| 750 | 767 | int uvc_queue_buffer(struct uvc_video_queue *queue, |
|---|
| 768 | + struct media_device *mdev, |
|---|
| 751 | 769 | struct v4l2_buffer *v4l2_buf); |
|---|
| 752 | 770 | int uvc_export_buffer(struct uvc_video_queue *queue, |
|---|
| 753 | 771 | struct v4l2_exportbuffer *exp); |
|---|
| .. | .. |
|---|
| 786 | 804 | int uvc_video_init(struct uvc_streaming *stream); |
|---|
| 787 | 805 | int uvc_video_suspend(struct uvc_streaming *stream); |
|---|
| 788 | 806 | int uvc_video_resume(struct uvc_streaming *stream, int reset); |
|---|
| 789 | | -int uvc_video_enable(struct uvc_streaming *stream, int enable); |
|---|
| 807 | +int uvc_video_start_streaming(struct uvc_streaming *stream); |
|---|
| 808 | +void uvc_video_stop_streaming(struct uvc_streaming *stream); |
|---|
| 790 | 809 | int uvc_probe_video(struct uvc_streaming *stream, |
|---|
| 791 | 810 | struct uvc_streaming_control *probe); |
|---|
| 792 | 811 | int uvc_query_ctrl(struct uvc_device *dev, u8 query, u8 unit, |
|---|
| .. | .. |
|---|
| 824 | 843 | int uvc_ctrl_init_device(struct uvc_device *dev); |
|---|
| 825 | 844 | void uvc_ctrl_cleanup_device(struct uvc_device *dev); |
|---|
| 826 | 845 | int uvc_ctrl_restore_values(struct uvc_device *dev); |
|---|
| 827 | | -bool uvc_ctrl_status_event(struct urb *urb, struct uvc_video_chain *chain, |
|---|
| 846 | +bool uvc_ctrl_status_event_async(struct urb *urb, struct uvc_video_chain *chain, |
|---|
| 847 | + struct uvc_control *ctrl, const u8 *data); |
|---|
| 848 | +void uvc_ctrl_status_event(struct uvc_video_chain *chain, |
|---|
| 828 | 849 | struct uvc_control *ctrl, const u8 *data); |
|---|
| 829 | 850 | |
|---|
| 830 | 851 | int uvc_ctrl_begin(struct uvc_video_chain *chain); |
|---|