• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __UAPI_MEDIA_MSMB_BUF_MNGR_H__
2 #define __UAPI_MEDIA_MSMB_BUF_MNGR_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 	uint32_t flags;
23 	struct timeval timestamp;
24 	uint32_t index;
25 	uint32_t reserved;
26 	enum msm_camera_buf_mngr_buf_type type;
27 	struct msm_camera_user_buf_cont_t user_buf;
28 };
29 
30 struct msm_buf_mngr_main_cont_info {
31 	uint32_t session_id;
32 	uint32_t stream_id;
33 	enum msm_camera_buf_mngr_cmd cmd;
34 	uint32_t cnt;
35 	int32_t cont_fd;
36 };
37 
38 struct v4l2_subdev *msm_buf_mngr_get_subdev(void);
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 
59 #ifdef CONFIG_COMPAT
60 struct msm_buf_mngr_info32_t {
61 	uint32_t session_id;
62 	uint32_t stream_id;
63 	uint32_t frame_id;
64 	uint32_t flags;
65 	struct compat_timeval timestamp;
66 	uint32_t index;
67 	uint32_t reserved;
68 	enum msm_camera_buf_mngr_buf_type type;
69 	struct msm_camera_user_buf_cont_t user_buf;
70 };
71 
72 #define VIDIOC_MSM_BUF_MNGR_GET_BUF32 \
73 	_IOWR('V', BASE_VIDIOC_PRIVATE + 33, struct msm_buf_mngr_info32_t)
74 
75 #define VIDIOC_MSM_BUF_MNGR_PUT_BUF32 \
76 	_IOWR('V', BASE_VIDIOC_PRIVATE + 34, struct msm_buf_mngr_info32_t)
77 
78 #define VIDIOC_MSM_BUF_MNGR_BUF_DONE32 \
79 	_IOWR('V', BASE_VIDIOC_PRIVATE + 35, struct msm_buf_mngr_info32_t)
80 
81 #endif
82 
83 #endif
84