blob: 9388d99f9b6266950450f20a892bf2f67627d055 [file] [log] [blame]
Sunid Wilson4584b5f2012-04-13 12:48:25 -07001#ifndef __LINUX_MSM_GESTURES_H
2#define __LINUX_MSM_GESTURES_H
3
4#include <linux/types.h>
5#include <linux/ioctl.h>
6#include <media/msm_camera.h>
7
8#define MSM_GES_IOCTL_CTRL_COMMAND \
9 _IOW('V', BASE_VIDIOC_PRIVATE + 20, struct v4l2_control)
10
11#define VIDIOC_MSM_GESTURE_EVT \
12 _IOWR('V', BASE_VIDIOC_PRIVATE + 21, struct v4l2_event)
13
14#define MSM_GES_GET_EVT_PAYLOAD \
15 _IOW('V', BASE_VIDIOC_PRIVATE + 22, struct msm_ges_evt)
16
17#define VIDIOC_MSM_GESTURE_CAM_EVT \
18 _IOWR('V', BASE_VIDIOC_PRIVATE + 23, int)
19
20#define MSM_GES_RESP_V4L2 MSM_CAM_RESP_MAX
21#define MSM_GES_RESP_MAX (MSM_GES_RESP_V4L2 + 1)
22
23#define MSM_SVR_RESP_MAX MSM_GES_RESP_MAX
24
25
26#define MSM_V4L2_GES_BASE 100
27#define MSM_V4L2_GES_OPEN (MSM_V4L2_GES_BASE + 0)
28#define MSM_V4L2_GES_CLOSE (MSM_V4L2_GES_BASE + 1)
29#define MSM_V4L2_GES_CAM_OPEN (MSM_V4L2_GES_BASE + 2)
30#define MSM_V4L2_GES_CAM_CLOSE (MSM_V4L2_GES_BASE + 3)
31
32#define MSM_GES_APP_EVT_MIN (V4L2_EVENT_PRIVATE_START + 0x14)
33#define MSM_GES_APP_NOTIFY_EVENT (MSM_GES_APP_EVT_MIN + 0)
34#define MSM_GES_APP_NOTIFY_ERROR_EVENT (MSM_GES_APP_EVT_MIN + 1)
35#define MSM_GES_APP_EVT_MAX (MSM_GES_APP_EVT_MIN + 2)
36
37#define MSM_GESTURE_CID_CTRL_CMD V4L2_CID_BRIGHTNESS
38
39#define MAX_GES_EVENTS 25
40
41struct msm_ges_ctrl_cmd {
42 int type;
43 void *value;
44 int len;
45 int fd;
46 uint32_t cookie;
47};
48
49struct msm_ges_evt {
50 void *evt_data;
51 int evt_len;
52};
53
54#endif /*__LINUX_MSM_GESTURES_H*/