1 #ifndef __UAPI_MEDIA_MSMB_GENERIC_BUF_MGR_H__
2 #define __UAPI_MEDIA_MSMB_GENERIC_BUF_MGR_H__
3 
4 #include <media/msmb_camera.h>
5 
6 enum msm_camera_buf_mngr_cmd {
7 	MSM_CAMERA_BUF_MNGR_CONT_MAP,
8 	MSM_CAMERA_BUF_MNGR_CONT_UNMAP,
9 	MSM_CAMERA_BUF_MNGR_CONT_MAX,
10 };
11 
12 enum msm_camera_buf_mngr_buf_type {
13 	MSM_CAMERA_BUF_MNGR_BUF_PLANAR,
14 	MSM_CAMERA_BUF_MNGR_BUF_USER,
15 	MSM_CAMERA_BUF_MNGR_BUF_INVALID,
16 };
17 
18 struct msm_buf_mngr_info {
19 	uint32_t session_id;
20 	uint32_t stream_id;
21 	uint32_t frame_id;
22 	struct timeval timestamp;
23 	uint32_t index;
24 	uint32_t reserved;
25 	enum msm_camera_buf_mngr_buf_type type;
26 	struct msm_camera_user_buf_cont_t user_buf;
27 };
28 
29 struct msm_buf_mngr_main_cont_info {
30 	uint32_t session_id;
31 	uint32_t stream_id;
32 	enum msm_camera_buf_mngr_cmd cmd;
33 	uint32_t cnt;
34 	int32_t cont_fd;
35 };
36 
37 #define MSM_CAMERA_BUF_MNGR_IOCTL_ID_BASE 0
38 #define MSM_CAMERA_BUF_MNGR_IOCTL_ID_GET_BUF_BY_IDX 1
39 
40 #define VIDIOC_MSM_BUF_MNGR_GET_BUF \
41 	_IOWR('V', BASE_VIDIOC_PRIVATE + 33, struct msm_buf_mngr_info)
42 
43 #define VIDIOC_MSM_BUF_MNGR_PUT_BUF \
44 	_IOWR('V', BASE_VIDIOC_PRIVATE + 34, struct msm_buf_mngr_info)
45 
46 #define VIDIOC_MSM_BUF_MNGR_BUF_DONE \
47 	_IOWR('V', BASE_VIDIOC_PRIVATE + 35, struct msm_buf_mngr_info)
48 
49 #define VIDIOC_MSM_BUF_MNGR_CONT_CMD \
50 	_IOWR('V', BASE_VIDIOC_PRIVATE + 36, struct msm_buf_mngr_main_cont_info)
51 
52 #define VIDIOC_MSM_BUF_MNGR_INIT \
53 	_IOWR('V', BASE_VIDIOC_PRIVATE + 37, struct msm_buf_mngr_info)
54 
55 #define VIDIOC_MSM_BUF_MNGR_DEINIT \
56 	_IOWR('V', BASE_VIDIOC_PRIVATE + 38, struct msm_buf_mngr_info)
57 
58 #define VIDIOC_MSM_BUF_MNGR_FLUSH \
59 	_IOWR('V', BASE_VIDIOC_PRIVATE + 39, struct msm_buf_mngr_info)
60 
61 #define VIDIOC_MSM_BUF_MNGR_IOCTL_CMD \
62 	_IOWR('V', BASE_VIDIOC_PRIVATE + 40, \
63 	struct msm_camera_private_ioctl_arg)
64 
65 #endif
66 
67