diff options
author | nichcream <c.potato23@gmail.com> | 2018-03-13 22:32:48 +0800 |
---|---|---|
committer | Davide Garberi <dade.garberi@gmail.com> | 2019-02-06 13:56:16 +0100 |
commit | 08c7aa76919692fa44b0ddceb206cd78d6f263a5 (patch) | |
tree | 234527a15427b824307455b4b403f3f4fd389e6a /camera/QCamera2 | |
parent | 79e7cfc7345db2330907fa49a9a465e491326be2 (diff) |
msm8996-common: camera: Improve min frame rate hack
AFAIK, there are apps that request 15fps min frame rate; this is
deliberate and we shouldn't change its default behaviour. But anything
that sets the min fps the same as the max fps definitely should just
stop.
Change-Id: I5c3a31241009ab79edba4191910ad99d2db30f71
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Diffstat (limited to 'camera/QCamera2')
-rw-r--r-- | camera/QCamera2/HAL/QCameraParameters.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/camera/QCamera2/HAL/QCameraParameters.cpp b/camera/QCamera2/HAL/QCameraParameters.cpp index 57d8ad9..7832f76 100644 --- a/camera/QCamera2/HAL/QCameraParameters.cpp +++ b/camera/QCamera2/HAL/QCameraParameters.cpp @@ -6509,6 +6509,13 @@ int32_t QCameraParameters::setPreviewFpsRange(int min_fps, property_get("persist.debug.set.fixedfps", value, "0"); fixedFpsValue = atoi(value); + // Don't allow function callers to request min fps same as max fps + // I mean SnapdragonCamera. + if (max_fps >= 24000 && min_fps == max_fps) { + LOGH("min_fps %d same as max_fps %d, setting min_fps to 7000", min_fps, max_fps); + min_fps = 7000; + } + LOGD("E minFps = %d, maxFps = %d , vid minFps = %d, vid maxFps = %d", min_fps, max_fps, vid_min_fps, vid_max_fps); @@ -6519,9 +6526,8 @@ int32_t QCameraParameters::setPreviewFpsRange(int min_fps, } } snprintf(str, sizeof(str), "%d,%d", min_fps, max_fps); - LOGH("Actual preview fps range %s", str); - updateParamEntry(KEY_PREVIEW_FPS_RANGE, "7000,30000"); - LOGH("Setting the preview fps range 7000,30000"); + LOGH("Setting preview fps range %s", str); + updateParamEntry(KEY_PREVIEW_FPS_RANGE, str); cam_fps_range_t fps_range; memset(&fps_range, 0x00, sizeof(cam_fps_range_t)); fps_range.min_fps = (float)min_fps / 1000.0f; |