camera: intel: ipu6: Clean up some duplicated macros
BUG=b:149069716
TEST=build
Change-Id: Ic73711a431cfe83f2bc1d6f1cd45e50c343abb69
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2563512
Reviewed-by: Qingwu Zhang <qingwu.zhang@intel.com>
Reviewed-by: Hung-yu Wu <hywu@chromium.org>
Tested-by: Qingwu Zhang <qingwu.zhang@intel.com>
Tested-by: Ren-Pei Zeng <kamesan@chromium.org>
Commit-Queue: Ren-Pei Zeng <kamesan@chromium.org>
diff --git a/camera/hal/intel/ipu6/aal/Camera3HALModule.cpp b/camera/hal/intel/ipu6/aal/Camera3HALModule.cpp
index c191558..a004e46 100644
--- a/camera/hal/intel/ipu6/aal/Camera3HALModule.cpp
+++ b/camera/hal/intel/ipu6/aal/Camera3HALModule.cpp
@@ -29,6 +29,7 @@
#include "PlatformData.h"
#include "Utils.h"
#include "iutils/CameraDump.h"
+#include "iutils/CameraLog.h"
namespace camera3 {
diff --git a/camera/hal/intel/ipu6/aal/HALv3Utils.h b/camera/hal/intel/ipu6/aal/HALv3Utils.h
index 576635c..ef21ff4 100644
--- a/camera/hal/intel/ipu6/aal/HALv3Utils.h
+++ b/camera/hal/intel/ipu6/aal/HALv3Utils.h
@@ -23,50 +23,8 @@
namespace camera3 {
-#undef LOG1
-#undef LOG2
-#undef LOGI
-#undef LOGW
-#undef LOGE
-#undef SLOWLY_MULTIPLIER
-
-#define SLOWLY_MULTIPLIER (icamera::gSlowlyRunRatio ? icamera::gSlowlyRunRatio : 1)
#define IS_ZSL_USAGE(usage) (((usage)&GRALLOC_USAGE_HW_CAMERA_ZSL) == GRALLOC_USAGE_HW_CAMERA_ZSL)
-#ifdef HAVE_LINUX_OS
-
-#define LOG1(format, args...) \
- icamera::Log::print_log(icamera::gLogLevel& icamera::CAMERA_DEBUG_LOG_LEVEL1, LOG_TAG, \
- icamera::CAMERA_DEBUG_LOG_LEVEL1, format, ##args)
-#define LOG2(format, args...) \
- icamera::Log::print_log(icamera::gLogLevel& icamera::CAMERA_DEBUG_LOG_LEVEL2, LOG_TAG, \
- icamera::CAMERA_DEBUG_LOG_LEVEL2, format, ##args)
-#define LOGFPS(format, args...) \
- icamera::Log::print_log(icamera::gLogLevel& icamera::CAMERA_DEBUG_LOG_FPS, LOG_TAG, \
- icamera::CAMERA_DEBUG_LOG_FPS, format, ##args)
-#define LOGI(format, args...) \
- icamera::Log::print_log(true, LOG_TAG, icamera::CAMERA_DEBUG_LOG_INFO, format, ##args)
-#define LOGW(format, args...) \
- icamera::Log::print_log(true, LOG_TAG, icamera::CAMERA_DEBUG_LOG_WARNING, format, ##args)
-#define LOGE(format, args...) \
- icamera::Log::print_log(true, LOG_TAG, icamera::CAMERA_DEBUG_LOG_ERR, format, ##args)
-
-#else
-
-#define LOG1(...) \
- icamera::__camera_hal_log(icamera::gLogLevel& icamera::CAMERA_DEBUG_LOG_LEVEL1, \
- ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOG2(...) \
- icamera::__camera_hal_log(icamera::gLogLevel& icamera::CAMERA_DEBUG_LOG_LEVEL2, \
- ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOGFPS(...) \
- icamera::__camera_hal_log(icamera::gLogLevel& icamera::CAMERA_DEBUG_LOG_FPS, \
- ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOGI(...) icamera::__camera_hal_log(true, ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
-#define LOGW(...) icamera::__camera_hal_log(true, ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
-#define LOGE(...) icamera::__camera_hal_log(true, ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
-
-#endif
namespace HalV3Utils {
const char* getCamera3StreamType(int type);
int HALFormatToV4l2Format(int cameraId, int halFormat, int usage);
diff --git a/camera/hal/intel/ipu6/modules/ia_cipr/src/Buffer.cpp b/camera/hal/intel/ipu6/modules/ia_cipr/src/Buffer.cpp
index fcaaa46..5833539 100644
--- a/camera/hal/intel/ipu6/modules/ia_cipr/src/Buffer.cpp
+++ b/camera/hal/intel/ipu6/modules/ia_cipr/src/Buffer.cpp
@@ -45,7 +45,7 @@
if (mMemoryDesc.cpuPtr) {
memoryCopy(cpuPtr, mMemoryDesc.size, mMemoryDesc.cpuPtr, mMemoryDesc.size);
} else if (mMemoryDesc.flags & MemoryFlag::MemoryHandle) {
- icamera::LOGE("%s: copy from handle to host only memory not implemented", __func__);
+ LOGE("%s: copy from handle to host only memory not implemented", __func__);
if (cpuPtr) CIPR::freeMemory(cpuPtr);
return Result::GeneralError;
}
@@ -138,7 +138,7 @@
Result Buffer::createWithUserMemory(uint32_t size, MemoryFlag flags, const MemoryDesc* userMemory) {
if (size < userMemory->size) {
- icamera::LOG2(
+ LOG2(
"%s: requested bytes to allocate less than provided user memory in argument, "
"truncating",
__func__);
@@ -240,7 +240,7 @@
mInitialized = true;
ret = validateBuffer(nullptr);
if (ret != Result::OK) {
- icamera::LOG2("Buffer::Buffer validateBuffer Error");
+ LOG2("Buffer::Buffer validateBuffer Error");
mInitialized = false;
}
}
@@ -279,14 +279,14 @@
if (isRegion()) {
if (!mMemoryDesc.anchor) {
- icamera::LOG2("%s: parent already released", __func__);
+ LOG2("%s: parent already released", __func__);
} else {
mMemoryDesc.anchor->mRegions.erase(this);
}
}
if (!mRegions.empty()) {
- icamera::LOG2("%s: parent buffer destroy leaves stale regions", __func__);
+ LOG2("%s: parent buffer destroy leaves stale regions", __func__);
for (auto& x : mRegions) {
x->mMemoryDesc.anchor = nullptr;
@@ -365,7 +365,7 @@
Buffer* Buffer::getParent() {
if (!isRegion()) {
- icamera::LOGE("%s: not a child object", __func__);
+ LOGE("%s: not a child object", __func__);
return nullptr;
}
diff --git a/camera/hal/intel/ipu6/modules/ia_cipr/src/Command.cpp b/camera/hal/intel/ipu6/modules/ia_cipr/src/Command.cpp
index e71a19a..971ff24 100644
--- a/camera/hal/intel/ipu6/modules/ia_cipr/src/Command.cpp
+++ b/camera/hal/intel/ipu6/modules/ia_cipr/src/Command.cpp
@@ -41,7 +41,7 @@
CIPR::callocMemory(cfg.buffers.size(), sizeof(struct ipu_psys_buffer)));
if (!mCmd->iocCmd.buffers) {
- icamera::LOG2("Could not allocate DMA-BUF handle array");
+ LOG2("Could not allocate DMA-BUF handle array");
delete mCmd;
return;
}
@@ -103,7 +103,7 @@
Result Command::getLegacyPGMem(const PSysCommandConfig& cfg, MemoryDesc* memory) {
auto ret = cfg.extBuf->getMemory(memory);
if (ret != Result::OK && cfg.pgParamsBuf != nullptr) {
- icamera::LOG2("pg_params_buf-field of CIPR command deprecated!");
+ LOG2("pg_params_buf-field of CIPR command deprecated!");
ret = cfg.pgParamsBuf->getMemory(memory);
if (ret != Result::OK) {
return ret;
@@ -148,7 +148,7 @@
mCmd->extBuf = cfg.extBuf;
if (cfg.id != 0) {
- icamera::LOG2("ID-field of CIPR command deprecated!");
+ LOG2("ID-field of CIPR command deprecated!");
}
mCmd->iocCmd.user_token = cfg.token;
diff --git a/camera/hal/intel/ipu6/modules/ia_cipr/src/Context.cpp b/camera/hal/intel/ipu6/modules/ia_cipr/src/Context.cpp
index 71d7afe..08881dd 100644
--- a/camera/hal/intel/ipu6/modules/ia_cipr/src/Context.cpp
+++ b/camera/hal/intel/ipu6/modules/ia_cipr/src/Context.cpp
@@ -78,12 +78,12 @@
CheckError(!out, Result::InvaildArg, "@%s, out is nullptr", __func__);
if (!(mInitFlag == Context::Flags::DEBUG) && (mem->flags & MemoryFlag::HardwareOnly)) {
- icamera::LOG2("%s: host cannot access HW only memory!", __func__);
+ LOG2("%s: host cannot access HW only memory!", __func__);
return Result::GeneralError;
}
if ((mem->flags & MemoryFlag::MemoryHandle) && !(mem->flags & MemoryFlag::CpuPtr)) {
- icamera::LOG2("%s: fallback host address mapping not implemented!", __func__);
+ LOG2("%s: fallback host address mapping not implemented!", __func__);
return Result::GeneralError;
}
@@ -170,7 +170,7 @@
int errnoCopy = errno;
if (res < 0) {
- icamera::LOG2("Ioctl returned error: %s", strerror(errnoCopy));
+ LOG2("Ioctl returned error: %s", strerror(errnoCopy));
switch (errnoCopy) {
case ENOMEM:
return Result::NoMemory;
@@ -211,11 +211,11 @@
}
if (!(ioc_buffer->flags & IPU_BUFFER_FLAG_DMA_HANDLE)) {
- icamera::LOG2("CIPR: IOC_GETBUF succeed but did not return dma handle");
+ LOG2("CIPR: IOC_GETBUF succeed but did not return dma handle");
CIPR::freeMemory(ioc_buffer);
return Result::InternalError;
} else if (ioc_buffer->flags & IPU_BUFFER_FLAG_USERPTR) {
- icamera::LOG2("CIPR: IOC_GETBUF succeed but did not consume the userptr flag");
+ LOG2("CIPR: IOC_GETBUF succeed but did not consume the userptr flag");
CIPR::freeMemory(ioc_buffer);
return Result::InternalError;
}
@@ -243,7 +243,7 @@
mem->sysBuff = ioc_buffer;
mem->flags |= MemoryFlag::Migrated;
- icamera::LOG2("%s: registered %p -> fd %d size:%u offset:%u bytes_used:%u", __func__,
+ LOG2("%s: registered %p -> fd %d size:%u offset:%u bytes_used:%u", __func__,
mem->cpuPtr, ioc_buffer->base.fd, ioc_buffer->len, ioc_buffer->data_offset,
ioc_buffer->bytes_used);
@@ -265,7 +265,7 @@
Result res = doIoctl(static_cast<int>(IPU_IOC_UNMAPBUF),
reinterpret_cast<void*>((intptr_t)ioc_buffer->base.fd));
if (res != Result::OK) {
- icamera::LOG2("%s: cannot unmap buffer fd %d, possibly already unmapped", __func__,
+ LOG2("%s: cannot unmap buffer fd %d, possibly already unmapped", __func__,
ioc_buffer->base.fd);
}
@@ -285,7 +285,7 @@
int error = errno;
if (res < 0) {
- icamera::LOG2("Close returned error: %s", strerror(error));
+ LOG2("Close returned error: %s", strerror(error));
switch (error) {
case EBADF:
return Result::InvaildArg;
diff --git a/camera/hal/intel/ipu6/modules/ia_cipr/src/Event.cpp b/camera/hal/intel/ipu6/modules/ia_cipr/src/Event.cpp
index 781fa03c..f89dc60 100644
--- a/camera/hal/intel/ipu6/modules/ia_cipr/src/Event.cpp
+++ b/camera/hal/intel/ipu6/modules/ia_cipr/src/Event.cpp
@@ -49,7 +49,7 @@
CheckError(!mEvent, VOID_VALUE, "%s: could not allocate mEvent", __func__);
if (eventConfig.id != 0) {
- icamera::LOG2("ID-field of CIPR mEvent deprecated!");
+ LOG2("ID-field of CIPR mEvent deprecated!");
}
mEvent->event.type = eventConfig.type;
@@ -111,7 +111,7 @@
return Result::TimeOut;
}
- icamera::LOG2("%s: poll returned error: %s", __func__, strerror(res));
+ LOG2("%s: poll returned error: %s", __func__, strerror(res));
return Result::GeneralError;
}
} // namespace CIPR
diff --git a/camera/hal/intel/ipu6/modules/ia_cipr/src/Utils.cpp b/camera/hal/intel/ipu6/modules/ia_cipr/src/Utils.cpp
index 89ff3ab..b332e8f 100755
--- a/camera/hal/intel/ipu6/modules/ia_cipr/src/Utils.cpp
+++ b/camera/hal/intel/ipu6/modules/ia_cipr/src/Utils.cpp
@@ -51,7 +51,7 @@
void memoryCopy(void* dst, size_t dsz, const void* src, size_t sz) {
if (dsz < sz) {
- icamera::LOG2("%s: destination size < source size, potential coding error", __func__);
+ LOG2("%s: destination size < source size, potential coding error", __func__);
}
MEMCPY_S(dst, dsz, src, sz);
diff --git a/camera/hal/intel/ipu6/src/iutils/CameraLog.h b/camera/hal/intel/ipu6/src/iutils/CameraLog.h
index c105cd0..771edfc 100644
--- a/camera/hal/intel/ipu6/src/iutils/CameraLog.h
+++ b/camera/hal/intel/ipu6/src/iutils/CameraLog.h
@@ -128,23 +128,48 @@
void ccaPrintDebug(const char *fmt, va_list ap);
};
-#define SLOWLY_MULTIPLIER (gSlowlyRunRatio ? gSlowlyRunRatio : 1)
+#define SLOWLY_MULTIPLIER (icamera::gSlowlyRunRatio ? icamera::gSlowlyRunRatio : 1)
#ifdef HAVE_LINUX_OS //Linux OS
-#define LOG1(format, args...) Log::print_log(gLogLevel & CAMERA_DEBUG_LOG_LEVEL1, LOG_TAG, CAMERA_DEBUG_LOG_LEVEL1, format, ##args)
-#define LOG2(format, args...) Log::print_log(gLogLevel & CAMERA_DEBUG_LOG_LEVEL2, LOG_TAG, CAMERA_DEBUG_LOG_LEVEL2, format, ##args)
-#define LOGR(format, args...) Log::print_log(gLogLevel & CAMERA_DEBUG_LOG_REQ_STATE, LOG_TAG, CAMERA_DEBUG_LOG_REQ_STATE, format, ##args)
-#define LOG3A(format, args...) Log::print_log(gLogLevel & CAMERA_DEBUG_LOG_AIQ, LOG_TAG, CAMERA_DEBUG_LOG_AIQ, format, ##args)
-#define LOGXML(format, args...) Log::print_log(gLogLevel & CAMERA_DEBUG_LOG_XML, LOG_TAG, CAMERA_DEBUG_LOG_XML, format, ##args)
-#define LOGVCSYNC(format, args...) Log::print_log(gLogLevel & CAMERA_DEBUG_LOG_VC_SYNC, LOG_TAG, CAMERA_DEBUG_LOG_VC_SYNC, format, ##args)
-#define LOGG(format, args...) Log::print_log(gLogLevel & CAMERA_DEBUG_LOG_GRAPH, LOG_TAG, CAMERA_DEBUG_LOG_GRAPH, format, ##args)
-#define LOGIPC(format, args...) Log::print_log(gLogLevel & CAMERA_DEBUG_LOG_SANDBOXING, LOG_TAG, CAMERA_DEBUG_LOG_SANDBOXING, format, ##args)
-#define LOGD(format, args...) Log::print_log(true, LOG_TAG, CAMERA_DEBUG_LOG_DBG, format, ##args)
-#define LOGI(format, args...) Log::print_log(true, LOG_TAG, CAMERA_DEBUG_LOG_INFO, format, ##args)
-#define LOGE(format, args...) Log::print_log(true, LOG_TAG, CAMERA_DEBUG_LOG_ERR, format, ##args)
-#define LOGW(format, args...) Log::print_log(true, LOG_TAG, CAMERA_DEBUG_LOG_WARNING, format, ##args)
-#define LOGV(format, args...) Log::print_log(true, LOG_TAG, CAMERA_DEBUG_LOG_VERBOSE, format, ##args)
+#define LOG1(format, args...) \
+ icamera::Log::print_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_LEVEL1, LOG_TAG, \
+ icamera::CAMERA_DEBUG_LOG_LEVEL1, format, ##args)
+#define LOG2(format, args...) \
+ icamera::Log::print_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_LEVEL2, LOG_TAG, \
+ icamera::CAMERA_DEBUG_LOG_LEVEL2, format, ##args)
+#define LOGR(format, args...) \
+ icamera::Log::print_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_REQ_STATE, LOG_TAG, \
+ icamera::CAMERA_DEBUG_LOG_REQ_STATE, format, ##args)
+#define LOG3A(format, args...) \
+ icamera::Log::print_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_AIQ, LOG_TAG, \
+ icamera::CAMERA_DEBUG_LOG_AIQ, format, ##args)
+#define LOGXML(format, args...) \
+ icamera::Log::print_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_XML, LOG_TAG, \
+ icamera::CAMERA_DEBUG_LOG_XML, format, ##args)
+#define LOGVCSYNC(format, args...) \
+ icamera::Log::print_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_VC_SYNC, LOG_TAG, \
+ icamera::CAMERA_DEBUG_LOG_VC_SYNC, format, ##args)
+#define LOGG(format, args...) \
+ icamera::Log::print_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_GRAPH, LOG_TAG, \
+ icamera::CAMERA_DEBUG_LOG_GRAPH, format, ##args)
+#define LOGIPC(format, args...) \
+ icamera::Log::print_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_SANDBOXING, LOG_TAG, \
+ icamera::CAMERA_DEBUG_LOG_SANDBOXING, format, ##args)
+#define LOGFPS(format, args...) \
+ icamera::Log::print_log(icamera::gLogLevel& icamera::CAMERA_DEBUG_LOG_FPS, LOG_TAG, \
+ icamera::CAMERA_DEBUG_LOG_FPS, format, ##args)
+
+#define LOGD(format, args...) \
+ icamera::Log::print_log(true, LOG_TAG, icamera::CAMERA_DEBUG_LOG_DBG, format, ##args)
+#define LOGI(format, args...) \
+ icamera::Log::print_log(true, LOG_TAG, icamera::CAMERA_DEBUG_LOG_INFO, format, ##args)
+#define LOGE(format, args...) \
+ icamera::Log::print_log(true, LOG_TAG, icamera::CAMERA_DEBUG_LOG_ERR, format, ##args)
+#define LOGW(format, args...) \
+ icamera::Log::print_log(true, LOG_TAG, icamera::CAMERA_DEBUG_LOG_WARNING, format, ##args)
+#define LOGV(format, args...) \
+ icamera::Log::print_log(true, LOG_TAG, icamera::CAMERA_DEBUG_LOG_VERBOSE, format, ##args)
#define ALOGE LOGE
#define ALOGD LOGD
@@ -159,22 +184,42 @@
void __camera_hal_log(bool condition, int prio, const char *tag, const char *fmt, ...);
-#define LOG1(...) __camera_hal_log(gLogLevel & CAMERA_DEBUG_LOG_LEVEL1, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOG2(...) __camera_hal_log(gLogLevel & CAMERA_DEBUG_LOG_LEVEL2, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOGR(...) __camera_hal_log(gLogLevel & CAMERA_DEBUG_LOG_REQ_STATE, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOG3A(...) __camera_hal_log(gLogLevel & CAMERA_DEBUG_LOG_AIQ, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOGXML(...) __camera_hal_log(gLogLevel & CAMERA_DEBUG_LOG_XML, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOGVCSYNC(...) __camera_hal_log(gLogLevel & CAMERA_DEBUG_LOG_VC_SYNC, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOGG(...) __camera_hal_log(gLogLevel & CAMERA_DEBUG_LOG_GRAPH, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOGIPC(format, args...) Log::print_log(gLogLevel & CAMERA_DEBUG_LOG_SANDBOXING, LOG_TAG, CAMERA_DEBUG_LOG_SANDBOXING, format, ##args)
+#define LOG1(...) \
+ icamera::__camera_hal_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_LEVEL1, \
+ ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+#define LOG2(...) \
+ icamera::__camera_hal_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_LEVEL2, \
+ ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+#define LOGR(...) \
+ icamera::__camera_hal_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_REQ_STATE, \
+ ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+#define LOG3A(...) \
+ icamera::__camera_hal_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_AIQ, \
+ ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+#define LOGXML(...) \
+ icamera::__camera_hal_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_XML, \
+ ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+#define LOGVCSYNC(...) \
+ icamera::__camera_hal_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_VC_SYNC, \
+ ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+#define LOGG(...) \
+ icamera::__camera_hal_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_GRAPH, \
+ ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+#define LOGIPC(format, args...) \
+ icamera::__camera_hal_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_SANDBOXING, \
+ ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+#define LOGFPS(format, args...) \
+ icamera::__camera_hal_log(icamera::gLogLevel & icamera::CAMERA_DEBUG_LOG_FPS, \
+ ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOGE(...) __camera_hal_log(true, ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
-#define LOGI(...) __camera_hal_log(true, ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
-#define LOGD(...) __camera_hal_log(true, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
-#define LOGW(...) __camera_hal_log(true, ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
-#define LOGV(...) __camera_hal_log(true, ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
+#define LOGE(...) icamera::__camera_hal_log(true, ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
+#define LOGI(...) icamera::__camera_hal_log(true, ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
+#define LOGD(...) icamera::__camera_hal_log(true, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+#define LOGW(...) icamera::__camera_hal_log(true, ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
+#define LOGV(...) icamera::__camera_hal_log(true, ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
#endif
+
#define HAL_TRACE_NAME(level, name) ScopedTrace ___tracer(level, name )
#define HAL_TRACE_CALL(level) HAL_TRACE_NAME(level, __PRETTY_FUNCTION__)