1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef __UAPI_CAM_SYNC_H__ 8 #define __UAPI_CAM_SYNC_H__ 9 #include <linux/videodev2.h> 10 #include <linux/types.h> 11 #include <linux/ioctl.h> 12 #include <linux/media.h> 13 #define CAM_SYNC_DEVICE_NAME "cam_sync_device" 14 #define CAM_SYNC_V4L_EVENT (V4L2_EVENT_PRIVATE_START + 0) 15 #define CAM_SYNC_V4L_EVENT_ID_CB_TRIG 0 16 #define CAM_SYNC_USER_PAYLOAD_SIZE 2 17 #define CAM_SYNC_DEVICE_TYPE (MEDIA_ENT_F_OLD_BASE) 18 #define CAM_SYNC_GET_PAYLOAD_PTR(ev,type) (type *) ((char *) ev.u.data + sizeof(struct cam_sync_ev_header)) 19 #define CAM_SYNC_GET_HEADER_PTR(ev) ((struct cam_sync_ev_header *) ev.u.data) 20 #define CAM_SYNC_STATE_INVALID 0 21 #define CAM_SYNC_STATE_ACTIVE 1 22 #define CAM_SYNC_STATE_SIGNALED_SUCCESS 2 23 #define CAM_SYNC_STATE_SIGNALED_ERROR 3 24 struct cam_sync_ev_header { 25 int32_t sync_obj; 26 int32_t status; 27 }; 28 struct cam_sync_info { 29 char name[64]; 30 int32_t sync_obj; 31 }; 32 struct cam_sync_signal { 33 int32_t sync_obj; 34 uint32_t sync_state; 35 }; 36 struct cam_sync_merge { 37 __u64 sync_objs; 38 uint32_t num_objs; 39 int32_t merged; 40 }; 41 struct cam_sync_userpayload_info { 42 int32_t sync_obj; 43 uint32_t reserved; 44 __u64 payload[CAM_SYNC_USER_PAYLOAD_SIZE]; 45 }; 46 struct cam_sync_wait { 47 int32_t sync_obj; 48 uint32_t reserved; 49 uint64_t timeout_ms; 50 }; 51 struct cam_private_ioctl_arg { 52 __u32 id; 53 __u32 size; 54 __u32 result; 55 __u32 reserved; 56 __u64 ioctl_ptr; 57 }; 58 #define CAM_PRIVATE_IOCTL_CMD _IOWR('V', BASE_VIDIOC_PRIVATE, struct cam_private_ioctl_arg) 59 #define CAM_SYNC_CREATE 0 60 #define CAM_SYNC_DESTROY 1 61 #define CAM_SYNC_SIGNAL 2 62 #define CAM_SYNC_MERGE 3 63 #define CAM_SYNC_REGISTER_PAYLOAD 4 64 #define CAM_SYNC_DEREGISTER_PAYLOAD 5 65 #define CAM_SYNC_WAIT 6 66 #endif 67