1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef __UAPI_CAM_SYNC_H__ 20 #define __UAPI_CAM_SYNC_H__ 21 #include <linux/videodev2.h> 22 #include <linux/types.h> 23 #include <linux/ioctl.h> 24 #include <linux/media.h> 25 #define CAM_SYNC_DEVICE_NAME "cam_sync_device" 26 #define CAM_SYNC_V4L_EVENT (V4L2_EVENT_PRIVATE_START + 0) 27 #define CAM_SYNC_V4L_EVENT_ID_CB_TRIG 0 28 #define CAM_SYNC_USER_PAYLOAD_SIZE 2 29 #define CAM_SYNC_DEVICE_TYPE (MEDIA_ENT_F_OLD_BASE) 30 #define CAM_SYNC_GET_PAYLOAD_PTR(ev,type) (type *) ((char *) ev.u.data + sizeof(struct cam_sync_ev_header)) 31 #define CAM_SYNC_GET_HEADER_PTR(ev) ((struct cam_sync_ev_header *) ev.u.data) 32 #define CAM_SYNC_STATE_INVALID 0 33 #define CAM_SYNC_STATE_ACTIVE 1 34 #define CAM_SYNC_STATE_SIGNALED_SUCCESS 2 35 #define CAM_SYNC_STATE_SIGNALED_ERROR 3 36 struct cam_sync_ev_header { 37 int32_t sync_obj; 38 int32_t status; 39 }; 40 struct cam_sync_info { 41 char name[64]; 42 int32_t sync_obj; 43 }; 44 struct cam_sync_signal { 45 int32_t sync_obj; 46 uint32_t sync_state; 47 }; 48 struct cam_sync_merge { 49 __u64 sync_objs; 50 uint32_t num_objs; 51 int32_t merged; 52 }; 53 struct cam_sync_userpayload_info { 54 int32_t sync_obj; 55 uint32_t reserved; 56 __u64 payload[CAM_SYNC_USER_PAYLOAD_SIZE]; 57 }; 58 struct cam_sync_wait { 59 int32_t sync_obj; 60 uint32_t reserved; 61 uint64_t timeout_ms; 62 }; 63 struct cam_private_ioctl_arg { 64 __u32 id; 65 __u32 size; 66 __u32 result; 67 __u32 reserved; 68 __u64 ioctl_ptr; 69 }; 70 #define CAM_PRIVATE_IOCTL_CMD _IOWR('V', BASE_VIDIOC_PRIVATE, struct cam_private_ioctl_arg) 71 #define CAM_SYNC_CREATE 0 72 #define CAM_SYNC_DESTROY 1 73 #define CAM_SYNC_SIGNAL 2 74 #define CAM_SYNC_MERGE 3 75 #define CAM_SYNC_REGISTER_PAYLOAD 4 76 #define CAM_SYNC_DEREGISTER_PAYLOAD 5 77 #define CAM_SYNC_WAIT 6 78 #endif 79 80