Camera3: Clean up ALOGE calls in non-error conditions [DO NOT MERGE]
Use ALOGI/ALOGD instead.
Bug: 12489802
Change-Id: Id7fc9147395af3a9a0fe135d1017a155aad174fb
diff --git a/QCamera2/HAL3/QCamera3Channel.cpp b/QCamera2/HAL3/QCamera3Channel.cpp
index 2fe3761..2c7ec40 100755
--- a/QCamera2/HAL3/QCamera3Channel.cpp
+++ b/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
@@ -895,12 +895,12 @@
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/QCamera2/HAL3/QCamera3HWI.cpp b/QCamera2/HAL3/QCamera3HWI.cpp
index da8282f..85f2c5c 100644
--- a/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/QCamera2/HAL3/QCamera3HWI.cpp
@@ -3287,10 +3287,8 @@
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/QCamera2/HAL3/QCamera3PostProc.cpp b/QCamera2/HAL3/QCamera3PostProc.cpp
index b54da47..204bd0c 100644
--- a/QCamera2/HAL3/QCamera3PostProc.cpp
+++ b/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
@@ -372,10 +372,10 @@
// 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 {
@@ -466,10 +466,10 @@
// 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;
@@ -1096,7 +1096,7 @@
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();
@@ -1117,7 +1117,7 @@
}
}
}
- ALOGE("%s: dequeuing pp frame", __func__);
+ ALOGD("%s: dequeuing pp frame", __func__);
pp_frame =
(mm_camera_super_buf_t *)pme->m_inputPPQ.dequeue();
if (NULL != pp_frame) {
diff --git a/QCamera2/HAL3/QCamera3Stream.cpp b/QCamera2/HAL3/QCamera3Stream.cpp
index 7c44121..0f32b59 100644
--- a/QCamera2/HAL3/QCamera3Stream.cpp
+++ b/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
@@ -275,7 +275,7 @@
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/QCamera2/stack/mm-camera-interface/src/mm_camera.c b/QCamera2/stack/mm-camera-interface/src/mm_camera.c
index 258240d..5417f25 100644
--- a/QCamera2/stack/mm-camera-interface/src/mm_camera.c
+++ b/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 @@
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/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c b/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c
index 89e0c48..0685438 100644
--- a/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c
+++ b/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c
@@ -1171,7 +1171,7 @@
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/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h b/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h
index 2bf199c..b0ef9c7 100644
--- a/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h
+++ b/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/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg.c b/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg.c
index e05b8e9..4e76705 100644
--- a/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg.c
+++ b/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); \
@@ -1079,7 +1079,7 @@
CDBG_ERROR("%s:%d] Error %d", __func__, __LINE__, rc);
return rc;
}
- CDBG_ERROR("%s:%d] Num of exif entries passed from HAL: %d", __func__, __LINE__,
+ CDBG_HIGH("%s:%d] Num of exif entries passed from HAL: %d", __func__, __LINE__,
(int)p_jobparams->exif_info.numOfEntries);
if (p_jobparams->exif_info.numOfEntries > 0) {
rc = OMX_SetConfig(p_session->omx_handle, exif_idx,
@@ -2028,7 +2028,7 @@
mm_jpeg_encode_job_t *p_jobparams = &p_session->encode_job;
int i = 0, rc = 0;
- CDBG_ERROR("%s:%d] Exif entry count %d %d", __func__, __LINE__,
+ CDBG_HIGH("%s:%d] Exif entry count %d %d", __func__, __LINE__,
(int)p_jobparams->exif_info.numOfEntries,
(int)p_session->exif_count_local);
for (i = 0; i < p_session->exif_count_local; i++) {
@@ -2351,12 +2351,12 @@
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;
@@ -2385,12 +2385,12 @@
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;
@@ -2419,7 +2419,7 @@
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/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_exif.c b/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_exif.c
index 83b7fd4..b9673ba 100644
--- a/QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_exif.c
+++ b/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
@@ -330,7 +330,7 @@
val_short = 0;
}
//val_short = (p_sensor_params->flash_mode << 3) | val_short;
- ALOGE("%s: Flash value %d flash mode %d flash state %d", __func__, val_short,
+ ALOGI("%s: Flash value %d flash mode %d flash state %d", __func__, val_short,
p_sensor_params->flash_mode, p_sensor_params->flash_state);
rc = addExifEntry(exif_info, EXIFTAGID_FLASH, EXIF_SHORT, 1, &val_short);
if (rc) {
diff --git a/mm-image-codec/qomx_core/qomx_core.c b/mm-image-codec/qomx_core/qomx_core.c
index fc52d24..3fbd3e9 100644
--- a/mm-image-codec/qomx_core/qomx_core.c
+++ b/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 @@
} 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 @@
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 @@
/* 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 @@
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 @@
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_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 @@
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;
}