From 3c17a3f79068fef751c777a7c13830d23e5f51cf Mon Sep 17 00:00:00 2001 From: Sungjoong Kang Date: Mon, 22 Oct 2012 14:39:49 -0700 Subject: [PATCH] hardware: samsung_slsi: libcamera2: Fix for supporting various FPS modes Add support for 24 and 25 fps modes. Fix bug on applying maximum fps parameter. BUG : 7385305 Signed-off-by: Sungjoong Kang Change-Id: I005f87da69ca12d408b51d46f1fbd75d1a1a6cc5 --- libcamera2/ExynosCamera2.cpp | 2 +- libcamera2/ExynosCameraHWInterface2.cpp | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libcamera2/ExynosCamera2.cpp b/libcamera2/ExynosCamera2.cpp index 0f2e82f..100f0a8 100644 --- a/libcamera2/ExynosCamera2.cpp +++ b/libcamera2/ExynosCamera2.cpp @@ -595,7 +595,7 @@ status_t ExynosCamera2::constructStaticInfo(camera_metadata_t **info, sizeof(exposureCompensationRange)/sizeof(int32_t)); static const int32_t availableTargetFpsRanges[] = { - 15, 15, 15, 30, 30, 30 + 15, 15, 24, 24, 25, 25, 15, 30, 30, 30 }; ADD_OR_SIZE(ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES, availableTargetFpsRanges, diff --git a/libcamera2/ExynosCameraHWInterface2.cpp b/libcamera2/ExynosCameraHWInterface2.cpp index eca1a3a..9ca9109 100644 --- a/libcamera2/ExynosCameraHWInterface2.cpp +++ b/libcamera2/ExynosCameraHWInterface2.cpp @@ -3313,6 +3313,26 @@ void ExynosCameraHWInterface2::m_sensorThreadFunc(SignalDrivenThread * self) shot_ext->request_scc = 0; } + switch (shot_ext->shot.ctl.aa.aeTargetFpsRange[1]) { + case 15: + shot_ext->shot.ctl.sensor.frameDuration = (66666 * 1000); + break; + + case 24: + shot_ext->shot.ctl.sensor.frameDuration = (41666 * 1000); + break; + + case 25: + shot_ext->shot.ctl.sensor.frameDuration = (40000 * 1000); + break; + + case 30: + default: + shot_ext->shot.ctl.sensor.frameDuration = (33333 * 1000); + break; + } + shot_ext->shot.ctl.aa.aeTargetFpsRange[1] = 30; + // Flash mode // Keep and Skip request_scc = 1 at flash enable mode to operate flash sequence if ((m_ctlInfo.flash.i_flashMode >= AA_AEMODE_ON_AUTO_FLASH) -- 2.20.1