exynos hal: jellybean compat
diff --git a/exynos4/hal/libcamera/SecCameraHWInterface.cpp b/exynos4/hal/libcamera/SecCameraHWInterface.cpp
index c50ec8d..3c2250e 100644
--- a/exynos4/hal/libcamera/SecCameraHWInterface.cpp
+++ b/exynos4/hal/libcamera/SecCameraHWInterface.cpp
@@ -15,8 +15,8 @@
 ** See the License for the specific language governing permissions and
 ** limitations under the License.
 */
-//#define LOG_NDEBUG 0
-#define LOG_TAG "CameraHardwareSec"
+//#define ALOG_NDEBUG 0
+#define ALOG_TAG "CameraHardwareSec"
 #include <utils/Log.h>
 
 #include "SecCameraHWInterface.h"
@@ -24,7 +24,7 @@
 #include <fcntl.h>
 #include <sys/mman.h>
 #include <camera/Camera.h>
-#include <media/stagefright/MetadataBufferType.h>
+#include <media/hardware/MetadataBufferType.h>
 
 #define VIDEO_COMMENT_MARKER_H          0xFFBE
 #define VIDEO_COMMENT_MARKER_L          0xFFBF
@@ -97,7 +97,7 @@
           mTouched(0),
           mHalDevice(dev)
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
     memset(&mCapBuffer, 0, sizeof(struct SecBuffer));
     int ret = 0;
 
@@ -112,12 +112,12 @@
     if (!mGrallocHal) {
         ret = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, (const hw_module_t **)&mGrallocHal);
         if (ret)
-            LOGE("ERR(%s):Fail on loading gralloc HAL", __func__);
+            ALOGE("ERR(%s):Fail on loading gralloc HAL", __func__);
     }
 
     ret = mSecCamera->CreateCamera(cameraId);
     if (ret < 0) {
-        LOGE("ERR(%s):Fail on mSecCamera init", __func__);
+        ALOGE("ERR(%s):Fail on mSecCamera init", __func__);
         mSecCamera->DestroyCamera();
     }
 
@@ -143,7 +143,7 @@
 void CameraHardwareSec::initDefaultParameters(int cameraId)
 {
     if (mSecCamera == NULL) {
-        LOGE("ERR(%s):mSecCamera object is NULL", __func__);
+        ALOGE("ERR(%s):mSecCamera object is NULL", __func__);
         return;
     }
 
@@ -152,10 +152,10 @@
 
     mCameraSensorName = mSecCamera->getCameraSensorName();
     if (mCameraSensorName == NULL) {
-        LOGE("ERR(%s):mCameraSensorName is NULL", __func__);
+        ALOGE("ERR(%s):mCameraSensorName is NULL", __func__);
         return;
     }
-    LOGV("CameraSensorName: %s", mCameraSensorName);
+    ALOGV("CameraSensorName: %s", mCameraSensorName);
 
     int preview_max_width   = 0;
     int preview_max_height  = 0;
@@ -201,11 +201,11 @@
     // sizes at zero to catch the error.
     if (mSecCamera->getPreviewMaxSize(&preview_max_width,
                                       &preview_max_height) < 0)
-        LOGE("getPreviewMaxSize fail (%d / %d)",
+        ALOGE("getPreviewMaxSize fail (%d / %d)",
              preview_max_width, preview_max_height);
     if (mSecCamera->getSnapshotMaxSize(&snapshot_max_width,
                                        &snapshot_max_height) < 0)
-        LOGE("getSnapshotMaxSize fail (%d / %d)",
+        ALOGE("getSnapshotMaxSize fail (%d / %d)",
              snapshot_max_width, snapshot_max_height);
 
     parameterString = CameraParameters::PIXEL_FORMAT_YUV420P;
@@ -436,7 +436,7 @@
 
 CameraHardwareSec::~CameraHardwareSec()
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     mSecCamera->DestroyCamera();
 }
 
@@ -445,33 +445,33 @@
     int min_bufs;
 
     mPreviewWindow = w;
-    LOGV("%s: mPreviewWindow %p", __func__, mPreviewWindow);
+    ALOGV("%s: mPreviewWindow %p", __func__, mPreviewWindow);
 
     if (!w) {
-        LOGE("preview window is NULL!");
+        ALOGE("preview window is NULL!");
         return OK;
     }
 
     mPreviewLock.lock();
 
     if (mPreviewRunning && !mPreviewStartDeferred) {
-        LOGI("stop preview (window change)");
+        ALOGI("stop preview (window change)");
         stopPreviewInternal();
     }
 
     if (w->get_min_undequeued_buffer_count(w, &min_bufs)) {
-        LOGE("%s: could not retrieve min undequeued buffer count", __func__);
+        ALOGE("%s: could not retrieve min undequeued buffer count", __func__);
         return INVALID_OPERATION;
     }
 
     if (min_bufs >= BUFFER_COUNT_FOR_GRALLOC) {
-        LOGE("%s: min undequeued buffer count %d is too high (expecting at most %d)", __func__,
+        ALOGE("%s: min undequeued buffer count %d is too high (expecting at most %d)", __func__,
              min_bufs, BUFFER_COUNT_FOR_GRALLOC - 1);
     }
 
-    LOGV("%s: setting buffer count to %d", __func__, BUFFER_COUNT_FOR_GRALLOC);
+    ALOGV("%s: setting buffer count to %d", __func__, BUFFER_COUNT_FOR_GRALLOC);
     if (w->set_buffer_count(w, BUFFER_COUNT_FOR_GRALLOC)) {
-        LOGE("%s: could not set buffer count", __func__);
+        ALOGE("%s: could not set buffer count", __func__);
         return INVALID_OPERATION;
     }
 
@@ -482,7 +482,7 @@
     int hal_pixel_format;
 
     const char *str_preview_format = mParameters.getPreviewFormat();
-    LOGV("%s: preview format %s", __func__, str_preview_format);
+    ALOGV("%s: preview format %s", __func__, str_preview_format);
     mFrameSizeDelta = 16;
 
     hal_pixel_format = HAL_PIXEL_FORMAT_YV12; // default
@@ -508,7 +508,7 @@
 #else
     if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN)) {
 #endif
-        LOGE("%s: could not set usage on gralloc buffer", __func__);
+        ALOGE("%s: could not set usage on gralloc buffer", __func__);
         return INVALID_OPERATION;
     }
 #else
@@ -519,7 +519,7 @@
     if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN
         | GRALLOC_USAGE_HW_FIMC1 | GRALLOC_USAGE_HWC_HWOVERLAY)) {
 #endif
-        LOGE("%s: could not set usage on gralloc buffer", __func__);
+        ALOGE("%s: could not set usage on gralloc buffer", __func__);
         return INVALID_OPERATION;
     }
 #endif
