summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuzhen Wang <shuzhenw@codeaurora.org>2014-01-13 17:29:48 -0800
committerAli B <abittin@gmail.com>2018-06-17 19:19:52 +0300
commit9cd7ce094fbbba112acd5e9df02217ceb913e49e (patch)
tree0d304eed9d94bcd5a1bc27498c10d4a1b75bc1a4
parent4afd38feea8b940fc5e3bac806ab8604a3ba3081 (diff)
Camera3: Clean up ALOGE calls in non-error conditions
Use ALOGI/ALOGD instead. Bug: 12489802 Change-Id: Id7fc9147395af3a9a0fe135d1017a155aad174fb Signed-off-by: Daniel Jarai <jaraidaniel@gmail.com>
-rwxr-xr-xcamera/QCamera2/HAL3/QCamera3Channel.cpp6
-rwxr-xr-xcamera/QCamera2/HAL3/QCamera3HWI.cpp2
-rw-r--r--camera/QCamera2/HAL3/QCamera3PostProc.cpp14
-rw-r--r--camera/QCamera2/HAL3/QCamera3Stream.cpp4
-rwxr-xr-xcamera/QCamera2/stack/mm-camera-interface/src/mm_camera.c6
-rwxr-xr-xcamera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c2
-rw-r--r--camera/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h4
-rw-r--r--camera/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg.c16
-rw-r--r--camera/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_exif.c2
-rw-r--r--camera/mm-image-codec/qomx_core/qomx_core.c18
10 files changed, 36 insertions, 38 deletions
diff --git a/camera/QCamera2/HAL3/QCamera3Channel.cpp b/camera/QCamera2/HAL3/QCamera3Channel.cpp
index 5912eb7..595d277 100755
--- a/camera/QCamera2/HAL3/QCamera3Channel.cpp
+++ b/camera/QCamera2/HAL3/QCamera3Channel.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundataion. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundataion. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -875,12 +875,12 @@ void QCamera3PicChannel::jpegEvtHandle(jpeg_job_status_t status,
if(obj->mJpegSettings->max_jpeg_size <= 0 ||
obj->mJpegSettings->max_jpeg_size > obj->mMemory->getSize(obj->mCurrentBufIndex)){
- ALOGE("%s:Max Jpeg size :%d is out of valid range setting to size of buffer",
+ ALOGW("%s:Max Jpeg size :%d is out of valid range setting to size of buffer",
__func__, obj->mJpegSettings->max_jpeg_size);
maxJpegSize = obj->mMemory->getSize(obj->mCurrentBufIndex);
} else {
maxJpegSize = obj->mJpegSettings->max_jpeg_size;
- ALOGE("%s: Setting max jpeg size to %d",__func__, maxJpegSize);
+ ALOGI("%s: Setting max jpeg size to %d",__func__, maxJpegSize);
}
jpeg_eof = &jpeg_buf[maxJpegSize-sizeof(jpegHeader)];
memcpy(jpeg_eof, &jpegHeader, sizeof(jpegHeader));
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index 5349837..3b18320 100755
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -2917,10 +2917,8 @@ camera_metadata_t* QCamera3HardwareInterface::translateCapabilityToMetadata(int
static uint8_t focusMode;
if (gCamCapability[mCameraId]->supported_focus_modes_cnt > 1) {
- ALOGE("%s: Setting focus mode to auto", __func__);
focusMode = ANDROID_CONTROL_AF_MODE_AUTO;
} else {
- ALOGE("%s: Setting focus mode to off", __func__);
focusMode = ANDROID_CONTROL_AF_MODE_OFF;
}
settings.update(ANDROID_CONTROL_AF_MODE, &focusMode, 1);
diff --git a/camera/QCamera2/HAL3/QCamera3PostProc.cpp b/camera/QCamera2/HAL3/QCamera3PostProc.cpp
index b1ac9f2..f3a363e 100644
--- a/camera/QCamera2/HAL3/QCamera3PostProc.cpp
+++ b/camera/QCamera2/HAL3/QCamera3PostProc.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundataion. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundataion. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -385,10 +385,10 @@ int32_t QCamera3PostProcessor::processAuxiliaryData(mm_camera_buf_def_t *frame,
// enqueu to post proc input queue
m_inputPPQ.enqueue((void *)aux_frame);
if (!(m_inputMetaQ.isEmpty())) {
- ALOGE("%s: meta queue is not empty, do next job", __func__);
+ ALOGI("%s: meta queue is not empty, do next job", __func__);
m_dataProcTh.sendCmd(CAMERA_CMD_TYPE_DO_NEXT_JOB, FALSE, FALSE);
} else {
- ALOGE("%s: meta queue is empty, not calling do next job", __func__);
+ ALOGI("%s: meta queue is empty, not calling do next job", __func__);
}
pthread_mutex_unlock(&mReprocJobLock);
} else {
@@ -479,10 +479,10 @@ int32_t QCamera3PostProcessor::processPPMetadata(mm_camera_super_buf_t *frame)
// enqueue to metadata input queue
m_inputMetaQ.enqueue((void *)frame);
if (!(m_inputPPQ.isEmpty())) {
- ALOGE("%s: pp queue is not empty, do next job", __func__);
+ ALOGI("%s: pp queue is not empty, do next job", __func__);
m_dataProcTh.sendCmd(CAMERA_CMD_TYPE_DO_NEXT_JOB, FALSE, FALSE);
} else {
- ALOGE("%s: pp queue is empty, not calling do next job", __func__);
+ ALOGI("%s: pp queue is empty, not calling do next job", __func__);
}
pthread_mutex_unlock(&mReprocJobLock);
return NO_ERROR;
@@ -1090,7 +1090,7 @@ void *QCamera3PostProcessor::dataProcessRoutine(void *data)
if (is_active == TRUE) {
// check if there is any ongoing jpeg jobs
if (pme->m_ongoingJpegQ.isEmpty()) {
- ALOGE("%s: ongoing jpeg queue is empty so doing the jpeg job", __func__);
+ ALOGI("%s: ongoing jpeg queue is empty so doing the jpeg job", __func__);
// no ongoing jpeg job, we are fine to send jpeg encoding job
qcamera_jpeg_data_t *jpeg_job =
(qcamera_jpeg_data_t *)pme->m_inputJpegQ.dequeue();
@@ -1111,7 +1111,7 @@ void *QCamera3PostProcessor::dataProcessRoutine(void *data)
}
}
}
- ALOGE("%s: dequeuing pp frame", __func__);
+ ALOGD("%s: dequeuing pp frame", __func__);
mm_camera_super_buf_t *pp_frame =
(mm_camera_super_buf_t *)pme->m_inputPPQ.dequeue();
if (NULL != pp_frame) {
diff --git a/camera/QCamera2/HAL3/QCamera3Stream.cpp b/camera/QCamera2/HAL3/QCamera3Stream.cpp
index 48820e7..dd21f76 100644
--- a/camera/QCamera2/HAL3/QCamera3Stream.cpp
+++ b/camera/QCamera2/HAL3/QCamera3Stream.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundataion. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundataion. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -274,7 +274,7 @@ int32_t QCamera3Stream::init(cam_stream_type_t streamType,
mStreamInfo->streaming_mode = CAM_STREAMING_MODE_BURST;
//mStreamInfo->num_of_burst = reprocess_config->offline.num_of_bufs;
mStreamInfo->num_of_burst = 1;
- ALOGE("%s: num_of_burst is %d", __func__, mStreamInfo->num_of_burst);
+ ALOGI("%s: num_of_burst is %d", __func__, mStreamInfo->num_of_burst);
} else {
mStreamInfo->streaming_mode = CAM_STREAMING_MODE_CONTINUOUS;
}
diff --git a/camera/QCamera2/stack/mm-camera-interface/src/mm_camera.c b/camera/QCamera2/stack/mm-camera-interface/src/mm_camera.c
index 258240d..5417f25 100755
--- a/camera/QCamera2/stack/mm-camera-interface/src/mm_camera.c
+++ b/camera/QCamera2/stack/mm-camera-interface/src/mm_camera.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -248,14 +248,14 @@ int32_t mm_camera_open(mm_camera_obj_t *my_obj)
snprintf(dev_name, sizeof(dev_name), "/dev/%s",
mm_camera_util_get_dev_name(my_obj->my_hdl));
sscanf(dev_name, "/dev/video%u", &cam_idx);
- CDBG_ERROR("%s: dev name = %s, cam_idx = %d", __func__, dev_name, cam_idx);
+ CDBG_HIGH("%s: dev name = %s, cam_idx = %d", __func__, dev_name, cam_idx);
do{
n_try--;
my_obj->ctrl_fd = open(dev_name, O_RDWR | O_NONBLOCK);
CDBG("%s: ctrl_fd = %d, errno == %d", __func__, my_obj->ctrl_fd, errno);
if((my_obj->ctrl_fd > 0) || (errno != EIO) || (n_try <= 0 )) {
- CDBG_ERROR("%s: opened, break out while loop", __func__);
+ CDBG_HIGH("%s: opened, break out while loop", __func__);
break;
}
CDBG_HIGH("%s:failed with I/O error retrying after %d milli-seconds",
diff --git a/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c b/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c
index 14b93e1..ac9e588 100755
--- a/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c
+++ b/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c
@@ -1181,7 +1181,7 @@ int32_t mm_stream_qbuf(mm_stream_t *my_obj, mm_camera_buf_def_t *buf)
mm_camera_async_call);
CDBG_HIGH("%s: Started poll on stream %p type :%d", __func__, my_obj,my_obj->stream_info->stream_type);
if (rc < 0) {
- ALOGE("%s: add poll fd error", __func__);
+ CDBG_ERROR("%s: add poll fd error", __func__);
return rc;
}
}
diff --git a/camera/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h b/camera/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h
index 2bf199c..b0ef9c7 100644
--- a/camera/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h
+++ b/camera/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -59,7 +59,7 @@
#endif
#ifdef _ANDROID_
- #define CDBG_HIGH(fmt, args...) ALOGE(fmt, ##args)
+ #define CDBG_HIGH(fmt, args...) ALOGI(fmt, ##args)
#define CDBG_ERROR(fmt, args...) ALOGE(fmt, ##args)
#else
#define CDBG_HIGH(fmt, args...) fprintf(stderr, fmt, ##args)
diff --git a/camera/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg.c b/camera/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg.c
index e74b4dd..66ae2e4 100644
--- a/camera/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg.c
+++ b/camera/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -59,7 +59,7 @@
FILE *fp = fopen(filename, "w+"); \
if (fp) { \
rc = fwrite(p_addr, 1, len, fp); \
- CDBG_ERROR("%s:%d] written size %d", __func__, __LINE__, len); \
+ CDBG_HIGH("%s:%d] written size %d", __func__, __LINE__, len); \
fclose(fp); \
} else { \
CDBG_ERROR("%s:%d] open %s failed", __func__, __LINE__, filename); \
@@ -79,7 +79,7 @@
if (fp) { \
rc = fwrite(p_addr1, 1, len1, fp); \
rc = fwrite(p_addr2, 1, len2, fp); \
- CDBG_ERROR("%s:%d] written %d %d", __func__, __LINE__, len1, len2); \
+ CDBG_HIGH("%s:%d] written %d %d", __func__, __LINE__, len1, len2); \
fclose(fp); \
} else { \
CDBG_ERROR("%s:%d] open %s failed", __func__, __LINE__, filename); \
@@ -2276,12 +2276,12 @@ mm_jpeg_job_q_node_t* mm_jpeg_queue_remove_job_by_client_id(
data = (mm_jpeg_job_q_node_t *)node->data;
if (data && (data->enc_info.client_handle == client_hdl)) {
- CDBG_ERROR("%s:%d] found matching client handle", __func__, __LINE__);
+ CDBG_HIGH("%s:%d] found matching client handle", __func__, __LINE__);
job_node = data;
cam_list_del_node(&node->list);
queue->size--;
free(node);
- CDBG_ERROR("%s: queue size = %d", __func__, queue->size);
+ CDBG_HIGH("%s: queue size = %d", __func__, queue->size);
break;
}
pos = pos->next;
@@ -2310,12 +2310,12 @@ mm_jpeg_job_q_node_t* mm_jpeg_queue_remove_job_by_session_id(
data = (mm_jpeg_job_q_node_t *)node->data;
if (data && (data->enc_info.encode_job.session_id == session_id)) {
- CDBG_ERROR("%s:%d] found matching session id", __func__, __LINE__);
+ CDBG_HIGH("%s:%d] found matching session id", __func__, __LINE__);
job_node = data;
cam_list_del_node(&node->list);
queue->size--;
free(node);
- CDBG_ERROR("%s: queue size = %d", __func__, queue->size);
+ CDBG_HIGH("%s: queue size = %d", __func__, queue->size);
break;
}
pos = pos->next;
@@ -2344,7 +2344,7 @@ mm_jpeg_job_q_node_t* mm_jpeg_queue_remove_job_by_job_id(
data = (mm_jpeg_job_q_node_t *)node->data;
if (data && (data->enc_info.job_id == job_id)) {
- CDBG_ERROR("%s:%d] found matching job id", __func__, __LINE__);
+ CDBG_HIGH("%s:%d] found matching job id", __func__, __LINE__);
job_node = data;
cam_list_del_node(&node->list);
queue->size--;
diff --git a/camera/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_exif.c b/camera/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_exif.c
index 016c9ae..1e68334 100644
--- a/camera/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_exif.c
+++ b/camera/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_exif.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/camera/mm-image-codec/qomx_core/qomx_core.c b/camera/mm-image-codec/qomx_core/qomx_core.c
index fc52d24..3fbd3e9 100644
--- a/camera/mm-image-codec/qomx_core/qomx_core.c
+++ b/camera/mm-image-codec/qomx_core/qomx_core.c
@@ -1,4 +1,4 @@
-/*Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/*Copyright (c) 2012, 2014, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -81,7 +81,7 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init()
} else {
rc = OMX_ErrorInsufficientResources;
}
- ALOGE("%s:%d] Complete %d", __func__, __LINE__, comp_cnt);
+ ALOGI("%s:%d] Complete %d", __func__, __LINE__, comp_cnt);
return rc;
}
@@ -98,7 +98,7 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit()
free(g_omxcore);
g_omxcore = NULL;
}
- ALOGE("%s:%d] Complete", __func__, __LINE__);
+ ALOGI("%s:%d] Complete", __func__, __LINE__);
return OMX_ErrorNone;
}
@@ -213,7 +213,7 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle(
/* Call the function from the address to create the obj */
p_obj = (*p_core_comp->get_instance)();
- ALOGE("%s:%d] get instance pts is %p", __func__, __LINE__, p_obj);
+ ALOGI("%s:%d] get instance pts is %p", __func__, __LINE__, p_obj);
if (NULL == p_obj) {
ALOGE("%s:%d] Error cannot create object", __func__, __LINE__);
rc = OMX_ErrorInvalidComponent;
@@ -237,7 +237,7 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle(
p_comp->SetCallbacks(p_comp, callBacks, appData);
pthread_mutex_unlock(&g_omxcore->core_lock);
- ALOGE("%s:%d] Success", __func__, __LINE__);
+ ALOGI("%s:%d] Success", __func__, __LINE__);
return OMX_ErrorNone;
error:
@@ -267,7 +267,7 @@ static int get_idx_from_handle(OMX_IN OMX_HANDLETYPE *ahComp, int *aCompIdx,
for (j = 0; j < OMX_COMP_MAX_INSTANCES; j++) {
if ((OMX_COMPONENTTYPE *)g_omxcore->component[i].handle[j] ==
(OMX_COMPONENTTYPE *)ahComp) {
- ALOGE("%s:%d] comp_idx %d inst_idx %d", __func__, __LINE__, i, j);
+ ALOGD("%s:%d] comp_idx %d inst_idx %d", __func__, __LINE__, i, j);
*aCompIdx = i;
*aInstIdx = j;
return TRUE;
@@ -308,7 +308,7 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle(
OMX_COMPONENTTYPE *p_comp = NULL;
omx_core_component_t *p_core_comp = NULL;
- ALOGE("%s:%d] ", __func__, __LINE__);
+ ALOGV("%s:%d] ", __func__, __LINE__);
if (hComp == NULL) {
return OMX_ErrorBadParameter;
}
@@ -337,9 +337,9 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle(
p_core_comp->create_comp_func = NULL;
p_core_comp->open = FALSE;
} else {
- ALOGE("%s:%d] Error Component is still Active", __func__, __LINE__);
+ ALOGI("%s:%d] Error Component is still Active", __func__, __LINE__);
}
pthread_mutex_unlock(&g_omxcore->core_lock);
- ALOGE("%s:%d] Success", __func__, __LINE__);
+ ALOGV("%s:%d] Success", __func__, __LINE__);
return rc;
}