1 #ifndef __UAPI_MSM_FD__ 2 #define __UAPI_MSM_FD__ 3 4 #include <linux/videodev2.h> 5 #include <linux/types.h> 6 7 /* 8 * struct msm_fd_event - Structure contain event info. 9 * @buf_index: Buffer index. 10 * @frame_id: Frame id. 11 * @face_cnt: Detected faces. 12 */ 13 struct msm_fd_event { 14 __u32 buf_index; 15 __u32 frame_id; 16 __u32 face_cnt; 17 }; 18 19 /* 20 * enum msm_fd_pose - Face pose. 21 */ 22 enum msm_fd_pose { 23 MSM_FD_POSE_FRONT, 24 MSM_FD_POSE_RIGHT_DIAGONAL, 25 MSM_FD_POSE_RIGHT, 26 MSM_FD_POSE_LEFT_DIAGONAL, 27 MSM_FD_POSE_LEFT, 28 }; 29 30 /* 31 * struct msm_fd_face_data - Structure contain detected face data. 32 * @pose: refer to enum msm_fd_pose. 33 * @angle: Face angle 34 * @confidence: Face confidence level. 35 * @reserved: Reserved data for future use. 36 * @face: Face rectangle. 37 */ 38 struct msm_fd_face_data { 39 __u32 pose; 40 __u32 angle; 41 __u32 confidence; 42 __u32 reserved; 43 struct v4l2_rect face; 44 }; 45 46 /* 47 * struct msm_fd_result - Structure contain detected faces result. 48 * @frame_id: Frame id of requested result. 49 * @face_cnt: Number of result faces, driver can modify this value (to smaller) 50 * @face_data: Pointer to array of face data structures. 51 * Array size should not be smaller then face_cnt. 52 */ 53 struct msm_fd_result { 54 __u32 frame_id; 55 __u32 face_cnt; 56 struct msm_fd_face_data *face_data; 57 }; 58 59 /* MSM FD private ioctl ID */ 60 #define VIDIOC_MSM_FD_GET_RESULT \ 61 _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_fd_result) 62 63 /* MSM FD event ID */ 64 #define MSM_EVENT_FD (V4L2_EVENT_PRIVATE_START) 65 66 /* MSM FD control ID's */ 67 #define V4L2_CID_FD_SPEED (V4L2_CID_PRIVATE_BASE) 68 #define V4L2_CID_FD_FACE_ANGLE (V4L2_CID_PRIVATE_BASE + 1) 69 #define V4L2_CID_FD_MIN_FACE_SIZE (V4L2_CID_PRIVATE_BASE + 2) 70 #define V4L2_CID_FD_FACE_DIRECTION (V4L2_CID_PRIVATE_BASE + 3) 71 #define V4L2_CID_FD_DETECTION_THRESHOLD (V4L2_CID_PRIVATE_BASE + 4) 72 #define V4L2_CID_FD_WORK_MEMORY_SIZE (V4L2_CID_PRIVATE_BASE + 5) 73 #define V4L2_CID_FD_WORK_MEMORY_FD (V4L2_CID_PRIVATE_BASE + 6) 74 75 #endif 76 77