@@ -527,7 +527,7 @@
     if (w->set_buffers_geometry(w,
                                 preview_width, preview_height,
                                 hal_pixel_format)) {
-        LOGE("%s: could not set buffers geometry to %s",
+        ALOGE("%s: could not set buffers geometry to %s",
              __func__, str_preview_format);
         return INVALID_OPERATION;
     }
@@ -535,13 +535,13 @@
 #ifdef BOARD_USE_V4L2_ION
     for(int i = 0; i < BUFFER_COUNT_FOR_ARRAY; i++)
         if (0 != mPreviewWindow->dequeue_buffer(mPreviewWindow, &mBufferHandle[i], &mStride[i])) {
-            LOGE("%s: Could not dequeue gralloc buffer[%d]!!", __func__, i);
+            ALOGE("%s: Could not dequeue gralloc buffer[%d]!!", __func__, i);
             return INVALID_OPERATION;
         }
 #endif
 
     if (mPreviewRunning && mPreviewStartDeferred) {
-        LOGV("start/resume preview");
+        ALOGV("start/resume preview");
         status_t ret = startPreviewInternal();
         if (ret == OK) {
             mPreviewStartDeferred = false;
@@ -568,14 +568,14 @@
 
 void CameraHardwareSec::enableMsgType(int32_t msgType)
 {
-    LOGV("%s : msgType = 0x%x, mMsgEnabled before = 0x%x",
+    ALOGV("%s : msgType = 0x%x, mMsgEnabled before = 0x%x",
          __func__, msgType, mMsgEnabled);
     mMsgEnabled |= msgType;
 
     mPreviewLock.lock();
     if ((msgType & (CAMERA_MSG_PREVIEW_FRAME | CAMERA_MSG_VIDEO_FRAME)) &&
              mPreviewRunning && mPreviewStartDeferred) {
-        LOGV("%s: starting deferred preview", __func__);
+        ALOGV("%s: starting deferred preview", __func__);
         if (startPreviewInternal() == OK) {
             mPreviewStartDeferred = false;
             mPreviewCondition.signal();
@@ -583,15 +583,15 @@
     }
     mPreviewLock.unlock();
 
-    LOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
+    ALOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
 }
 
 void CameraHardwareSec::disableMsgType(int32_t msgType)
 {
-    LOGV("%s : msgType = 0x%x, mMsgEnabled before = 0x%x",
+    ALOGV("%s : msgType = 0x%x, mMsgEnabled before = 0x%x",
          __func__, msgType, mMsgEnabled);
     mMsgEnabled &= ~msgType;
-    LOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
+    ALOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
 }
 
 bool CameraHardwareSec::msgTypeEnabled(int32_t msgType)
@@ -610,21 +610,21 @@
 
 int CameraHardwareSec::previewThreadWrapper()
 {
-    LOGI("%s: starting", __func__);
+    ALOGI("%s: starting", __func__);
     while (1) {
         mPreviewLock.lock();
         while (!mPreviewRunning) {
-            LOGI("%s: calling mSecCamera->stopPreview() and waiting", __func__);
+            ALOGI("%s: calling mSecCamera->stopPreview() and waiting", __func__);
             mSecCamera->stopPreview();
             /* signal that we're stopping */
             mPreviewStoppedCondition.signal();
             mPreviewCondition.wait(mPreviewLock);
-            LOGI("%s: return from wait", __func__);
+            ALOGI("%s: return from wait", __func__);
         }
         mPreviewLock.unlock();
 
         if (mExitPreviewThread) {
-            LOGI("%s: exiting", __func__);
+            ALOGI("%s: exiting", __func__);
             mSecCamera->stopPreview();
             return 0;
         }
@@ -655,7 +655,7 @@
     mFaceData = &fdmeta;
 
     if (index < 0) {
-        LOGE("ERR(%s):Fail on SecCamera->getPreview()", __func__);
+        ALOGE("ERR(%s):Fail on SecCamera->getPreview()", __func__);
 #ifdef BOARD_USE_V4L2_ION
         if (mSecCamera->getPreviewState()) {
             stopPreview();
@@ -672,7 +672,7 @@
 
         if (mCapIndex >= 0) {
             if (mSecCamera->setSnapshotFrame(mCapIndex) < 0) {
-                LOGE("%s: Fail qbuf, index(%d)", __func__, mCapIndex);
+                ALOGE("%s: Fail qbuf, index(%d)", __func__, mCapIndex);
                 return INVALID_OPERATION;
             }
         }
@@ -683,9 +683,9 @@
     if (mSkipFrame > 0) {
         mSkipFrame--;
         mSkipFrameLock.unlock();
-        LOGV("%s: index %d skipping frame", __func__, index);
+        ALOGV("%s: index %d skipping frame", __func__, index);
         if (mSecCamera->setPreviewFrame(index) < 0) {
-            LOGE("%s: Could not qbuff[%d]!!", __func__, index);
+            ALOGE("%s: Could not qbuff[%d]!!", __func__, index);
             return UNKNOWN_ERROR;
         }
         return NO_ERROR;
@@ -715,7 +715,7 @@
 
         mGrallocHal->unlock(mGrallocHal, *mBufferHandle[index]);
         if (0 != mPreviewWindow->enqueue_buffer(mPreviewWindow, mBufferHandle[index])) {
-            LOGE("%s: Could not enqueue gralloc buffer[%d]!!", __func__, index);
+            ALOGE("%s: Could not enqueue gralloc buffer[%d]!!", __func__, index);
             goto callbacks;
         } else {
             mBufferHandle[index] = NULL;
@@ -726,7 +726,7 @@
 #endif
 
         if (0 != mPreviewWindow->dequeue_buffer(mPreviewWindow, &mBufferHandle[numArray], &mStride[numArray])) {
-            LOGE("%s: Could not dequeue gralloc buffer[%d]!!", __func__, numArray);
+            ALOGE("%s: Could not dequeue gralloc buffer[%d]!!", __func__, numArray);
             goto callbacks;
         }
 
@@ -769,17 +769,17 @@
 #endif
         }
         else
-            LOGE("%s: could not obtain gralloc buffer", __func__);
+            ALOGE("%s: could not obtain gralloc buffer", __func__);
 
         if (mSecCamera->setPreviewFrame(index) < 0) {
-            LOGE("%s: Fail qbuf, index(%d)", __func__, index);
+            ALOGE("%s: Fail qbuf, index(%d)", __func__, index);
             goto callbacks;
         }
 
         index = 0;
 #ifndef BOARD_USE_V4L2_ION
         if (0 != mPreviewWindow->enqueue_buffer(mPreviewWindow, *mBufferHandle)) {
-            LOGE("Could not enqueue gralloc buffer!");
+            ALOGE("Could not enqueue gralloc buffer!");
             goto callbacks;
         }
 #endif
@@ -801,7 +801,7 @@
 
         index = mSecCamera->getRecordFrame();
         if (index < 0) {
-            LOGE("ERR(%s):Fail on SecCamera->getRecordFrame()", __func__);
+            ALOGE("ERR(%s):Fail on SecCamera->getRecordFrame()", __func__);
             return UNKNOWN_ERROR;
         }
 
@@ -810,7 +810,7 @@
             mCapIndex = mSecCamera->getSnapshot();
 
             if (mSecCamera->setSnapshotFrame(mCapIndex) < 0) {
-                LOGE("%s: Fail qbuf, index(%d)", __func__, mCapIndex);
+                ALOGE("%s: Fail qbuf, index(%d)", __func__, mCapIndex);
                 return INVALID_OPERATION;
             }
         }
@@ -822,10 +822,10 @@
         recordingIndex = index;
         mSecCamera->getRecordAddr(index, &recordAddr);
 
-        LOGV("record PhyY(0x%08x) phyC(0x%08x) ", recordAddr.phys.extP[0], recordAddr.phys.extP[1]);
+        ALOGV("record PhyY(0x%08x) phyC(0x%08x) ", recordAddr.phys.extP[0], recordAddr.phys.extP[1]);
 
         if (recordAddr.phys.extP[0] == 0xffffffff || recordAddr.phys.extP[1] == 0xffffffff) {
-            LOGE("ERR(%s):Fail on SecCamera getRectPhyAddr Y addr = %0x C addr = %0x", __func__,
+            ALOGE("ERR(%s):Fail on SecCamera getRectPhyAddr Y addr = %0x C addr = %0x", __func__,
                  recordAddr.phys.extP[0], recordAddr.phys.extP[1]);
             return UNKNOWN_ERROR;
         }
@@ -853,18 +853,18 @@
 {
     int ret = 0;
 
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
 
     Mutex::Autolock lock(mStateLock);
     if (mCaptureInProgress) {
-        LOGE("%s : capture in progress, not allowed", __func__);
+        ALOGE("%s : capture in progress, not allowed", __func__);
         return INVALID_OPERATION;
     }
 
     mPreviewLock.lock();
     if (mPreviewRunning) {
         // already running
-        LOGE("%s : preview thread already running", __func__);
+        ALOGE("%s : preview thread already running", __func__);
         mPreviewLock.unlock();
         return INVALID_OPERATION;
     }
@@ -875,7 +875,7 @@
     if (!mPreviewWindow &&
             !(mMsgEnabled & CAMERA_MSG_PREVIEW_FRAME) &&
             !(mMsgEnabled & CAMERA_MSG_VIDEO_FRAME)) {
-        LOGI("%s : deferring", __func__);
+        ALOGI("%s : deferring", __func__);
         mPreviewStartDeferred = true;
         mPreviewLock.unlock();
         return NO_ERROR;
@@ -891,11 +891,11 @@
 
 status_t CameraHardwareSec::startPreviewInternal()
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     int width, height, frame_size;
 
     mSecCamera->getPreviewSize(&width, &height, &frame_size);
-    LOGD("mPreviewHeap(fd(%d), size(%d), width(%d), height(%d))",
+    ALOGD("mPreviewHeap(fd(%d), size(%d), width(%d), height(%d))",
          mSecCamera->getCameraFd(SecCamera::PREVIEW), frame_size + mFrameSizeDelta, width, height);
 
 #ifdef BOARD_USE_V4L2_ION
@@ -913,7 +913,7 @@
     for (int i = 0; i < MAX_BUFFERS; i++) {
         if (mBufferHandle[i] == NULL) {
             if (0 != mPreviewWindow->dequeue_buffer(mPreviewWindow, &mBufferHandle[i], &mStride[i])) {
-                LOGE("%s: Could not dequeue gralloc buffer[%d]!!", __func__, i);
+                ALOGE("%s: Could not dequeue gralloc buffer[%d]!!", __func__, i);
                 return INVALID_OPERATION;
             }
         }
@@ -921,7 +921,7 @@
                           *mBufferHandle[i],
                           GRALLOC_USAGE_SW_WRITE_OFTEN | GRALLOC_USAGE_YUV_ADDR,
                           0, 0, width, height, vaddr)) {
-            LOGE("ERR(%s): Could not get virtual address!!, index = %d", __func__, i);
+            ALOGE("ERR(%s): Could not get virtual address!!, index = %d", __func__, i);
             return UNKNOWN_ERROR;
         }
         mSecCamera->setUserBufferAddr(vaddr, i, PREVIEW_MODE);
@@ -929,10 +929,10 @@
 #endif
 
     int ret  = mSecCamera->startPreview();
-    LOGV("%s : mSecCamera->startPreview() returned %d", __func__, ret);
+    ALOGV("%s : mSecCamera->startPreview() returned %d", __func__, ret);
 
     if (ret < 0) {
-        LOGE("ERR(%s):Fail on mSecCamera->startPreview()", __func__);
+        ALOGE("ERR(%s):Fail on mSecCamera->startPreview()", __func__);
         return UNKNOWN_ERROR;
     }
 
@@ -960,7 +960,7 @@
     mFaceDataHeap = mGetMemoryCb(-1, 1, 1, 0);
 
     mSecCamera->getPostViewConfig(&mPostViewWidth, &mPostViewHeight, &mPostViewSize);
-    LOGV("CameraHardwareSec: mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",
+    ALOGV("CameraHardwareSec: mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d",
          mPostViewWidth,mPostViewHeight,mPostViewSize);
 
     return NO_ERROR;
@@ -968,7 +968,7 @@
 
 void CameraHardwareSec::stopPreviewInternal()
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
 
     /* request that the preview thread stop. */
     if (mPreviewRunning) {
@@ -982,7 +982,7 @@
             for (int i = 0; i < MAX_BUFFERS; i++) {
                 if (mBufferHandle[i] != NULL) {
                     if (0 != mPreviewWindow->cancel_buffer(mPreviewWindow, mBufferHandle[i])) {
-                        LOGE("%s: Fail to cancel buffer[%d]", __func__, i);
+                        ALOGE("%s: Fail to cancel buffer[%d]", __func__, i);
                     } else {
                         mBufferHandle[i] = NULL;
                         mStride[i] = NULL;
@@ -992,14 +992,14 @@
 #endif
         }
         else
-            LOGV("%s : preview running but deferred, doing nothing", __func__);
+            ALOGV("%s : preview running but deferred, doing nothing", __func__);
     } else
-        LOGI("%s : preview not running, doing nothing", __func__);
+        ALOGI("%s : preview not running, doing nothing", __func__);
 }
 
 void CameraHardwareSec::stopPreview()
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
 
     /* request that the preview thread stop. */
     mPreviewLock.lock();
@@ -1010,13 +1010,13 @@
 bool CameraHardwareSec::previewEnabled()
 {
     Mutex::Autolock lock(mPreviewLock);
-    LOGV("%s : %d", __func__, mPreviewRunning);
+    ALOGV("%s : %d", __func__, mPreviewRunning);
     return mPreviewRunning;
 }
 
 status_t CameraHardwareSec::startRecording()
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
 
     Mutex::Autolock lock(mRecordLock);
 
@@ -1038,16 +1038,16 @@
         mRecordHeap[i] = mGetMemoryCb(-1, sizeof(struct addrs), MAX_BUFFERS, NULL);
 #endif
         if (!mRecordHeap[i]) {
-            LOGE("ERR(%s): Record heap[%d] creation fail", __func__, i);
+            ALOGE("ERR(%s): Record heap[%d] creation fail", __func__, i);
             return UNKNOWN_ERROR;
         }
     }
 
-    LOGV("mRecordHeaps alloc done");
+    ALOGV("mRecordHeaps alloc done");
 
     if (mRecordRunning == false) {
         if (mSecCamera->startRecord(mRecordHint) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->startRecord()", __func__);
+            ALOGE("ERR(%s):Fail on mSecCamera->startRecord()", __func__);
             return UNKNOWN_ERROR;
         }
         mRecordRunning = true;
@@ -1057,13 +1057,13 @@
 
 void CameraHardwareSec::stopRecording()
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
 
     Mutex::Autolock lock(mRecordLock);
 
     if (mRecordRunning == true) {
         if (mSecCamera->stopRecord() < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->stopRecord()", __func__);
+            ALOGE("ERR(%s):Fail on mSecCamera->stopRecord()", __func__);
             return;
         }
         mRecordRunning = false;
@@ -1072,8 +1072,8 @@
 
 bool CameraHardwareSec::recordingEnabled()
 {
-    LOGV("%s :", __func__);
-    LOGV("%s : %d", __func__, mPreviewRunning);
+    ALOGV("%s :", __func__);
+    ALOGV("%s : %d", __func__, mPreviewRunning);
 
     return mRecordRunning;
 }
@@ -1098,7 +1098,7 @@
     int count =0;
     int af_status =0 ;
 
-    LOGV("%s : starting", __func__);
+    ALOGV("%s : starting", __func__);
 
     /* block until we're told to start.  we don't want to use
      * a restartable thread and requestExitAndWait() in cancelAutoFocus()
@@ -1110,14 +1110,14 @@
     /* check early exit request */
     if (mExitAutoFocusThread) {
         mFocusLock.unlock();
-        LOGV("%s : exiting on request0", __func__);
+        ALOGV("%s : exiting on request0", __func__);
         return NO_ERROR;
     }
     mFocusCondition.wait(mFocusLock);
     /* check early exit request */
     if (mExitAutoFocusThread) {
         mFocusLock.unlock();
-        LOGV("%s : exiting on request1", __func__);
+        ALOGV("%s : exiting on request1", __func__);
         return NO_ERROR;
     }
     mFocusLock.unlock();
@@ -1125,15 +1125,15 @@
     /* TODO : Currently only possible auto focus at BACK caemra
               We need to modify to check that sensor can support auto focus */
     if (mCameraID == SecCamera::CAMERA_ID_BACK) {
-        LOGV("%s : calling setAutoFocus", __func__);
+        ALOGV("%s : calling setAutoFocus", __func__);
         if (mTouched == 0) {
             if (mSecCamera->setAutofocus() < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setAutofocus()", __func__);
+                ALOGE("ERR(%s):Fail on mSecCamera->setAutofocus()", __func__);
                 return UNKNOWN_ERROR;
             }
         } else {
             if (mSecCamera->setTouchAF() < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setAutofocus()", __func__);
+                ALOGE("ERR(%s):Fail on mSecCamera->setAutofocus()", __func__);
                 return UNKNOWN_ERROR;
             }
         }
@@ -1162,11 +1162,11 @@
     }
 
     if (af_status == 0x01) {
-        LOGV("%s : AF Cancelled !!", __func__);
+        ALOGV("%s : AF Cancelled !!", __func__);
         if (mMsgEnabled & CAMERA_MSG_FOCUS)
             mNotifyCb(CAMERA_MSG_FOCUS, true, 0, mCallbackCookie);
     } else if (af_status == 0x02) {
-        LOGV("%s : AF Success !!", __func__);
+        ALOGV("%s : AF Success !!", __func__);
         if (mMsgEnabled & CAMERA_MSG_FOCUS) {
             /* CAMERA_MSG_FOCUS only takes a bool.  true for
              * finished and false for failure.  cancel is still
@@ -1175,19 +1175,19 @@
             mNotifyCb(CAMERA_MSG_FOCUS, true, 0, mCallbackCookie);
         }
     } else {
-        LOGV("%s : AF Fail !!", __func__);
-        LOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
+        ALOGV("%s : AF Fail !!", __func__);
+        ALOGV("%s : mMsgEnabled = 0x%x", __func__, mMsgEnabled);
         if (mMsgEnabled & CAMERA_MSG_FOCUS)
             mNotifyCb(CAMERA_MSG_FOCUS, false, 0, mCallbackCookie);
     }
 
-    LOGV("%s : exiting with no error", __func__);
+    ALOGV("%s : exiting with no error", __func__);
     return NO_ERROR;
 }
 
 status_t CameraHardwareSec::autoFocus()
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
     /* signal autoFocusThread to run once */
     mFocusCondition.signal();
     return NO_ERROR;
@@ -1195,10 +1195,10 @@
 
 status_t CameraHardwareSec::cancelAutoFocus()
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
 
     if (mSecCamera->cancelAutofocus() < 0) {
-        LOGE("ERR(%s):Fail on mSecCamera->cancelAutofocus()", __func__);
+        ALOGE("ERR(%s):Fail on mSecCamera->cancelAutofocus()", __func__);
         return UNKNOWN_ERROR;
     }
 
@@ -1213,14 +1213,14 @@
     /* file create/open, note to "wb" */
     yuv_fp = fopen("/data/camera_dump.jpeg", "wb");
     if (yuv_fp == NULL) {
-        LOGE("Save jpeg file open error");
+        ALOGE("Save jpeg file open error");
         return -1;
     }
 
-    LOGV("[BestIQ]  real_jpeg size ========>  %d", jpeg_size);
+    ALOGV("[BestIQ]  real_jpeg size ========>  %d", jpeg_size);
     buffer = (char *) malloc(jpeg_size);
     if (buffer == NULL) {
-        LOGE("Save YUV] buffer alloc failed");
+        ALOGE("Save YUV] buffer alloc failed");
         if (yuv_fp)
             fclose(yuv_fp);
 
@@ -1249,24 +1249,24 @@
     int cnt = 0;
     uint32_t written = 0;
 
-    LOGD("opening file [%s]", fname);
+    ALOGD("opening file [%s]", fname);
     int fd = open(fname, O_RDWR | O_CREAT);
     if (fd < 0) {
-        LOGE("failed to create file [%s]: %s", fname, strerror(errno));
+        ALOGE("failed to create file [%s]: %s", fname, strerror(errno));
         return;
     }
 
-    LOGD("writing %d bytes to file [%s]", size, fname);
+    ALOGD("writing %d bytes to file [%s]", size, fname);
     while (written < size) {
         nw = ::write(fd, buf + written, size - written);
         if (nw < 0) {
-            LOGE("failed to write to file %d [%s]: %s",written,fname, strerror(errno));
+            ALOGE("failed to write to file %d [%s]: %s",written,fname, strerror(errno));
             break;
         }
         written += nw;
         cnt++;
     }
-    LOGD("done writing %d bytes to file [%s] in %d passes",size, fname, cnt);
+    ALOGD("done writing %d bytes to file [%s] in %d passes",size, fname, cnt);
     ::close(fd);
 }
 
@@ -1278,7 +1278,7 @@
     int32_t x, y, src_y_start_pos, dst_pos, src_pos;
 
     if (dstWidth % 2 != 0 || dstHeight % 2 != 0) {
-        LOGE("scale_down_yuv422: invalid width, height for scaling");
+        ALOGE("scale_down_yuv422: invalid width, height for scaling");
         return false;
     }
 
@@ -1335,7 +1335,7 @@
 
 int CameraHardwareSec::pictureThread()
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
 
     int jpeg_size = 0;
     int ret = NO_ERROR;
@@ -1363,7 +1363,7 @@
     else
         mJpegHeapSize = cap_frame_size;
 
-    LOGV("[5B] mPostViewWidth = %d mPostViewHeight = %d\n",mPostViewWidth,mPostViewHeight);
+    ALOGV("[5B] mPostViewWidth = %d mPostViewHeight = %d\n",mPostViewWidth,mPostViewHeight);
 
     camera_memory_t *JpegHeap = mGetMemoryCb(-1, mJpegHeapSize, 1, 0);
 #ifdef BOARD_USE_V4L2_ION
@@ -1393,7 +1393,7 @@
 
             jpeg_data = mSecCamera->getJpeg(&JpegImageSize, &mThumbSize, &thumb_addr, &phyAddr);
             if (jpeg_data == NULL) {
-                LOGE("ERR(%s):Fail on SecCamera->getJpeg()", __func__);
+                ALOGE("ERR(%s):Fail on SecCamera->getJpeg()", __func__);
                 ret = UNKNOWN_ERROR;
             }
 
@@ -1407,7 +1407,7 @@
             mSecCamera->getCaptureAddr(mCapIndex, &mCapBuffer);
 
             if (mCapBuffer.virt.extP[0] == NULL) {
-                LOGE("ERR(%s):Fail on SecCamera getCaptureAddr = %0x ",
+                ALOGE("ERR(%s):Fail on SecCamera getCaptureAddr = %0x ",
                      __func__, mCapBuffer.virt.extP[0]);
                 return UNKNOWN_ERROR;
             }
@@ -1428,7 +1428,7 @@
                 JpegHeap->release(JpegHeap);
                 return UNKNOWN_ERROR;
             }
-            LOGI("snapshotandjpeg done");
+            ALOGI("snapshotandjpeg done");
 
 #ifdef ZERO_SHUTTER_LAG
             if (!mRecordRunning)
@@ -1443,14 +1443,14 @@
 
 #ifndef BOARD_USE_V4L2_ION
     int rawHeapSize = cap_frame_size;
-    LOGV("mRawHeap : MemoryHeapBase(previewHeapSize(%d))", rawHeapSize);
+    ALOGV("mRawHeap : MemoryHeapBase(previewHeapSize(%d))", rawHeapSize);
 #ifdef BOARD_USE_V4L2_ION
     mRawHeap = mGetMemoryCb(mPostviewHeap[mCapIndex]->getHeapID(), rawHeapSize, 1, 0);
 #else
     mRawHeap = mGetMemoryCb((int)mSecCamera->getCameraFd(SecCamera::PICTURE), rawHeapSize, 1, 0);
 #endif
     if (!mRawHeap)
-        LOGE("ERR(%s): Raw heap creation fail", __func__);
+        ALOGE("ERR(%s): Raw heap creation fail", __func__);
 
     if (mMsgEnabled & CAMERA_MSG_RAW_IMAGE)
         mDataCb(CAMERA_MSG_RAW_IMAGE, mRawHeap, 0, NULL, mCallbackCookie);
@@ -1466,7 +1466,7 @@
         int JpegExifSize = mSecCamera->getExif((unsigned char *)ExifHeap->data,
                                            (unsigned char *)mThumbnailHeap->base(),
                                             mThumbSize);
-        LOGV("JpegExifSize=%d", JpegExifSize);
+        ALOGV("JpegExifSize=%d", JpegExifSize);
 
         if (JpegExifSize < 0) {
             ret = UNKNOWN_ERROR;
@@ -1496,7 +1496,7 @@
         }
     }
 
-    LOGV("%s : pictureThread end", __func__);
+    ALOGV("%s : pictureThread end", __func__);
 
 out:
     if (JpegHeap) {
@@ -1517,7 +1517,7 @@
 
 status_t CameraHardwareSec::takePicture()
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
 
 #ifdef ZERO_SHUTTER_LAG
     if (!mUseInternalISP) {
@@ -1529,12 +1529,12 @@
 
     Mutex::Autolock lock(mStateLock);
     if (mCaptureInProgress) {
-        LOGE("%s : capture already in progress", __func__);
+        ALOGE("%s : capture already in progress", __func__);
         return INVALID_OPERATION;
     }
 
     if (mPictureThread->run("CameraPictureThread", PRIORITY_DEFAULT) != NO_ERROR) {
-        LOGE("%s : couldn't run picture thread", __func__);
+        ALOGE("%s : couldn't run picture thread", __func__);
         return INVALID_OPERATION;
     }
     mCaptureInProgress = true;
@@ -1544,12 +1544,12 @@
 
 status_t CameraHardwareSec::cancelPicture()
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
 
     if (mPictureThread.get()) {
-        LOGV("%s: waiting for picture thread to exit", __func__);
+        ALOGV("%s: waiting for picture thread to exit", __func__);
         mPictureThread->requestExitAndWait();
-        LOGV("%s: picture thread has exited", __func__);
+        ALOGV("%s: picture thread has exited", __func__);
     }
 
     return NO_ERROR;
@@ -1558,7 +1558,7 @@
 bool CameraHardwareSec::CheckVideoStartMarker(unsigned char *pBuf)
 {
     if (!pBuf) {
-        LOGE("CheckVideoStartMarker() => pBuf is NULL");
+        ALOGE("CheckVideoStartMarker() => pBuf is NULL");
         return false;
     }
 
@@ -1572,7 +1572,7 @@
 bool CameraHardwareSec::CheckEOIMarker(unsigned char *pBuf)
 {
     if (!pBuf) {
-        LOGE("CheckEOIMarker() => pBuf is NULL");
+        ALOGE("CheckEOIMarker() => pBuf is NULL");
         return false;
     }
 
@@ -1586,7 +1586,7 @@
 bool CameraHardwareSec::FindEOIMarkerInJPEG(unsigned char *pBuf, int dwBufSize, int *pnJPEGsize)
 {
     if (NULL == pBuf || 0 >= dwBufSize) {
-        LOGE("FindEOIMarkerInJPEG() => There is no contents.");
+        ALOGE("FindEOIMarkerInJPEG() => There is no contents.");
         return false;
     }
 
@@ -1607,15 +1607,15 @@
                     void *pJPEG, int *pdwJPEGSize,
                     void *pVideo, int *pdwVideoSize)
 {
-    LOGV("===========SplitFrame Start==============");
+    ALOGV("===========SplitFrame Start==============");
 
     if (NULL == pFrame || 0 >= dwSize) {
-        LOGE("There is no contents (pFrame=%p, dwSize=%d", pFrame, dwSize);
+        ALOGE("There is no contents (pFrame=%p, dwSize=%d", pFrame, dwSize);
         return false;
     }
 
     if (0 == dwJPEGLineLength || 0 == dwVideoLineLength) {
-        LOGE("There in no input information for decoding interleaved jpeg");
+        ALOGE("There in no input information for decoding interleaved jpeg");
         return false;
     }
 
@@ -1684,14 +1684,14 @@
         if (pdwVideoSize)
             *pdwVideoSize = dwVSize;
     } else {
-        LOGE("DecodeInterleaveJPEG_WithOutDT() => Can not find EOI");
+        ALOGE("DecodeInterleaveJPEG_WithOutDT() => Can not find EOI");
         bRet = false;
         if (pdwJPEGSize)
             *pdwJPEGSize = 0;
         if (pdwVideoSize)
             *pdwVideoSize = 0;
     }
-    LOGV("===========SplitFrame end==============");
+    ALOGV("===========SplitFrame end==============");
 
     return bRet;
 }
@@ -1717,7 +1717,7 @@
 
     int i = 0;
 
-    LOGV("decodeInterleaveData Start~~~");
+    ALOGV("decodeInterleaveData Start~~~");
     while (i < interleaveDataSize) {
         if ((*interleave_ptr == 0xFFFFFFFF) || (*interleave_ptr == 0x02FFFFFF) ||
                 (*interleave_ptr == 0xFF02FFFF)) {
@@ -1777,7 +1777,7 @@
             }
         }
     }
-    LOGV("decodeInterleaveData End~~~");
+    ALOGV("decodeInterleaveData End~~~");
     return ret;
 }
 
@@ -1829,13 +1829,13 @@
                 if (pictureSizes[i].width <= videoSizes[0].width) {
                     *width = pictureSizes[i].width;
                     *height = pictureSizes[i].height;
-                    LOGV("%s(width(%d), height(%d))", __func__, *width, *height);
+                    ALOGV("%s(width(%d), height(%d))", __func__, *width, *height);
                     return true;
                 }
             } else {
                 *width = pictureSizes[i].width;
                 *height = pictureSizes[i].height;
-                LOGV("%s(width(%d), height(%d))", __func__, *width, *height);
+                ALOGV("%s(width(%d), height(%d))", __func__, *width, *height);
                 return true;
             }
         }
@@ -1846,19 +1846,19 @@
 
 status_t CameraHardwareSec::setParameters(const CameraParameters& params)
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
 
     status_t ret = NO_ERROR;
 
     const char *new_record_hint_str = params.get(CameraParameters::KEY_RECORDING_HINT);
     const char *curr_record_hint_str = mParameters.get(CameraParameters::KEY_RECORDING_HINT);
-    LOGV("new_record_hint_str: %s", new_record_hint_str);
+    ALOGV("new_record_hint_str: %s", new_record_hint_str);
 
     if (new_record_hint_str) {
         if (strncmp(new_record_hint_str, curr_record_hint_str, 5)) {
             mRecordHint = !strncmp(new_record_hint_str, "true", 4);
             if (mSecCamera->setMode(mRecordHint) < 0) {
-                LOGE("ERR(%s):fail on mSecCamera->setMode(%d)", __func__, mRecordHint);
+                ALOGE("ERR(%s):fail on mSecCamera->setMode(%d)", __func__, mRecordHint);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set(CameraParameters::KEY_RECORDING_HINT, new_record_hint_str);
@@ -1866,7 +1866,7 @@
 
             if (mUseInternalISP) {
                 if (mSecCamera->initSetParams() < 0) {
-                    LOGE("ERR(%s):fail on mSecCamera->initSetParams()", __func__);
+                    ALOGE("ERR(%s):fail on mSecCamera->initSetParams()", __func__);
                     ret = UNKNOWN_ERROR;
                 }
             }
@@ -1880,7 +1880,7 @@
     mStateLock.lock();
     if (mCaptureInProgress) {
         mStateLock.unlock();
-        LOGE("%s : capture in progress, not allowed", __func__);
+        ALOGE("%s : capture in progress, not allowed", __func__);
         return UNKNOWN_ERROR;
     }
     mStateLock.unlock();
@@ -1897,20 +1897,20 @@
         int videosnapshot_height = new_preview_height;
 
         if (!getVideosnapshotSize(&videosnapshot_width, &videosnapshot_height)) {
-            LOGE("ERR(%s):fail on getVideosnapshotSize(width(%d), height(%d))",
+            ALOGE("ERR(%s):fail on getVideosnapshotSize(width(%d), height(%d))",
                     __func__, videosnapshot_width, videosnapshot_height);
             ret = UNKNOWN_ERROR;
         }
 
         if (mSecCamera->setVideosnapshotSize(videosnapshot_width, videosnapshot_height) < 0) {
-            LOGE("ERR(%s):fail on mSecCamera->setVideosnapshotSize(width(%d), height(%d))",
+            ALOGE("ERR(%s):fail on mSecCamera->setVideosnapshotSize(width(%d), height(%d))",
                     __func__, videosnapshot_width, videosnapshot_height);
             ret = UNKNOWN_ERROR;
         }
     }
 
     const char *new_str_preview_format = params.getPreviewFormat();
-    LOGV("%s : new_preview_width x new_preview_height = %dx%d, format = %s",
+    ALOGV("%s : new_preview_width x new_preview_height = %dx%d, format = %s",
          __func__, new_preview_width, new_preview_height, new_str_preview_format);
 
     if (0 < new_preview_width && 0 < new_preview_height &&
@@ -1962,29 +1962,29 @@
             current_pixel_format != new_preview_format) {
             if (mSecCamera->setPreviewSize(new_preview_width, new_preview_height,
                                            new_preview_format) < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setPreviewSize(width(%d), height(%d), format(%d))",
+                ALOGE("ERR(%s):Fail on mSecCamera->setPreviewSize(width(%d), height(%d), format(%d))",
                      __func__, new_preview_width, new_preview_height, new_preview_format);
                 ret = UNKNOWN_ERROR;
             } else {
                 if (mPreviewWindow) {
                     if (mPreviewRunning && !mPreviewStartDeferred) {
-                        LOGE("ERR(%s): preview is running, cannot change size and format!", __func__);
+                        ALOGE("ERR(%s): preview is running, cannot change size and format!", __func__);
                         ret = INVALID_OPERATION;
                     }
-                    LOGV("%s: mPreviewWindow (%p) set_buffers_geometry", __func__, mPreviewWindow);
-                    LOGV("%s: mPreviewWindow->set_buffers_geometry (%p)", __func__,
+                    ALOGV("%s: mPreviewWindow (%p) set_buffers_geometry", __func__, mPreviewWindow);
+                    ALOGV("%s: mPreviewWindow->set_buffers_geometry (%p)", __func__,
                          mPreviewWindow->set_buffers_geometry);
                     mPreviewWindow->set_buffers_geometry(mPreviewWindow,
                                                          new_preview_width, new_preview_height,
                                                          V4L2_PIX_2_HAL_PIXEL_FORMAT(new_preview_format));
-                    LOGV("%s: DONE mPreviewWindow (%p) set_buffers_geometry", __func__, mPreviewWindow);
+                    ALOGV("%s: DONE mPreviewWindow (%p) set_buffers_geometry", __func__, mPreviewWindow);
                 }
                 mParameters.setPreviewSize(new_preview_width, new_preview_height);
                 mParameters.setPreviewFormat(new_str_preview_format);
             }
         }
     } else {
-        LOGE("%s: Invalid preview size(%dx%d)",
+        ALOGE("%s: Invalid preview size(%dx%d)",
                 __func__, new_preview_width, new_preview_height);
 
         ret = INVALID_OPERATION;
@@ -1995,7 +1995,7 @@
     int new_picture_height = 0;
 
     params.getPictureSize(&new_picture_width, &new_picture_height);
-    LOGV("%s : new_picture_width x new_picture_height = %dx%d", __func__, new_picture_width, new_picture_height);
+    ALOGV("%s : new_picture_width x new_picture_height = %dx%d", __func__, new_picture_width, new_picture_height);
 
     int current_picture_width, current_picture_height, current_picture_size;
     mSecCamera->getSnapshotSize(&current_picture_width, &current_picture_height, &current_picture_size);
@@ -2003,7 +2003,7 @@
     if (new_picture_width != current_picture_width ||
         new_picture_height != current_picture_height) {
         if (mSecCamera->setSnapshotSize(new_picture_width, new_picture_height) < 0) {
-            LOGE("ERR(%s):fail on mSecCamera->setSnapshotSize(width(%d), height(%d))",
+            ALOGE("ERR(%s):fail on mSecCamera->setSnapshotSize(width(%d), height(%d))",
                     __func__, new_picture_width, new_picture_height);
             ret = UNKNOWN_ERROR;
         } else {
@@ -2019,7 +2019,7 @@
 
     // picture format
     const char *new_str_picture_format = params.getPictureFormat();
-    LOGV("%s : new_str_picture_format %s", __func__, new_str_picture_format);
+    ALOGV("%s : new_str_picture_format %s", __func__, new_str_picture_format);
     if (new_str_picture_format != NULL) {
         int new_picture_format = 0;
 
@@ -2047,7 +2047,7 @@
             new_picture_format = V4L2_PIX_FMT_NV21; //for 3rd party
 
         if (mSecCamera->setSnapshotPixelFormat(new_picture_format) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setSnapshotPixelFormat(format(%d))", __func__, new_picture_format);
+            ALOGE("ERR(%s):Fail on mSecCamera->setSnapshotPixelFormat(format(%d))", __func__, new_picture_format);
             ret = UNKNOWN_ERROR;
         } else
             mParameters.setPictureFormat(new_str_picture_format);
@@ -2055,11 +2055,11 @@
 
     // JPEG image quality
     int new_jpeg_quality = params.getInt(CameraParameters::KEY_JPEG_QUALITY);
-    LOGV("%s : new_jpeg_quality %d", __func__, new_jpeg_quality);
+    ALOGV("%s : new_jpeg_quality %d", __func__, new_jpeg_quality);
     /* we ignore bad values */
     if (new_jpeg_quality >=1 && new_jpeg_quality <= 100) {
         if (mSecCamera->setJpegQuality(new_jpeg_quality) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setJpegQuality(quality(%d))", __func__, new_jpeg_quality);
+            ALOGE("ERR(%s):Fail on mSecCamera->setJpegQuality(quality(%d))", __func__, new_jpeg_quality);
             ret = UNKNOWN_ERROR;
         } else
             mParameters.set(CameraParameters::KEY_JPEG_QUALITY, new_jpeg_quality);
@@ -2070,7 +2070,7 @@
     int new_jpeg_thumbnail_height= params.getInt(CameraParameters::KEY_JPEG_THUMBNAIL_HEIGHT);
     if (0 <= new_jpeg_thumbnail_width && 0 <= new_jpeg_thumbnail_height) {
         if (mSecCamera->setJpegThumbnailSize(new_jpeg_thumbnail_width, new_jpeg_thumbnail_height) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setJpegThumbnailSize(width(%d), height(%d))", __func__, new_jpeg_thumbnail_width, new_jpeg_thumbnail_height);
+            ALOGE("ERR(%s):Fail on mSecCamera->setJpegThumbnailSize(width(%d), height(%d))", __func__, new_jpeg_thumbnail_width, new_jpeg_thumbnail_height);
             ret = UNKNOWN_ERROR;
         } else {
             mParameters.set(CameraParameters::KEY_JPEG_THUMBNAIL_WIDTH, new_jpeg_thumbnail_width);
@@ -2080,11 +2080,11 @@
 
     // JPEG thumbnail quality
     int new_jpeg_thumbnail_quality = params.getInt(CameraParameters::KEY_JPEG_THUMBNAIL_QUALITY);
-    LOGV("%s : new_jpeg_thumbnail_quality %d", __func__, new_jpeg_thumbnail_quality);
+    ALOGV("%s : new_jpeg_thumbnail_quality %d", __func__, new_jpeg_thumbnail_quality);
     /* we ignore bad values */
     if (new_jpeg_thumbnail_quality >=1 && new_jpeg_thumbnail_quality <= 100) {
         if (mSecCamera->setJpegThumbnailQuality(new_jpeg_thumbnail_quality) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setJpegThumbnailQuality(quality(%d))",
+            ALOGE("ERR(%s):Fail on mSecCamera->setJpegThumbnailQuality(quality(%d))",
                                                __func__, new_jpeg_thumbnail_quality);
             ret = UNKNOWN_ERROR;
         } else
@@ -2099,7 +2099,7 @@
     if (mRecordHint) {
         if (new_frame_rate) {
             if (mUseInternalISP && (mSecCamera->setFrameRate(new_frame_rate) < 0)){
-                LOGE("ERR(%s):Fail on mSecCamera->setFrameRate(%d)", __func__, new_frame_rate);
+                ALOGE("ERR(%s):Fail on mSecCamera->setFrameRate(%d)", __func__, new_frame_rate);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.setPreviewFrameRate(new_frame_rate);
@@ -2109,11 +2109,11 @@
 
     // rotation
     int new_rotation = params.getInt(CameraParameters::KEY_ROTATION);
-    LOGV("%s : new_rotation %d", __func__, new_rotation);
+    ALOGV("%s : new_rotation %d", __func__, new_rotation);
     if (0 <= new_rotation) {
-        LOGV("%s : set orientation:%d", __func__, new_rotation);
+        ALOGV("%s : set orientation:%d", __func__, new_rotation);
         if (mSecCamera->setExifOrientationInfo(new_rotation) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setExifOrientationInfo(%d)", __func__, new_rotation);
+            ALOGE("ERR(%s):Fail on mSecCamera->setExifOrientationInfo(%d)", __func__, new_rotation);
             ret = UNKNOWN_ERROR;
         } else
             mParameters.set(CameraParameters::KEY_ROTATION, new_rotation);
@@ -2122,11 +2122,11 @@
     // zoom
     int new_zoom = params.getInt(CameraParameters::KEY_ZOOM);
     int current_zoom = mParameters.getInt(CameraParameters::KEY_ZOOM);
-    LOGV("%s : new_zoom %d", __func__, new_zoom);
+    ALOGV("%s : new_zoom %d", __func__, new_zoom);
     if (0 <= new_zoom) {
         if (new_zoom != current_zoom) {
             if (mSecCamera->setZoom(new_zoom) < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setZoom(zoom(%d))", __func__, new_zoom);
+                ALOGE("ERR(%s):Fail on mSecCamera->setZoom(zoom(%d))", __func__, new_zoom);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set(CameraParameters::KEY_ZOOM, new_zoom);
@@ -2138,11 +2138,11 @@
     int new_brightness = params.getInt("brightness");
     int max_brightness = params.getInt("brightness-max");
     int min_brightness = params.getInt("brightness-min");
-    LOGV("%s : new_brightness %d", __func__, new_brightness);
+    ALOGV("%s : new_brightness %d", __func__, new_brightness);
     if ((min_brightness <= new_brightness) &&
         (max_brightness >= new_brightness)) {
         if (mSecCamera->setBrightness(new_brightness) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setBrightness(brightness(%d))", __func__, new_brightness);
+            ALOGE("ERR(%s):Fail on mSecCamera->setBrightness(brightness(%d))", __func__, new_brightness);
             ret = UNKNOWN_ERROR;
         } else {
             mParameters.set("brightness", new_brightness);
@@ -2153,11 +2153,11 @@
     int new_saturation = params.getInt("saturation");
     int max_saturation = params.getInt("saturation-max");
     int min_saturation = params.getInt("saturation-min");
-    LOGV("%s : new_saturation %d", __func__, new_saturation);
+    ALOGV("%s : new_saturation %d", __func__, new_saturation);
     if ((min_saturation <= new_saturation) &&
         (max_saturation >= new_saturation)) {
         if (mSecCamera->setSaturation(new_saturation) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setSaturation(saturation(%d))", __func__, new_saturation);
+            ALOGE("ERR(%s):Fail on mSecCamera->setSaturation(saturation(%d))", __func__, new_saturation);
             ret = UNKNOWN_ERROR;
         } else {
             mParameters.set("saturation", new_saturation);
@@ -2168,11 +2168,11 @@
     int new_sharpness = params.getInt("sharpness");
     int max_sharpness = params.getInt("sharpness-max");
     int min_sharpness = params.getInt("sharpness-min");
-    LOGV("%s : new_sharpness %d", __func__, new_sharpness);
+    ALOGV("%s : new_sharpness %d", __func__, new_sharpness);
     if ((min_sharpness <= new_sharpness) &&
         (max_sharpness >= new_sharpness)) {
         if (mSecCamera->setSharpness(new_sharpness) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setSharpness(sharpness(%d))", __func__, new_sharpness);
+            ALOGE("ERR(%s):Fail on mSecCamera->setSharpness(sharpness(%d))", __func__, new_sharpness);
             ret = UNKNOWN_ERROR;
         } else {
             mParameters.set("sharpness", new_sharpness);
@@ -2183,11 +2183,11 @@
     int new_hue = params.getInt("hue");
     int max_hue = params.getInt("hue-max");
     int min_hue = params.getInt("hue-min");
-    LOGV("%s : new_hue %d", __func__, new_hue);
+    ALOGV("%s : new_hue %d", __func__, new_hue);
     if ((min_hue <= new_hue) &&
         (max_hue >= new_hue)) {
         if (mSecCamera->setHue(new_hue) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setHue(hue(%d))", __func__, new_hue);
+            ALOGE("ERR(%s):Fail on mSecCamera->setHue(hue(%d))", __func__, new_hue);
             ret = UNKNOWN_ERROR;
         } else {
             mParameters.set("hue", new_hue);
@@ -2198,11 +2198,11 @@
     int new_exposure_compensation = params.getInt(CameraParameters::KEY_EXPOSURE_COMPENSATION);
     int max_exposure_compensation = params.getInt(CameraParameters::KEY_MAX_EXPOSURE_COMPENSATION);
     int min_exposure_compensation = params.getInt(CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION);
-    LOGV("%s : new_exposure_compensation %d", __func__, new_exposure_compensation);
+    ALOGV("%s : new_exposure_compensation %d", __func__, new_exposure_compensation);
     if ((min_exposure_compensation <= new_exposure_compensation) &&
         (max_exposure_compensation >= new_exposure_compensation)) {
         if (mSecCamera->setExposure(new_exposure_compensation) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setExposure(exposure(%d))", __func__, new_exposure_compensation);
+            ALOGE("ERR(%s):Fail on mSecCamera->setExposure(exposure(%d))", __func__, new_exposure_compensation);
             ret = UNKNOWN_ERROR;
         } else {
             mParameters.set(CameraParameters::KEY_EXPOSURE_COMPENSATION, new_exposure_compensation);
@@ -2215,7 +2215,7 @@
         if (strncmp(new_AE_lock, old_AE_lock, 4)) {
             int ae_value = !strncmp(new_AE_lock, "true", 4);
             if (mSecCamera->setAutoExposureLock(ae_value) < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setExposureLock", __func__);
+                ALOGE("ERR(%s):Fail on mSecCamera->setExposureLock", __func__);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set(CameraParameters::KEY_AUTO_EXPOSURE_LOCK, new_AE_lock);
@@ -2225,7 +2225,7 @@
 
     // ISO
     const char *new_iso_str = params.get("iso");
-    LOGV("%s : new_iso_str %s", __func__, new_iso_str);
+    ALOGV("%s : new_iso_str %s", __func__, new_iso_str);
     if (new_iso_str != NULL) {
         int new_iso = -1;
 
@@ -2244,13 +2244,13 @@
         } else if (!strcmp(new_iso_str, "1600")) {
             new_iso = ISO_1600;
         } else {
-            LOGE("ERR(%s):Invalid iso value(%s)", __func__, new_iso_str);
+            ALOGE("ERR(%s):Invalid iso value(%s)", __func__, new_iso_str);
             ret = UNKNOWN_ERROR;
         }
 
         if (0 <= new_iso) {
             if (mSecCamera->setISO(new_iso) < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setISO(iso(%d))", __func__, new_iso);
+                ALOGE("ERR(%s):Fail on mSecCamera->setISO(iso(%d))", __func__, new_iso);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set("iso", new_iso_str);
@@ -2260,7 +2260,7 @@
 
     // Metering
     const char *new_metering_str = params.get("metering");
-    LOGV("%s : new_metering_str %s", __func__, new_metering_str);
+    ALOGV("%s : new_metering_str %s", __func__, new_metering_str);
     if (new_metering_str != NULL) {
         int new_metering = -1;
 
@@ -2271,13 +2271,13 @@
         } else if (!strcmp(new_metering_str, "matrix")) {
             new_metering = METERING_MATRIX;
         } else {
-            LOGE("ERR(%s):Invalid metering value(%s)", __func__, new_metering_str);
+            ALOGE("ERR(%s):Invalid metering value(%s)", __func__, new_metering_str);
             ret = UNKNOWN_ERROR;
         }
 
         if (0 <= new_metering) {
             if (mSecCamera->setMetering(new_metering) < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setMetering(metering(%d))", __func__, new_metering);
+                ALOGE("ERR(%s):Fail on mSecCamera->setMetering(metering(%d))", __func__, new_metering);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set("metering", new_metering_str);
@@ -2287,7 +2287,7 @@
 
     // AFC
     const char *new_antibanding_str = params.get(CameraParameters::KEY_ANTIBANDING);
-    LOGV("%s : new_antibanding_str %s", __func__, new_antibanding_str);
+    ALOGV("%s : new_antibanding_str %s", __func__, new_antibanding_str);
     if (new_antibanding_str != NULL) {
         int new_antibanding = -1;
 
@@ -2312,13 +2312,13 @@
             else
                 new_antibanding = ANTI_BANDING_OFF;
         } else {
-            LOGE("ERR(%s):Invalid antibanding value(%s)", __func__, new_antibanding_str);
+            ALOGE("ERR(%s):Invalid antibanding value(%s)", __func__, new_antibanding_str);
             ret = UNKNOWN_ERROR;
         }
 
         if (0 <= new_antibanding) {
             if (mSecCamera->setAntiBanding(new_antibanding) < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setAntiBanding(antibanding(%d))", __func__, new_antibanding);
+                ALOGE("ERR(%s):Fail on mSecCamera->setAntiBanding(antibanding(%d))", __func__, new_antibanding);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set(CameraParameters::KEY_ANTIBANDING, new_antibanding_str);
@@ -2343,10 +2343,10 @@
     if (new_scene_mode_str && current_scene_mode_str) {
         if (!strcmp(new_scene_mode_str, current_scene_mode_str)) {
             if ((new_min_fps != current_min_fps) || (new_max_fps != current_max_fps)) {
-                LOGW("%s : requested new_min_fps = %d, new_max_fps = %d not allowed",
+                ALOGW("%s : requested new_min_fps = %d, new_max_fps = %d not allowed",
                         __func__, new_min_fps, new_max_fps);
                 /* TODO : We need policy for fps. */
-                LOGW("%s : current_min_fps = %d, current_max_fps = %d",
+                ALOGW("%s : current_min_fps = %d, current_max_fps = %d",
                         __func__, current_min_fps, current_max_fps);
                 //ret = UNKNOWN_ERROR;
             }
@@ -2403,7 +2403,7 @@
             } else if (!strcmp(new_scene_mode_str, CameraParameters::SCENE_MODE_CANDLELIGHT)) {
                 new_scene_mode = SCENE_MODE_CANDLE_LIGHT;
             } else {
-                LOGE("%s::unmatched scene_mode(%s)",
+                ALOGE("%s::unmatched scene_mode(%s)",
                         __func__, new_scene_mode_str); //action, night-portrait, theatre, steadyphoto
                 ret = UNKNOWN_ERROR;
             }
@@ -2411,7 +2411,7 @@
 
         if (0 <= new_scene_mode) {
             if (mSecCamera->setSceneMode(new_scene_mode) < 0) {
-                LOGE("%s::mSecCamera->setSceneMode(%d) fail", __func__, new_scene_mode);
+                ALOGE("%s::mSecCamera->setSceneMode(%d) fail", __func__, new_scene_mode);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set(CameraParameters::KEY_SCENE_MODE, new_scene_mode_str);
@@ -2448,13 +2448,13 @@
             /* TODO */
             /* This is temperary implementation.
                When camera support all AF mode, this code will be changing */
-            LOGE("%s::unmatched focus_mode(%s)", __func__, new_focus_mode_str);
+            ALOGE("%s::unmatched focus_mode(%s)", __func__, new_focus_mode_str);
             ret = UNKNOWN_ERROR;
         }
 
         if (0 <= new_focus_mode) {
             if (mSecCamera->setFocusMode(new_focus_mode) < 0) {
-                LOGE("%s::mSecCamera->setFocusMode(%d) fail", __func__, new_focus_mode);
+                ALOGE("%s::mSecCamera->setFocusMode(%d) fail", __func__, new_focus_mode);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set(CameraParameters::KEY_FOCUS_MODE, new_focus_mode_str);
@@ -2475,12 +2475,12 @@
         else if (!strcmp(new_flash_mode_str, CameraParameters::FLASH_MODE_TORCH))
             new_flash_mode = FLASH_MODE_TORCH;
         else {
-            LOGE("%s::unmatched flash_mode(%s)", __func__, new_flash_mode_str); //red-eye
+            ALOGE("%s::unmatched flash_mode(%s)", __func__, new_flash_mode_str); //red-eye
             ret = UNKNOWN_ERROR;
         }
         if (0 <= new_flash_mode) {
             if (mSecCamera->setFlashMode(new_flash_mode) < 0) {
-                LOGE("%s::mSecCamera->setFlashMode(%d) fail", __func__, new_flash_mode);
+                ALOGE("%s::mSecCamera->setFlashMode(%d) fail", __func__, new_flash_mode);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set(CameraParameters::KEY_FLASH_MODE, new_flash_mode_str);
@@ -2489,7 +2489,7 @@
     }
 
     // whitebalance
-    LOGV("%s : new_white_str %s", __func__, new_white_str);
+    ALOGV("%s : new_white_str %s", __func__, new_white_str);
     if ((new_scene_mode_str != NULL) && !strcmp(new_scene_mode_str, CameraParameters::SCENE_MODE_AUTO)) {
         if (new_white_str != NULL) {
             int new_white = -1;
@@ -2509,13 +2509,13 @@
                              CameraParameters::WHITE_BALANCE_INCANDESCENT)) {
                 new_white = WHITE_BALANCE_TUNGSTEN;
             } else {
-                LOGE("ERR(%s):Invalid white balance(%s)", __func__, new_white_str); //twilight, shade, warm_flourescent
+                ALOGE("ERR(%s):Invalid white balance(%s)", __func__, new_white_str); //twilight, shade, warm_flourescent
                 ret = UNKNOWN_ERROR;
             }
 
             if (0 <= new_white) {
                 if (mSecCamera->setWhiteBalance(new_white) < 0) {
-                    LOGE("ERR(%s):Fail on mSecCamera->setWhiteBalance(white(%d))", __func__, new_white);
+                    ALOGE("ERR(%s):Fail on mSecCamera->setWhiteBalance(white(%d))", __func__, new_white);
                     ret = UNKNOWN_ERROR;
                 } else {
                     mParameters.set(CameraParameters::KEY_WHITE_BALANCE, new_white_str);
@@ -2530,7 +2530,7 @@
         if (strncmp(new_AWB_lock, old_AWB_lock, 4)) {
             int awb_value = !strncmp(new_AWB_lock, "true", 4);
             if (mSecCamera->setAutoWhiteBalanceLock(awb_value) < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setoAutoWhiteBalanceLock()", __func__);
+                ALOGE("ERR(%s):Fail on mSecCamera->setoAutoWhiteBalanceLock()", __func__);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set(CameraParameters::KEY_AUTO_WHITEBALANCE_LOCK, new_AWB_lock);
@@ -2539,7 +2539,7 @@
     }
 
     const char *new_touch_rect_str = params.get(CameraParameters::KEY_FOCUS_AREAS);
-    LOGV("Touched rect is '%s'", new_touch_rect_str);
+    ALOGV("Touched rect is '%s'", new_touch_rect_str);
 
     if (new_touch_rect_str != NULL) {
         int left = 0, top = 0, right = 0, bottom = 0, touched = 0;
@@ -2549,27 +2549,27 @@
         char delim = ',';
         left = (int)strtol(new_touch_rect_str+1, &end, 10);
         if (*end != delim) {
-            LOGE("Cannot find '%c' in str=%s", delim, new_touch_rect_str);
+            ALOGE("Cannot find '%c' in str=%s", delim, new_touch_rect_str);
             return -1;
         }
         top = (int)strtol(end+1, &end, 10);
         if (*end != delim) {
-            LOGE("Cannot find '%c' in str=%s", delim, new_touch_rect_str);
+            ALOGE("Cannot find '%c' in str=%s", delim, new_touch_rect_str);
             return -1;
         }
         right = (int)strtol(end+1, &end, 10);
         if (*end != delim) {
-            LOGE("Cannot find '%c' in str=%s", delim, new_touch_rect_str);
+            ALOGE("Cannot find '%c' in str=%s", delim, new_touch_rect_str);
             return -1;
         }
         bottom = (int)strtol(end+1, &end, 10);
         if (*end != delim) {
-            LOGE("Cannot find '%c' in str=%s", delim, new_touch_rect_str);
+            ALOGE("Cannot find '%c' in str=%s", delim, new_touch_rect_str);
             return -1;
         }
         touched = (int)strtol(end+1, &end, 10);
         if (*end != ')') {
-            LOGE("Cannot find ')' in str=%s", new_touch_rect_str);
+            ALOGE("Cannot find ')' in str=%s", new_touch_rect_str);
             return -1;
         }
 
@@ -2599,13 +2599,13 @@
             new_image_effect = IMAGE_EFFECT_NEGATIVE;
         } else {
             //posterize, whiteboard, blackboard, solarize
-            LOGE("ERR(%s):Invalid effect(%s)", __func__, new_image_effect_str);
+            ALOGE("ERR(%s):Invalid effect(%s)", __func__, new_image_effect_str);
             ret = UNKNOWN_ERROR;
         }
 
         if (new_image_effect >= 0) {
             if (mSecCamera->setImageEffect(new_image_effect) < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setImageEffect(effect(%d))", __func__, new_image_effect);
+                ALOGE("ERR(%s):Fail on mSecCamera->setImageEffect(effect(%d))", __func__, new_image_effect);
                 ret = UNKNOWN_ERROR;
             } else {
                 const char *old_image_effect_str = mParameters.get(CameraParameters::KEY_EFFECT);
@@ -2623,7 +2623,7 @@
 
     //contrast
     const char *new_contrast_str = params.get("contrast");
-    LOGV("%s : new_contrast_str %s", __func__, new_contrast_str);
+    ALOGV("%s : new_contrast_str %s", __func__, new_contrast_str);
     if (new_contrast_str != NULL) {
         int new_contrast = -1;
 
@@ -2631,7 +2631,7 @@
             if (mUseInternalISP)
                 new_contrast = IS_CONTRAST_AUTO;
             else
-                LOGW("WARN(%s):Invalid contrast value (%s)", __func__, new_contrast_str);
+                ALOGW("WARN(%s):Invalid contrast value (%s)", __func__, new_contrast_str);
         } else if (!strcmp(new_contrast_str, "-2")) {
             if (mUseInternalISP)
                 new_contrast = IS_CONTRAST_MINUS_2;
@@ -2658,13 +2658,13 @@
             else
                 new_contrast = CONTRAST_PLUS_2;
         } else {
-            LOGE("ERR(%s):Invalid contrast value(%s)", __func__, new_contrast_str);
+            ALOGE("ERR(%s):Invalid contrast value(%s)", __func__, new_contrast_str);
             ret = UNKNOWN_ERROR;
         }
 
         if (0 <= new_contrast) {
             if (mSecCamera->setContrast(new_contrast) < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setContrast(contrast(%d))", __func__, new_contrast);
+                ALOGE("ERR(%s):Fail on mSecCamera->setContrast(contrast(%d))", __func__, new_contrast);
                 ret = UNKNOWN_ERROR;
             } else {
                 mParameters.set("contrast", new_contrast_str);
@@ -2674,11 +2674,11 @@
 
     //WDR
     int new_wdr = params.getInt("wdr");
-    LOGV("%s : new_wdr %d", __func__, new_wdr);
+    ALOGV("%s : new_wdr %d", __func__, new_wdr);
 
     if (0 <= new_wdr) {
         if (mSecCamera->setWDR(new_wdr) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setWDR(%d)", __func__, new_wdr);
+            ALOGE("ERR(%s):Fail on mSecCamera->setWDR(%d)", __func__, new_wdr);
             ret = UNKNOWN_ERROR;
         }
     }
@@ -2688,7 +2688,7 @@
 
     if (0 <= new_anti_shake) {
         if (mSecCamera->setAntiShake(new_anti_shake) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setWDR(%d)", __func__, new_anti_shake);
+            ALOGE("ERR(%s):Fail on mSecCamera->setWDR(%d)", __func__, new_anti_shake);
             ret = UNKNOWN_ERROR;
         }
     }
@@ -2696,7 +2696,7 @@
     // gps latitude
     const char *new_gps_latitude_str = params.get(CameraParameters::KEY_GPS_LATITUDE);
     if (mSecCamera->setGPSLatitude(new_gps_latitude_str) < 0) {
-        LOGE("%s::mSecCamera->setGPSLatitude(%s) fail", __func__, new_gps_latitude_str);
+        ALOGE("%s::mSecCamera->setGPSLatitude(%s) fail", __func__, new_gps_latitude_str);
         ret = UNKNOWN_ERROR;
     } else {
         if (new_gps_latitude_str) {
@@ -2710,7 +2710,7 @@
     const char *new_gps_longitude_str = params.get(CameraParameters::KEY_GPS_LONGITUDE);
 
     if (mSecCamera->setGPSLongitude(new_gps_longitude_str) < 0) {
-        LOGE("%s::mSecCamera->setGPSLongitude(%s) fail", __func__, new_gps_longitude_str);
+        ALOGE("%s::mSecCamera->setGPSLongitude(%s) fail", __func__, new_gps_longitude_str);
         ret = UNKNOWN_ERROR;
     } else {
         if (new_gps_longitude_str) {
@@ -2724,7 +2724,7 @@
     const char *new_gps_altitude_str = params.get(CameraParameters::KEY_GPS_ALTITUDE);
 
     if (mSecCamera->setGPSAltitude(new_gps_altitude_str) < 0) {
-        LOGE("%s::mSecCamera->setGPSAltitude(%s) fail", __func__, new_gps_altitude_str);
+        ALOGE("%s::mSecCamera->setGPSAltitude(%s) fail", __func__, new_gps_altitude_str);
         ret = UNKNOWN_ERROR;
     } else {
         if (new_gps_altitude_str) {
@@ -2738,7 +2738,7 @@
     const char *new_gps_timestamp_str = params.get(CameraParameters::KEY_GPS_TIMESTAMP);
 
     if (mSecCamera->setGPSTimeStamp(new_gps_timestamp_str) < 0) {
-        LOGE("%s::mSecCamera->setGPSTimeStamp(%s) fail", __func__, new_gps_timestamp_str);
+        ALOGE("%s::mSecCamera->setGPSTimeStamp(%s) fail", __func__, new_gps_timestamp_str);
         ret = UNKNOWN_ERROR;
     } else {
         if (new_gps_timestamp_str) {
@@ -2752,7 +2752,7 @@
     const char *new_gps_processing_method_str = params.get(CameraParameters::KEY_GPS_PROCESSING_METHOD);
 
     if (mSecCamera->setGPSProcessingMethod(new_gps_processing_method_str) < 0) {
-        LOGE("%s::mSecCamera->setGPSProcessingMethod(%s) fail", __func__, new_gps_processing_method_str);
+        ALOGE("%s::mSecCamera->setGPSProcessingMethod(%s) fail", __func__, new_gps_processing_method_str);
         ret = UNKNOWN_ERROR;
     } else {
         if (new_gps_processing_method_str) {
@@ -2768,19 +2768,19 @@
     int new_recording_width  = 0;
     int new_recording_height = 0;
     params.getVideoSize(&new_recording_width, &new_recording_height);
-    LOGV("new_recording_width (%d) new_recording_height (%d)",
+    ALOGV("new_recording_width (%d) new_recording_height (%d)",
             new_recording_width, new_recording_height);
 
     int current_recording_width, current_recording_height;
     mParameters.getVideoSize(&current_recording_width, &current_recording_height);
-    LOGV("current_recording_width (%d) current_recording_height (%d)",
+    ALOGV("current_recording_width (%d) current_recording_height (%d)",
             current_recording_width, current_recording_height);
 
     if (current_recording_width != new_recording_width ||
         current_recording_height != new_recording_height) {
         if (0 < new_recording_width && 0 < new_recording_height) {
             if (mSecCamera->setRecordingSize(new_recording_width, new_recording_height) < 0) {
-                LOGE("ERR(%s):Fail on mSecCamera->setRecordingSize(width(%d), height(%d))",
+                ALOGE("ERR(%s):Fail on mSecCamera->setRecordingSize(width(%d), height(%d))",
                         __func__, new_recording_width, new_recording_height);
                 ret = UNKNOWN_ERROR;
             }
@@ -2798,13 +2798,13 @@
         else if (!strcmp(new_gamma_str, "on"))
             new_gamma = GAMMA_ON;
         else {
-            LOGE("%s::unmatched gamma(%s)", __func__, new_gamma_str);
+            ALOGE("%s::unmatched gamma(%s)", __func__, new_gamma_str);
             ret = UNKNOWN_ERROR;
         }
 
         if (0 <= new_gamma) {
             if (mSecCamera->setGamma(new_gamma) < 0) {
-                LOGE("%s::mSecCamera->setGamma(%d) fail", __func__, new_gamma);
+                ALOGE("%s::mSecCamera->setGamma(%d) fail", __func__, new_gamma);
                 ret = UNKNOWN_ERROR;
             }
         }
@@ -2821,13 +2821,13 @@
         else if (!strcmp(new_slow_ae_str, "on"))
             new_slow_ae = SLOW_AE_ON;
         else {
-            LOGE("%s::unmatched slow_ae(%s)", __func__, new_slow_ae_str);
+            ALOGE("%s::unmatched slow_ae(%s)", __func__, new_slow_ae_str);
             ret = UNKNOWN_ERROR;
         }
 
         if (0 <= new_slow_ae) {
             if (mSecCamera->setSlowAE(new_slow_ae) < 0) {
-                LOGE("%s::mSecCamera->setSlowAE(%d) fail", __func__, new_slow_ae);
+                ALOGE("%s::mSecCamera->setSlowAE(%d) fail", __func__, new_slow_ae);
                 ret = UNKNOWN_ERROR;
             }
         }
@@ -2838,7 +2838,7 @@
 
     if (0 <= new_sensor_mode) {
         if (mSecCamera->setSensorMode(new_sensor_mode) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setSensorMode(%d)", __func__, new_sensor_mode);
+            ALOGE("ERR(%s):Fail on mSecCamera->setSensorMode(%d)", __func__, new_sensor_mode);
             ret = UNKNOWN_ERROR;
         }
     } else {
@@ -2850,7 +2850,7 @@
 
     if (0 <= new_shot_mode) {
         if (mSecCamera->setShotMode(new_shot_mode) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setShotMode(%d)", __func__, new_shot_mode);
+            ALOGE("ERR(%s):Fail on mSecCamera->setShotMode(%d)", __func__, new_shot_mode);
             ret = UNKNOWN_ERROR;
         }
     } else {
@@ -2862,18 +2862,18 @@
 
     if (0 <= new_dataline) {
         if (mSecCamera->setDataLineCheck(new_dataline) < 0) {
-            LOGE("ERR(%s):Fail on mSecCamera->setDataLineCheck(%d)", __func__, new_dataline);
+            ALOGE("ERR(%s):Fail on mSecCamera->setDataLineCheck(%d)", __func__, new_dataline);
             ret = UNKNOWN_ERROR;
         }
     }
-    LOGV("%s return ret = %d", __func__, ret);
+    ALOGV("%s return ret = %d", __func__, ret);
 
     return ret;
 }
 
 CameraParameters CameraHardwareSec::getParameters() const
 {
-    LOGV("%s :", __func__);
+    ALOGV("%s :", __func__);
     return mParameters;
 }
 
@@ -2884,7 +2884,7 @@
        for Face Detection */
     if(command == CAMERA_CMD_START_FACE_DETECTION) {
         if (mSecCamera->setFaceDetect(FACE_DETECTION_ON) < 0) {
-            LOGE("ERR(%s): Fail on mSecCamera->startFaceDetection()");
+            ALOGE("ERR(%s): Fail on mSecCamera->startFaceDetection()");
             return BAD_VALUE;
         } else {
             return NO_ERROR;
@@ -2892,7 +2892,7 @@
     }
     if(command == CAMERA_CMD_STOP_FACE_DETECTION) {
         if (mSecCamera->setFaceDetect(FACE_DETECTION_OFF) < 0) {
-            LOGE("ERR(%s): Fail on mSecCamera->stopFaceDetection()");
+            ALOGE("ERR(%s): Fail on mSecCamera->stopFaceDetection()");
             return BAD_VALUE;
         } else {
             return NO_ERROR;
@@ -2904,7 +2904,7 @@
 
 void CameraHardwareSec::release()
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
 
     /* shut down any threads we have that might be running.  do it here
      * instead of the destructor.  we're guaranteed to be on another thread
@@ -2979,7 +2979,7 @@
     // metadata buffer mode can be turned on or off.
     // Samsung needs to fix this.
     if (!enable) {
-        LOGE("Non-metadata buffer mode is not supported!");
+        ALOGE("Non-metadata buffer mode is not supported!");
         return INVALID_OPERATION;
     }
     return OK;
@@ -2991,7 +2991,7 @@
 
 static int HAL_camera_device_close(struct hw_device_t* device)
 {
-    LOGI("%s", __func__);
+    ALOGI("%s", __func__);
     if (device) {
         camera_device_t *cam_device = (camera_device_t *)device;
         delete static_cast<CameraHardwareSec *>(cam_device->priv);
@@ -3010,7 +3010,7 @@
 static int HAL_camera_device_set_preview_window(struct camera_device *dev,
                                                 struct preview_stream_ops *buf)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->setPreviewWindow(buf);
 }
 
@@ -3022,7 +3022,7 @@
         camera_request_memory get_memory,
         void* user)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     obj(dev)->setCallbacks(notify_cb, data_cb, data_cb_timestamp,
                            get_memory,
                            user);
@@ -3038,7 +3038,7 @@
  */
 static void HAL_camera_device_enable_msg_type(struct camera_device *dev, int32_t msg_type)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     obj(dev)->enableMsgType(msg_type);
 }
 
@@ -3054,7 +3054,7 @@
  */
 static void HAL_camera_device_disable_msg_type(struct camera_device *dev, int32_t msg_type)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     obj(dev)->disableMsgType(msg_type);
 }
 
@@ -3065,7 +3065,7 @@
  */
 static int HAL_camera_device_msg_type_enabled(struct camera_device *dev, int32_t msg_type)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->msgTypeEnabled(msg_type);
 }
 
@@ -3074,7 +3074,7 @@
  */
 static int HAL_camera_device_start_preview(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->startPreview();
 }
 
@@ -3083,7 +3083,7 @@
  */
 static void HAL_camera_device_stop_preview(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     obj(dev)->stopPreview();
 }
 
@@ -3092,7 +3092,7 @@
  */
 static int HAL_camera_device_preview_enabled(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->previewEnabled();
 }
 
@@ -3128,7 +3128,7 @@
  */
 static int HAL_camera_device_store_meta_data_in_buffers(struct camera_device *dev, int enable)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->storeMetaDataInBuffers(enable);
 }
 
@@ -3144,7 +3144,7 @@
  */
 static int HAL_camera_device_start_recording(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->startRecording();
 }
 
@@ -3153,7 +3153,7 @@
  */
 static void HAL_camera_device_stop_recording(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     obj(dev)->stopRecording();
 }
 
@@ -3162,7 +3162,7 @@
  */
 static int HAL_camera_device_recording_enabled(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->recordingEnabled();
 }
 
@@ -3178,7 +3178,7 @@
 static void HAL_camera_device_release_recording_frame(struct camera_device *dev,
                                 const void *opaque)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     obj(dev)->releaseRecordingFrame(opaque);
 }
 
@@ -3189,7 +3189,7 @@
  */
 static int HAL_camera_device_auto_focus(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->autoFocus();
 }
 
@@ -3201,7 +3201,7 @@
  */
 static int HAL_camera_device_cancel_auto_focus(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->cancelAutoFocus();
 }
 
@@ -3210,7 +3210,7 @@
  */
 static int HAL_camera_device_take_picture(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->takePicture();
 }
 
@@ -3220,7 +3220,7 @@
  */
 static int HAL_camera_device_cancel_picture(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->cancelPicture();
 }
 
@@ -3231,7 +3231,7 @@
 static int HAL_camera_device_set_parameters(struct camera_device *dev,
                                             const char *parms)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     String8 str(parms);
     CameraParameters p(str);
     return obj(dev)->setParameters(p);
@@ -3240,7 +3240,7 @@
 /** Return the camera parameters. */
 char *HAL_camera_device_get_parameters(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     String8 str;
     CameraParameters parms = obj(dev)->getParameters();
     str = parms.flatten();
@@ -3249,7 +3249,7 @@
 
 static void HAL_camera_device_put_parameters(struct camera_device *dev, char *parms)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     free(parms);
 }
 
@@ -3259,7 +3259,7 @@
 static int HAL_camera_device_send_command(struct camera_device *dev,
                     int32_t cmd, int32_t arg1, int32_t arg2)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->sendCommand(cmd, arg1, arg2);
 }
 
@@ -3269,7 +3269,7 @@
  */
 static void HAL_camera_device_release(struct camera_device *dev)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     obj(dev)->release();
 }
 
@@ -3278,26 +3278,26 @@
  */
 static int HAL_camera_device_dump(struct camera_device *dev, int fd)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     return obj(dev)->dump(fd);
 }
 
 static int HAL_getNumberOfCameras()
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
 
     int cam_fd;
     static struct v4l2_input input;
 
     cam_fd = open(CAMERA_DEV_NAME, O_RDONLY);
     if (cam_fd < 0) {
-        LOGE("ERR(%s):Cannot open %s (error : %s)", __func__, CAMERA_DEV_NAME, strerror(errno));
+        ALOGE("ERR(%s):Cannot open %s (error : %s)", __func__, CAMERA_DEV_NAME, strerror(errno));
         return -1;
     }
 
     input.index = 0;
     while (ioctl(cam_fd, VIDIOC_ENUMINPUT, &input) == 0) {
-        LOGI("Name of input channel[%d] is %s", input.index, input.name);
+        ALOGI("Name of input channel[%d] is %s", input.index, input.name);
         input.index++;
     }
 
@@ -3308,7 +3308,7 @@
 
 static int HAL_getCameraInfo(int cameraId, struct camera_info *cameraInfo)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
     memcpy(cameraInfo, &sCameraInfo[cameraId], sizeof(CameraInfo));
     return 0;
 }
@@ -3347,20 +3347,20 @@
                                   const char *id,
                                   struct hw_device_t** device)
 {
-    LOGV("%s", __func__);
+    ALOGV("%s", __func__);
 
     int cameraId = atoi(id);
     if (cameraId < 0 || cameraId >= HAL_getNumberOfCameras()) {
-        LOGE("Invalid camera ID %s", id);
+        ALOGE("Invalid camera ID %s", id);
         return -EINVAL;
     }
 
     if (g_cam_device) {
         if (obj(g_cam_device)->getCameraId() == cameraId) {
-            LOGV("returning existing camera ID %s", id);
+            ALOGV("returning existing camera ID %s", id);
             goto done;
         } else {
-            LOGE("Cannot open camera %d. camera %d is already running!",
+            ALOGE("Cannot open camera %d. camera %d is already running!",
                     cameraId, obj(g_cam_device)->getCameraId());
             return -ENOSYS;
         }
@@ -3377,13 +3377,13 @@
 
     g_cam_device->ops = &camera_device_ops;
 
-    LOGI("%s: open camera %s", __func__, id);
+    ALOGI("%s: open camera %s", __func__, id);
 
     g_cam_device->priv = new CameraHardwareSec(cameraId, g_cam_device);
 
 done:
     *device = (hw_device_t *)g_cam_device;
-    LOGI("%s: opened camera %s (%p)", __func__, id, *device);
+    ALOGI("%s: opened camera %s (%p)", __func__, id, *device);
     return 0;
 }