Home | History | Annotate | Download | only in media
      1 /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
      2  *
      3  * This program is free software; you can redistribute it and/or modify
      4  * it under the terms of the GNU General Public License version 2 and
      5  * only version 2 as published by the Free Software Foundation.
      6  *
      7  * This program is distributed in the hope that it will be useful,
      8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     10  * GNU General Public License for more details.
     11  *
     12  */
     13 #ifndef __LINUX_MSM_GESTURES_H
     14 #define __LINUX_MSM_GESTURES_H
     15 
     16 #include <linux/types.h>
     17 #include <linux/ioctl.h>
     18 #include <media/msm_camera.h>
     19 
     20 #define MSM_GES_IOCTL_CTRL_COMMAND \
     21 	_IOW('V', BASE_VIDIOC_PRIVATE + 20, struct v4l2_control)
     22 
     23 #define VIDIOC_MSM_GESTURE_EVT \
     24 	_IOWR('V', BASE_VIDIOC_PRIVATE + 21, struct v4l2_event)
     25 
     26 #define MSM_GES_GET_EVT_PAYLOAD \
     27 	_IOW('V', BASE_VIDIOC_PRIVATE + 22, struct msm_ges_evt)
     28 
     29 #define VIDIOC_MSM_GESTURE_CAM_EVT \
     30 	_IOWR('V', BASE_VIDIOC_PRIVATE + 23, int)
     31 
     32 #define MSM_GES_RESP_V4L2  MSM_CAM_RESP_MAX
     33 #define MSM_GES_RESP_MAX  (MSM_GES_RESP_V4L2 + 1)
     34 
     35 #define MSM_SVR_RESP_MAX  MSM_GES_RESP_MAX
     36 
     37 
     38 #define MSM_V4L2_GES_BASE                             100
     39 #define MSM_V4L2_GES_OPEN         (MSM_V4L2_GES_BASE + 0)
     40 #define MSM_V4L2_GES_CLOSE        (MSM_V4L2_GES_BASE + 1)
     41 #define MSM_V4L2_GES_CAM_OPEN     (MSM_V4L2_GES_BASE + 2)
     42 #define MSM_V4L2_GES_CAM_CLOSE    (MSM_V4L2_GES_BASE + 3)
     43 
     44 #define MSM_GES_APP_EVT_MIN     (V4L2_EVENT_PRIVATE_START + 0x14)
     45 #define MSM_GES_APP_NOTIFY_EVENT        (MSM_GES_APP_EVT_MIN + 0)
     46 #define MSM_GES_APP_NOTIFY_ERROR_EVENT  (MSM_GES_APP_EVT_MIN + 1)
     47 #define MSM_GES_APP_EVT_MAX             (MSM_GES_APP_EVT_MIN + 2)
     48 
     49 #define MSM_GESTURE_CID_CTRL_CMD V4L2_CID_BRIGHTNESS
     50 
     51 #define MAX_GES_EVENTS 25
     52 
     53 struct msm_ges_ctrl_cmd {
     54 	int type;
     55 	void *value;
     56 	int len;
     57 	int fd;
     58 	uint32_t cookie;
     59 };
     60 
     61 struct msm_ges_evt {
     62 	void *evt_data;
     63 	int evt_len;
     64 };
     65 
     66 #endif /*__LINUX_MSM_GESTURES_H*/
     67