summaryrefslogtreecommitdiffstats
path: root/camera/CameraHal.cpp
diff options
context:
space:
mode:
authorSathya Prakash M R <a0393677@ti.com>2012-04-25 22:46:28 +0530
committerDaniel Levin <dendy@ti.com>2012-07-25 08:56:29 -0500
commit286e1a5ed9bb6113b754921229f94cf18d2b31d5 (patch)
treec03df501cb7c9aa1ee821a57ee1fa6e30367d2fc /camera/CameraHal.cpp
parent620c8e83d379416aee21b17ff2e48b2ac721e331 (diff)
downloadhardware_ti_omap4-286e1a5ed9bb6113b754921229f94cf18d2b31d5.zip
hardware_ti_omap4-286e1a5ed9bb6113b754921229f94cf18d2b31d5.tar.gz
hardware_ti_omap4-286e1a5ed9bb6113b754921229f94cf18d2b31d5.tar.bz2
CameraHAL: Enable Sensor Overclocking for OV14825 for 60 FPS
OV14285 needs sensor overclocking to get 60 fps for 1080p resolution. This patch enables overclocking when FPS is set to 60 and resolution is 1080p. This patch also adds the 60fps to the capabilities. So that when ducati gives the capability for 60fps cameraHAL will populate this to application. This also restarts the preview when the FPS range is reduced from 60fps to 30fps. Change-Id: Ib7c34a6581d3f0c9bd555a1b444b91a7cd2fda4c Signed-off-by: Sathya Prakash M R <a0393677@ti.com> Signed-off-by: Solaiyappan Saravanan <saravanan.s@ti.com>
Diffstat (limited to 'camera/CameraHal.cpp')
-rw-r--r--camera/CameraHal.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp
index d1667b2..c215fab 100644
--- a/camera/CameraHal.cpp
+++ b/camera/CameraHal.cpp
@@ -539,11 +539,18 @@ int CameraHal::setParameters(const CameraParameters& params)
// If Port FPS needs to be used for configuring, then FPS RANGE should not be set by the APP.
valstr = params.get(CameraParameters::KEY_PREVIEW_FPS_RANGE);
if (valstr != NULL && strlen(valstr)) {
+ int curMaxFPS = 0;
+ int curMinFPS = 0;
+
// APP wants to set FPS range
// Set framerate = MAXFPS
CAMHAL_LOGDA("APP IS CHANGING FRAME RATE RANGE");
+ mParameters.getPreviewFpsRange(&curMinFPS, &curMaxFPS);
+ CAMHAL_LOGDB("## current minFPS = %d; maxFPS=%d",curMinFPS, curMaxFPS);
+
params.getPreviewFpsRange(&minFPS, &maxFPS);
+ CAMHAL_LOGDB("## requested minFPS = %d; maxFPS=%d",minFPS, maxFPS);
// Validate VFR
if (!isFpsRangeValid(minFPS, maxFPS, params.get(CameraParameters::KEY_SUPPORTED_PREVIEW_FPS_RANGE))) {
CAMHAL_LOGEA("Invalid FPS Range");
@@ -554,6 +561,10 @@ int CameraHal::setParameters(const CameraParameters& params)
CAMHAL_LOGDB("SET FRAMERATE %d", framerate);
mParameters.set(CameraParameters::KEY_PREVIEW_FPS_RANGE, valstr);
CAMHAL_LOGDB("FPS Range = %s", valstr);
+ if ( curMaxFPS == (FRAME_RATE_HIGH_HD * CameraHal::VFR_SCALE) &&
+ maxFPS < (FRAME_RATE_HIGH_HD * CameraHal::VFR_SCALE) ) {
+ restartPreviewRequired = true;
+ }
}
} else {
framerate = params.getPreviewFrameRate();