msm: mpq8064: Enable v4l2 event handle in VCAP
This will allow client to subscribe and receive events regarding
VCAP device
Change-Id: If8b6723feaa29dcf4e6a3bb9275ccc776081c830
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
diff --git a/include/media/vcap_fmt.h b/include/media/vcap_fmt.h
index 51b45ac..dfb62c4 100644
--- a/include/media/vcap_fmt.h
+++ b/include/media/vcap_fmt.h
@@ -15,7 +15,19 @@
#define VCAP_FMT_H
#define V4L2_BUF_TYPE_INTERLACED_IN_DECODER (V4L2_BUF_TYPE_PRIVATE)
-#define V4L2_BUF_TYPE_VP_OUT (V4L2_BUF_TYPE_PRIVATE + 1)
+
+#define VCAP_GENERIC_NOTIFY_EVENT 0
+#define VCAP_VC_PIX_ERR_EVENT 1
+#define VCAP_VC_LINE_ERR_EVENT 2
+#define VCAP_VC_VSYNC_ERR_EVENT 3
+#define VCAP_VC_NPL_OFLOW_ERR_EVENT 4
+#define VCAP_VC_LBUF_OFLOW_ERR_EVENT 5
+#define VCAP_VC_BUF_OVERWRITE_EVENT 6
+#define VCAP_VP_REG_R_ERR_EVENT 7
+#define VCAP_VP_REG_W_ERR_EVENT 8
+#define VCAP_VP_IN_HEIGHT_ERR_EVENT 9
+#define VCAP_VP_IN_WIDTH_ERR_EVENT 10
+#define VCAP_MAX_NOTIFY_EVENT 11
enum hal_vcap_mode {
HAL_VCAP_MODE_PRO = 0,
diff --git a/include/media/vcap_v4l2.h b/include/media/vcap_v4l2.h
index 374e681..bdc3c61 100644
--- a/include/media/vcap_v4l2.h
+++ b/include/media/vcap_v4l2.h
@@ -29,6 +29,8 @@
#include <media/vcap_fmt.h>
#include <mach/board.h>
+#define to_client_data(val) container_of(val, struct vcap_client_data, vfh)
+
#define writel_iowmb(val, addr) \
do { \
__iowmb(); \
@@ -204,6 +206,8 @@
spinlock_t cap_slock;
bool streaming;
+
+ struct v4l2_fh vfh;
};
struct vcap_hacked_vals {