hardware: samsung_slsi: libcamera2: Fix AE state for night mode
authorSungjoong Kang <sj3.kang@samsung.com>
Sat, 29 Sep 2012 10:32:04 +0000 (03:32 -0700)
committerRebecca Schultz Zavin <rebecca@android.com>
Mon, 1 Oct 2012 17:39:35 +0000 (10:39 -0700)
Makes AE state to be passed to camera service properly
so that service can decide capture method between ZSL and normal.

Bug: 7257412
Change-Id: I58e8b69a9e444cdc6a69de73075fe67e85ddaa08
Signed-off-by: Sungjoong Kang <sj3.kang@samsung.com>
libcamera2/ExynosCameraHWInterface2.cpp
libcamera2/MetadataConverter.cpp

index d2fb371ef72fabdb3018ccf7da95b52879b32f24..c248aa781651a0da75ec4352b8623d649ac85d42 100644 (file)
@@ -3453,7 +3453,7 @@ void ExynosCameraHWInterface2::m_sensorThreadFunc(SignalDrivenThread * self)
                 }
             }
             // At flash off mode, capture can be done as zsl capture
-            if (m_ctlInfo.flash.i_flashMode == AA_AEMODE_ON)
+            if (m_ctlInfo.flash.i_flashMode == AA_AEMODE_ON && shot_ext->shot.ctl.aa.sceneMode != AA_SCENE_MODE_NIGHT)
                 shot_ext->shot.dm.aa.aeState = AE_STATE_CONVERGED;
 
             // At scene mode face priority
index 4ddc844e57ec7c55e12d7aa6e22d4a1063141785..7946a660837dd7e3a743581cc3388ca1166cb933 100644 (file)
@@ -609,8 +609,9 @@ status_t MetadataConverter::ToDynamicMetadata(struct camera2_shot_ext * metadata
                 &metadata->ctl.scaler.cropRegion, 3))
         return NO_MEMORY;
 
+    byteData = metadata->dm.aa.aeState - 1;
     if (0 != add_camera_metadata_entry(dst, ANDROID_CONTROL_AE_STATE,
-                &(metadata->dm.aa.aeState), 1))
+                &byteData, 1))
         return NO_MEMORY;
 
     if (0 != add_camera_metadata_entry(dst, ANDROID_CONTROL_AWB_STATE,