msm: camera: Configure VFE for two output mode.
Configure upto two outputs of VFE desginated
as primary and secondary. Depending on the irq,
only send message type primary and secondary and
allow MCTL to interpret these messages.
Change-Id: I25568cb6bba5792658b0570383f64ddb58e21421
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
diff --git a/include/media/msm_camera.h b/include/media/msm_camera.h
index 58129bb..dcafa59 100644
--- a/include/media/msm_camera.h
+++ b/include/media/msm_camera.h
@@ -1,3 +1,15 @@
+/* Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
#ifndef __LINUX_MSM_CAMERA_H
#define __LINUX_MSM_CAMERA_H
@@ -168,6 +180,9 @@
#define MSM_CAM_IOCTL_GET_KERNEL_SYSTEM_TIME \
_IOW(MSM_CAM_IOCTL_MAGIC, 50, struct timeval *)
+#define MSM_CAM_IOCTL_SET_VFE_OUTPUT_TYPE \
+ _IOW(MSM_CAM_IOCTL_MAGIC, 51, uint32_t *)
+
struct msm_mctl_pp_cmd {
int32_t id;
uint16_t length;
@@ -404,6 +419,11 @@
#define CMD_AXI_CFG_VIDEO_ALL_CHNLS 50
#define CMD_VFE_BUFFER_RELEASE 51
+#define CMD_AXI_CFG_PRIM 0xF1
+#define CMD_AXI_CFG_PRIM_ALL_CHNLS 0xF2
+#define CMD_AXI_CFG_SEC 0xF4
+#define CMD_AXI_CFG_SEC_ALL_CHNLS 0xF8
+
/* vfe config command: config command(from config thread)*/
struct msm_vfe_cfg_cmd {
int cmd_type;
@@ -496,6 +516,12 @@
#define OUTPUT_ZSL_ALL_CHNLS 10
#define LAST_AXI_OUTPUT_MODE_ENUM = OUTPUT_ZSL_ALL_CHNLS
+#define OUTPUT_PRIM 0xF1
+#define OUTPUT_PRIM_ALL_CHNLS 0xF2
+#define OUTPUT_SEC 0xF4
+#define OUTPUT_SEC_ALL_CHNLS 0xF8
+
+
#define MSM_FRAME_PREV_1 0
#define MSM_FRAME_PREV_2 1
#define MSM_FRAME_ENC 2
diff --git a/include/media/msm_isp.h b/include/media/msm_isp.h
index 12d3220..2bb5b7b 100644
--- a/include/media/msm_isp.h
+++ b/include/media/msm_isp.h
@@ -1,6 +1,20 @@
+/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
#ifndef __MSM_ISP_H__
#define __MSM_ISP_H__
+#define BIT(nr) (1UL << (nr))
+
/* ISP message IDs */
#define MSG_ID_RESET_ACK 0
#define MSG_ID_START_ACK 1
@@ -42,6 +56,8 @@
#define MSG_ID_SOF_ACK 37
#define MSG_ID_STOP_REC_ACK 38
#define MSG_ID_STATS_AWB_AEC 39
+#define MSG_ID_OUTPUT_PRIMARY 40
+#define MSG_ID_OUTPUT_SECONDARY 41
/* ISP command IDs */
#define VFE_CMD_DUMMY_0 0
@@ -180,6 +196,8 @@
#define VFE_CMD_Y_GAMMA_CONFIG 133
#define VFE_CMD_SCALE_OUTPUT1_CONFIG 134
#define VFE_CMD_SCALE_OUTPUT2_CONFIG 135
+#define VFE_CMD_CAPTURE_RAW 136
+#define VFE_CMD_STOP_LIVESHOT 137
struct msm_isp_cmd {
int32_t id;
@@ -288,5 +306,15 @@
/* TBD: 3D related */
};
+#define VFE_OUTPUTS_MAIN_AND_PREVIEW BIT(0)
+#define VFE_OUTPUTS_MAIN_AND_VIDEO BIT(1)
+#define VFE_OUTPUTS_MAIN_AND_THUMB BIT(2)
+#define VFE_OUTPUTS_THUMB_AND_MAIN BIT(3)
+#define VFE_OUTPUTS_PREVIEW_AND_VIDEO BIT(4)
+#define VFE_OUTPUTS_VIDEO_AND_PREVIEW BIT(5)
+#define VFE_OUTPUTS_PREVIEW BIT(6)
+#define VFE_OUTPUTS_VIDEO BIT(7)
+#define VFE_OUTPUTS_RAW BIT(8)
+
#endif /*__MSM_ISP_H__*/