diff options
Diffstat (limited to 'drivers/media/video/uvc/uvcvideo.h')
-rw-r--r-- | drivers/media/video/uvc/uvcvideo.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index 67f88d85bb16..e43deb715d98 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/videodev2.h> | 13 | #include <linux/videodev2.h> |
14 | #include <media/media-device.h> | 14 | #include <media/media-device.h> |
15 | #include <media/v4l2-device.h> | 15 | #include <media/v4l2-device.h> |
16 | #include <media/v4l2-event.h> | ||
17 | #include <media/v4l2-fh.h> | ||
16 | #include <media/videobuf2-core.h> | 18 | #include <media/videobuf2-core.h> |
17 | 19 | ||
18 | /* -------------------------------------------------------------------------- | 20 | /* -------------------------------------------------------------------------- |
@@ -153,6 +155,7 @@ struct uvc_control_info { | |||
153 | 155 | ||
154 | struct uvc_control_mapping { | 156 | struct uvc_control_mapping { |
155 | struct list_head list; | 157 | struct list_head list; |
158 | struct list_head ev_subs; | ||
156 | 159 | ||
157 | struct uvc_control_info *ctrl; | 160 | struct uvc_control_info *ctrl; |
158 | 161 | ||
@@ -524,6 +527,7 @@ enum uvc_handle_state { | |||
524 | }; | 527 | }; |
525 | 528 | ||
526 | struct uvc_fh { | 529 | struct uvc_fh { |
530 | struct v4l2_fh vfh; | ||
527 | struct uvc_video_chain *chain; | 531 | struct uvc_video_chain *chain; |
528 | struct uvc_streaming *stream; | 532 | struct uvc_streaming *stream; |
529 | enum uvc_handle_state state; | 533 | enum uvc_handle_state state; |
@@ -643,6 +647,8 @@ extern int uvc_status_suspend(struct uvc_device *dev); | |||
643 | extern int uvc_status_resume(struct uvc_device *dev); | 647 | extern int uvc_status_resume(struct uvc_device *dev); |
644 | 648 | ||
645 | /* Controls */ | 649 | /* Controls */ |
650 | extern const struct v4l2_subscribed_event_ops uvc_ctrl_sub_ev_ops; | ||
651 | |||
646 | extern int uvc_query_v4l2_ctrl(struct uvc_video_chain *chain, | 652 | extern int uvc_query_v4l2_ctrl(struct uvc_video_chain *chain, |
647 | struct v4l2_queryctrl *v4l2_ctrl); | 653 | struct v4l2_queryctrl *v4l2_ctrl); |
648 | extern int uvc_query_v4l2_menu(struct uvc_video_chain *chain, | 654 | extern int uvc_query_v4l2_menu(struct uvc_video_chain *chain, |
@@ -655,14 +661,18 @@ extern void uvc_ctrl_cleanup_device(struct uvc_device *dev); | |||
655 | extern int uvc_ctrl_resume_device(struct uvc_device *dev); | 661 | extern int uvc_ctrl_resume_device(struct uvc_device *dev); |
656 | 662 | ||
657 | extern int uvc_ctrl_begin(struct uvc_video_chain *chain); | 663 | extern int uvc_ctrl_begin(struct uvc_video_chain *chain); |
658 | extern int __uvc_ctrl_commit(struct uvc_video_chain *chain, int rollback); | 664 | extern int __uvc_ctrl_commit(struct uvc_fh *handle, int rollback, |
659 | static inline int uvc_ctrl_commit(struct uvc_video_chain *chain) | 665 | const struct v4l2_ext_control *xctrls, |
666 | unsigned int xctrls_count); | ||
667 | static inline int uvc_ctrl_commit(struct uvc_fh *handle, | ||
668 | const struct v4l2_ext_control *xctrls, | ||
669 | unsigned int xctrls_count) | ||
660 | { | 670 | { |
661 | return __uvc_ctrl_commit(chain, 0); | 671 | return __uvc_ctrl_commit(handle, 0, xctrls, xctrls_count); |
662 | } | 672 | } |
663 | static inline int uvc_ctrl_rollback(struct uvc_video_chain *chain) | 673 | static inline int uvc_ctrl_rollback(struct uvc_fh *handle) |
664 | { | 674 | { |
665 | return __uvc_ctrl_commit(chain, 1); | 675 | return __uvc_ctrl_commit(handle, 1, NULL, 0); |
666 | } | 676 | } |
667 | 677 | ||
668 | extern int uvc_ctrl_get(struct uvc_video_chain *chain, | 678 | extern int uvc_ctrl_get(struct uvc_video_chain *chain, |