summaryrefslogtreecommitdiffstats
path: root/camera/inc/CameraHal.h
diff options
context:
space:
mode:
Diffstat (limited to 'camera/inc/CameraHal.h')
-rw-r--r--camera/inc/CameraHal.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/camera/inc/CameraHal.h b/camera/inc/CameraHal.h
index 0e6dfff..b6d19b7 100644
--- a/camera/inc/CameraHal.h
+++ b/camera/inc/CameraHal.h
@@ -86,6 +86,12 @@
#define SHARPNESS_OFFSET 100
#define CONTRAST_OFFSET 100
+#ifdef MOTOROLA_CAMERA
+#define DEFAULT_INTENSITY 100
+#define FLASH_VOLTAGE_THRESHOLD1 3700000 // intensity will be reduced to 50% below threshold1
+#define FLASH_VOLTAGE_THRESHOLD2 3300000 // flash disabled below threshold2
+#endif
+
#define FRAME_RATE_HIGH_HD 60
#define CAMHAL_GRALLOC_USAGE GRALLOC_USAGE_HW_TEXTURE | \
@@ -117,6 +123,11 @@ extern const char * const kYuvImagesOutputDirPath;
#define V4L_CAMERA_NAME_USB "USBCAMERA"
#define OMX_CAMERA_NAME_OV "OV5640"
#define OMX_CAMERA_NAME_SONY "IMX060"
+#ifdef MOTOROLA_CAMERA
+#define OMX_CAMERA_NAME_OV8820 "OV8820"
+#define OMX_CAMERA_NAME_OV7739 "OV7739"
+#define OMX_CAMERA_NAME_MT9M114 "MT9M114"
+#endif
///Forward declarations
@@ -1101,6 +1112,10 @@ public:
//@{
public:
+#ifdef MOTOROLA_CAMERA
+ bool SetFlashLedTorch(unsigned intensity);
+#endif
+
/** Set the notification and data callbacks */
void setCallbacks(camera_notify_callback notify_cb,
camera_data_callback data_cb,
@@ -1399,6 +1414,14 @@ private:
status_t releaseTapinLocked(struct preview_stream_ops *in);
static SocFamily getSocFamily();
+
+#ifdef MOTOROLA_CAMERA
+ // I2C read write utility to support factory test commands
+ bool i2cRW(int read_size, int write_size, unsigned char *read_data, unsigned char *write_data);
+
+ // get best flash intensity level for the current battery level
+ unsigned int getFlashIntensity(void);
+#endif
/*----------Member variables - Public ---------------------*/
public:
int32_t mMsgEnabled;