diff options
author | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2012-07-22 15:45:33 +0200 |
---|---|---|
committer | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2012-07-22 15:45:33 +0200 |
commit | 0fdadcaf08c588469ad9905b0136c894bb062fdf (patch) | |
tree | 8e2e52523f6d8bba08f8ec022535ff7b57474485 | |
parent | 29deaa07a920f242d8b2766fba3c8ffa374b1eaf (diff) | |
download | hardware_samsung-0fdadcaf08c588469ad9905b0136c894bb062fdf.zip hardware_samsung-0fdadcaf08c588469ad9905b0136c894bb062fdf.tar.gz hardware_samsung-0fdadcaf08c588469ad9905b0136c894bb062fdf.tar.bz2 |
exynos hal: jellybean compat
82 files changed, 3269 insertions, 3271 deletions
diff --git a/exynos/multimedia/codecs/audio/exynos4/srp/alp/src/srp_api.c b/exynos/multimedia/codecs/audio/exynos4/srp/alp/src/srp_api.c index 56125fb..73c8c04 100644 --- a/exynos/multimedia/codecs/audio/exynos4/srp/alp/src/srp_api.c +++ b/exynos/multimedia/codecs/audio/exynos4/srp/alp/src/srp_api.c @@ -12,8 +12,8 @@ #include "srp_api.h" -#define LOG_NDEBUG 1 -#define LOG_TAG "libsrpapi" +#define ALOG_NDEBUG 1 +#define ALOG_TAG "libsrpapi" #include <utils/Log.h> static struct srp_buf_info ibuf_info; @@ -35,7 +35,7 @@ int SRP_Create(int block_mode) return SRP_ERROR_OPEN_FAIL; } - LOGE("%s: Device is already opened", __func__); + ALOGE("%s: Device is already opened", __func__); return SRP_ERROR_ALREADY_OPEN; } @@ -52,20 +52,20 @@ int SRP_Init() /* mmap for OBUF */ ret = ioctl(srp_dev, SRP_GET_MMAP_SIZE, &mmapped_size); if (ret < 0) { - LOGE("%s: SRP_GET_MMAP_SIZE is failed", __func__); + ALOGE("%s: SRP_GET_MMAP_SIZE is failed", __func__); return SRP_ERROR_OBUF_MMAP; } obuf_info.mmapped_addr = mmap(0, mmapped_size, PROT_READ | PROT_WRITE, MAP_SHARED, srp_dev, 0); if (!obuf_info.mmapped_addr) { - LOGE("%s: mmap is failed", __func__); + ALOGE("%s: mmap is failed", __func__); return SRP_ERROR_OBUF_MMAP; } obuf_info.mmapped_size = mmapped_size; ret = SRP_RETURN_OK; } else { - LOGE("%s: Device is not ready", __func__); + ALOGE("%s: Device is not ready", __func__); ret = SRP_ERROR_NOT_READY; /* device is not created */ } @@ -78,12 +78,12 @@ int SRP_Decode(void *buff, int size_byte) if (srp_dev != -1) { if (size_byte > 0) { - LOGV("%s: Send data to RP (%d bytes)", __func__, size_byte); + ALOGV("%s: Send data to RP (%d bytes)", __func__, size_byte); ret = write(srp_dev, buff, size_byte); /* Write Buffer to RP Driver */ if (ret < 0) { if (ret != SRP_ERROR_IBUF_OVERFLOW) - LOGE("SRP_Decode returned error code: %d", ret); + ALOGE("SRP_Decode returned error code: %d", ret); } return ret; /* Write Success */ } else { @@ -91,7 +91,7 @@ int SRP_Decode(void *buff, int size_byte) } } - LOGE("%s: Device is not ready", __func__); + ALOGE("%s: Device is not ready", __func__); return SRP_ERROR_NOT_READY; } @@ -135,7 +135,7 @@ int SRP_Get_PCM(void **addr, unsigned int *size) ret = read(srp_dev, &pcm_info, 0); if (ret == -1) { *size = 0; - LOGE("%s: PCM read fail", __func__); + ALOGE("%s: PCM read fail", __func__); return SRP_ERROR_OBUF_READ; } @@ -155,11 +155,11 @@ int SRP_Get_Dec_Info(struct srp_dec_info *dec_info) if (srp_dev != -1) { ret = ioctl(srp_dev, SRP_GET_DEC_INFO, dec_info); if (ret < 0) { - LOGE("%s: Failed to get dec info", __func__); + ALOGE("%s: Failed to get dec info", __func__); return SRP_ERROR_GETINFO_FAIL; } - LOGV("numChannels(%d), samplingRate(%d)", dec_info->channels, dec_info->sample_rate); + ALOGV("numChannels(%d), samplingRate(%d)", dec_info->channels, dec_info->sample_rate); ret = SRP_RETURN_OK; } else { @@ -176,7 +176,7 @@ int SRP_Get_Ibuf_Info(void **addr, unsigned int *size, unsigned int *num) if (srp_dev != -1) { ret = ioctl(srp_dev, SRP_GET_IBUF_INFO, &ibuf_info); if (ret == -1) { - LOGE("%s: Failed to get Ibuf info", __func__); + ALOGE("%s: Failed to get Ibuf info", __func__); return SRP_ERROR_IBUF_INFO; } @@ -185,7 +185,7 @@ int SRP_Get_Ibuf_Info(void **addr, unsigned int *size, unsigned int *num) *num = ibuf_info.num; if (*num == 0) { - LOGE("%s: IBUF num is 0", __func__); + ALOGE("%s: IBUF num is 0", __func__); return SRP_ERROR_INVALID_SETTING; } @@ -205,7 +205,7 @@ int SRP_Get_Obuf_Info(void **addr, unsigned int *size, unsigned int *num) if (obuf_info.addr == NULL) { ret = ioctl(srp_dev, SRP_GET_OBUF_INFO, &obuf_info); if (ret < 0) { - LOGE("%s: SRP_GET_OBUF_INFO is failed", __func__); + ALOGE("%s: SRP_GET_OBUF_INFO is failed", __func__); return SRP_ERROR_OBUF_INFO; } } @@ -215,7 +215,7 @@ int SRP_Get_Obuf_Info(void **addr, unsigned int *size, unsigned int *num) *num = obuf_info.num; if (*num == 0) { - LOGE("%s: OBUF num is 0", __func__); + ALOGE("%s: OBUF num is 0", __func__); return SRP_ERROR_INVALID_SETTING; } @@ -256,10 +256,10 @@ int SRP_Terminate(void) int SRP_IsOpen(void) { if (srp_dev == -1) { - LOGV("%s: Device is not opened", __func__); + ALOGV("%s: Device is not opened", __func__); return 0; } - LOGV("%s: Device is opened", __func__); + ALOGV("%s: Device is opened", __func__); return 1; } diff --git a/exynos/multimedia/codecs/audio/exynos4/srp/libsa_jni/SACtrl.c b/exynos/multimedia/codecs/audio/exynos4/srp/libsa_jni/SACtrl.c index 6b99dc3..9e696f4 100644 --- a/exynos/multimedia/codecs/audio/exynos4/srp/libsa_jni/SACtrl.c +++ b/exynos/multimedia/codecs/audio/exynos4/srp/libsa_jni/SACtrl.c @@ -7,7 +7,7 @@ #include "srp_api_ctrl.h" -#define LOG_TAG "libsa_jni" +#define ALOG_TAG "libsa_jni" #include <cutils/log.h> void Java_com_android_music_SetSACtrlJNI_set(JNIEnv * env, jobject obj, int effect_num) @@ -15,17 +15,17 @@ void Java_com_android_music_SetSACtrlJNI_set(JNIEnv * env, jobject obj, int effe unsigned long effect_enable = effect_num ? 1 : 0; unsigned int ret; - LOGD("Sound effect[%d]", effect_num); + ALOGD("Sound effect[%d]", effect_num); ret = SRP_Ctrl_Enable_Effect(effect_enable); if (ret < 0) { - LOGE("%s: Couldn't enabled effect\n", __func__); + ALOGE("%s: Couldn't enabled effect\n", __func__); return; } SRP_Ctrl_Set_Effect_Def(effect_num << 5); if (ret < 0) { - LOGE("%s: Couldn't defined effect\n", __func__); + ALOGE("%s: Couldn't defined effect\n", __func__); return; } diff --git a/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api.c b/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api.c index b0c0e5e..2848346 100644 --- a/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api.c +++ b/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api.c @@ -12,14 +12,14 @@ #include "srp_api.h" -#define LOG_TAG "libsrpapi" +#define ALOG_TAG "libsrpapi" #include <cutils/log.h> -/* Disable LOGD message */ -#ifdef LOGD -#undef LOGD +/* Disable ALOGD message */ +#ifdef ALOGD +#undef ALOGD #endif -#define LOGD(...) +#define ALOGD(...) //#define _USE_WBUF_ /* Buffering before writing srp-rp device */ //#define _DUMP_TO_FILE_ @@ -48,11 +48,11 @@ static int WriteBuff_Init(void) wbuf_size = srp_ibuf_size * WBUF_LEN_MUL; wbuf_pos = 0; wbuf = (unsigned char *)malloc(wbuf_size); - LOGD("%s: WriteBuffer %dbytes allocated", __func__, wbuf_size); + ALOGD("%s: WriteBuffer %dbytes allocated", __func__, wbuf_size); return 0; } - LOGE("%s: WriteBuffer already allocated", __func__); + ALOGE("%s: WriteBuffer already allocated", __func__); return -1; } @@ -64,7 +64,7 @@ static int WriteBuff_Deinit(void) return 0; } - LOGE("%s: WriteBuffer is not ready", __func__); + ALOGE("%s: WriteBuffer is not ready", __func__); return -1; } @@ -76,7 +76,7 @@ static int WriteBuff_Write(unsigned char *buff, int size_byte) memcpy(&wbuf[wbuf_pos], buff, size_byte); wbuf_pos += size_byte; } else { - LOGE("%s: WriteBuffer is filled [%d], ignoring write [%d]", __func__, wbuf_pos, size_byte); + ALOGE("%s: WriteBuffer is filled [%d], ignoring write [%d]", __func__, wbuf_pos, size_byte); return -1; /* Insufficient buffer */ } @@ -109,7 +109,7 @@ int SRP_Create(int block_mode) return srp_dev; } - LOGE("%s: Device is not ready", __func__); + ALOGE("%s: Device is not ready", __func__); return -1; /* device alreay opened */ } @@ -134,11 +134,11 @@ int SRP_Init(unsigned int ibuf_size) } } - LOGD("%s: Dump MP3 to %s", __func__, outname); + ALOGD("%s: Dump MP3 to %s", __func__, outname); if (fp_dump = fopen(outname, "wb")) - LOGD("%s: Success to open %s", __func__, outname); + ALOGD("%s: Success to open %s", __func__, outname); else - LOGD("%s: Fail to open %s", __func__, outname); + ALOGD("%s: Fail to open %s", __func__, outname); #endif #ifdef _USE_WBUF_ @@ -149,7 +149,7 @@ int SRP_Init(unsigned int ibuf_size) #endif } - LOGE("%s: Device is not ready", __func__); + ALOGE("%s: Device is not ready", __func__); return -1; /* device is not created */ } @@ -163,17 +163,17 @@ int SRP_Decode(void *buff, int size_byte) if (srp_dev != -1) { /* Check wbuf before writing buff */ while (wbuf_pos >= srp_ibuf_size) { /* Write_Buffer filled? (IBUF Size)*/ - LOGD("%s: Write Buffer is full, Send data to RP", __func__); + ALOGD("%s: Write Buffer is full, Send data to RP", __func__); ret = write(srp_dev, wbuf, srp_ibuf_size); /* Write Buffer to RP Driver */ if (ret == -1) { /* Fail? */ ioctl(srp_dev, SRP_ERROR_STATE, &val); if (!val) { /* Write error? */ - LOGE("%s: IBUF write fail", __func__); + ALOGE("%s: IBUF write fail", __func__); return -1; } else { /* Write OK, but RP decode error? */ err_code = val; - LOGE("%s: RP decode error [0x%05X]", __func__, err_code); + ALOGE("%s: RP decode error [0x%05X]", __func__, err_code); } } #ifdef _DUMP_TO_FILE_ @@ -187,11 +187,11 @@ int SRP_Decode(void *buff, int size_byte) if (ret == -1) return -1; /* Buffering error */ - LOGD("%s: Write Buffer remain [%d]", __func__, wbuf_pos); + ALOGD("%s: Write Buffer remain [%d]", __func__, wbuf_pos); return err_code; /* Write Success */ } - LOGE("%s: Device is not ready", __func__); + ALOGE("%s: Device is not ready", __func__); return -1; /* device is not created */ } @@ -212,10 +212,10 @@ int SRP_Send_EOS(void) if (ret == -1) { /* Fail? */ ret = ioctl(srp_dev, SRP_ERROR_STATE, &val); if (!val) { /* Write error? */ - LOGE("%s: IBUF write fail", __func__); + ALOGE("%s: IBUF write fail", __func__); return -1; } else { /* RP decoe error? */ - LOGE("%s: RP decode error [0x%05X]", __func__, val); + ALOGE("%s: RP decode error [0x%05X]", __func__, val); return -1; } } else { /* Success? */ @@ -244,17 +244,17 @@ int SRP_Decode(void *buff, int size_byte) int err_code = 0; if (srp_dev != -1) { - LOGD("%s: Send data to RP (%d bytes)", __func__, size_byte); + ALOGD("%s: Send data to RP (%d bytes)", __func__, size_byte); ret = write(srp_dev, buff, size_byte); /* Write Buffer to RP Driver */ if (ret == -1) { /* Fail? */ ioctl(srp_dev, SRP_ERROR_STATE, &val); if (!val) { /* Write error? */ - LOGE("%s: IBUF write fail", __func__); + ALOGE("%s: IBUF write fail", __func__); return -1; } else { /* Write OK, but RP decode error? */ err_code = val; - LOGE("%s: RP decode error [0x%05X]", __func__, err_code); + ALOGE("%s: RP decode error [0x%05X]", __func__, err_code); } } #ifdef _DUMP_TO_FILE_ @@ -265,7 +265,7 @@ int SRP_Decode(void *buff, int size_byte) return err_code; /* Write Success */ } - LOGE("%s: Device is not ready", __func__); + ALOGE("%s: Device is not ready", __func__); return -1; /* device is not created */ } @@ -348,7 +348,7 @@ int SRP_Deinit(void) return ioctl(srp_dev, SRP_DEINIT); /* Deinialize */ } - LOGE("%s: Device is not ready", __func__); + ALOGE("%s: Device is not ready", __func__); return -1; /* device is not created */ } @@ -365,17 +365,17 @@ int SRP_Terminate(void) } } - LOGE("%s: Device is not ready", __func__); + ALOGE("%s: Device is not ready", __func__); return -1; /* device is not created or close error*/ } int SRP_IsOpen(void) { if (srp_dev == -1) { - LOGD("%s: Device is not opened", __func__); + ALOGD("%s: Device is not opened", __func__); return 0; } - LOGD("%s: Device is opened", __func__); + ALOGD("%s: Device is opened", __func__); return 1; } diff --git a/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api_ctrl.c b/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api_ctrl.c index bdc2310..ed32089 100644 --- a/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api_ctrl.c +++ b/exynos/multimedia/codecs/audio/exynos4/srp/ulp/src/srp_api_ctrl.c @@ -13,14 +13,14 @@ #include "srp_api_ctrl.h" #include "srp_ioctl.h" -#define LOG_TAG "libsrpapi" +#define ALOG_TAG "libsrpapi" #include <cutils/log.h> -/* Disable LOGD message */ -#ifdef LOGD -#undef LOGD +/* Disable ALOGD message */ +#ifdef ALOGD +#undef ALOGD #endif -#define LOGD(...) +#define ALOGD(...) static int srp_ctrl = -1; static int srp_ctrl_cnt = 0; @@ -42,11 +42,11 @@ static int SRP_Ctrl_Open(void) if (srp_ctrl_cnt == 0) { srp_ctrl = open(SRP_CTRL_DEV_NAME, O_RDWR | O_NDELAY); if (srp_ctrl < 0) { - LOGE("%s: Failed open device file %d", __func__, srp_ctrl); + ALOGE("%s: Failed open device file %d", __func__, srp_ctrl); return -1; } srp_ctrl_cnt++; - LOGV("%s: Device is opened[%d]: cnt %d", __func__, srp_ctrl, srp_ctrl_cnt); + ALOGV("%s: Device is opened[%d]: cnt %d", __func__, srp_ctrl, srp_ctrl_cnt); } return srp_ctrl; @@ -59,11 +59,11 @@ static int SRP_Ctrl_Close(void) if (srp_ctrl_cnt == 1) { ret = close(srp_ctrl); if (ret < 0) { - LOGE("%s: Failed closen device file %d", __func__, srp_ctrl); + ALOGE("%s: Failed closen device file %d", __func__, srp_ctrl); return -1; } srp_ctrl_cnt--; - LOGV("%s: Device is closed[%d]: cnt %d", __func__, srp_ctrl, srp_ctrl_cnt); + ALOGV("%s: Device is closed[%d]: cnt %d", __func__, srp_ctrl, srp_ctrl_cnt); srp_ctrl = -1; } @@ -86,13 +86,13 @@ static int SRP_Check_AltFirmware(void) ioctl(srp_ctrl, SRP_CTRL_ALTFW_STATE, &alt_fw_loaded); if (!alt_fw_loaded) { /* Not loaded yet? */ - LOGE("Try to download alternate RP firmware"); + ALOGE("Try to download alternate RP firmware"); temp_buff = (unsigned long *)malloc(256*1024); /* temp buffer */ for (alt_fw_set = 0; alt_fw_set < 6; alt_fw_set++) { sprintf(alt_fw_name, "%s_text.bin", srp_alt_fw_name_pre[alt_fw_set]); if (fp = fopen(alt_fw_name, "rb")) { - LOGE("RP Alt-Firmware Loading: %s", alt_fw_name); + ALOGE("RP Alt-Firmware Loading: %s", alt_fw_name); fread(temp_buff, 64*1024, 1, fp); close(fp); alt_fw_text_ok = 1; @@ -102,7 +102,7 @@ static int SRP_Check_AltFirmware(void) sprintf(alt_fw_name, "%s_data.bin", srp_alt_fw_name_pre[alt_fw_set]); if (fp = fopen(alt_fw_name, "rb")) { - LOGE("RP Alt-Firmware Loading: %s", alt_fw_name); + ALOGE("RP Alt-Firmware Loading: %s", alt_fw_name); fread(&temp_buff[64*1024/4], 96*1024, 1, fp); close(fp); alt_fw_data_ok = 1; @@ -131,7 +131,7 @@ int SRP_Ctrl_Set_Effect(int effect) ret = SRP_Ctrl_Open(); if (ret < 0) { - LOGE("%s: SRP_Ctrl_Open error", __func__); + ALOGE("%s: SRP_Ctrl_Open error", __func__); return -1; } @@ -149,7 +149,7 @@ int SRP_Ctrl_Enable_Effect(int on) ret = SRP_Ctrl_Open(); if (ret < 0) { - LOGE("%s: SRP_Ctrl_Open error", __func__); + ALOGE("%s: SRP_Ctrl_Open error", __func__); return -1; } @@ -166,7 +166,7 @@ int SRP_Ctrl_Set_Effect_Def(unsigned long effect_def) ret = SRP_Ctrl_Open(); if (ret < 0) { - LOGE("%s: SRP_Ctrl_Open error", __func__); + ALOGE("%s: SRP_Ctrl_Open error", __func__); return -1; } @@ -183,7 +183,7 @@ int SRP_Ctrl_Set_Effect_EQ_User(unsigned long eq_user) ret = SRP_Ctrl_Open(); if (ret < 0) { - LOGE("%s: SRP_Ctrl_Open error", __func__); + ALOGE("%s: SRP_Ctrl_Open error", __func__); return -1; } @@ -200,13 +200,13 @@ int SRP_Ctrl_Set_Pcm_Dump(int on) ret = SRP_Ctrl_Open(); if (ret < 0) { - LOGE("%s: SRP_Ctrl_Open error", __func__); + ALOGE("%s: SRP_Ctrl_Open error", __func__); return -1; } ioctl(srp_ctrl, SRP_CTRL_PCM_DUMP_OP, on); - LOGV("dump_op: %d", on); + ALOGV("dump_op: %d", on); SRP_Ctrl_Close(); @@ -220,13 +220,13 @@ int SRP_Ctrl_Get_Pcm_Dump_State(void) ret = SRP_Ctrl_Open(); if (ret < 0) { - LOGE("%s: SRP_Ctrl_Open error", __func__); + ALOGE("%s: SRP_Ctrl_Open error", __func__); return -1; } ioctl(srp_ctrl, SRP_CTRL_IS_PCM_DUMP, &srp_dump_stat); - LOGV("srp_dump_stat: %d", srp_dump_stat); + ALOGV("srp_dump_stat: %d", srp_dump_stat); SRP_Ctrl_Close(); @@ -240,7 +240,7 @@ int SRP_Ctrl_Set_Gain(float value) ret = SRP_Ctrl_Open(); if (ret < 0) { - LOGE("%s: SRP_Ctrl_Open error", __func__); + ALOGE("%s: SRP_Ctrl_Open error", __func__); return -1; } @@ -259,13 +259,13 @@ int SRP_Ctrl_Get_Running_Stat(void) ret = SRP_Ctrl_Open(); if (ret < 0) { - LOGE("%s: SRP_Ctrl_Open error", __func__); + ALOGE("%s: SRP_Ctrl_Open error", __func__); return -1; } ioctl(srp_ctrl, SRP_CTRL_IS_RUNNING, &srp_running_stat); - LOGV("srp_running_stat: %d", srp_running_stat); + ALOGV("srp_running_stat: %d", srp_running_stat); SRP_Ctrl_Close(); @@ -279,13 +279,13 @@ int SRP_Ctrl_Get_Open_Stat(void) ret = SRP_Ctrl_Open(); if (ret < 0) { - LOGE("%s: SRP_Ctrl_Open error", __func__); + ALOGE("%s: SRP_Ctrl_Open error", __func__); return -1; } ioctl(srp_ctrl, SRP_CTRL_IS_OPENED, &srp_open_stat); - LOGV("srp_open_stat: %d", srp_open_stat); + ALOGV("srp_open_stat: %d", srp_open_stat); SRP_Ctrl_Close(); @@ -301,7 +301,7 @@ short *SRP_Ctrl_Get_Pcm(void) ret = SRP_Ctrl_Open(); if (ret < 0) { - LOGE("%s: SRP_Ctrl_Open error", __func__); + ALOGE("%s: SRP_Ctrl_Open error", __func__); return NULL; } diff --git a/exynos/multimedia/codecs/audio/exynos5/srp/alp/src/srp_api.c b/exynos/multimedia/codecs/audio/exynos5/srp/alp/src/srp_api.c index 56125fb..73c8c04 100644 --- a/exynos/multimedia/codecs/audio/exynos5/srp/alp/src/srp_api.c +++ b/exynos/multimedia/codecs/audio/exynos5/srp/alp/src/srp_api.c @@ -12,8 +12,8 @@ #include "srp_api.h" -#define LOG_NDEBUG 1 -#define LOG_TAG "libsrpapi" +#define ALOG_NDEBUG 1 +#define ALOG_TAG "libsrpapi" #include <utils/Log.h> static struct srp_buf_info ibuf_info; @@ -35,7 +35,7 @@ int SRP_Create(int block_mode) return SRP_ERROR_OPEN_FAIL; } - LOGE("%s: Device is already opened", __func__); + ALOGE("%s: Device is already opened", __func__); return SRP_ERROR_ALREADY_OPEN; } @@ -52,20 +52,20 @@ int SRP_Init() /* mmap for OBUF */ ret = ioctl(srp_dev, SRP_GET_MMAP_SIZE, &mmapped_size); if (ret < 0) { - LOGE("%s: SRP_GET_MMAP_SIZE is failed", __func__); + ALOGE("%s: SRP_GET_MMAP_SIZE is failed", __func__); return SRP_ERROR_OBUF_MMAP; } obuf_info.mmapped_addr = mmap(0, mmapped_size, PROT_READ | PROT_WRITE, MAP_SHARED, srp_dev, 0); if (!obuf_info.mmapped_addr) { - LOGE("%s: mmap is failed", __func__); + ALOGE("%s: mmap is failed", __func__); return SRP_ERROR_OBUF_MMAP; } obuf_info.mmapped_size = mmapped_size; ret = SRP_RETURN_OK; } else { - LOGE("%s: Device is not ready", __func__); + ALOGE("%s: Device is not ready", __func__); ret = SRP_ERROR_NOT_READY; /* device is not created */ } @@ -78,12 +78,12 @@ int SRP_Decode(void *buff, int size_byte) if (srp_dev != -1) { if (size_byte > 0) { - LOGV("%s: Send data to RP (%d bytes)", __func__, size_byte); + ALOGV("%s: Send data to RP (%d bytes)", __func__, size_byte); ret = write(srp_dev, buff, size_byte); /* Write Buffer to RP Driver */ if (ret < 0) { if (ret != SRP_ERROR_IBUF_OVERFLOW) - LOGE("SRP_Decode returned error code: %d", ret); + ALOGE("SRP_Decode returned error code: %d", ret); } return ret; /* Write Success */ } else { @@ -91,7 +91,7 @@ int SRP_Decode(void *buff, int size_byte) } } - LOGE("%s: Device is not ready", __func__); + ALOGE("%s: Device is not ready", __func__); return SRP_ERROR_NOT_READY; } @@ -135,7 +135,7 @@ int SRP_Get_PCM(void **addr, unsigned int *size) ret = read(srp_dev, &pcm_info, 0); if (ret == -1) { *size = 0; - LOGE("%s: PCM read fail", __func__); + ALOGE("%s: PCM read fail", __func__); return SRP_ERROR_OBUF_READ; } @@ -155,11 +155,11 @@ int SRP_Get_Dec_Info(struct srp_dec_info *dec_info) if (srp_dev != -1) { ret = ioctl(srp_dev, SRP_GET_DEC_INFO, dec_info); if (ret < 0) { - LOGE("%s: Failed to get dec info", __func__); + ALOGE("%s: Failed to get dec info", __func__); return SRP_ERROR_GETINFO_FAIL; } - LOGV("numChannels(%d), samplingRate(%d)", dec_info->channels, dec_info->sample_rate); + ALOGV("numChannels(%d), samplingRate(%d)", dec_info->channels, dec_info->sample_rate); ret = SRP_RETURN_OK; } else { @@ -176,7 +176,7 @@ int SRP_Get_Ibuf_Info(void **addr, unsigned int *size, unsigned int *num) if (srp_dev != -1) { ret = ioctl(srp_dev, SRP_GET_IBUF_INFO, &ibuf_info); if (ret == -1) { - LOGE("%s: Failed to get Ibuf info", __func__); + ALOGE("%s: Failed to get Ibuf info", __func__); return SRP_ERROR_IBUF_INFO; } @@ -185,7 +185,7 @@ int SRP_Get_Ibuf_Info(void **addr, unsigned int *size, unsigned int *num) *num = ibuf_info.num; if (*num == 0) { - LOGE("%s: IBUF num is 0", __func__); + ALOGE("%s: IBUF num is 0", __func__); return SRP_ERROR_INVALID_SETTING; } @@ -205,7 +205,7 @@ int SRP_Get_Obuf_Info(void **addr, unsigned int *size, unsigned int *num) if (obuf_info.addr == NULL) { ret = ioctl(srp_dev, SRP_GET_OBUF_INFO, &obuf_info); if (ret < 0) { - LOGE("%s: SRP_GET_OBUF_INFO is failed", __func__); + ALOGE("%s: SRP_GET_OBUF_INFO is failed", __func__); return SRP_ERROR_OBUF_INFO; } } @@ -215,7 +215,7 @@ int SRP_Get_Obuf_Info(void **addr, unsigned int *size, unsigned int *num) *num = obuf_info.num; if (*num == 0) { - LOGE("%s: OBUF num is 0", __func__); + ALOGE("%s: OBUF num is 0", __func__); return SRP_ERROR_INVALID_SETTING; } @@ -256,10 +256,10 @@ int SRP_Terminate(void) int SRP_IsOpen(void) { if (srp_dev == -1) { - LOGV("%s: Device is not opened", __func__); + ALOGV("%s: Device is not opened", __func__); return 0; } - LOGV("%s: Device is opened", __func__); + ALOGV("%s: Device is opened", __func__); return 1; } diff --git a/exynos/multimedia/codecs/video/exynos4/mfc/Android.mk b/exynos/multimedia/codecs/video/exynos4/mfc/Android.mk index 2b3bd48..f712c3c 100644 --- a/exynos/multimedia/codecs/video/exynos4/mfc/Android.mk +++ b/exynos/multimedia/codecs/video/exynos4/mfc/Android.mk @@ -23,7 +23,7 @@ LOCAL_PRELINK_MODULE := false ifeq ($(BOARD_USES_MFC_FPS),true) LOCAL_CFLAGS := -DCONFIG_MFC_FPS -#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_LOG +#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_ALOG endif ifeq ($(BOARD_USE_S3D_SUPPORT), true) @@ -61,7 +61,7 @@ LOCAL_PRELINK_MODULE := false ifeq ($(BOARD_USES_MFC_FPS),true) LOCAL_CFLAGS := -DCONFIG_MFC_FPS -#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_LOG +#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_ALOG endif ifeq ($(BOARD_USE_S3D_SUPPORT), true) @@ -99,7 +99,7 @@ LOCAL_PRELINK_MODULE := false ifeq ($(BOARD_USES_MFC_FPS),true) LOCAL_CFLAGS := -DCONFIG_MFC_FPS -#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_LOG +#LOCAL_CFLAGS += -DCONFIG_MFC_PERF_ALOG endif ifeq ($(BOARD_USE_S3D_SUPPORT), true) diff --git a/exynos/multimedia/codecs/video/exynos4/mfc/dec/src/SsbSipMfcDecAPI.c b/exynos/multimedia/codecs/video/exynos4/mfc/dec/src/SsbSipMfcDecAPI.c index 92a8ca6..df985dc 100644 --- a/exynos/multimedia/codecs/video/exynos4/mfc/dec/src/SsbSipMfcDecAPI.c +++ b/exynos/multimedia/codecs/video/exynos4/mfc/dec/src/SsbSipMfcDecAPI.c @@ -34,9 +34,9 @@ #include "SsbSipMfcApi.h" #include <utils/Log.h> -/*#define LOG_NDEBUG 0*/ -#undef LOG_TAG -#define LOG_TAG "MFC_DEC_APP" +/*#define ALOG_NDEBUG 0*/ +#undef ALOG_TAG +#define ALOG_TAG "MFC_DEC_APP" #ifdef CONFIG_MFC_FPS #include <sys/time.h> @@ -76,21 +76,21 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng) while (1) { while (startCode != USR_DATA_START_CODE) { if ((startCode == VOP_START_CODE) || (leng_idx == Frameleng)) { - LOGI("isPBPacked] VOP START Found !!.....return"); - LOGW("isPBPacked] Non Packed PB"); + ALOGI("isPBPacked] VOP START Found !!.....return"); + ALOGW("isPBPacked] Non Packed PB"); return 0; } getAByte(strmBuffer, &startCode); - LOGV(">> StartCode = 0x%08x <<\n", startCode); + ALOGV(">> StartCode = 0x%08x <<\n", startCode); strmBuffer++; leng_idx++; } - LOGI("isPBPacked] User Data Found !!"); + ALOGI("isPBPacked] User Data Found !!"); do { if (*strmBuffer == 'p') { - /*LOGI(">> peter strmBuffer = 0x%08x <<\n", *strmBuffer);*/ - LOGW("isPBPacked] Packed PB\n"); + /*ALOGI(">> peter strmBuffer = 0x%08x <<\n", *strmBuffer);*/ + ALOGW("isPBPacked] Packed PB\n"); return 1; } getAByte(strmBuffer, &startCode); @@ -101,7 +101,7 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng) break; } - LOGW("isPBPacked] Non Packed PB"); + ALOGW("isPBPacked] Non Packed PB"); return 0; } @@ -119,7 +119,7 @@ void *SsbSipMfcDecOpen(void) int mapped_size; struct mfc_common_args CommonArg; - LOGI("[%s] MFC Library Ver %d.%02d\n",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); + ALOGI("[%s] MFC Library Ver %d.%02d\n",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); #ifdef CONFIG_MFC_FPS framecount = 0; over30ms = 0; @@ -128,27 +128,27 @@ void *SsbSipMfcDecOpen(void) #endif pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB)); if (pCTX == NULL) { - LOGE("SsbSipMfcDecOpen] malloc failed.\n"); + ALOGE("SsbSipMfcDecOpen] malloc failed.\n"); return NULL; } memset(pCTX, 0, sizeof(_MFCLIB)); if (access(mfc_dev_name, F_OK) != 0) { - LOGE("SsbSipMfcDecOpen] MFC device node not exists"); + ALOGE("SsbSipMfcDecOpen] MFC device node not exists"); free(pCTX); return NULL; } hMFCOpen = open(mfc_dev_name, O_RDWR | O_NDELAY); if (hMFCOpen < 0) { - LOGE("SsbSipMfcDecOpen] MFC Open failure"); + ALOGE("SsbSipMfcDecOpen] MFC Open failure"); free(pCTX); return NULL; } mapped_size = ioctl(hMFCOpen, IOCTL_MFC_GET_MMAP_SIZE, &CommonArg); if ((mapped_size < 0) || (CommonArg.ret_code != MFC_OK)) { - LOGE("SsbSipMfcDecOpen] IOCTL_MFC_GET_MMAP_SIZE failed"); + ALOGE("SsbSipMfcDecOpen] IOCTL_MFC_GET_MMAP_SIZE failed"); free(pCTX); close(hMFCOpen); return NULL; @@ -156,7 +156,7 @@ void *SsbSipMfcDecOpen(void) mapped_addr = (unsigned int)mmap(0, mapped_size, PROT_READ | PROT_WRITE, MAP_SHARED, hMFCOpen, 0); if (!mapped_addr) { - LOGE("SsbSipMfcDecOpen] FIMV5.x driver address mapping failed"); + ALOGE("SsbSipMfcDecOpen] FIMV5.x driver address mapping failed"); free(pCTX); close(hMFCOpen); return NULL; @@ -180,24 +180,24 @@ void *SsbSipMfcDecOpenExt(void *value) int err; struct mfc_common_args CommonArg; - LOGI("[%s] MFC Library Ver %d.%02d\n",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); + ALOGI("[%s] MFC Library Ver %d.%02d\n",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB)); if (pCTX == NULL) { - LOGE("SsbSipMfcDecOpenExt] malloc failed.\n"); + ALOGE("SsbSipMfcDecOpenExt] malloc failed.\n"); return NULL; } memset(pCTX, 0, sizeof(_MFCLIB)); if (access(mfc_dev_name, F_OK) != 0) { - LOGE("SsbSipMfcDecOpen] MFC device node not exists"); + ALOGE("SsbSipMfcDecOpen] MFC device node not exists"); free(pCTX); return NULL; } hMFCOpen = open(mfc_dev_name, O_RDWR | O_NDELAY); if (hMFCOpen < 0) { - LOGE("SsbSipMfcDecOpenExt] MFC Open failure"); + ALOGE("SsbSipMfcDecOpenExt] MFC Open failure"); free(pCTX); return NULL; } @@ -206,7 +206,7 @@ void *SsbSipMfcDecOpenExt(void *value) err = ioctl(hMFCOpen, IOCTL_MFC_SET_BUF_CACHE, &CommonArg); if ((err < 0) || (CommonArg.ret_code != MFC_OK)) { - LOGE("SsbSipMfcDecOpenExt] IOCTL_MFC_SET_BUF_CACHE failed"); + ALOGE("SsbSipMfcDecOpenExt] IOCTL_MFC_SET_BUF_CACHE failed"); free(pCTX); close(hMFCOpen); return NULL; @@ -214,7 +214,7 @@ void *SsbSipMfcDecOpenExt(void *value) mapped_size = ioctl(hMFCOpen, IOCTL_MFC_GET_MMAP_SIZE, &CommonArg); if ((mapped_size < 0) || (CommonArg.ret_code != MFC_OK)) { - LOGE("SsbSipMfcDecOpenExt] IOCTL_MFC_GET_MMAP_SIZE failed"); + ALOGE("SsbSipMfcDecOpenExt] IOCTL_MFC_GET_MMAP_SIZE failed"); free(pCTX); close(hMFCOpen); return NULL; @@ -222,7 +222,7 @@ void *SsbSipMfcDecOpenExt(void *value) mapped_addr = (unsigned int)mmap(0, mapped_size, PROT_READ | PROT_WRITE, MAP_SHARED, hMFCOpen, 0); if (!mapped_addr) { - LOGE("SsbSipMfcDecOpenExt] FIMV5.x driver address mapping failed"); + ALOGE("SsbSipMfcDecOpenExt] FIMV5.x driver address mapping failed"); free(pCTX); close(hMFCOpen); return NULL; @@ -245,7 +245,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit (void *openHandle, SSBSIP_MFC_CODEC_TYPE _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcDecInit] openHandle is NULL"); + ALOGE("SsbSipMfcDecInit] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } @@ -264,7 +264,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit (void *openHandle, SSBSIP_MFC_CODEC_TYPE (codec_type != XVID_DEC) && (codec_type != VC1RCV_DEC) && (codec_type != VC1_DEC)) { - LOGE("SsbSipMfcDecInit] Undefined codec type"); + ALOGE("SsbSipMfcDecInit] Undefined codec type"); return MFC_RET_INVALID_PARAM; } pCTX->codecType = codec_type; @@ -300,7 +300,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit (void *openHandle, SSBSIP_MFC_CODEC_TYPE r = ioctl(pCTX->hMFC, IOCTL_MFC_DEC_INIT, &DecArg); if (DecArg.ret_code != MFC_OK) { - LOGE("SsbSipMfcDecInit] IOCTL_MFC_DEC_INIT failed"); + ALOGE("SsbSipMfcDecInit] IOCTL_MFC_DEC_INIT failed"); return MFC_RET_DEC_INIT_FAIL; } @@ -341,12 +341,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) long int diffTime, avgTime; #endif if (openHandle == NULL) { - LOGE("SsbSipMfcDecExe] openHandle is NULL\n"); + ALOGE("SsbSipMfcDecExe] openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) { - LOGE("SsbSipMfcDecExe] lengthBufFill is invalid. (lengthBufFill=%d)", lengthBufFill); + ALOGE("SsbSipMfcDecExe] lengthBufFill is invalid. (lengthBufFill=%d)", lengthBufFill); return MFC_RET_INVALID_PARAM; } @@ -366,12 +366,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) #ifdef CONFIG_MFC_FPS gettimeofday(&mDec1, NULL); -#ifdef CONFIG_MFC_PERF_LOG +#ifdef CONFIG_MFC_PERF_ALOG if (framecount != 0) { if (mDec2.tv_sec == mDec1.tv_sec) - LOGI("SsbSipMfcDecExe] Interval between IOCTL_MFC_DEC_EXE's (end to start) = %8d", (mDec1.tv_usec - mDec2.tv_usec)); + ALOGI("SsbSipMfcDecExe] Interval between IOCTL_MFC_DEC_EXE's (end to start) = %8d", (mDec1.tv_usec - mDec2.tv_usec)); else - LOGI("SsbSipMfcDecExe] Interval between IOCTL_MFC_DEC_EXE's (end to start) = %8d", (1000000 + (mDec1.tv_usec - mDec2.tv_usec))); + ALOGI("SsbSipMfcDecExe] Interval between IOCTL_MFC_DEC_EXE's (end to start) = %8d", (1000000 + (mDec1.tv_usec - mDec2.tv_usec))); } #endif #endif @@ -379,7 +379,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) ret = ioctl(pCTX->hMFC, IOCTL_MFC_DEC_EXE, &DecArg); if (DecArg.ret_code != MFC_OK) { - LOGE("SsbSipMfcDecExe] IOCTL_MFC_DEC_EXE failed(ret : %d)", DecArg.ret_code); + ALOGE("SsbSipMfcDecExe] IOCTL_MFC_DEC_EXE failed(ret : %d)", DecArg.ret_code); return MFC_RET_DEC_EXE_ERR; } @@ -390,14 +390,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) if (mDec1.tv_sec == mDec2.tv_sec) { if (mDec2.tv_usec - mDec1.tv_usec > 30000) over30ms++; -#ifdef CONFIG_MFC_PERF_LOG - LOGI("SsbSipMfcDecExe] Time consumed for IOCTL_MFC_DEC_EXE = %8d", ((mDec2.tv_usec - mDec1.tv_usec))); +#ifdef CONFIG_MFC_PERF_ALOG + ALOGI("SsbSipMfcDecExe] Time consumed for IOCTL_MFC_DEC_EXE = %8d", ((mDec2.tv_usec - mDec1.tv_usec))); #endif } else { if (1000000 + mDec2.tv_usec - mDec1.tv_usec > 30000) over30ms++; -#ifdef CONFIG_MFC_PERF_LOG - LOGI("SsbSipMfcDecExe] Time consumed for IOCTL_MFC_DEC_EXE = %8d", (1000000 + (mDec2.tv_usec - mDec1.tv_usec))); +#ifdef CONFIG_MFC_PERF_ALOG + ALOGI("SsbSipMfcDecExe] Time consumed for IOCTL_MFC_DEC_EXE = %8d", (1000000 + (mDec2.tv_usec - mDec1.tv_usec))); #endif } @@ -411,7 +411,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) /* FIXME: dynamic resolution change */ if (DecArg.args.dec_exe.out_display_status == 4) { - LOGI("SsbSipMfcDecExe] Resolution is chagned"); + ALOGI("SsbSipMfcDecExe] Resolution is chagned"); /* pCTX->virFrmBuf.chroma = DecArg.args.dec_exe.out_u_addr.chroma; pCTX->virFrmBuf.luma = DecArg.args.dec_exe.out_u_addr.luma; @@ -466,14 +466,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle) struct mfc_common_args free_arg; #ifdef CONFIG_MFC_FPS - LOGI(">>> Statistics in MFC API:"); - LOGI(">>> Total number of IOCTL_MFC_DEC_EXE = %d", framecount); - LOGI(">>> Number of IOCTL_MFC_DEC_EXE taking more than 30ms = %d", over30ms); - LOGI(">>> Avg IOCTL_MFC_DEC_EXE time = %dsec %.2fmsec", (int)mAvg.tv_sec, (float)(mAvg.tv_usec / 1000.0)); + ALOGI(">>> Statistics in MFC API:"); + ALOGI(">>> Total number of IOCTL_MFC_DEC_EXE = %d", framecount); + ALOGI(">>> Number of IOCTL_MFC_DEC_EXE taking more than 30ms = %d", over30ms); + ALOGI(">>> Avg IOCTL_MFC_DEC_EXE time = %dsec %.2fmsec", (int)mAvg.tv_sec, (float)(mAvg.tv_usec / 1000.0)); #endif if (openHandle == NULL) { - LOGE("SsbSipMfcDecClose] openHandle is NULL"); + ALOGE("SsbSipMfcDecClose] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } @@ -511,12 +511,12 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi struct mfc_common_args user_addr_arg, phys_addr_arg; if (inputBufferSize < 0) { - LOGE("SsbSipMfcDecGetInBuf] inputBufferSize = %d is invalid", inputBufferSize); + ALOGE("SsbSipMfcDecGetInBuf] inputBufferSize = %d is invalid", inputBufferSize); return NULL; } if (openHandle == NULL) { - LOGE("SsbSipMfcDecGetInBuf] openHandle is NULL\n"); + ALOGE("SsbSipMfcDecGetInBuf] openHandle is NULL\n"); return NULL; } @@ -528,14 +528,14 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi user_addr_arg.args.mem_alloc.mapped_addr = pCTX->mapped_addr; ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_IN_BUF, &user_addr_arg); if (ret_code < 0) { - LOGE("SsbSipMfcDecGetInBuf] IOCTL_MFC_GET_IN_BUF failed"); + ALOGE("SsbSipMfcDecGetInBuf] IOCTL_MFC_GET_IN_BUF failed"); return NULL; } phys_addr_arg.args.real_addr.key = user_addr_arg.args.mem_alloc.offset; ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_REAL_ADDR, &phys_addr_arg); if (ret_code < 0) { - LOGE("SsbSipMfcDecGetInBuf] IOCTL_MFC_GET_PHYS_ADDR failed"); + ALOGE("SsbSipMfcDecGetInBuf] IOCTL_MFC_GET_PHYS_ADDR failed"); return NULL; } @@ -558,7 +558,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcDecSetInBuf] openHandle is NULL"); + ALOGE("SsbSipMfcDecSetInBuf] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } @@ -575,7 +575,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecGetOutBuf(void *openHandle, SSBSIP_MFC_ _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcDecGetOutBuf] openHandle is NULL"); + ALOGE("SsbSipMfcDecGetOutBuf] openHandle is NULL"); return MFC_GETOUTBUF_DISPLAY_END; } @@ -626,12 +626,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON struct mfc_dec_fimv1_info *fimv1_res; if (openHandle == NULL) { - LOGE("SsbSipMfcDecSetConfig] openHandle is NULL"); + ALOGE("SsbSipMfcDecSetConfig] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("SsbSipMfcDecSetConfig] value is NULL"); + ALOGE("SsbSipMfcDecSetConfig] value is NULL"); return MFC_RET_INVALID_PARAM; } @@ -669,8 +669,8 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON case MFC_DEC_SETCONF_FIMV1_WIDTH_HEIGHT: fimv1_res = (struct mfc_dec_fimv1_info *)value; - LOGI("fimv1->width = %d\n", fimv1_res->width); - LOGI("fimv1->height = %d\n", fimv1_res->height); + ALOGI("fimv1->width = %d\n", fimv1_res->width); + ALOGI("fimv1->height = %d\n", fimv1_res->height); #ifdef S3D_SUPPORT DecArg.args.config.args.basic.values[0] = (int)(fimv1_res->width); DecArg.args.config.args.basic.values[1] = (int)(fimv1_res->height); @@ -696,7 +696,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_SET_CONFIG, &DecArg); if (DecArg.ret_code != MFC_OK) { - LOGE("SsbSipMfcDecSetConfig] IOCTL_MFC_SET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type); + ALOGE("SsbSipMfcDecSetConfig] IOCTL_MFC_SET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type); return MFC_RET_DEC_SET_CONF_FAIL; } @@ -722,12 +722,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON #endif if (openHandle == NULL) { - LOGE("SsbSipMfcDecGetConfig] openHandle is NULL"); + ALOGE("SsbSipMfcDecGetConfig] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("SsbSipMfcDecGetConfig] value is NULL"); + ALOGE("SsbSipMfcDecGetConfig] value is NULL"); return MFC_RET_INVALID_PARAM; } @@ -740,7 +740,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON phys_addr_arg.args.get_phys_addr.u_addr = buf_addr->u_addr; r = ioctl(pCTX->hMFC, IOCTL_MFC_GET_PHYS_ADDR, &phys_addr_arg); if (r < 0) { - LOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_PHYS_ADDR failed"); + ALOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_PHYS_ADDR failed"); return MFC_API_FAIL; } buf_addr->p_addr = phys_addr_arg.args.get_phys_addr.p_addr; @@ -771,7 +771,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_CONFIG, &DecArg); if (DecArg.ret_code != MFC_OK) { - LOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type); + ALOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type); return MFC_RET_DEC_GET_CONF_FAIL; } @@ -793,7 +793,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_CONFIG, &DecArg); if (DecArg.ret_code != MFC_OK) { - LOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type); + ALOGE("SsbSipMfcDecGetConfig] IOCTL_MFC_GET_CONFIG failed(ret : %d, conf_type: 0x%08x)", DecArg.ret_code, conf_type); return MFC_RET_DEC_GET_CONF_FAIL; } crc_data->luma0 = DecArg.args.get_config.out_config_value[0]; @@ -801,7 +801,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON #endif break; default: - LOGE("SsbSipMfcDecGetConfig] No such conf_type is supported"); + ALOGE("SsbSipMfcDecGetConfig] No such conf_type is supported"); return MFC_RET_DEC_GET_CONF_FAIL; } diff --git a/exynos/multimedia/codecs/video/exynos4/mfc/enc/src/SsbSipMfcEncAPI.c b/exynos/multimedia/codecs/video/exynos4/mfc/enc/src/SsbSipMfcEncAPI.c index 797baad..92df6b0 100644 --- a/exynos/multimedia/codecs/video/exynos4/mfc/enc/src/SsbSipMfcEncAPI.c +++ b/exynos/multimedia/codecs/video/exynos4/mfc/enc/src/SsbSipMfcEncAPI.c @@ -30,9 +30,9 @@ #include "SsbSipMfcApi.h" #include <utils/Log.h> -/* #define LOG_NDEBUG 0 */ -#undef LOG_TAG -#define LOG_TAG "MFC_ENC_APP" +/* #define ALOG_NDEBUG 0 */ +#undef ALOG_TAG +#define ALOG_TAG "MFC_ENC_APP" #define _MFCLIB_MAGIC_NUMBER 0x92241001 @@ -51,31 +51,31 @@ void *SsbSipMfcEncOpen(void) int mapped_size; struct mfc_common_args CommonArg; - LOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); + ALOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); #if 0 if ((codecType != MPEG4_ENC) && (codecType != H264_ENC) && (codecType != H263_ENC)) { - LOGE("SsbSipMfcEncOpen] Undefined codec type"); + ALOGE("SsbSipMfcEncOpen] Undefined codec type"); return NULL; } #endif if (access(mfc_dev_name, F_OK) != 0) { - LOGE("SsbSipMfcEncOpen] MFC device node not exists"); + ALOGE("SsbSipMfcEncOpen] MFC device node not exists"); return NULL; } hMFCOpen = open(mfc_dev_name, O_RDWR | O_NDELAY); if (hMFCOpen < 0) { - LOGE("SsbSipMfcEncOpen] MFC Open failure"); + ALOGE("SsbSipMfcEncOpen] MFC Open failure"); return NULL; } pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB)); if (pCTX == NULL) { - LOGE("SsbSipMfcEncOpen] malloc failed."); + ALOGE("SsbSipMfcEncOpen] malloc failed."); close(hMFCOpen); return NULL; } @@ -83,7 +83,7 @@ void *SsbSipMfcEncOpen(void) mapped_size = ioctl(hMFCOpen, IOCTL_MFC_GET_MMAP_SIZE, &CommonArg); if ((mapped_size < 0) || (CommonArg.ret_code != MFC_OK)) { - LOGE("SsbSipMfcEncOpen] IOCTL_MFC_GET_MMAP_SIZE failed"); + ALOGE("SsbSipMfcEncOpen] IOCTL_MFC_GET_MMAP_SIZE failed"); free(pCTX); close(hMFCOpen); return NULL; @@ -91,7 +91,7 @@ void *SsbSipMfcEncOpen(void) mapped_addr = (unsigned int)mmap(0, mapped_size, PROT_READ | PROT_WRITE, MAP_SHARED, hMFCOpen, 0); if (!mapped_addr) { - LOGE("SsbSipMfcEncOpen] FIMV5.x driver address mapping failed"); + ALOGE("SsbSipMfcEncOpen] FIMV5.x driver address mapping failed"); free(pCTX); close(hMFCOpen); return NULL; @@ -116,31 +116,31 @@ void *SsbSipMfcEncOpenExt(void *value) int err; struct mfc_common_args CommonArg; - LOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); + ALOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); #if 0 if ((codecType != MPEG4_ENC) && (codecType != H264_ENC) && (codecType != H263_ENC)) { - LOGE("SsbSipMfcEncOpen] Undefined codec type"); + ALOGE("SsbSipMfcEncOpen] Undefined codec type"); return NULL; } #endif if (access(mfc_dev_name, F_OK) != 0) { - LOGE("SsbSipMfcEncOpenExt] MFC device node not exists"); + ALOGE("SsbSipMfcEncOpenExt] MFC device node not exists"); return NULL; } hMFCOpen = open(mfc_dev_name, O_RDWR | O_NDELAY); if (hMFCOpen < 0) { - LOGE("SsbSipMfcEncOpenExt] MFC Open failure"); + ALOGE("SsbSipMfcEncOpenExt] MFC Open failure"); return NULL; } pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB)); if (pCTX == NULL) { - LOGE("SsbSipMfcEncOpenExt] malloc failed."); + ALOGE("SsbSipMfcEncOpenExt] malloc failed."); close(hMFCOpen); return NULL; } @@ -150,7 +150,7 @@ void *SsbSipMfcEncOpenExt(void *value) err = ioctl(hMFCOpen, IOCTL_MFC_SET_BUF_CACHE, &CommonArg); if ((err < 0) || (CommonArg.ret_code != MFC_OK)) { - LOGE("SsbSipMfcEncOpenExt] IOCTL_MFC_SET_BUF_CACHE failed"); + ALOGE("SsbSipMfcEncOpenExt] IOCTL_MFC_SET_BUF_CACHE failed"); free(pCTX); close(hMFCOpen); return NULL; @@ -158,7 +158,7 @@ void *SsbSipMfcEncOpenExt(void *value) mapped_size = ioctl(hMFCOpen, IOCTL_MFC_GET_MMAP_SIZE, &CommonArg); if ((mapped_size < 0) || (CommonArg.ret_code != MFC_OK)) { - LOGE("SsbSipMfcEncOpenExt] IOCTL_MFC_GET_MMAP_SIZE failed"); + ALOGE("SsbSipMfcEncOpenExt] IOCTL_MFC_GET_MMAP_SIZE failed"); free(pCTX); close(hMFCOpen); return NULL; @@ -166,7 +166,7 @@ void *SsbSipMfcEncOpenExt(void *value) mapped_addr = (unsigned int)mmap(0, mapped_size, PROT_READ | PROT_WRITE, MAP_SHARED, hMFCOpen, 0); if (!mapped_addr) { - LOGE("SsbSipMfcEncOpenExt] FIMV5.x driver address mapping failed"); + ALOGE("SsbSipMfcEncOpenExt] FIMV5.x driver address mapping failed"); free(pCTX); close(hMFCOpen); return NULL; @@ -208,17 +208,17 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) if (h264_arg->codecType == H264_ENC) { pCTX->codecType = H264_ENC; } else { - LOGE("SsbSipMfcEncInit] Undefined codec type"); + ALOGE("SsbSipMfcEncInit] Undefined codec type"); return MFC_RET_INVALID_PARAM; } } } - LOGI("SsbSipMfcEncInit] Encode Init start"); + ALOGI("SsbSipMfcEncInit] Encode Init start"); switch (pCTX->codecType) { case MPEG4_ENC: - LOGI("SsbSipMfcEncInit] MPEG4 Encode"); + ALOGI("SsbSipMfcEncInit] MPEG4 Encode"); mpeg4_arg = (SSBSIP_MFC_ENC_MPEG4_PARAM *)param; pCTX->width = mpeg4_arg->SourceWidth; @@ -226,7 +226,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) break; case H263_ENC: - LOGI("SsbSipMfcEncInit] H263 Encode"); + ALOGI("SsbSipMfcEncInit] H263 Encode"); h263_arg = (SSBSIP_MFC_ENC_H263_PARAM *)param; pCTX->width = h263_arg->SourceWidth; @@ -234,7 +234,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) break; case H264_ENC: - LOGI("SsbSipMfcEncInit] H264 Encode"); + ALOGI("SsbSipMfcEncInit] H264 Encode"); h264_arg = (SSBSIP_MFC_ENC_H264_PARAM *)param; pCTX->width = h264_arg->SourceWidth; @@ -263,7 +263,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) /* rate control*/ EncArg.args.enc_init.cmn.in_rc_fr_en = mpeg4_arg->EnableFRMRateControl; if ((mpeg4_arg->QSCodeMin > 31) || (mpeg4_arg->QSCodeMax > 31)) { - LOGE("SsbSipMfcEncInit] No such Min/Max QP is supported"); + ALOGE("SsbSipMfcEncInit] No such Min/Max QP is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.cmn.in_rc_qbound_min = mpeg4_arg->QSCodeMin; @@ -273,7 +273,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) /* pad control */ EncArg.args.enc_init.cmn.in_pad_ctrl_on = mpeg4_arg->PadControlOn; if ((mpeg4_arg->LumaPadVal > 255) || (mpeg4_arg->CbPadVal > 255) || (mpeg4_arg->CrPadVal > 255)) { - LOGE("SsbSipMfcEncInit] No such Pad value is supported"); + ALOGE("SsbSipMfcEncInit] No such Pad value is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.cmn.in_y_pad_val = mpeg4_arg->LumaPadVal; @@ -285,7 +285,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init.cmn.in_rc_bitrate = mpeg4_arg->Bitrate; if ((mpeg4_arg->FrameQp > 31) || (mpeg4_arg->FrameQp_P > 31)) { - LOGE("SsbSipMfcEncInit] No such FrameQp is supported"); + ALOGE("SsbSipMfcEncInit] No such FrameQp is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.cmn.in_vop_quant = mpeg4_arg->FrameQp; @@ -296,13 +296,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init.codec.mpeg4.in_level = mpeg4_arg->LevelIDC; if (mpeg4_arg->FrameQp_B > 31) { - LOGE("SsbSipMfcEncInit] No such FrameQp is supported"); + ALOGE("SsbSipMfcEncInit] No such FrameQp is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.codec.mpeg4.in_vop_quant_b = mpeg4_arg->FrameQp_B; if (mpeg4_arg->NumberBFrames > 2) { - LOGE("SsbSipMfcEncInit] No such BframeNum is supported"); + ALOGE("SsbSipMfcEncInit] No such BframeNum is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.codec.mpeg4.in_bframenum = mpeg4_arg->NumberBFrames; @@ -331,7 +331,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) /* rate control*/ EncArg.args.enc_init.cmn.in_rc_fr_en = h263_arg->EnableFRMRateControl; if ((h263_arg->QSCodeMin > 31) || (h263_arg->QSCodeMax > 31)) { - LOGE("SsbSipMfcEncInit] No such Min/Max QP is supported"); + ALOGE("SsbSipMfcEncInit] No such Min/Max QP is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.cmn.in_rc_qbound_min = h263_arg->QSCodeMin; @@ -341,7 +341,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) /* pad control */ EncArg.args.enc_init.cmn.in_pad_ctrl_on = h263_arg->PadControlOn; if ((h263_arg->LumaPadVal > 255) || (h263_arg->CbPadVal > 255) || (h263_arg->CrPadVal > 255)) { - LOGE("SsbSipMfcEncInit] No such Pad value is supported"); + ALOGE("SsbSipMfcEncInit] No such Pad value is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.cmn.in_y_pad_val = h263_arg->LumaPadVal; @@ -353,7 +353,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init.cmn.in_rc_bitrate = h263_arg->Bitrate; if ((h263_arg->FrameQp > 31) || (h263_arg->FrameQp_P > 31)) { - LOGE("SsbSipMfcEncInit] No such FrameQp is supported"); + ALOGE("SsbSipMfcEncInit] No such FrameQp is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.cmn.in_vop_quant = h263_arg->FrameQp; @@ -377,7 +377,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) (h264_arg->SliceMode == 2)||(h264_arg->SliceMode == 4)) { EncArg.args.enc_init.cmn.in_ms_mode = h264_arg->SliceMode; } else { - LOGE("SsbSipMfcEncInit] No such slice mode is supported"); + ALOGE("SsbSipMfcEncInit] No such slice mode is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.cmn.in_ms_arg = h264_arg->SliceArgument; @@ -386,7 +386,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) /* pad control */ EncArg.args.enc_init.cmn.in_pad_ctrl_on = h264_arg->PadControlOn; if ((h264_arg->LumaPadVal > 255) || (h264_arg->CbPadVal > 255) || (h264_arg->CrPadVal > 255)) { - LOGE("SsbSipMfcEncInit] No such Pad value is supported"); + ALOGE("SsbSipMfcEncInit] No such Pad value is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.cmn.in_y_pad_val = h264_arg->LumaPadVal; @@ -400,14 +400,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init.cmn.in_rc_fr_en = h264_arg->EnableFRMRateControl; EncArg.args.enc_init.cmn.in_rc_bitrate = h264_arg->Bitrate; if ((h264_arg->FrameQp > 51) || (h264_arg->FrameQp_P > 51)) { - LOGE("SsbSipMfcEncInit] No such FrameQp is supported"); + ALOGE("SsbSipMfcEncInit] No such FrameQp is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.cmn.in_vop_quant = h264_arg->FrameQp; EncArg.args.enc_init.cmn.in_vop_quant_p = h264_arg->FrameQp_P; if ((h264_arg->QSCodeMin > 51) || (h264_arg->QSCodeMax > 51)) { - LOGE("SsbSipMfcEncInit] No such Min/Max QP is supported"); + ALOGE("SsbSipMfcEncInit] No such Min/Max QP is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.cmn.in_rc_qbound_min = h264_arg->QSCodeMin; @@ -420,13 +420,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init.codec.h264.in_level = h264_arg->LevelIDC; if (h264_arg->FrameQp_B > 51) { - LOGE("SsbSipMfcEncInit] No such FrameQp is supported"); + ALOGE("SsbSipMfcEncInit] No such FrameQp is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.codec.h264.in_vop_quant_b = h264_arg->FrameQp_B; if (h264_arg->NumberBFrames > 2) { - LOGE("SsbSipMfcEncInit] No such BframeNum is supported"); + ALOGE("SsbSipMfcEncInit] No such BframeNum is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.codec.h264.in_bframenum = h264_arg->NumberBFrames; @@ -434,7 +434,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init.codec.h264.in_interlace_mode = h264_arg->PictureInterlace; if ((h264_arg->NumberRefForPframes > 2)||(h264_arg->NumberReferenceFrames >2)) { - LOGE("SsbSipMfcEncInit] No such ref Num is supported"); + ALOGE("SsbSipMfcEncInit] No such ref Num is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.codec.h264.in_reference_num = h264_arg->NumberReferenceFrames; @@ -450,7 +450,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init.codec.h264.in_deblock_dis = h264_arg->LoopFilterDisable; if ((abs(h264_arg->LoopFilterAlphaC0Offset) > 6) || (abs(h264_arg->LoopFilterBetaOffset) > 6)) { - LOGE("SsbSipMfcEncInit] No such AlphaC0Offset or BetaOffset is supported"); + ALOGE("SsbSipMfcEncInit] No such AlphaC0Offset or BetaOffset is supported"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init.codec.h264.in_deblock_alpha_c0 = h264_arg->LoopFilterAlphaC0Offset; @@ -466,7 +466,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) break; default: - LOGE("SsbSipMfcEncInit] No such codec type is supported"); + ALOGE("SsbSipMfcEncInit] No such codec type is supported"); return MFC_RET_INVALID_PARAM; } @@ -474,7 +474,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_ENC_INIT, &EncArg); if (EncArg.ret_code != MFC_OK) { - LOGE("SsbSipMfcEncInit] IOCTL_MFC_ENC_INIT failed"); + ALOGE("SsbSipMfcEncInit] IOCTL_MFC_ENC_INIT failed"); return MFC_RET_ENC_INIT_FAIL; } @@ -498,7 +498,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) struct mfc_common_args EncArg; if (openHandle == NULL) { - LOGE("SsbSipMfcEncExe] openHandle is NULL"); + ALOGE("SsbSipMfcEncExe] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } @@ -524,7 +524,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_ENC_EXE, &EncArg); if (EncArg.ret_code != MFC_OK) { - LOGE("SsbSipMfcEncExe] IOCTL_MFC_ENC_EXE failed(ret : %d)", EncArg.ret_code); + ALOGE("SsbSipMfcEncExe] IOCTL_MFC_ENC_EXE failed(ret : %d)", EncArg.ret_code); return MFC_RET_ENC_EXE_ERR; } @@ -535,7 +535,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) pCTX->outframetagtop = EncArg.args.enc_exe.out_frametag_top; pCTX->outframetagbottom = EncArg.args.enc_exe.out_frametag_bottom; - LOGV("SsbSipMfcEncExe] Encode success =================="); + ALOGV("SsbSipMfcEncExe] Encode success =================="); return MFC_RET_OK; } @@ -547,7 +547,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle) struct mfc_common_args free_arg; if (openHandle == NULL) { - LOGE("SsbSipMfcEncClose] openHandle is NULL"); + ALOGE("SsbSipMfcEncClose] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } @@ -586,7 +586,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU int aligned_y_size, aligned_c_size; if (openHandle == NULL) { - LOGE("SsbSipMfcEncGetInBuf] openHandle is NULL"); + ALOGE("SsbSipMfcEncGetInBuf] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } @@ -606,7 +606,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU user_addr_arg.args.mem_alloc.mapped_addr = pCTX->mapped_addr; ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_IN_BUF, &user_addr_arg); if (ret_code < 0) { - LOGE("SsbSipMfcEncGetInBuf] IOCTL_MFC_GET_IN_BUF failed"); + ALOGE("SsbSipMfcEncGetInBuf] IOCTL_MFC_GET_IN_BUF failed"); return MFC_RET_ENC_GET_INBUF_FAIL; } @@ -616,7 +616,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU real_addr_arg.args.real_addr.key = user_addr_arg.args.mem_alloc.offset; ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_REAL_ADDR, &real_addr_arg); if (ret_code < 0) { - LOGE("SsbSipMfcEncGetInBuf] IOCTL_MFC_GET_REAL_ADDR failed"); + ALOGE("SsbSipMfcEncGetInBuf] IOCTL_MFC_GET_REAL_ADDR failed"); return MFC_RET_ENC_GET_INBUF_FAIL; } pCTX->phyFrmBuf.luma = real_addr_arg.args.real_addr.addr; @@ -643,11 +643,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU int aligned_y_size, aligned_c_size; if (openHandle == NULL) { - LOGE("SsbSipMfcEncSetInBuf] openHandle is NULL"); + ALOGE("SsbSipMfcEncSetInBuf] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } - LOGV("SsbSipMfcEncSetInBuf] input_info->YPhyAddr & input_info->CPhyAddr should be 64KB aligned"); + ALOGV("SsbSipMfcEncSetInBuf] input_info->YPhyAddr & input_info->CPhyAddr should be 64KB aligned"); pCTX = (_MFCLIB *) openHandle; @@ -673,7 +673,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcEncGetOutBuf] openHandle is NULL"); + ALOGE("SsbSipMfcEncGetOutBuf] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } @@ -705,7 +705,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetOutBuf(void *openHandle, void *phyOutbuf, v _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcEncSetOutBuf] openHandle is NULL"); + ALOGE("SsbSipMfcEncSetOutBuf] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } @@ -731,12 +731,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON #endif if (openHandle == NULL) { - LOGE("SsbSipMfcEncSetConfig] openHandle is NULL"); + ALOGE("SsbSipMfcEncSetConfig] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("SsbSipMfcEncSetConfig] value is NULL"); + ALOGE("SsbSipMfcEncSetConfig] value is NULL"); return MFC_RET_INVALID_PARAM; } @@ -787,7 +787,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON EncArg.args.config.args.basic.values[1] = 0; break; default: - LOGE("SsbSipMfcEncSetConfig] not supported type"); + ALOGE("SsbSipMfcEncSetConfig] not supported type"); return MFC_RET_ENC_SET_CONF_FAIL; } #else @@ -816,7 +816,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_SET_CONFIG, &EncArg); if (EncArg.ret_code != MFC_OK) { - LOGE("SsbSipMfcEncSetConfig] IOCTL_MFC_SET_CONFIG failed(ret : %d)", EncArg.ret_code); + ALOGE("SsbSipMfcEncSetConfig] IOCTL_MFC_SET_CONFIG failed(ret : %d)", EncArg.ret_code); return MFC_RET_ENC_SET_CONF_FAIL; } @@ -834,11 +834,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON pCTX = (_MFCLIB *)openHandle; if (openHandle == NULL) { - LOGE("SsbSipMfcEncGetConfig] openHandle is NULL"); + ALOGE("SsbSipMfcEncGetConfig] openHandle is NULL"); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("SsbSipMfcEncGetConfig] value is NULL"); + ALOGE("SsbSipMfcEncGetConfig] value is NULL"); return MFC_RET_INVALID_PARAM; } @@ -853,7 +853,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON break; #endif default: - LOGE("SsbSipMfcEncGetConfig] No such conf_type is supported."); + ALOGE("SsbSipMfcEncGetConfig] No such conf_type is supported."); return MFC_RET_INVALID_PARAM; } diff --git a/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c b/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c index 510a351..cad62e3 100644 --- a/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c +++ b/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c @@ -36,8 +36,8 @@ #include "mfc_interface.h" #include "SsbSipMfcApi.h" -/* #define LOG_NDEBUG 0 */ -#define LOG_TAG "MFC_DEC_APP" +/* #define ALOG_NDEBUG 0 */ +#define ALOG_TAG "MFC_DEC_APP" #include <utils/Log.h> #ifdef CONFIG_MFC_FPS @@ -83,20 +83,20 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng) while (1) { while (startCode != USR_DATA_START_CODE) { if ((startCode == VOP_START_CODE) || (leng_idx == Frameleng)) { - LOGI("[%s] VOP START Found !!.....return",__func__); - LOGW("[%s] Non Packed PB",__func__); + ALOGI("[%s] VOP START Found !!.....return",__func__); + ALOGW("[%s] Non Packed PB",__func__); return 0; } getAByte(strmBuffer, &startCode); - LOGV(">> StartCode = 0x%08x <<\n", startCode); + ALOGV(">> StartCode = 0x%08x <<\n", startCode); strmBuffer++; leng_idx++; } - LOGI("[%s] User Data Found !!",__func__); + ALOGI("[%s] User Data Found !!",__func__); do { if (*strmBuffer == 'p') { - LOGW("[%s] Packed PB",__func__); + ALOGW("[%s] Packed PB",__func__); return 1; } getAByte(strmBuffer, &startCode); @@ -107,7 +107,7 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng) break; } - LOGW("[%s] Non Packed PB",__func__); + ALOGW("[%s] Non Packed PB",__func__); return 0; } @@ -143,7 +143,7 @@ void *SsbSipMfcDecOpen(void) struct v4l2_buffer buf; struct v4l2_plane planes[MFC_DEC_NUM_PLANES]; - LOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); + ALOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); #ifdef CONFIG_MFC_FPS framecount = 0; over30ms = 0; @@ -151,23 +151,23 @@ void *SsbSipMfcDecOpen(void) #endif pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB)); if (pCTX == NULL) { - LOGE("[%s] malloc failed.",__func__); + ALOGE("[%s] malloc failed.",__func__); return NULL; } memset(pCTX, 0, sizeof(_MFCLIB)); getMFCName(mfc_dev_name, 64); - LOGI("[%s] dev name is %s",__func__,mfc_dev_name); + ALOGI("[%s] dev name is %s",__func__,mfc_dev_name); if (access(mfc_dev_name, F_OK) != 0) { - LOGE("[%s] MFC device node not exists",__func__); + ALOGE("[%s] MFC device node not exists",__func__); goto error_case1; } hMFCOpen = open(mfc_dev_name, O_RDWR|O_NONBLOCK, 0); if (hMFCOpen < 0) { - LOGE("[%s] Failed to open MFC device",__func__); + ALOGE("[%s] Failed to open MFC device",__func__); goto error_case1; } @@ -176,22 +176,22 @@ void *SsbSipMfcDecOpen(void) memset(&cap, 0, sizeof(cap)); ret = ioctl(pCTX->hMFC, VIDIOC_QUERYCAP, &cap); if (ret != 0) { - LOGE("[%s] VIDIOC_QUERYCAP failed",__func__); + ALOGE("[%s] VIDIOC_QUERYCAP failed",__func__); goto error_case2; } if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { - LOGE("[%s] Device does not support capture",__func__); + ALOGE("[%s] Device does not support capture",__func__); goto error_case2; } if (!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) { - LOGE("[%s] Device does not support output",__func__); + ALOGE("[%s] Device does not support output",__func__); goto error_case2; } if (!(cap.capabilities & V4L2_CAP_STREAMING)) { - LOGE("[%s] Device does not support streaming",__func__); + ALOGE("[%s] Device does not support streaming",__func__); goto error_case2; } @@ -203,7 +203,7 @@ void *SsbSipMfcDecOpen(void) ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt); if (ret != 0) { - LOGE("[%s] S_FMT failed",__func__); + ALOGE("[%s] S_FMT failed",__func__); goto error_case2; } @@ -216,7 +216,7 @@ void *SsbSipMfcDecOpen(void) ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_REQBUFS failed",__func__); + ALOGE("[%s] VIDIOC_REQBUFS failed",__func__); goto error_case2; } @@ -232,14 +232,14 @@ void *SsbSipMfcDecOpen(void) ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &buf); if (ret != 0) { - LOGE("[%s] VIDIOC_QUERYBUF failed",__func__); + ALOGE("[%s] VIDIOC_QUERYBUF failed",__func__); goto error_case3; } pCTX->v4l2_dec.mfc_src_bufs[i] = mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset); if (pCTX->v4l2_dec.mfc_src_bufs[i] == MAP_FAILED) { - LOGE("[%s] mmap failed (%d)",__func__,i); + ALOGE("[%s] mmap failed (%d)",__func__,i); goto error_case3; } } @@ -284,10 +284,10 @@ void *SsbSipMfcDecOpenExt(void *value) if (NO_CACHE == (*(SSBIP_MFC_BUFFER_TYPE *)value)) { pCTX->cacheablebuffer = NO_CACHE; - LOGI("[%s] non cacheable buffer",__func__); + ALOGI("[%s] non cacheable buffer",__func__); } else { pCTX->cacheablebuffer = CACHE; - LOGI("[%s] cacheable buffer",__func__); + ALOGI("[%s] cacheable buffer",__func__); } return (void *)pCTX; @@ -300,14 +300,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle) enum v4l2_buf_type type; #ifdef CONFIG_MFC_FPS - LOGI(">>> MFC"); + ALOGI(">>> MFC"); gettimeofday(&mTS2, NULL); - LOGI(">>> time=%d", mTS2.tv_sec-mTS1.tv_sec); - LOGI(">>> framecount=%d", framecount); - LOGI(">>> 30ms over=%d", over30ms); + ALOGI(">>> time=%d", mTS2.tv_sec-mTS1.tv_sec); + ALOGI(">>> framecount=%d", framecount); + ALOGI(">>> 30ms over=%d", over30ms); #endif if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -317,7 +317,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle) type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; ret = ioctl(pCTX->hMFC, VIDIOC_STREAMOFF, &type); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__); return MFC_RET_CLOSE_FAIL; } pCTX->inter_buff_status &= ~(MFC_USE_DST_STREAMON); @@ -327,7 +327,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle) type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; ret = ioctl(pCTX->hMFC, VIDIOC_STREAMOFF, &type); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__); return MFC_RET_CLOSE_FAIL; } pCTX->inter_buff_status &= ~(MFC_USE_SRC_STREAMON); @@ -371,7 +371,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c enum v4l2_buf_type type; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -423,7 +423,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_VC1_RCV; break; default: - LOGE("[%s] Does NOT support the standard (%d)",__func__,pCTX->codecType); + ALOGE("[%s] Does NOT support the standard (%d)",__func__,pCTX->codecType); ret = MFC_RET_INVALID_PARAM; goto error_case1; } @@ -433,7 +433,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt); if (ret != 0) { - LOGE("[%s] S_FMT failed",__func__); + ALOGE("[%s] S_FMT failed",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -449,7 +449,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -460,7 +460,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c // on OUTPUT queue ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMON failed",__func__); + ALOGE("[%s] VIDIOC_STREAMON failed",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -471,7 +471,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = ioctl(pCTX->hMFC, VIDIOC_G_FMT, &fmt); if (ret != 0) { - LOGE("[%s] VIDIOC_G_FMT failed",__func__); + ALOGE("[%s] VIDIOC_G_FMT failed",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -489,7 +489,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = ioctl(pCTX->hMFC, VIDIOC_G_CROP, &crop); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CROP failed",__func__); + ALOGE("[%s] VIDIOC_G_CROP failed",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -506,7 +506,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed",__func__); + ALOGE("[%s] VIDIOC_G_CTRL failed",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -522,7 +522,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__); + ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -534,7 +534,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_REQBUFS failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_REQBUFS failed (destination buffers)",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -551,7 +551,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QUERYBUF failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_QUERYBUF failed (destination buffers)",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -566,7 +566,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, qbuf.m.planes[0].m.mem_offset); if (pCTX->v4l2_dec.mfc_dst_bufs[i][0] == MAP_FAILED) { - LOGE("[%s] mmap failed (destination buffers (Y))",__func__); + ALOGE("[%s] mmap failed (destination buffers (Y))",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case2; } @@ -574,14 +574,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c pCTX->v4l2_dec.mfc_dst_bufs[i][1] = mmap(NULL, qbuf.m.planes[1].length, PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, qbuf.m.planes[1].m.mem_offset); if (pCTX->v4l2_dec.mfc_dst_bufs[i][1] == MAP_FAILED) { - LOGE("[%s] mmap failed (destination buffers (UV))",__func__); + ALOGE("[%s] mmap failed (destination buffers (UV))",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case2; } ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case2; } @@ -591,7 +591,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -603,7 +603,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = ioctl(pCTX->hMFC, VIDIOC_DQBUF, &qbuf); if(ret != 0) { - LOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -634,12 +634,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) framecount++; #endif if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) { - LOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill); + ALOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill); return MFC_RET_INVALID_PARAM; } @@ -665,7 +665,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_DEC_EXE_ERR; } @@ -687,10 +687,10 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) break; } } else if (poll_events.revents & POLLERR) { /* POLLERR */ - LOGE("[%s] POLLERR\n",__func__); + ALOGE("[%s] POLLERR\n",__func__); return MFC_RET_DEC_EXE_ERR; } else { - LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); + ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); return MFC_RET_DEC_EXE_ERR; } } else if (0 > poll_state) { @@ -737,7 +737,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_DEC_EXE_ERR; } @@ -824,12 +824,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill) framecount++; #endif if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) { - LOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill); + ALOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill); return MFC_RET_INVALID_PARAM; } @@ -847,7 +847,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill) ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_DEC_EXE_ERR; } } else if(pCTX->v4l2_dec.bBeingFinalized == 0) { @@ -862,7 +862,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill) ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_DEC_EXE_ERR; } } @@ -910,10 +910,10 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecWaitForOutBuf(void *openHandle, SSBSIP_ break; } } else if (poll_events.revents & POLLERR) { /* POLLERR */ - LOGE("[%s] POLLERR\n",__func__); + ALOGE("[%s] POLLERR\n",__func__); return MFC_GETOUTBUF_STATUS_NULL; } else { - LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); + ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); return MFC_GETOUTBUF_STATUS_NULL; } } else if (0 > poll_state) { @@ -1023,12 +1023,12 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi int i; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return NULL; } if ((inputBufferSize < 0) || (inputBufferSize > MAX_DECODER_INPUT_BUFFER_SIZE)) { - LOGE("[%s] inputBufferSize = %d is invalid",__func__, inputBufferSize); + ALOGE("[%s] inputBufferSize = %d is invalid",__func__, inputBufferSize); return NULL; } @@ -1039,7 +1039,7 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi break; if (i == MFC_DEC_NUM_SRC_BUFS) { - LOGV("[%s] No buffer is available.",__func__); + ALOGV("[%s] No buffer is available.",__func__); return NULL; } else { pCTX->virStrmBuf = (unsigned int)pCTX->v4l2_dec.mfc_src_bufs[i]; @@ -1056,9 +1056,9 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi _MFCLIB *pCTX; int i; - LOGV("[%s] Enter",__func__); + ALOGV("[%s] Enter",__func__); if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -1069,14 +1069,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi break; if (i == MFC_DEC_NUM_SRC_BUFS) { - LOGE("[%s] Can not use the buffer",__func__); + ALOGE("[%s] Can not use the buffer",__func__); return MFC_RET_INVALID_PARAM; } else { pCTX->virStrmBuf = (unsigned int)virInBuf; pCTX->v4l2_dec.beingUsedIndex = i; pCTX->v4l2_dec.mfc_src_buf_flags[i] = BUF_ENQUEUED; } - LOGV("[%s] Exit idx %d",__func__,pCTX->v4l2_dec.beingUsedIndex); + ALOGV("[%s] Exit idx %d",__func__,pCTX->v4l2_dec.beingUsedIndex); return MFC_RET_OK; } @@ -1086,7 +1086,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecGetOutBuf(void *openHandle, SSBSIP_MFC_ _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_GETOUTBUF_DISPLAY_END; } @@ -1118,13 +1118,13 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecGetOutBuf(void *openHandle, SSBSIP_MFC_ #ifdef SSB_UMP ret = ump_secure_id_get_from_vaddr(pCTX->decOutInfo.YVirAddr, &output_info->y_cookie); if (ret) { - LOGV("[%s] fail to get secure id(%d) from vaddr(%x)\n",__func__, \ + ALOGV("[%s] fail to get secure id(%d) from vaddr(%x)\n",__func__, \ output_info->y_cookie, pCTX->decOutInfo.YVirAddr); } ret = ump_secure_id_get_from_vaddr(pCTX->decOutInfo.CVirAddr, &output_info->c_cookie); if (ret) { - LOGV("[%s] fail to get secure id(%d) from vaddr(%x)\n",__func__, \ + ALOGV("[%s] fail to get secure id(%d) from vaddr(%x)\n",__func__, \ output_info->c_cookie, pCTX->decOutInfo.CVirAddr); } break; @@ -1153,12 +1153,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON enum v4l2_buf_type type; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } if ((value == NULL) && (MFC_DEC_SETCONF_IS_LAST_FRAME !=conf_type)) { - LOGE("[%s] value is NULL",__func__); + ALOGE("[%s] value is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -1172,8 +1172,8 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON case MFC_DEC_SETCONF_FIMV1_WIDTH_HEIGHT: /* be set before calling SsbSipMfcDecInit */ fimv1_res = (struct mfc_dec_fimv1_info *)value; - LOGI("fimv1->width = %d\n", fimv1_res->width); - LOGI("fimv1->height = %d\n", fimv1_res->height); + ALOGI("fimv1->width = %d\n", fimv1_res->width); + ALOGI("fimv1->height = %d\n", fimv1_res->height); pCTX->fimv1_res.width = (int)(fimv1_res->width); pCTX->fimv1_res.height = (int)(fimv1_res->height); return MFC_RET_OK; @@ -1190,7 +1190,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; ret = ioctl(pCTX->hMFC, VIDIOC_STREAMOFF, &type); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__); return MFC_RET_DEC_SET_CONF_FAIL; } pCTX->inter_buff_status &= ~(MFC_USE_DST_STREAMON); @@ -1206,7 +1206,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); return MFC_RET_DEC_SET_CONF_FAIL; } } @@ -1214,7 +1214,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__); return MFC_RET_DEC_SET_CONF_FAIL; } pCTX->inter_buff_status |= MFC_USE_DST_STREAMON; @@ -1253,13 +1253,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON break; default: - LOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type); + ALOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type); return MFC_RET_INVALID_PARAM; } ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type); + ALOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type); return MFC_RET_DEC_SET_CONF_FAIL; } @@ -1277,12 +1277,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON struct v4l2_control ctrl; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("[%s] value is NULL",__func__); + ALOGE("[%s] value is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -1305,7 +1305,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_LUMA",__func__); + ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_LUMA",__func__); return MFC_RET_DEC_GET_CONF_FAIL; } crc_data->luma0 = ctrl.value; @@ -1315,13 +1315,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_CHROMA",__func__); + ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_CHROMA",__func__); return MFC_RET_DEC_GET_CONF_FAIL; } crc_data->chroma0 = ctrl.value; - LOGI("[%s] crc_data->luma0=%d",__func__,ctrl.value); - LOGI("[%s] crc_data->chroma0=%d",__func__,ctrl.value); + ALOGI("[%s] crc_data->luma0=%d",__func__,ctrl.value); + ALOGI("[%s] crc_data->chroma0=%d",__func__,ctrl.value); break; case MFC_DEC_GETCONF_FRAME_TAG: @@ -1344,7 +1344,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON break; default: - LOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type); + ALOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type); return MFC_RET_INVALID_PARAM; } diff --git a/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c b/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c index 45888c6..d35e153 100644 --- a/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c +++ b/exynos/multimedia/codecs/video/exynos4/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c @@ -31,8 +31,8 @@ #include "mfc_interface.h" #include "SsbSipMfcApi.h" -/* #define LOG_NDEBUG 0 */ -#define LOG_TAG "MFC_ENC_APP" +/* #define ALOG_NDEBUG 0 */ +#define ALOG_TAG "MFC_ENC_APP" #include <utils/Log.h> #define POLL_ENC_WAIT_TIMEOUT 25 @@ -71,22 +71,22 @@ void *SsbSipMfcEncOpen(void) struct v4l2_capability cap; getMFCName(mfc_dev_name, 64); - LOGI("[%s] dev name is %s\n",__func__,mfc_dev_name); + ALOGI("[%s] dev name is %s\n",__func__,mfc_dev_name); if (access(mfc_dev_name, F_OK) != 0) { - LOGE("[%s] MFC device node not exists",__func__); + ALOGE("[%s] MFC device node not exists",__func__); return NULL; } hMFCOpen = open(mfc_dev_name, O_RDWR | O_NONBLOCK, 0); if (hMFCOpen < 0) { - LOGE("[%s] Failed to open MFC device",__func__); + ALOGE("[%s] Failed to open MFC device",__func__); return NULL; } pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB)); if (pCTX == NULL) { - LOGE("[%s] malloc failed.",__func__); + ALOGE("[%s] malloc failed.",__func__); return NULL; } memset(pCTX, 0, sizeof(_MFCLIB)); @@ -96,28 +96,28 @@ void *SsbSipMfcEncOpen(void) memset(&cap, 0, sizeof(cap)); ret = ioctl(pCTX->hMFC, VIDIOC_QUERYCAP, &cap); if (ret != 0) { - LOGE("[%s] VIDIOC_QUERYCAP failed",__func__); + ALOGE("[%s] VIDIOC_QUERYCAP failed",__func__); close(pCTX->hMFC); free(pCTX); return NULL; } if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { - LOGE("[%s] Device does not support capture",__func__); + ALOGE("[%s] Device does not support capture",__func__); close(pCTX->hMFC); free(pCTX); return NULL; } if (!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) { - LOGE("[%s] Device does not support output",__func__); + ALOGE("[%s] Device does not support output",__func__); close(pCTX->hMFC); free(pCTX); return NULL; } if (!(cap.capabilities & V4L2_CAP_STREAMING)) { - LOGE("[%s] Device does not support streaming",__func__); + ALOGE("[%s] Device does not support streaming",__func__); close(pCTX->hMFC); free(pCTX); return NULL; @@ -144,13 +144,13 @@ void *SsbSipMfcEncOpenExt(void *value) pCTX->cacheablebuffer = NO_CACHE; /* physical address is used for Input source */ pCTX->v4l2_enc.bInputPhyVir = 1; - LOGI("[%s] non cacheable buffer",__func__); + ALOGI("[%s] non cacheable buffer",__func__); } else { pCTX->cacheablebuffer = CACHE; /* vitual address is used for Input source */ pCTX->v4l2_enc.bInputPhyVir = 0; - LOGI("[%s] cacheable buffer",__func__); + ALOGI("[%s] cacheable buffer",__func__); } return (void *)pCTX; @@ -162,7 +162,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle) int i; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -240,7 +240,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) pCTX->height = h264_arg->SourceHeight; pCTX->framemap = h264_arg->FrameMap; } else { - LOGE("[%s] Undefined codec type \n",__func__); + ALOGE("[%s] Undefined codec type \n",__func__); ret = MFC_RET_INVALID_PARAM; goto error_case1; } @@ -526,7 +526,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) break; default: - LOGE("[%s] Undefined codec type",__func__); + ALOGE("[%s] Undefined codec type",__func__); ret = MFC_RET_INVALID_PARAM; goto error_case1; } @@ -545,7 +545,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_S_EXT_CTRLS, &ext_ctrls); if (ret != 0) { - LOGE("[%s] Failed to set extended controls",__func__); + ALOGE("[%s] Failed to set extended controls",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case1; } @@ -575,7 +575,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt); if (ret != 0) { - LOGE("[%s] S_FMT failed on MFC output stream",__func__); + ALOGE("[%s] S_FMT failed on MFC output stream",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case1; } @@ -594,7 +594,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_H263; break; default: - LOGE("[%s] Codec has not been recognised",__func__); + ALOGE("[%s] Codec has not been recognised",__func__); return MFC_RET_ENC_INIT_FAIL; } @@ -603,7 +603,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt); if (ret != 0) { - LOGE("[%s] S_FMT failed on MFC output stream",__func__); + ALOGE("[%s] S_FMT failed on MFC output stream",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case1; } @@ -617,7 +617,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__); + ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case1; } @@ -633,7 +633,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf); if (ret != 0) { - LOGE("[%s] Reqbufs src ioctl failed",__func__); + ALOGE("[%s] Reqbufs src ioctl failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case1; } @@ -651,7 +651,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &buf); if (ret != 0) { - LOGE("[%s] Querybuf src ioctl failed",__func__); + ALOGE("[%s] Querybuf src ioctl failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case2; } @@ -666,7 +666,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset); if (pCTX->v4l2_enc.mfc_src_bufs[i][0] == MAP_FAILED) { - LOGE("[%s] Mmap on src buffer (0) failed",__func__); + ALOGE("[%s] Mmap on src buffer (0) failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case2; } @@ -676,13 +676,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) MAP_SHARED, pCTX->hMFC, buf.m.planes[1].m.mem_offset); if (pCTX->v4l2_enc.mfc_src_bufs[i][1] == MAP_FAILED) { munmap(pCTX->v4l2_enc.mfc_src_bufs[i][0], pCTX->v4l2_enc.mfc_src_bufs_len[0]); - LOGE("[%s] Mmap on src buffer (1) failed",__func__); + ALOGE("[%s] Mmap on src buffer (1) failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case2; } } } else - LOGV("[%s] Camera Phys src buf %d",__func__,reqbuf.count); + ALOGV("[%s] Camera Phys src buf %d",__func__,reqbuf.count); for (i = 0; i<pCTX->v4l2_enc.mfc_num_src_bufs; i++) pCTX->v4l2_enc.mfc_src_buf_flags[i] = BUF_DEQUEUED; @@ -701,7 +701,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf); if (ret != 0) { - LOGE("[%s] Reqbufs dst ioctl failed",__func__); + ALOGE("[%s] Reqbufs dst ioctl failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case2; } @@ -718,7 +718,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &buf); if (ret != 0) { - LOGE("[%s] Querybuf dst ioctl failed",__func__); + ALOGE("[%s] Querybuf dst ioctl failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } @@ -728,14 +728,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset); if (pCTX->v4l2_enc.mfc_dst_bufs[i] == MAP_FAILED) { - LOGE("[%s] Mmap on dst buffer failed",__func__); + ALOGE("[%s] Mmap on dst buffer failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &buf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } @@ -748,7 +748,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type); if (ret != 0) { - LOGE("[%s] V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, VIDIOC_STREAMON failed",__func__); + ALOGE("[%s] V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, VIDIOC_STREAMON failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } @@ -773,11 +773,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) if (ret == 0) break; } else if(poll_events.revents & POLLERR) { /*POLLERR */ - LOGE("[%s] POLLERR\n",__func__); + ALOGE("[%s] POLLERR\n",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } else { - LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); + ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } @@ -801,11 +801,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &buf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } - LOGV("[%s] Strm out idx %d",__func__,index); + ALOGV("[%s] Strm out idx %d",__func__,index); return MFC_RET_OK; error_case3: @@ -830,7 +830,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU int i; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -857,7 +857,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU break; if (i == pCTX->v4l2_enc.mfc_num_src_bufs) { - LOGV("[%s] No buffer is available.",__func__); + ALOGV("[%s] No buffer is available.",__func__); return MFC_RET_ENC_GET_INBUF_FAIL; } else { /* FIXME check this for correct physical address */ @@ -871,7 +871,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU pCTX->v4l2_enc.mfc_src_buf_flags[i] = BUF_ENQUEUED; } } - LOGV("[%s] Input Buffer idx %d",__func__,i); + ALOGV("[%s] Input Buffer idx %d",__func__,i); return MFC_RET_OK; } @@ -884,7 +884,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU int ret,i; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -906,14 +906,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU MFC dqbuf() */ pCTX->v4l2_enc.beingUsedIndex++; pCTX->v4l2_enc.beingUsedIndex %= MFC_ENC_NUM_SRC_BUFS; - LOGV("[%s] Phy Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex); + ALOGV("[%s] Phy Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex); } else { for (i = 0; i < pCTX->v4l2_enc.mfc_num_src_bufs; i++) if (pCTX->v4l2_enc.mfc_src_bufs[i][0] == input_info->YVirAddr) break; if (i == pCTX->v4l2_enc.mfc_num_src_bufs) { - LOGE("[%s] Can not use the buffer",__func__); + ALOGE("[%s] Can not use the buffer",__func__); return MFC_RET_INVALID_PARAM; } else { pCTX->v4l2_enc.beingUsedIndex = i; @@ -923,7 +923,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU qbuf.index = pCTX->v4l2_enc.beingUsedIndex; planes[0].bytesused = pCTX->width * pCTX->height; planes[1].bytesused = (pCTX->width * pCTX->height) >> 1; - LOGV("[%s] Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex); + ALOGV("[%s] Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex); } qbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; @@ -932,7 +932,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_ENC_SET_INBUF_FAIL; } @@ -944,7 +944,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -970,7 +970,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetOutBuf(void *openHandle, void *phyOutbuf, void *virOutbuf, int outputBufferSize) { if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -993,9 +993,9 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) struct pollfd poll_events; int poll_state; - LOGV("[%s] Enter \n",__func__); + ALOGV("[%s] Enter \n",__func__); if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -1006,7 +1006,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__); + ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__); return MFC_RET_ENC_EXE_ERR; } @@ -1014,7 +1014,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMON failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_STREAMON failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_ENC_EXE_ERR; } @@ -1041,14 +1041,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) if (ret == 0) break; } else if (poll_events.revents & POLLERR) { /* POLLERR */ - LOGE("[%s] POLLERR\n",__func__); + ALOGE("[%s] POLLERR\n",__func__); return MFC_RET_ENC_EXE_ERR; } else { - LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); + ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); return MFC_RET_ENC_EXE_ERR; } } else if (0 > poll_state) { - LOGE("[%s] poll() Encoder POLL Timeout 0x%x\n",__func__, poll_events.revents); + ALOGE("[%s] poll() Encoder POLL Timeout 0x%x\n",__func__, poll_events.revents); return MFC_RET_ENC_EXE_ERR; } loopcnt++; @@ -1057,7 +1057,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) if (pCTX->v4l2_enc.bRunning != 0) { pCTX->encodedframeType = (qbuf.flags & 0x18) >> 3; /* encoded frame type */ - LOGV("[%s] encoded frame type = %d\n",__func__, pCTX->encodedframeType); + ALOGV("[%s] encoded frame type = %d\n",__func__, pCTX->encodedframeType); switch (pCTX->encodedframeType) { case 1: pCTX->encodedframeType = MFC_FRAME_TYPE_I_FRAME; @@ -1069,7 +1069,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) pCTX->encodedframeType = MFC_FRAME_TYPE_B_FRAME; break; default: - LOGE("[%s] VIDIOC_DQBUF failed, encoded frame type is wrong",__func__); + ALOGE("[%s] VIDIOC_DQBUF failed, encoded frame type is wrong",__func__); } } @@ -1084,7 +1084,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__); + ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__); return MFC_RET_ENC_EXE_ERR; } @@ -1099,7 +1099,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); return MFC_RET_ENC_EXE_ERR; } @@ -1114,7 +1114,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) ret = ioctl(pCTX->hMFC, VIDIOC_DQBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_ENC_EXE_ERR; } } @@ -1122,7 +1122,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) /* Update context stream buffer address */ pCTX->virStrmBuf = pCTX->v4l2_enc.mfc_dst_bufs[dequeued_index]; - LOGV("[%s] Strm out idx %d",__func__,dequeued_index); + ALOGV("[%s] Strm out idx %d",__func__,dequeued_index); return MFC_RET_OK; } @@ -1132,12 +1132,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("[%s] value is NULL\n",__func__); + ALOGE("[%s] value is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -1168,7 +1168,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON case MFC_ENC_SETCONF_I_PERIOD: #endif default: - LOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type); + ALOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type); return MFC_RET_INVALID_PARAM; } @@ -1182,12 +1182,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON pCTX = (_MFCLIB *) openHandle; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("[%s] value is NULL\n",__func__); + ALOGE("[%s] value is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -1197,7 +1197,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON break; default: - LOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type); + ALOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type); return MFC_RET_INVALID_PARAM; } diff --git a/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c b/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c index cfb5dcc..d09a553 100644 --- a/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c +++ b/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/dec/src/SsbSipMfcDecAPI.c @@ -39,8 +39,8 @@ #include "ion.h" #endif -/* #define LOG_NDEBUG 0 */ -#define LOG_TAG "MFC_DEC_APP" +/* #define ALOG_NDEBUG 0 */ +#define ALOG_TAG "MFC_DEC_APP" #include <utils/Log.h> #ifdef CONFIG_MFC_FPS @@ -85,22 +85,22 @@ int v4l2_mfc_querycap(int fd) ret = ioctl(fd, VIDIOC_QUERYCAP, &cap); if (ret != 0) { - LOGE("[%s] VIDIOC_QUERYCAP failed", __func__); + ALOGE("[%s] VIDIOC_QUERYCAP failed", __func__); return ret; } if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { - LOGE("[%s] Device does not support capture", __func__); + ALOGE("[%s] Device does not support capture", __func__); return -1; } if (!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) { - LOGE("[%s] Device does not support output", __func__); + ALOGE("[%s] Device does not support output", __func__); return -1; } if (!(cap.capabilities & V4L2_CAP_STREAMING)) { - LOGE("[%s] Device does not support streaming", __func__); + ALOGE("[%s] Device does not support streaming", __func__); return -1; } @@ -158,7 +158,7 @@ int v4l2_mfc_s_fmt(int fd, enum v4l2_buf_type type, fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_VP8; break; default: - LOGE("[%s] Does NOT support the codec type (%d)", __func__, pixelformat); + ALOGE("[%s] Does NOT support the codec type (%d)", __func__, pixelformat); return -1; } fmt.fmt.pix_mp.plane_fmt[0].sizeimage = sizeimage; @@ -174,11 +174,11 @@ int v4l2_mfc_s_fmt(int fd, enum v4l2_buf_type type, fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV21M; break; default: - LOGE("[%s] Does NOT support the pixel format (%d)", __func__, pixelformat); + ALOGE("[%s] Does NOT support the pixel format (%d)", __func__, pixelformat); return -1; } } else { - LOGE("[%s] Wrong buffer type", __func__); + ALOGE("[%s] Wrong buffer type", __func__); return -1; } @@ -377,20 +377,20 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng) while (1) { while (startCode != USR_DATA_START_CODE) { if ((startCode == VOP_START_CODE) || (leng_idx == Frameleng)) { - LOGI("[%s] VOP START Found !!.....return",__func__); - LOGW("[%s] Non Packed PB",__func__); + ALOGI("[%s] VOP START Found !!.....return",__func__); + ALOGW("[%s] Non Packed PB",__func__); return 0; } getAByte(strmBuffer, &startCode); - LOGV(">> StartCode = 0x%08x <<\n", startCode); + ALOGV(">> StartCode = 0x%08x <<\n", startCode); strmBuffer++; leng_idx++; } - LOGI("[%s] User Data Found !!",__func__); + ALOGI("[%s] User Data Found !!",__func__); do { if (*strmBuffer == 'p') { - LOGW("[%s] Packed PB",__func__); + ALOGW("[%s] Packed PB",__func__); return 1; } getAByte(strmBuffer, &startCode); @@ -401,7 +401,7 @@ static int isPBPacked(_MFCLIB *pCtx, int Frameleng) break; } - LOGW("[%s] Non Packed PB",__func__); + ALOGW("[%s] Non Packed PB",__func__); return 0; } @@ -434,7 +434,7 @@ void *SsbSipMfcDecOpen(void) struct v4l2_buffer buf; struct v4l2_plane planes[MFC_DEC_NUM_PLANES]; - LOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); + ALOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); #ifdef CONFIG_MFC_FPS framecount = 0; @@ -444,23 +444,23 @@ void *SsbSipMfcDecOpen(void) pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB)); if (pCTX == NULL) { - LOGE("[%s] malloc failed.",__func__); + ALOGE("[%s] malloc failed.",__func__); return NULL; } memset(pCTX, 0, sizeof(_MFCLIB)); getMFCName(mfc_dev_name, 64); - LOGI("[%s] dev name is %s",__func__,mfc_dev_name); + ALOGI("[%s] dev name is %s",__func__,mfc_dev_name); if (access(mfc_dev_name, F_OK) != 0) { - LOGE("[%s] MFC device node not exists",__func__); + ALOGE("[%s] MFC device node not exists",__func__); goto error_case1; } hMFCOpen = open(mfc_dev_name, O_RDWR|O_NONBLOCK, 0); if (hMFCOpen < 0) { - LOGE("[%s] Failed to open MFC device",__func__); + ALOGE("[%s] Failed to open MFC device",__func__); goto error_case1; } @@ -468,7 +468,7 @@ void *SsbSipMfcDecOpen(void) ret = v4l2_mfc_querycap(pCTX->hMFC); if (ret != 0) { - LOGE("[%s] QUERYCAP failed", __func__); + ALOGE("[%s] QUERYCAP failed", __func__); goto error_case2; } @@ -476,7 +476,7 @@ void *SsbSipMfcDecOpen(void) ret = v4l2_mfc_s_fmt(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, H264_DEC, MAX_DECODER_INPUT_BUFFER_SIZE, 0, 0); if (ret != 0) { - LOGE("[%s] S_FMT failed",__func__); + ALOGE("[%s] S_FMT failed",__func__); goto error_case2; } @@ -486,7 +486,7 @@ void *SsbSipMfcDecOpen(void) ret = v4l2_mfc_reqbufs(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_MMAP, &req_count); if (ret != 0) { - LOGE("[%s] VIDIOC_REQBUFS failed",__func__); + ALOGE("[%s] VIDIOC_REQBUFS failed",__func__); goto error_case2; } @@ -496,14 +496,14 @@ void *SsbSipMfcDecOpen(void) ret = v4l2_mfc_querybuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_MMAP, i, planes); if (ret != 0) { - LOGE("[%s] VIDIOC_QUERYBUF failed",__func__); + ALOGE("[%s] VIDIOC_QUERYBUF failed",__func__); goto error_case3; } pCTX->v4l2_dec.mfc_src_bufs[i] = mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset); if (pCTX->v4l2_dec.mfc_src_bufs[i] == MAP_FAILED) { - LOGE("[%s] mmap failed (%d)",__func__,i); + ALOGE("[%s] mmap failed (%d)",__func__,i); goto error_case3; } } @@ -546,10 +546,10 @@ void *SsbSipMfcDecOpenExt(void *value) if (NO_CACHE == (*(SSBIP_MFC_BUFFER_TYPE *)value)) { pCTX->cacheablebuffer = NO_CACHE; - LOGI("[%s] non cacheable buffer",__func__); + ALOGI("[%s] non cacheable buffer",__func__); } else { pCTX->cacheablebuffer = CACHE; - LOGI("[%s] cacheable buffer",__func__); + ALOGI("[%s] cacheable buffer",__func__); } return (void *)pCTX; @@ -561,15 +561,15 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle) _MFCLIB *pCTX; #ifdef CONFIG_MFC_FPS - LOGI(">>> MFC"); + ALOGI(">>> MFC"); gettimeofday(&mTS2, NULL); - LOGI(">>> time=%d", mTS2.tv_sec-mTS1.tv_sec); - LOGI(">>> framecount=%d", framecount); - LOGI(">>> 30ms over=%d", over30ms); + ALOGI(">>> time=%d", mTS2.tv_sec-mTS1.tv_sec); + ALOGI(">>> framecount=%d", framecount); + ALOGI(">>> 30ms over=%d", over30ms); #endif if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -578,7 +578,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle) if (pCTX->inter_buff_status & MFC_USE_DST_STREAMON) { ret = v4l2_mfc_streamoff(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__); return MFC_RET_CLOSE_FAIL; } pCTX->inter_buff_status &= ~(MFC_USE_DST_STREAMON); @@ -587,7 +587,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle) if (pCTX->inter_buff_status & MFC_USE_SRC_STREAMON) { ret = v4l2_mfc_streamoff(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__); return MFC_RET_CLOSE_FAIL; } pCTX->inter_buff_status &= ~(MFC_USE_SRC_STREAMON); @@ -631,7 +631,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c int poll_state, poll_revents; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -654,7 +654,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = v4l2_mfc_s_fmt(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, pCTX->codecType, MAX_DECODER_INPUT_BUFFER_SIZE, width, height); if (ret != 0) { - LOGE("[%s] S_FMT failed", __func__); + ALOGE("[%s] S_FMT failed", __func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -663,7 +663,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = v4l2_mfc_s_fmt(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, NV12MT_FMT, 0, width, height); if (ret != 0) { - LOGE("[%s] S_FMT failed",__func__); + ALOGE("[%s] S_FMT failed",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -672,7 +672,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c if (packedPB) { ret = v4l2_mfc_s_ctrl(pCTX->hMFC, V4L2_CID_CODEC_PACKED_PB, 1); if (ret != 0) { - LOGE("[%s] VIDIOC_S_CTRL failed of PACKED_PB\n", __func__); + ALOGE("[%s] VIDIOC_S_CTRL failed of PACKED_PB\n", __func__); return MFC_RET_DEC_SET_CONF_FAIL; } } @@ -680,7 +680,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_MMAP, pCTX->v4l2_dec.beingUsedIndex, planes, Frameleng); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -689,7 +689,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c on OUTPUT queue */ ret = v4l2_mfc_streamon(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMON failed",__func__); + ALOGE("[%s] VIDIOC_STREAMON failed",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -707,7 +707,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = v4l2_mfc_s_ctrl(pCTX->hMFC, V4L2_CID_CACHEABLE, ctrl_value); if (ret != 0) { - LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE", __func__); + ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE", __func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -715,7 +715,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c #ifdef USE_ION pCTX->ion_fd = ion_client_create(); if (pCTX->ion_fd < 3) { - LOGE("[%s] Failed to get ion_fd : %d", __func__, pCTX->ion_fd); + ALOGE("[%s] Failed to get ion_fd : %d", __func__, pCTX->ion_fd); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -727,7 +727,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret = v4l2_mfc_streamon(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMON failed (destination buffers)", __func__); + ALOGE("[%s] VIDIOC_STREAMON failed (destination buffers)", __func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -741,10 +741,10 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c if (ret == 0) break; } else if (poll_revents & POLLERR) { - LOGE("[%s] POLLERR\n", __func__); + ALOGE("[%s] POLLERR\n", __func__); return MFC_GETOUTBUF_STATUS_NULL; } else { - LOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents); + ALOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents); return MFC_GETOUTBUF_STATUS_NULL; } } else if (poll_state < 0) { @@ -772,7 +772,7 @@ int read_header_data(void *openHandle) ret = v4l2_mfc_g_fmt(pCTX->hMFC, &fmt, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); if (ret != 0) { - LOGE("[%s] VIDIOC_G_FMT failed",__func__); + ALOGE("[%s] VIDIOC_G_FMT failed",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case; } @@ -787,7 +787,7 @@ int read_header_data(void *openHandle) ret = v4l2_mfc_g_crop(pCTX->hMFC, &crop, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CROP failed",__func__); + ALOGE("[%s] VIDIOC_G_CROP failed",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case; } @@ -801,14 +801,14 @@ int read_header_data(void *openHandle) ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_REQ_NUM_BUFS, &ctrl_value); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed",__func__); + ALOGE("[%s] VIDIOC_G_CTRL failed",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case; } pCTX->v4l2_dec.mfc_num_dst_bufs = ctrl_value + pCTX->dec_numextradpb; - LOGV("[%s] Num of allocated buffers: %d\n",__func__, pCTX->v4l2_dec.mfc_num_dst_bufs); + ALOGV("[%s] Num of allocated buffers: %d\n",__func__, pCTX->v4l2_dec.mfc_num_dst_bufs); return 0; @@ -829,7 +829,7 @@ int init_mfc_output_stream(void *openHandle) ret = v4l2_mfc_reqbufs(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, V4L2_MEMORY_MMAP, (int *)&pCTX->v4l2_dec.mfc_num_dst_bufs); if (ret != 0) { - LOGE("[%s] VIDIOC_REQBUFS failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_REQBUFS failed (destination buffers)",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -838,7 +838,7 @@ int init_mfc_output_stream(void *openHandle) ret = v4l2_mfc_querybuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, V4L2_MEMORY_MMAP, i, planes); if (ret != 0) { - LOGE("[%s] VIDIOC_QUERYBUF failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_QUERYBUF failed (destination buffers)",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case1; } @@ -864,7 +864,7 @@ int init_mfc_output_stream(void *openHandle) pCTX->v4l2_dec.mfc_dst_bufs[i][0] = mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset); if (pCTX->v4l2_dec.mfc_dst_bufs[i][0] == MAP_FAILED) { - LOGE("[%s] mmap failed (destination buffers (Y))",__func__); + ALOGE("[%s] mmap failed (destination buffers (Y))",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case2; } @@ -872,7 +872,7 @@ int init_mfc_output_stream(void *openHandle) pCTX->v4l2_dec.mfc_dst_bufs[i][1] = mmap(NULL, buf.m.planes[1].length, PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[1].m.mem_offset); if (pCTX->v4l2_dec.mfc_dst_bufs[i][1] == MAP_FAILED) { - LOGE("[%s] mmap failed (destination buffers (UV))",__func__); + ALOGE("[%s] mmap failed (destination buffers (UV))",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case2; } @@ -881,7 +881,7 @@ int init_mfc_output_stream(void *openHandle) ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, V4L2_MEMORY_MMAP, i, planes, 0); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); ret = MFC_RET_DEC_INIT_FAIL; goto error_case2; } @@ -954,12 +954,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) framecount++; #endif if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) { - LOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill); + ALOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill); return MFC_RET_INVALID_PARAM; } @@ -973,7 +973,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_MMAP, pCTX->v4l2_dec.beingUsedIndex, planes, lengthBufFill); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_DEC_EXE_ERR; } @@ -996,10 +996,10 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) break; } } else if (poll_revents & POLLERR) { - LOGE("[%s] POLLERR\n",__func__); + ALOGE("[%s] POLLERR\n",__func__); return MFC_RET_DEC_EXE_ERR; } else { - LOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents); + ALOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents); return MFC_RET_DEC_EXE_ERR; } } else if (poll_state < 0) { @@ -1019,7 +1019,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) } else { ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_DISPLAY_STATUS, &ctrl_value); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed", __func__); + ALOGE("[%s] VIDIOC_G_CTRL failed", __func__); return MFC_RET_DEC_GET_CONF_FAIL; } @@ -1060,7 +1060,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_MMAP, pCTX->v4l2_dec.beingUsedIndex, planes, 0); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_DEC_EXE_ERR; } @@ -1072,7 +1072,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) usleep(1000); loop_count++; if (loop_count >= 1000) { - LOGE("[%s] Error in do-while loop",__func__); + ALOGE("[%s] Error in do-while loop",__func__); break; } } while (ret != 0); @@ -1092,7 +1092,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) usleep(1000); loop_count++; if (loop_count >= 1000) { - LOGE("[%s] Error in do-while loop",__func__); + ALOGE("[%s] Error in do-while loop",__func__); break; } } while (ret != 0); @@ -1151,12 +1151,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill) framecount++; #endif if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) { - LOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill); + ALOGE("[%s] lengthBufFill is invalid. (lengthBufFill=%d)",__func__, lengthBufFill); return MFC_RET_INVALID_PARAM; } @@ -1167,7 +1167,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill) ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_MMAP, pCTX->v4l2_dec.beingUsedIndex, planes, lengthBufFill); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_DEC_EXE_ERR; } } else if (pCTX->v4l2_dec.bBeingFinalized == 0) { @@ -1175,7 +1175,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExeNb(void *openHandle, int lengthBufFill) ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_MMAP, pCTX->v4l2_dec.beingUsedIndex, planes, 0); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_DEC_EXE_ERR; } } @@ -1198,15 +1198,15 @@ int isBreak_loop(void *openHandle) ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_CHECK_STATE, &ctrl_value); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed", __func__); + ALOGE("[%s] VIDIOC_G_CTRL failed", __func__); return 0; } if (ctrl_value == MFCSTATE_DEC_RES_DETECT) { - LOGV("[%s] Resolution Change detect",__func__); + ALOGV("[%s] Resolution Change detect",__func__); return 1; } else if (ctrl_value == MFCSTATE_DEC_TERMINATING) { - LOGV("[%s] Decoding Finish!!!",__func__); + ALOGV("[%s] Decoding Finish!!!",__func__); return 1; } @@ -1243,10 +1243,10 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecWaitForOutBuf(void *openHandle, SSBSIP_ break; } } else if (poll_revents & POLLERR) { - LOGE("[%s] POLLERR\n",__func__); + ALOGE("[%s] POLLERR\n",__func__); return MFC_GETOUTBUF_STATUS_NULL; } else { - LOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents); + ALOGE("[%s] poll() returns 0x%x\n", __func__, poll_revents); return MFC_GETOUTBUF_STATUS_NULL; } } else if (poll_state < 0) { @@ -1266,7 +1266,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecWaitForOutBuf(void *openHandle, SSBSIP_ } else { ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_DISPLAY_STATUS, &ctrl_value); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed", __func__); + ALOGE("[%s] VIDIOC_G_CTRL failed", __func__); return MFC_RET_DEC_GET_CONF_FAIL; } @@ -1310,7 +1310,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecWaitForOutBuf(void *openHandle, SSBSIP_ usleep(1000); loop_count++; if (loop_count >= 1000) { - LOGE("[%s] Error in do-while loop",__func__); + ALOGE("[%s] Error in do-while loop",__func__); break; } } while (ret != 0); @@ -1330,7 +1330,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecWaitForOutBuf(void *openHandle, SSBSIP_ usleep(1000); loop_count++; if (loop_count >= 1000) { - LOGE("[%s] Error in do-while loop",__func__); + ALOGE("[%s] Error in do-while loop",__func__); break; } } while (ret != 0); @@ -1379,12 +1379,12 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi int i; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return NULL; } if ((inputBufferSize < 0) || (inputBufferSize > MAX_DECODER_INPUT_BUFFER_SIZE)) { - LOGE("[%s] inputBufferSize = %d is invalid",__func__, inputBufferSize); + ALOGE("[%s] inputBufferSize = %d is invalid",__func__, inputBufferSize); return NULL; } @@ -1395,7 +1395,7 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSi break; if (i == MFC_DEC_NUM_SRC_BUFS) { - LOGV("[%s] No buffer is available.",__func__); + ALOGV("[%s] No buffer is available.",__func__); return NULL; } else { pCTX->virStrmBuf = (unsigned int)pCTX->v4l2_dec.mfc_src_bufs[i]; @@ -1413,9 +1413,9 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi _MFCLIB *pCTX; int i; - LOGV("[%s] Enter",__func__); + ALOGV("[%s] Enter",__func__); if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -1427,14 +1427,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi } if (i == MFC_DEC_NUM_SRC_BUFS) { - LOGE("[%s] Can not use the buffer",__func__); + ALOGE("[%s] Can not use the buffer",__func__); return MFC_RET_INVALID_PARAM; } else { pCTX->virStrmBuf = (unsigned int)virInBuf; pCTX->v4l2_dec.beingUsedIndex = i; pCTX->v4l2_dec.mfc_src_buf_flags[i] = BUF_ENQUEUED; } - LOGV("[%s] Exit idx %d",__func__,pCTX->v4l2_dec.beingUsedIndex); + ALOGV("[%s] Exit idx %d",__func__,pCTX->v4l2_dec.beingUsedIndex); return MFC_RET_OK; } @@ -1443,7 +1443,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecGetOutBuf(void *openHandle, SSBSIP_MFC_ _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_GETOUTBUF_DISPLAY_END; } @@ -1495,12 +1495,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON int id, ctrl_value; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } if ((value == NULL) && (MFC_DEC_SETCONF_IS_LAST_FRAME !=conf_type)) { - LOGE("[%s] value is NULL",__func__); + ALOGE("[%s] value is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -1514,8 +1514,8 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON case MFC_DEC_SETCONF_FIMV1_WIDTH_HEIGHT: /* be set before calling SsbSipMfcDecInit */ fimv1_res = (struct mfc_dec_fimv1_info *)value; - LOGI("fimv1->width = %d\n", fimv1_res->width); - LOGI("fimv1->height = %d\n", fimv1_res->height); + ALOGI("fimv1->width = %d\n", fimv1_res->width); + ALOGI("fimv1->height = %d\n", fimv1_res->height); pCTX->fimv1_res.width = (int)(fimv1_res->width); pCTX->fimv1_res.height = (int)(fimv1_res->height); return MFC_RET_OK; @@ -1531,7 +1531,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON case MFC_DEC_SETCONF_DPB_FLUSH: ret = v4l2_mfc_streamoff(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__); return MFC_RET_DEC_SET_CONF_FAIL; } pCTX->inter_buff_status &= ~(MFC_USE_DST_STREAMON); @@ -1540,14 +1540,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON ret = v4l2_mfc_qbuf(pCTX->hMFC, &buf, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, V4L2_MEMORY_MMAP, i, planes, 0); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); return MFC_RET_DEC_SET_CONF_FAIL; } } ret = v4l2_mfc_streamon(pCTX->hMFC, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMON failed (destination buffers)",__func__); return MFC_RET_DEC_SET_CONF_FAIL; } pCTX->inter_buff_status |= MFC_USE_DST_STREAMON; @@ -1585,13 +1585,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON break; default: - LOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type); + ALOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type); return MFC_RET_INVALID_PARAM; } ret = v4l2_mfc_s_ctrl(pCTX->hMFC, id, ctrl_value); if (ret != 0) { - LOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type); + ALOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type); return MFC_RET_DEC_SET_CONF_FAIL; } @@ -1608,12 +1608,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON SSBSIP_MFC_CROP_INFORMATION *crop_information; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("[%s] value is NULL",__func__); + ALOGE("[%s] value is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -1631,7 +1631,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON case MFC_DEC_GETCONF_FRAME_TAG: ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_FRAME_TAG, (int*)value); if (ret != 0) - LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG", __func__); + ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG", __func__); break; case MFC_DEC_GETCONF_CRC_DATA: @@ -1639,17 +1639,17 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_CRC_DATA_LUMA, &crc_data->luma0); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_LUMA",__func__); + ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_LUMA",__func__); return MFC_RET_DEC_GET_CONF_FAIL; } ret = v4l2_mfc_g_ctrl(pCTX->hMFC, V4L2_CID_CODEC_CRC_DATA_CHROMA, &crc_data->chroma0); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_CHROMA",__func__); + ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_CRC_DATA_CHROMA",__func__); return MFC_RET_DEC_GET_CONF_FAIL; } - LOGI("[%s] crc_data->luma0=0x%x\n", __func__, crc_data->luma0); - LOGI("[%s] crc_data->chroma0=0x%x\n", __func__, crc_data->chroma0); + ALOGI("[%s] crc_data->luma0=0x%x\n", __func__, crc_data->luma0); + ALOGI("[%s] crc_data->chroma0=0x%x\n", __func__, crc_data->chroma0); break; case MFC_DEC_GETCONF_CROP_INFO: @@ -1661,7 +1661,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON break; default: - LOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type); + ALOGE("[%s] conf_type(%d) is NOT supported",__func__, conf_type); return MFC_RET_INVALID_PARAM; } diff --git a/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c b/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c index a4a841f..b444fd2 100644 --- a/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c +++ b/exynos/multimedia/codecs/video/exynos5/mfc_v4l2/enc/src/SsbSipMfcEncAPI.c @@ -31,8 +31,8 @@ #include "mfc_interface.h" #include "SsbSipMfcApi.h" -/* #define LOG_NDEBUG 0 */ -#define LOG_TAG "MFC_ENC_APP" +/* #define ALOG_NDEBUG 0 */ +#define ALOG_TAG "MFC_ENC_APP" #include <utils/Log.h> #define POLL_ENC_WAIT_TIMEOUT 25 @@ -70,24 +70,24 @@ void *SsbSipMfcEncOpen(void) int ret; struct v4l2_capability cap; - LOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); + ALOGI("[%s] MFC Library Ver %d.%02d",__func__, MFC_LIB_VER_MAJOR, MFC_LIB_VER_MINOR); getMFCName(mfc_dev_name, 64); - LOGI("[%s] dev name is %s\n",__func__,mfc_dev_name); + ALOGI("[%s] dev name is %s\n",__func__,mfc_dev_name); if (access(mfc_dev_name, F_OK) != 0) { - LOGE("[%s] MFC device node not exists",__func__); + ALOGE("[%s] MFC device node not exists",__func__); return NULL; } hMFCOpen = open(mfc_dev_name, O_RDWR | O_NONBLOCK, 0); if (hMFCOpen < 0) { - LOGE("[%s] Failed to open MFC device",__func__); + ALOGE("[%s] Failed to open MFC device",__func__); return NULL; } pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB)); if (pCTX == NULL) { - LOGE("[%s] malloc failed.",__func__); + ALOGE("[%s] malloc failed.",__func__); return NULL; } memset(pCTX, 0, sizeof(_MFCLIB)); @@ -97,28 +97,28 @@ void *SsbSipMfcEncOpen(void) memset(&cap, 0, sizeof(cap)); ret = ioctl(pCTX->hMFC, VIDIOC_QUERYCAP, &cap); if (ret != 0) { - LOGE("[%s] VIDIOC_QUERYCAP failed",__func__); + ALOGE("[%s] VIDIOC_QUERYCAP failed",__func__); close(pCTX->hMFC); free(pCTX); return NULL; } if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { - LOGE("[%s] Device does not support capture",__func__); + ALOGE("[%s] Device does not support capture",__func__); close(pCTX->hMFC); free(pCTX); return NULL; } if (!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) { - LOGE("[%s] Device does not support output",__func__); + ALOGE("[%s] Device does not support output",__func__); close(pCTX->hMFC); free(pCTX); return NULL; } if (!(cap.capabilities & V4L2_CAP_STREAMING)) { - LOGE("[%s] Device does not support streaming",__func__); + ALOGE("[%s] Device does not support streaming",__func__); close(pCTX->hMFC); free(pCTX); return NULL; @@ -145,13 +145,13 @@ void *SsbSipMfcEncOpenExt(void *value) pCTX->cacheablebuffer = NO_CACHE; /* physical address is used for Input source */ pCTX->v4l2_enc.bInputPhyVir = 1; - LOGI("[%s] non cacheable buffer",__func__); + ALOGI("[%s] non cacheable buffer",__func__); } else { pCTX->cacheablebuffer = CACHE; /* vitual address is used for Input source */ pCTX->v4l2_enc.bInputPhyVir = 0; - LOGI("[%s] cacheable buffer",__func__); + ALOGI("[%s] cacheable buffer",__func__); } return (void *)pCTX; @@ -165,7 +165,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle) enum v4l2_buf_type type; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL",__func__); + ALOGE("[%s] openHandle is NULL",__func__); return MFC_RET_INVALID_PARAM; } @@ -175,7 +175,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle) type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; ret = ioctl(pCTX->hMFC, VIDIOC_STREAMOFF, &type); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMOFF failed (destination buffers)",__func__); return MFC_RET_CLOSE_FAIL; } pCTX->inter_buff_status &= ~(MFC_USE_DST_STREAMON); @@ -185,7 +185,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle) type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; ret = ioctl(pCTX->hMFC, VIDIOC_STREAMOFF, &type); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__); + ALOGE("[%s] VIDIOC_STREAMOFF failed (source buffers)",__func__); return MFC_RET_CLOSE_FAIL; } pCTX->inter_buff_status &= ~(MFC_USE_SRC_STREAMON); @@ -263,7 +263,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) pCTX->height = h264_arg->SourceHeight; pCTX->framemap = h264_arg->FrameMap; } else { - LOGE("[%s] Undefined codec type \n",__func__); + ALOGE("[%s] Undefined codec type \n",__func__); ret = MFC_RET_INVALID_PARAM; goto error_case1; } @@ -574,7 +574,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) break; default: - LOGE("[%s] Undefined codec type",__func__); + ALOGE("[%s] Undefined codec type",__func__); ret = MFC_RET_INVALID_PARAM; goto error_case1; } @@ -593,7 +593,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_S_EXT_CTRLS, &ext_ctrls); if (ret != 0) { - LOGE("[%s] Failed to set extended controls",__func__); + ALOGE("[%s] Failed to set extended controls",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case1; } @@ -630,7 +630,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) #endif ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt); if (ret != 0) { - LOGE("[%s] S_FMT failed on MFC output stream",__func__); + ALOGE("[%s] S_FMT failed on MFC output stream",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case1; } @@ -649,7 +649,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) fmt.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_H263; break; default: - LOGE("[%s] Codec has not been recognised",__func__); + ALOGE("[%s] Codec has not been recognised",__func__); return MFC_RET_ENC_INIT_FAIL; } @@ -658,7 +658,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_S_FMT, &fmt); if (ret != 0) { - LOGE("[%s] S_FMT failed on MFC output stream",__func__); + ALOGE("[%s] S_FMT failed on MFC output stream",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case1; } @@ -672,7 +672,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__); + ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CACHEABLE",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case1; } @@ -688,7 +688,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf); if (ret != 0) { - LOGE("[%s] Reqbufs src ioctl failed",__func__); + ALOGE("[%s] Reqbufs src ioctl failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case1; } @@ -706,7 +706,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &buf); if (ret != 0) { - LOGE("[%s] Querybuf src ioctl failed",__func__); + ALOGE("[%s] Querybuf src ioctl failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case2; } @@ -721,7 +721,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset); if (pCTX->v4l2_enc.mfc_src_bufs[i][0] == MAP_FAILED) { - LOGE("[%s] Mmap on src buffer (0) failed",__func__); + ALOGE("[%s] Mmap on src buffer (0) failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case2; } @@ -731,13 +731,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) MAP_SHARED, pCTX->hMFC, buf.m.planes[1].m.mem_offset); if (pCTX->v4l2_enc.mfc_src_bufs[i][1] == MAP_FAILED) { munmap(pCTX->v4l2_enc.mfc_src_bufs[i][0], pCTX->v4l2_enc.mfc_src_bufs_len[0]); - LOGE("[%s] Mmap on src buffer (1) failed",__func__); + ALOGE("[%s] Mmap on src buffer (1) failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case2; } } } else - LOGV("[%s] Camera Phys src buf %d",__func__,reqbuf.count); + ALOGV("[%s] Camera Phys src buf %d",__func__,reqbuf.count); for (i = 0; i < pCTX->v4l2_enc.mfc_num_src_bufs; i++) pCTX->v4l2_enc.mfc_src_buf_flags[i] = BUF_DEQUEUED; @@ -756,7 +756,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_REQBUFS, &reqbuf); if (ret != 0) { - LOGE("[%s] Reqbufs dst ioctl failed",__func__); + ALOGE("[%s] Reqbufs dst ioctl failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case2; } @@ -773,7 +773,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_QUERYBUF, &buf); if (ret != 0) { - LOGE("[%s] Querybuf dst ioctl failed",__func__); + ALOGE("[%s] Querybuf dst ioctl failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } @@ -783,14 +783,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) mmap(NULL, buf.m.planes[0].length, PROT_READ | PROT_WRITE, MAP_SHARED, pCTX->hMFC, buf.m.planes[0].m.mem_offset); if (pCTX->v4l2_enc.mfc_dst_bufs[i] == MAP_FAILED) { - LOGE("[%s] Mmap on dst buffer failed",__func__); + ALOGE("[%s] Mmap on dst buffer failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &buf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } @@ -803,7 +803,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type); if (ret != 0) { - LOGE("[%s] V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, VIDIOC_STREAMON failed",__func__); + ALOGE("[%s] V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, VIDIOC_STREAMON failed",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } @@ -830,11 +830,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) if (ret == 0) break; } else if (poll_events.revents & POLLERR) { /*POLLERR */ - LOGE("[%s] POLLERR\n",__func__); + ALOGE("[%s] POLLERR\n",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } else { - LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); + ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } @@ -858,11 +858,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &buf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); ret = MFC_RET_ENC_INIT_FAIL; goto error_case3; } - LOGV("[%s] Strm out idx %d",__func__,index); + ALOGV("[%s] Strm out idx %d",__func__,index); return MFC_RET_OK; error_case3: @@ -887,7 +887,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU int i; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -916,7 +916,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU break; if (i == pCTX->v4l2_enc.mfc_num_src_bufs) { - LOGV("[%s] No buffer is available.",__func__); + ALOGV("[%s] No buffer is available.",__func__); return MFC_RET_ENC_GET_INBUF_FAIL; } else { input_info->YPhyAddr = (void*)pCTX->v4l2_enc.mfc_src_phys[i][0]; @@ -929,7 +929,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU pCTX->v4l2_enc.mfc_src_buf_flags[i] = BUF_ENQUEUED; } } - LOGV("[%s] Input Buffer idx %d",__func__,i); + ALOGV("[%s] Input Buffer idx %d",__func__,i); return MFC_RET_OK; } @@ -942,7 +942,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU int ret,i; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -964,14 +964,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU MFC dqbuf() */ pCTX->v4l2_enc.beingUsedIndex++; pCTX->v4l2_enc.beingUsedIndex %= MFC_ENC_NUM_SRC_BUFS; - LOGV("[%s] Phy Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex); + ALOGV("[%s] Phy Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex); } else { for (i = 0; i < pCTX->v4l2_enc.mfc_num_src_bufs; i++) if (pCTX->v4l2_enc.mfc_src_bufs[i][0] == input_info->YVirAddr) break; if (i == pCTX->v4l2_enc.mfc_num_src_bufs) { - LOGE("[%s] Can not use the buffer",__func__); + ALOGE("[%s] Can not use the buffer",__func__); return MFC_RET_INVALID_PARAM; } else { pCTX->v4l2_enc.beingUsedIndex = i; @@ -981,7 +981,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU qbuf.index = pCTX->v4l2_enc.beingUsedIndex; planes[0].bytesused = pCTX->width * pCTX->height; planes[1].bytesused = (pCTX->width * pCTX->height) >> 1; - LOGV("[%s] Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex); + ALOGV("[%s] Input Buffer idx Queued %d",__func__,pCTX->v4l2_enc.beingUsedIndex); } qbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; @@ -990,7 +990,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_ENC_SET_INBUF_FAIL; } @@ -1005,7 +1005,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT int ret; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -1022,14 +1022,14 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT ctrl.value = 0; ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl); if (ret != 0) - LOGE("[%s] Error to do g_ctrl",__func__); + ALOGE("[%s] Error to do g_ctrl",__func__); encoded_y_addr = (unsigned int)ctrl.value; ctrl.id = V4L2_CID_CODEC_ENCODED_CHROMA_ADDR; ctrl.value = 0; ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl); if (ret != 0) - LOGE("[%s] Error to do g_ctrl",__func__); + ALOGE("[%s] Error to do g_ctrl",__func__); encoded_c_addr = (unsigned int)ctrl.value; output_info->headerSize = pCTX->encodedHeaderSize; @@ -1045,7 +1045,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetOutBuf(void *openHandle, void *phyOutbuf, void *virOutbuf, int outputBufferSize) { if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -1068,9 +1068,9 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) struct pollfd poll_events; int poll_state; - LOGV("[%s] Enter \n",__func__); + ALOGV("[%s] Enter \n",__func__); if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -1081,7 +1081,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__); + ALOGE("[%s] VIDIOC_S_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__); return MFC_RET_ENC_EXE_ERR; } @@ -1089,7 +1089,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; ret = ioctl(pCTX->hMFC, VIDIOC_STREAMON, &type); if (ret != 0) { - LOGE("[%s] VIDIOC_STREAMON failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_STREAMON failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_ENC_EXE_ERR; } @@ -1118,20 +1118,20 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) if (ret == 0) break; } else if (poll_events.revents & POLLERR) { /* POLLERR */ - LOGE("[%s] POLLERR\n",__func__); + ALOGE("[%s] POLLERR\n",__func__); return MFC_RET_ENC_EXE_ERR; } else { - LOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); + ALOGE("[%s] poll() returns 0x%x\n",__func__, poll_events.revents); return MFC_RET_ENC_EXE_ERR; } } else if (0 > poll_state) { - LOGE("[%s] poll() Encoder POLL Timeout 0x%x\n",__func__, poll_events.revents); + ALOGE("[%s] poll() Encoder POLL Timeout 0x%x\n",__func__, poll_events.revents); return MFC_RET_ENC_EXE_ERR; } else { /* in the case of B frame encoding */ ctrl.id = V4L2_CID_CODEC_CHECK_STATE; ctrl.value = 0; ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl); - LOGV("[%s] ctx state = %d\n",__func__, ctrl.value); + ALOGV("[%s] ctx state = %d\n",__func__, ctrl.value); if (ctrl.value == MFCSTATE_ENC_NO_OUTPUT) return MFC_RET_OK; } @@ -1140,7 +1140,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) if (pCTX->v4l2_enc.bRunning != 0) { pCTX->encodedframeType = (qbuf.flags & 0x38) >> 3; /* encoded frame type */ - LOGV("[%s] encoded frame type = %d\n", __func__, pCTX->encodedframeType); + ALOGV("[%s] encoded frame type = %d\n", __func__, pCTX->encodedframeType); switch (pCTX->encodedframeType) { case 1: @@ -1153,7 +1153,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) pCTX->encodedframeType = MFC_FRAME_TYPE_B_FRAME; break; default: - LOGE("[%s] VIDIOC_DQBUF failed, encoded frame type is wrong",__func__); + ALOGE("[%s] VIDIOC_DQBUF failed, encoded frame type is wrong",__func__); } } @@ -1168,7 +1168,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) ret = ioctl(pCTX->hMFC, VIDIOC_G_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__); + ALOGE("[%s] VIDIOC_G_CTRL failed, V4L2_CID_CODEC_FRAME_TAG",__func__); return MFC_RET_ENC_EXE_ERR; } @@ -1183,7 +1183,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) ret = ioctl(pCTX->hMFC, VIDIOC_QBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); + ALOGE("[%s] VIDIOC_QBUF failed, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE",__func__); return MFC_RET_ENC_EXE_ERR; } @@ -1198,7 +1198,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) ret = ioctl(pCTX->hMFC, VIDIOC_DQBUF, &qbuf); if (ret != 0) { - LOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); + ALOGE("[%s] VIDIOC_DQBUF failed, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE",__func__); return MFC_RET_ENC_EXE_ERR; } } @@ -1206,7 +1206,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) /* Update context stream buffer address */ pCTX->virStrmBuf = pCTX->v4l2_enc.mfc_dst_bufs[dequeued_index]; - LOGV("[%s] Strm out idx %d",__func__,dequeued_index); + ALOGV("[%s] Strm out idx %d",__func__,dequeued_index); return MFC_RET_OK; } @@ -1219,12 +1219,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON int ret; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("[%s] value is NULL\n",__func__); + ALOGE("[%s] value is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -1274,13 +1274,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON return MFC_RET_OK; default: - LOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type); + ALOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type); return MFC_RET_INVALID_PARAM; } ret = ioctl(pCTX->hMFC, VIDIOC_S_CTRL, &ctrl); if (ret != 0) { - LOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type); + ALOGE("[%s] VIDIOC_S_CTRL failed (conf_type = %d)",__func__, conf_type); return MFC_RET_ENC_SET_CONF_FAIL; } @@ -1294,12 +1294,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON pCTX = (_MFCLIB *) openHandle; if (openHandle == NULL) { - LOGE("[%s] openHandle is NULL\n",__func__); + ALOGE("[%s] openHandle is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("[%s] value is NULL\n",__func__); + ALOGE("[%s] value is NULL\n",__func__); return MFC_RET_INVALID_PARAM; } @@ -1309,7 +1309,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON break; default: - LOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type); + ALOGE("[%s] conf_type(%d) is NOT supported\n",__func__, conf_type); return MFC_RET_INVALID_PARAM; } diff --git a/exynos/multimedia/libstagefrighthw/Android.mk b/exynos/multimedia/libstagefrighthw/Android.mk index ce7a5e7..242e609 100644 --- a/exynos/multimedia/libstagefrighthw/Android.mk +++ b/exynos/multimedia/libstagefrighthw/Android.mk @@ -7,7 +7,7 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS += $(PV_CFLAGS_MINUS_VISIBILITY) LOCAL_C_INCLUDES:= \ - $(TOP)/frameworks/base/include/media/stagefright/openmax \ + $(TOP)/frameworks/native/include/media/openmax \ LOCAL_SHARED_LIBRARIES := \ libbinder \ @@ -15,7 +15,7 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libui \ libdl \ - libsurfaceflinger_client + libstagefright_foundation LOCAL_MODULE := libstagefrighthw diff --git a/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.cpp b/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.cpp index efc8691..8e57d1e 100644 --- a/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.cpp +++ b/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.cpp @@ -18,8 +18,8 @@ #include <dlfcn.h> -#include <media/stagefright/HardwareAPI.h> -#include <media/stagefright/MediaDebug.h> +#include <media/hardware/HardwareAPI.h> +#include <media/stagefright/foundation/ADebug.h> namespace android { diff --git a/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.h b/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.h index 6df2d31..c7e0dee 100644 --- a/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.h +++ b/exynos/multimedia/libstagefrighthw/SEC_OMX_Plugin.h @@ -18,7 +18,7 @@ #define SEC_OMX_PLUGIN -#include <media/stagefright/OMXPluginBase.h> +#include <media/hardware/OMXPluginBase.h> namespace android { diff --git a/exynos/multimedia/openmax/osal/Android.mk b/exynos/multimedia/openmax/osal/Android.mk index e4ceba0..b7caa51 100644 --- a/exynos/multimedia/openmax/osal/Android.mk +++ b/exynos/multimedia/openmax/osal/Android.mk @@ -31,7 +31,6 @@ LOCAL_SHARED_LIBRARIES := libcutils libutils \ libui \ libhardware \ libandroid_runtime \ - libsurfaceflinger_client \ libbinder \ libmedia diff --git a/exynos/multimedia/openmax/osal/SEC_OSAL_Android.cpp b/exynos/multimedia/openmax/osal/SEC_OSAL_Android.cpp index bb41720..1f0231a 100644 --- a/exynos/multimedia/openmax/osal/SEC_OSAL_Android.cpp +++ b/exynos/multimedia/openmax/osal/SEC_OSAL_Android.cpp @@ -29,13 +29,13 @@ #include <stdio.h> #include <stdlib.h> -#include <ui/android_native_buffer.h> + #include <ui/GraphicBuffer.h> #include <ui/GraphicBufferMapper.h> #include <ui/Rect.h> -#include <media/stagefright/HardwareAPI.h> +#include <media/hardware/HardwareAPI.h> #include <hardware/hardware.h> -#include <media/stagefright/MetadataBufferType.h> +#include <media/hardware/MetadataBufferType.h> #include "SEC_OSAL_Semaphore.h" #include "SEC_OMX_Baseport.h" diff --git a/exynos/multimedia/utils/csc/exynos4/csc_fimc.cpp b/exynos/multimedia/utils/csc/exynos4/csc_fimc.cpp index 7c458b2..a8e6b67 100644 --- a/exynos/multimedia/utils/csc/exynos4/csc_fimc.cpp +++ b/exynos/multimedia/utils/csc/exynos4/csc_fimc.cpp @@ -52,7 +52,7 @@ void *csc_fimc_open() if (hw_converter->bHWconvert_flag == 0) { delete hw_converter; hw_converter = NULL; - LOGE("%s LINE = %d HardwareConverter failed", __func__, __LINE__); + ALOGE("%s LINE = %d HardwareConverter failed", __func__, __LINE__); } return (void *)hw_converter; diff --git a/exynos/multimedia/utils/csc/exynos5/csc_fimc.cpp b/exynos/multimedia/utils/csc/exynos5/csc_fimc.cpp index 89d0f97..4243624 100644 --- a/exynos/multimedia/utils/csc/exynos5/csc_fimc.cpp +++ b/exynos/multimedia/utils/csc/exynos5/csc_fimc.cpp @@ -67,21 +67,21 @@ void *csc_fimc_open() hdl = dlopen("libfimc.so", RTLD_NOW); if (hdl == NULL) { - LOGE("%s:: load libfimc.so failed", __func__); + ALOGE("%s:: load libfimc.so failed", __func__); return NULL; } create_instance = (SecFimc *(*)())dlsym(hdl, "create_instance"); handle_fimc = (SecFimc *)create_instance(); if (handle_fimc == NULL) { - LOGE("%s:: create handle_fimc failed", __func__); + ALOGE("%s:: create handle_fimc failed", __func__); return NULL; } if (!handle_fimc->create(SecFimc::DEV_1, SecFimc::MODE_MULTI_BUF, 1)) { destroy_instance = (void (*)(void *))dlsym(hdl, "destroy_instance"); destroy_instance(handle_fimc); - LOGE("%s:: create() failed", __func__); + ALOGE("%s:: create() failed", __func__); return NULL; } return (void *)handle_fimc; @@ -103,13 +103,13 @@ CSC_FIMC_ERROR_CODE csc_fimc_close(void *handle) void* hdl = NULL; if (!handle_fimc->destroy()) { - LOGE("%s:: destroy() failed", __func__); + ALOGE("%s:: destroy() failed", __func__); return CSC_FIMC_RET_FAIL; } hdl = dlopen("libfimc.so", RTLD_NOW); if (hdl == NULL) { - LOGE("%s:: load libfimc.so failed", __func__); + ALOGE("%s:: load libfimc.so failed", __func__); return CSC_FIMC_RET_FAIL; } @@ -172,7 +172,7 @@ CSC_FIMC_ERROR_CODE csc_fimc_convert_nv12t( if (!handle_fimc->setSrcParams(width, height, src_crop_x, src_crop_y, &src_crop_width, &src_crop_height, HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED)) { - LOGE("%s:: setSrcParms() failed", __func__); + ALOGE("%s:: setSrcParms() failed", __func__); return CSC_FIMC_RET_FAIL; } @@ -180,19 +180,19 @@ CSC_FIMC_ERROR_CODE csc_fimc_convert_nv12t( (unsigned int)src_addr[1], (unsigned int)src_addr[1], HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED)) { - LOGE("%s:: setSrcPhyAddr() failed", __func__); + ALOGE("%s:: setSrcPhyAddr() failed", __func__); return CSC_FIMC_RET_FAIL; } if (!handle_fimc->setRotVal(rotate_value)) { - LOGE("%s:: setRotVal() failed", __func__); + ALOGE("%s:: setRotVal() failed", __func__); return CSC_FIMC_RET_FAIL; } if (!handle_fimc->setDstParams(width, height, dst_crop_x, dst_crop_y, &dst_crop_width, &dst_crop_height, HarPixelformat)) { - LOGE("%s:: setDstParams() failed", __func__); + ALOGE("%s:: setDstParams() failed", __func__); return CSC_FIMC_RET_FAIL; } @@ -201,7 +201,7 @@ CSC_FIMC_ERROR_CODE csc_fimc_convert_nv12t( if (!handle_fimc->setDstAddr((unsigned int)(dst_addr[0]), (unsigned int)(dst_addr[1]), (unsigned int)(dst_addr[1]))) { - LOGE("%s:: setDstPhyAddr() failed", __func__); + ALOGE("%s:: setDstPhyAddr() failed", __func__); return CSC_FIMC_RET_FAIL; } break; @@ -210,14 +210,14 @@ CSC_FIMC_ERROR_CODE csc_fimc_convert_nv12t( if (!handle_fimc->setDstAddr((unsigned int)(dst_addr[0]), (unsigned int)(dst_addr[1]), (unsigned int)(dst_addr[2]))) { - LOGE("%s:: setDstPhyAddr() failed", __func__); + ALOGE("%s:: setDstPhyAddr() failed", __func__); return CSC_FIMC_RET_FAIL; } break; } if (!handle_fimc->draw(0, 0)) { - LOGE("%s:: handleOneShot() failed", __func__); + ALOGE("%s:: handleOneShot() failed", __func__); return CSC_FIMC_RET_FAIL; } diff --git a/exynos4/hal/include/sec_utils.h b/exynos4/hal/include/sec_utils.h index 55808f4..ed4fe80 100644 --- a/exynos4/hal/include/sec_utils.h +++ b/exynos4/hal/include/sec_utils.h @@ -130,7 +130,7 @@ inline int HAL_PIXEL_FORMAT_2_V4L2_PIX(int HAL_PIXEL_FORMAT) break; default: - LOGE("%s::unmatched HAL_PIXEL_FORMAT color_space(0x%x)\n", + ALOGE("%s::unmatched HAL_PIXEL_FORMAT color_space(0x%x)\n", __func__, HAL_PIXEL_FORMAT); break; } @@ -212,7 +212,7 @@ inline int V4L2_PIX_2_HAL_PIXEL_FORMAT(int V4L2_PIX) break; default: - LOGE("%s::unmatched V4L2_PIX color_space(%d)\n", + ALOGE("%s::unmatched V4L2_PIX color_space(%d)\n", __func__, V4L2_PIX); break; } @@ -287,7 +287,7 @@ inline unsigned int FRAME_SIZE(int HAL_PIXEL_FORMAT, int w, int h) break; default: - LOGD("%s::no matching source colorformat(0x%x), w(%d), h(%d) fail\n", + ALOGD("%s::no matching source colorformat(0x%x), w(%d), h(%d) fail\n", __func__, HAL_PIXEL_FORMAT, w, h); break; } diff --git a/exynos4/hal/include/sec_utils_v4l2.h b/exynos4/hal/include/sec_utils_v4l2.h index 3aa7c35..2c250b9 100644 --- a/exynos4/hal/include/sec_utils_v4l2.h +++ b/exynos4/hal/include/sec_utils_v4l2.h @@ -152,7 +152,7 @@ inline int HAL_PIXEL_FORMAT_2_V4L2_PIX(int HAL_PIXEL_FORMAT) break; default: - LOGE("%s::unmatched HAL_PIXEL_FORMAT color_space(0x%x)\n", + ALOGE("%s::unmatched HAL_PIXEL_FORMAT color_space(0x%x)\n", __func__, HAL_PIXEL_FORMAT); break; } @@ -240,7 +240,7 @@ inline int V4L2_PIX_2_HAL_PIXEL_FORMAT(int V4L2_PIX) break; default: - LOGE("%s::unmatched V4L2_PIX color_space(%d)\n", + ALOGE("%s::unmatched V4L2_PIX color_space(%d)\n", __func__, V4L2_PIX); break; } @@ -316,7 +316,7 @@ inline unsigned int FRAME_SIZE(int HAL_PIXEL_FORMAT, int w, int h) break; default: - LOGD("%s::no matching source colorformat(0x%x), w(%d), h(%d) fail\n", + ALOGD("%s::no matching source colorformat(0x%x), w(%d), h(%d) fail\n", __func__, HAL_PIXEL_FORMAT, w, h); break; } diff --git a/exynos4/hal/libcamera/SecCamera.cpp b/exynos4/hal/libcamera/SecCamera.cpp index 9c7bf94..97f4708 100644 --- a/exynos4/hal/libcamera/SecCamera.cpp +++ b/exynos4/hal/libcamera/SecCamera.cpp @@ -23,8 +23,8 @@ ************************************* */ -//#define LOG_NDEBUG 0 -#define LOG_TAG "SecCamera" +//#define ALOG_NDEBUG 0 +#define ALOG_TAG "SecCamera" #include <utils/Log.h> #include <string.h> @@ -37,14 +37,14 @@ using namespace android; #define CHECK(return_value) \ if (return_value < 0) { \ - LOGE("%s::%d fail. errno: %s, m_camera_id = %d", \ + ALOGE("%s::%d fail. errno: %s, m_camera_id = %d", \ __func__, __LINE__, strerror(errno), m_camera_id); \ return -1; \ } #define CHECK_PTR(return_value) \ if (return_value < 0) { \ - LOGE("%s::%d fail, errno: %s, m_camera_id = %d", \ + ALOGE("%s::%d fail, errno: %s, m_camera_id = %d", \ __func__,__LINE__, strerror(errno), m_camera_id); \ return NULL; \ } @@ -54,7 +54,7 @@ namespace android { static struct timeval time_start; static struct timeval time_stop; -#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0 +#if defined(ALOG_NDEBUG) && LOG_NDEBUG == 0 unsigned long measure_time_camera(struct timeval *start, struct timeval *stop) { unsigned long sec, usec, time; @@ -83,7 +83,7 @@ static int close_buffers(struct SecBuffer *buffers, int num_of_buf) if (buffers[i].virt.extP[j]) { #ifndef BOARD_USE_V4L2_ION ret = munmap(buffers[i].virt.extP[j], buffers[i].size.extS[j]); - LOGV("munmap():buffers[%d].virt.extP[%d]: 0x%x size = %d", + ALOGV("munmap():buffers[%d].virt.extP[%d]: 0x%x size = %d", i, j, (unsigned int) buffers[i].virt.extP[j], buffers[i].size.extS[j]); #endif @@ -137,12 +137,12 @@ static int fimc_poll(struct pollfd *events) */ ret = poll(events, 1, 10000); if (ret < 0) { - LOGE("ERR(%s):poll error", __func__); + ALOGE("ERR(%s):poll error", __func__); return ret; } if (ret == 0) { - LOGE("ERR(%s):No data in 10 secs..", __func__); + ALOGE("ERR(%s):No data in 10 secs..", __func__); return ret; } @@ -154,12 +154,12 @@ static int fimc_v4l2_querycap(int fp) struct v4l2_capability cap; if (ioctl(fp, VIDIOC_QUERYCAP, &cap) < 0) { - LOGE("ERR(%s):VIDIOC_QUERYCAP failed", __func__); + ALOGE("ERR(%s):VIDIOC_QUERYCAP failed", __func__); return -1; } if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { - LOGE("ERR(%s):no capture devices", __func__); + ALOGE("ERR(%s):no capture devices", __func__); return -1; } @@ -172,10 +172,10 @@ static const __u8* fimc_v4l2_enuminput(int fp, int index) input.index = index; if (ioctl(fp, VIDIOC_ENUMINPUT, &input) != 0) { - LOGE("ERR(%s):No matching index found", __func__); + ALOGE("ERR(%s):No matching index found", __func__); return NULL; } - LOGI("Name of input channel[%d] is %s", input.index, input.name); + ALOGI("Name of input channel[%d] is %s", input.index, input.name); return input.name; } @@ -187,7 +187,7 @@ static int fimc_v4l2_s_input(int fp, int index) input.index = index; if (ioctl(fp, VIDIOC_S_INPUT, &input) < 0) { - LOGE("ERR(%s):VIDIOC_S_INPUT failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_INPUT failed", __func__); return -1; } @@ -220,7 +220,7 @@ static int fimc_v4l2_s_fmt(int fp, int width, int height, unsigned int fmt, enum v4l2_fmt.fmt.pix_mp.plane_fmt[1].sizeimage = ALIGN(width/2, 16) * ALIGN(height/2, 16); v4l2_fmt.fmt.pix_mp.plane_fmt[2].sizeimage = ALIGN(width/2, 16) * ALIGN(height/2, 16); } else { - LOGE("ERR(%s): Invalid plane number", __func__); + ALOGE("ERR(%s): Invalid plane number", __func__); return -1; } v4l2_fmt.fmt.pix_mp.num_planes = num_plane; @@ -233,12 +233,12 @@ static int fimc_v4l2_s_fmt(int fp, int width, int height, unsigned int fmt, enum pixfmt.field = V4L2_FIELD_NONE; v4l2_fmt.fmt.pix = pixfmt; - LOGV("fimc_v4l2_s_fmt : width(%d) height(%d)", width, height); + ALOGV("fimc_v4l2_s_fmt : width(%d) height(%d)", width, height); #endif /* Set up for capture */ if (ioctl(fp, VIDIOC_S_FMT, &v4l2_fmt) < 0) { - LOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); return -1; } @@ -261,11 +261,11 @@ static int fimc_v4l2_s_fmt_cap(int fp, int width, int height, unsigned int fmt) pixfmt.colorspace = V4L2_COLORSPACE_JPEG; v4l2_fmt.fmt.pix = pixfmt; - LOGV("fimc_v4l2_s_fmt_cap : width(%d) height(%d)", width, height); + ALOGV("fimc_v4l2_s_fmt_cap : width(%d) height(%d)", width, height); /* Set up for capture */ if (ioctl(fp, VIDIOC_S_FMT, &v4l2_fmt) < 0) { - LOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); return -1; } @@ -287,11 +287,11 @@ int fimc_v4l2_s_fmt_is(int fp, int width, int height, unsigned int fmt, enum v4l pixfmt.field = field; v4l2_fmt.fmt.pix = pixfmt; - LOGV("fimc_v4l2_s_fmt_is : width(%d) height(%d)", width, height); + ALOGV("fimc_v4l2_s_fmt_is : width(%d) height(%d)", width, height); /* Set up for capture */ if (ioctl(fp, VIDIOC_S_FMT, &v4l2_fmt) < 0) { - LOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); return -1; } @@ -308,7 +308,7 @@ static int fimc_v4l2_enum_fmt(int fp, unsigned int fmt) while (ioctl(fp, VIDIOC_ENUM_FMT, &fmtdesc) == 0) { if (fmtdesc.pixelformat == fmt) { - LOGV("passed fmt = %#x found pixel format[%d]: %s", fmt, fmtdesc.index, fmtdesc.description); + ALOGV("passed fmt = %#x found pixel format[%d]: %s", fmt, fmtdesc.index, fmtdesc.description); found = 1; break; } @@ -317,7 +317,7 @@ static int fimc_v4l2_enum_fmt(int fp, unsigned int fmt) } if (!found) { - LOGE("unsupported pixel format"); + ALOGE("unsupported pixel format"); return -1; } @@ -333,7 +333,7 @@ static int fimc_v4l2_reqbufs(int fp, enum v4l2_buf_type type, int nr_bufs) req.memory = V4L2_MEMORY_TYPE; if (ioctl(fp, VIDIOC_REQBUFS, &req) < 0) { - LOGE("ERR(%s):VIDIOC_REQBUFS failed", __func__); + ALOGE("ERR(%s):VIDIOC_REQBUFS failed", __func__); return -1; } @@ -355,41 +355,41 @@ static int fimc_v4l2_querybuf(int fp, struct SecBuffer *buffers, enum v4l2_buf_t #ifdef BOARD_USE_V4L2 v4l2_buf.m.planes = planes; v4l2_buf.length = num_plane; // this is for multi-planar - LOGV("QUERYBUF(index=%d)", i); - LOGV("memory plane is %d", v4l2_buf.length); + ALOGV("QUERYBUF(index=%d)", i); + ALOGV("memory plane is %d", v4l2_buf.length); #endif ret = ioctl(fp, VIDIOC_QUERYBUF, &v4l2_buf); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_QUERYBUF failed", __func__); + ALOGE("ERR(%s):VIDIOC_QUERYBUF failed", __func__); return -1; } #ifdef BOARD_USE_V4L2 for (plane_index = 0; plane_index < num_plane; plane_index++) { - LOGV("Offset : 0x%x", v4l2_buf.m.planes[plane_index].m.mem_offset); - LOGV("Plane Length : 0x%x", v4l2_buf.m.planes[plane_index].length); + ALOGV("Offset : 0x%x", v4l2_buf.m.planes[plane_index].m.mem_offset); + ALOGV("Plane Length : 0x%x", v4l2_buf.m.planes[plane_index].length); buffers[i].phys.extP[plane_index] = (unsigned int)v4l2_buf.m.planes[plane_index].cookie; buffers[i].size.extS[plane_index] = v4l2_buf.m.planes[plane_index].length; - LOGV("length[%d] : 0x%x", i, buffers[i].size.extS[plane_index]); + ALOGV("length[%d] : 0x%x", i, buffers[i].size.extS[plane_index]); if ((buffers[i].virt.extP[plane_index] = (char *)mmap(0, v4l2_buf.m.planes[plane_index].length, PROT_READ | PROT_WRITE, MAP_SHARED, fp, v4l2_buf.m.planes[plane_index].m.mem_offset)) < 0) { - LOGE("mmap failed"); + ALOGE("mmap failed"); return -1; } - LOGV("vaddr[%d][%d] : 0x%x", i, plane_index, (__u32) buffers[i].virt.extP[plane_index]); + ALOGV("vaddr[%d][%d] : 0x%x", i, plane_index, (__u32) buffers[i].virt.extP[plane_index]); } #else buffers[i].size.s = v4l2_buf.length; if ((buffers[i].virt.p = (char *)mmap(0, v4l2_buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, fp, v4l2_buf.m.offset)) < 0) { - LOGE("%s %d] mmap() failed",__func__, __LINE__); + ALOGE("%s %d] mmap() failed",__func__, __LINE__); return -1; } - LOGV("buffers[%d].virt.p = %p v4l2_buf.length = %d", i, buffers[i].virt.p, v4l2_buf.length); + ALOGV("buffers[%d].virt.p = %p v4l2_buf.length = %d", i, buffers[i].virt.p, v4l2_buf.length); #endif } return 0; @@ -402,7 +402,7 @@ static int fimc_v4l2_streamon(int fp) ret = ioctl(fp, VIDIOC_STREAMON, &type); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_STREAMON failed", __func__); + ALOGE("ERR(%s):VIDIOC_STREAMON failed", __func__); return ret; } @@ -414,10 +414,10 @@ static int fimc_v4l2_streamoff(int fp) enum v4l2_buf_type type = V4L2_BUF_TYPE; int ret; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); ret = ioctl(fp, VIDIOC_STREAMOFF, &type); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_STREAMOFF failed", __func__); + ALOGE("ERR(%s):VIDIOC_STREAMOFF failed", __func__); return ret; } @@ -458,7 +458,7 @@ static int fimc_v4l2_qbuf(int fp, int width, int height, struct SecBuffer *vaddr v4l2_buf.m.planes[2].m.userptr = (long unsigned int)vaddr[index].virt.extP[2]; v4l2_buf.m.planes[2].length = ALIGN(width/2, 16) * ALIGN(height/2, 16); } else { - LOGE("ERR(%s): Invalid plane number", __func__); + ALOGE("ERR(%s): Invalid plane number", __func__); return -1; } } else if (mode == CAPTURE_MODE) { @@ -470,14 +470,14 @@ static int fimc_v4l2_qbuf(int fp, int width, int height, struct SecBuffer *vaddr v4l2_buf.m.planes[1].m.userptr = (long unsigned int)vaddr[index].virt.extP[1]; v4l2_buf.m.planes[1].length = ALIGN(ALIGN(width, 16) * ALIGN(height >> 1, 8), 2048); } else { - LOGE("ERR(%s): Invalid mode", __func__); + ALOGE("ERR(%s): Invalid mode", __func__); return -1; } #endif ret = ioctl(fp, VIDIOC_QBUF, &v4l2_buf); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_QBUF failed", __func__); + ALOGE("ERR(%s):VIDIOC_QBUF failed", __func__); return ret; } @@ -501,7 +501,7 @@ static int fimc_v4l2_dqbuf(int fp, int num_plane) ret = ioctl(fp, VIDIOC_DQBUF, &v4l2_buf); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_DQBUF failed, dropped frame", __func__); + ALOGE("ERR(%s):VIDIOC_DQBUF failed, dropped frame", __func__); return ret; } @@ -517,7 +517,7 @@ static int fimc_v4l2_g_ctrl(int fp, unsigned int id) ret = ioctl(fp, VIDIOC_G_CTRL, &ctrl); if (ret < 0) { - LOGE("ERR(%s): VIDIOC_G_CTRL(id = 0x%x (%d)) failed, ret = %d", + ALOGE("ERR(%s): VIDIOC_G_CTRL(id = 0x%x (%d)) failed, ret = %d", __func__, id, id-V4L2_CID_PRIVATE_BASE, ret); return ret; } @@ -535,7 +535,7 @@ static int fimc_v4l2_s_ctrl(int fp, unsigned int id, unsigned int value) ret = ioctl(fp, VIDIOC_S_CTRL, &ctrl); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_S_CTRL(id = %#x (%d), value = %d) failed ret = %d", + ALOGE("ERR(%s):VIDIOC_S_CTRL(id = %#x (%d), value = %d) failed ret = %d", __func__, id, id-V4L2_CID_PRIVATE_BASE, value, ret); return ret; @@ -558,7 +558,7 @@ static int fimc_v4l2_s_ext_ctrl(int fp, unsigned int id, void *value) ret = ioctl(fp, VIDIOC_S_EXT_CTRLS, &ctrls); if (ret < 0) - LOGE("ERR(%s):VIDIOC_S_EXT_CTRLS failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_EXT_CTRLS failed", __func__); return ret; } @@ -633,11 +633,11 @@ static int fimc_v4l2_g_parm(int fp, struct v4l2_streamparm *streamparm) ret = ioctl(fp, VIDIOC_G_PARM, streamparm); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_G_PARM failed", __func__); + ALOGE("ERR(%s):VIDIOC_G_PARM failed", __func__); return -1; } - LOGV("%s : timeperframe: numerator %d, denominator %d", __func__, + ALOGV("%s : timeperframe: numerator %d, denominator %d", __func__, streamparm->parm.capture.timeperframe.numerator, streamparm->parm.capture.timeperframe.denominator); @@ -652,7 +652,7 @@ static int fimc_v4l2_s_parm(int fp, struct v4l2_streamparm *streamparm) ret = ioctl(fp, VIDIOC_S_PARM, streamparm); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_S_PARM failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_PARM failed", __func__); return ret; } @@ -735,13 +735,13 @@ SecCamera::SecCamera() : SecCamera::~SecCamera() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); DestroyCamera(); } bool SecCamera::CreateCamera(int index) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); int ret = 0; switch (index) { @@ -774,15 +774,15 @@ bool SecCamera::CreateCamera(int index) m_cam_fd = open(CAMERA_DEV_NAME, O_RDWR); if (m_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; } - LOGV("%s: open(%s) --> m_cam_fd %d", __func__, CAMERA_DEV_NAME, m_cam_fd); + ALOGV("%s: open(%s) --> m_cam_fd %d", __func__, CAMERA_DEV_NAME, m_cam_fd); ret = fimc_v4l2_querycap(m_cam_fd); CHECK(ret); if (!fimc_v4l2_enuminput(m_cam_fd, index)) { - LOGE("m_cam_fd(%d) fimc_v4l2_enuminput fail", m_cam_fd); + ALOGE("m_cam_fd(%d) fimc_v4l2_enuminput fail", m_cam_fd); return -1; } ret = fimc_v4l2_s_input(m_cam_fd, index); @@ -809,16 +809,16 @@ bool SecCamera::CreateCamera(int index) #ifdef ZERO_SHUTTER_LAG if (m_camera_use_ISP) { m_cam_fd2 = open(CAMERA_DEV_NAME2, O_RDWR); - LOGV("%s: open(%s) --> m_cam_fd2 = %d", __func__, CAMERA_DEV_NAME2, m_cam_fd2); + ALOGV("%s: open(%s) --> m_cam_fd2 = %d", __func__, CAMERA_DEV_NAME2, m_cam_fd2); if (m_cam_fd2 < 0) { - LOGE("ERR(%s):Cannot open %s (error : %s)", __func__, CAMERA_DEV_NAME2, strerror(errno)); + ALOGE("ERR(%s):Cannot open %s (error : %s)", __func__, CAMERA_DEV_NAME2, strerror(errno)); return -1; } ret = fimc_v4l2_querycap(m_cam_fd2); CHECK(ret); if (!fimc_v4l2_enuminput(m_cam_fd2, index)) { - LOGE("m_cam_fd2(%d) fimc_v4l2_enuminput fail", m_cam_fd2); + ALOGE("m_cam_fd2(%d) fimc_v4l2_enuminput fail", m_cam_fd2); return -1; } ret = fimc_v4l2_s_input(m_cam_fd2, index); @@ -828,16 +828,16 @@ bool SecCamera::CreateCamera(int index) #endif m_cam_fd3 = open(CAMERA_DEV_NAME3, O_RDWR); - LOGV("%s: open(%s) --> m_cam_fd3 = %d", __func__, CAMERA_DEV_NAME3, m_cam_fd3); + ALOGV("%s: open(%s) --> m_cam_fd3 = %d", __func__, CAMERA_DEV_NAME3, m_cam_fd3); if (m_cam_fd3 < 0) { - LOGE("ERR(%s):Cannot open %s (error : %s)", __func__, CAMERA_DEV_NAME3, strerror(errno)); + ALOGE("ERR(%s):Cannot open %s (error : %s)", __func__, CAMERA_DEV_NAME3, strerror(errno)); return -1; } ret = fimc_v4l2_querycap(m_cam_fd3); CHECK(ret); if (!fimc_v4l2_enuminput(m_cam_fd3, index)) { - LOGE("m_cam_fd3(%d) fimc_v4l2_enuminput fail", m_cam_fd3); + ALOGE("m_cam_fd3(%d) fimc_v4l2_enuminput fail", m_cam_fd3); return -1; } ret = fimc_v4l2_s_input(m_cam_fd3, index); @@ -869,14 +869,14 @@ bool SecCamera::CreateCamera(int index) void SecCamera::resetCamera() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); DestroyCamera(); CreateCamera(m_camera_id); } bool SecCamera::DestroyCamera() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_flagCreate) { @@ -885,7 +885,7 @@ bool SecCamera::DestroyCamera() /* close m_cam_fd after stopRecord() because stopRecord() * uses m_cam_fd to change frame rate */ - LOGI("DestroyCamera: m_cam_fd(%d)", m_cam_fd); + ALOGI("DestroyCamera: m_cam_fd(%d)", m_cam_fd); if (m_cam_fd > -1) { close(m_cam_fd); m_cam_fd = -1; @@ -893,7 +893,7 @@ bool SecCamera::DestroyCamera() #ifdef ZERO_SHUTTER_LAG if (m_camera_use_ISP) { - LOGI("DestroyCamera: m_cam_fd2(%d)", m_cam_fd2); + ALOGI("DestroyCamera: m_cam_fd2(%d)", m_cam_fd2); if (m_cam_fd2 > -1) { close(m_cam_fd2); m_cam_fd2 = -1; @@ -901,7 +901,7 @@ bool SecCamera::DestroyCamera() } #endif - LOGI("DestroyCamera: m_cam_fd3(%d)", m_cam_fd3); + ALOGI("DestroyCamera: m_cam_fd3(%d)", m_cam_fd3); if (m_cam_fd3 > -1) { close(m_cam_fd3); m_cam_fd3 = -1; @@ -909,7 +909,7 @@ bool SecCamera::DestroyCamera() m_flagCreate = 0; } else - LOGI("%s : already deinitialized", __func__); + ALOGI("%s : already deinitialized", __func__); return 0; } @@ -950,7 +950,7 @@ void SecCamera::initParameters(int internalISP) int SecCamera::setMode(int recording_en) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); int mode; m_recording_en = recording_en; @@ -962,7 +962,7 @@ int SecCamera::setMode(int recording_en) mode = IS_MODE_PREVIEW_VIDEO; if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_S_FORMAT_SCENARIO, mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_S_FORMAT_SCENARIO", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_S_FORMAT_SCENARIO", __func__); return -1; } } @@ -994,16 +994,16 @@ int SecCamera::startPreview(void) v4l2_streamparm streamparm; struct sec_cam_parm *parms; parms = (struct sec_cam_parm*)&streamparm.parm.raw_data; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); // aleady started if (m_flag_camera_start > 0) { - LOGE("ERR(%s):Preview was already started", __func__); + ALOGE("ERR(%s):Preview was already started", __func__); return 0; } if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -1015,7 +1015,7 @@ int SecCamera::startPreview(void) int ret = fimc_v4l2_enum_fmt(m_cam_fd,m_preview_v4lformat); CHECK(ret); - LOGV("m_camera_use_ISP(%d), %s", m_camera_use_ISP, (const char*)getCameraSensorName()); + ALOGV("m_camera_use_ISP(%d), %s", m_camera_use_ISP, (const char*)getCameraSensorName()); if (m_camera_use_ISP) { if (!m_recording_en) @@ -1057,10 +1057,10 @@ int SecCamera::startPreview(void) CHECK(ret); #endif - LOGV("%s : m_preview_width: %d m_preview_height: %d m_angle: %d", + ALOGV("%s : m_preview_width: %d m_preview_height: %d m_angle: %d", __func__, m_preview_width, m_preview_height, m_angle); - LOGV("m_camera_id : %d", m_camera_id); + ALOGV("m_camera_id : %d", m_camera_id); /* start with all buffers in queue */ for (int i = 0; i < MAX_BUFFERS; i++) { @@ -1087,7 +1087,7 @@ int SecCamera::startPreview(void) m_flag_camera_start = 1; - LOGV("%s: got the first frame of the preview", __func__); + ALOGV("%s: got the first frame of the preview", __func__); return 0; } @@ -1096,10 +1096,10 @@ int SecCamera::stopPreview(void) { int ret; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_flag_camera_start == 0) { - LOGW("%s: doing nothing because m_flag_camera_start is zero", __func__); + ALOGW("%s: doing nothing because m_flag_camera_start is zero", __func__); return 0; } @@ -1112,7 +1112,7 @@ int SecCamera::stopPreview(void) setFlashMode(FLASH_MODE_OFF); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } #ifdef USE_FACE_DETECTION @@ -1126,13 +1126,13 @@ int SecCamera::stopPreview(void) if (m_camera_use_ISP && m_params->aeawb_mode) { if (m_params->aeawb_mode & 0x1) { if (setAutoExposureLock(0) < 0) { - LOGE("ERR(%s): Fail on setAutoExposureLock()"); + ALOGE("ERR(%s): Fail on setAutoExposureLock()"); return -1; } } if (m_params->aeawb_mode & (0x1 << 1)) { if (setAutoWhiteBalanceLock(0) < 0) { - LOGE("ERR(%s): Fail on setAutoWhiteBalnaceLock()"); + ALOGE("ERR(%s): Fail on setAutoWhiteBalnaceLock()"); return -1; } } @@ -1153,16 +1153,16 @@ int SecCamera::stopPreview(void) int SecCamera::startSnapshot(SecBuffer *yuv_buf) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); // already started if (m_snapshot_state) { - LOGI("%s: Doing nothing because snapshot is already started!", __func__); + ALOGI("%s: Doing nothing because snapshot is already started!", __func__); return 0; } if (m_cap_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -1172,25 +1172,25 @@ int SecCamera::startSnapshot(SecBuffer *yuv_buf) m_events_c2.fd = m_cap_fd; m_events_c2.events = POLLIN | POLLERR; -#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0 +#if defined(ALOG_NDEBUG) && LOG_NDEBUG == 0 if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV420) - LOGV("SnapshotFormat:V4L2_PIX_FMT_YUV420"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_YUV420"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12) - LOGV("SnapshotFormat:V4L2_PIX_FMT_NV12"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_NV12"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12T) - LOGV("SnapshotFormat:V4L2_PIX_FMT_NV12T"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_NV12T"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV21) - LOGV("SnapshotFormat:V4L2_PIX_FMT_NV21"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_NV21"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV422P) - LOGV("SnapshotFormat:V4L2_PIX_FMT_YUV422P"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_YUV422P"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUYV) - LOGV("SnapshotFormat:V4L2_PIX_FMT_YUYV"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_YUYV"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_UYVY) - LOGV("SnapshotFormat:V4L2_PIX_FMT_UYVY"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_UYVY"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_RGB565) - LOGV("SnapshotFormat:V4L2_PIX_FMT_RGB565"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_RGB565"); else - LOGV("SnapshotFormat:UnknownFormat"); + ALOGV("SnapshotFormat:UnknownFormat"); #endif int ret = fimc_v4l2_enum_fmt(m_cap_fd, m_snapshot_v4lformat); @@ -1256,15 +1256,15 @@ int SecCamera::stopSnapshot(void) { int ret; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (!m_snapshot_state) { - LOGI("%s: Doing nothing because snapshot is not started!", __func__); + ALOGI("%s: Doing nothing because snapshot is not started!", __func__); return 0; } if (m_cap_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -1283,16 +1283,16 @@ int SecCamera::startRecord(bool recordHint) { int ret, i; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); // aleady started if (m_flag_record_start > 0) { - LOGE("ERR(%s):Preview was already started", __func__); + ALOGE("ERR(%s):Preview was already started", __func__); return 0; } if (m_rec_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -1300,10 +1300,10 @@ int SecCamera::startRecord(bool recordHint) ret = fimc_v4l2_enum_fmt(m_rec_fd, RECORD_PIX_FMT); CHECK(ret); - LOGI("%s: m_recording_width = %d, m_recording_height = %d", + ALOGI("%s: m_recording_width = %d, m_recording_height = %d", __func__, m_recording_width, m_recording_height); - LOGV("m_camera_use_ISP(%d), %s", m_camera_use_ISP, (const char*)getCameraSensorName()); + ALOGV("m_camera_use_ISP(%d), %s", m_camera_use_ISP, (const char*)getCameraSensorName()); if (m_camera_use_ISP) { fimc_v4l2_s_fmt_is(m_rec_fd, m_videosnapshot_width, m_videosnapshot_height, @@ -1366,10 +1366,10 @@ int SecCamera::stopRecord(void) { int ret; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_flag_record_start == 0) { - LOGW("%s: doing nothing because m_flag_record_start is zero", __func__); + ALOGW("%s: doing nothing because m_flag_record_start is zero", __func__); return 0; } @@ -1379,7 +1379,7 @@ int SecCamera::stopRecord(void) #endif if (m_rec_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -1449,7 +1449,7 @@ void SecCamera::setUserBufferAddr(void *ptr, int index, int mode) m_buffers_record[index].virt.extP[0] = (char *)ptr; m_buffers_record[index].virt.extP[1] = (char *)ptr + (ALIGN((ALIGN(m_recording_width, 16) * ALIGN(m_recording_height, 16)), 2048)); } else - LOGE("%s: Invalid fd!!!", __func__); + ALOGE("%s: Invalid fd!!!", __func__); } #endif @@ -1459,7 +1459,7 @@ int SecCamera::getPreview(camera_frame_metadata_t *facedata) int ret; if (m_flag_camera_start == 0 || fimc_poll(&m_events_c) == 0) { - LOGE("ERR(%s):Start Camera Device Reset", __func__); + ALOGE("ERR(%s):Start Camera Device Reset", __func__); /* * When there is no data for more than 1 second from the camera we inform * the FIMC driver by calling fimc_v4l2_s_input() with a special value = 1000 @@ -1480,14 +1480,14 @@ int SecCamera::getPreview(camera_frame_metadata_t *facedata) #endif ret = startPreview(); if (ret < 0) { - LOGE("ERR(%s): startPreview() return %d", __func__, ret); + ALOGE("ERR(%s): startPreview() return %d", __func__, ret); return 0; } } index = fimc_v4l2_dqbuf(m_cam_fd, PREVIEW_NUM_PLANE); if (!(0 <= index && index < MAX_BUFFERS)) { - LOGE("ERR(%s):wrong index = %d", __func__, index); + ALOGE("ERR(%s):wrong index = %d", __func__, index); return -1; } @@ -1519,7 +1519,7 @@ int SecCamera::getSnapshot() index = fimc_v4l2_dqbuf(m_cap_fd, 1); if (!(0 <= index && index < m_num_capbuf)) { - LOGE("ERR(%s):wrong index = %d", __func__, index); + ALOGE("ERR(%s):wrong index = %d", __func__, index); return -1; } return index; @@ -1540,14 +1540,14 @@ int SecCamera::setSnapshotFrame(int index) int SecCamera::getRecordFrame() { if (m_flag_record_start == 0) { - LOGE("%s: m_flag_record_start is 0", __func__); + ALOGE("%s: m_flag_record_start is 0", __func__); return -1; } fimc_poll(&m_events_c3); int index = fimc_v4l2_dqbuf(m_rec_fd, RECORD_NUM_PLANE); if (!(0 <= index && index < MAX_BUFFERS)) { - LOGE("ERR(%s):wrong index = %d", __func__, index); + ALOGE("ERR(%s):wrong index = %d", __func__, index); return -1; } @@ -1563,7 +1563,7 @@ int SecCamera::releaseRecordFrame(int index) * cases where fimc could crash if we called qbuf and it * wasn't expecting it. */ - LOGI("%s: recording not in progress, ignoring", __func__); + ALOGI("%s: recording not in progress, ignoring", __func__); return 0; } @@ -1572,31 +1572,31 @@ int SecCamera::releaseRecordFrame(int index) int SecCamera::setPreviewSize(int width, int height, int pixel_format) { - LOGV("%s(width(%d), height(%d), format(%d))", __func__, width, height, pixel_format); + ALOGV("%s(width(%d), height(%d), format(%d))", __func__, width, height, pixel_format); int v4lpixelformat = pixel_format; -#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0 +#if defined(ALOG_NDEBUG) && LOG_NDEBUG == 0 if (v4lpixelformat == V4L2_PIX_FMT_YUV420) - LOGV("PreviewFormat:V4L2_PIX_FMT_YUV420"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_YUV420"); else if (v4lpixelformat == V4L2_PIX_FMT_YVU420) - LOGV("PreviewFormat:V4L2_PIX_FMT_YVU420"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_YVU420"); else if (v4lpixelformat == V4L2_PIX_FMT_YVU420M) - LOGV("PreviewFormat:V4L2_PIX_FMT_YVU420M"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_YVU420M"); else if (v4lpixelformat == V4L2_PIX_FMT_NV12) - LOGV("PreviewFormat:V4L2_PIX_FMT_NV12"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_NV12"); else if (v4lpixelformat == V4L2_PIX_FMT_NV12T) - LOGV("PreviewFormat:V4L2_PIX_FMT_NV12T"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_NV12T"); else if (v4lpixelformat == V4L2_PIX_FMT_NV21) - LOGV("PreviewFormat:V4L2_PIX_FMT_NV21"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_NV21"); else if (v4lpixelformat == V4L2_PIX_FMT_YUV422P) - LOGV("PreviewFormat:V4L2_PIX_FMT_YUV422P"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_YUV422P"); else if (v4lpixelformat == V4L2_PIX_FMT_YUYV) - LOGV("PreviewFormat:V4L2_PIX_FMT_YUYV"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_YUYV"); else if (v4lpixelformat == V4L2_PIX_FMT_RGB565) - LOGV("PreviewFormat:V4L2_PIX_FMT_RGB565"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_RGB565"); else - LOGV("PreviewFormat:UnknownFormat"); + ALOGV("PreviewFormat:UnknownFormat"); #endif m_preview_width = width; m_preview_height = height; @@ -1632,17 +1632,17 @@ int SecCamera::getPreviewPixelFormat(void) */ int SecCamera::setSnapshotCmd(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); int ret = 0; if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return 0; } if (m_flag_camera_start > 0) { - LOGW("WARN(%s):Camera was in preview, should have been stopped", __func__); + ALOGW("WARN(%s):Camera was in preview, should have been stopped", __func__); stopPreview(); } @@ -1713,7 +1713,7 @@ unsigned char* SecCamera::getJpeg(int *jpeg_size, index = fimc_v4l2_dqbuf(m_cam_fd, 1); if (index != 0) { - LOGE("ERR(%s):wrong index = %d", __func__, index); + ALOGE("ERR(%s):wrong index = %d", __func__, index); return NULL; } @@ -1735,7 +1735,7 @@ unsigned char* SecCamera::getJpeg(int *jpeg_size, ret = fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_STREAM_PAUSE, 0); CHECK_PTR(ret); - LOGV("\nsnapshot dqueued buffer = %d snapshot_width = %d snapshot_height = %d, size = %d", + ALOGV("\nsnapshot dqueued buffer = %d snapshot_width = %d snapshot_height = %d, size = %d", index, m_snapshot_width, m_snapshot_height, *jpeg_size); addr = (unsigned char*)(m_capture_buf[0].virt.extP[0]) + main_offset; @@ -1757,25 +1757,25 @@ int SecCamera::getExif(unsigned char *pExifDst, unsigned char *pThumbSrc, int th /* JPEG encode for smdkv310 */ if (m_jpeg_fd > 0) { if (api_jpeg_encode_deinit(m_jpeg_fd) != JPEG_OK) - LOGE("ERR(%s):Fail on api_jpeg_encode_deinit", __func__); + ALOGE("ERR(%s):Fail on api_jpeg_encode_deinit", __func__); m_jpeg_fd = 0; } m_jpeg_fd = api_jpeg_encode_init(); - LOGV("(%s):JPEG device open ID = %d", __func__, m_jpeg_fd); + ALOGV("(%s):JPEG device open ID = %d", __func__, m_jpeg_fd); if (m_jpeg_fd <= 0) { if (m_jpeg_fd < 0) { m_jpeg_fd = 0; - LOGE("ERR(%s):Cannot open a jpeg device file", __func__); + ALOGE("ERR(%s):Cannot open a jpeg device file", __func__); return -1; } - LOGE("ERR(%s):JPEG device was closed", __func__); + ALOGE("ERR(%s):JPEG device was closed", __func__); return -1; } if (m_snapshot_v4lformat == V4L2_PIX_FMT_RGB565) { - LOGE("ERR(%s):It doesn't support V4L2_PIX_FMT_RGB565", __func__); + ALOGE("ERR(%s):It doesn't support V4L2_PIX_FMT_RGB565", __func__); return -1; } @@ -1820,13 +1820,13 @@ int SecCamera::getExif(unsigned char *pExifDst, unsigned char *pThumbSrc, int th unsigned int thumbnail_size = m_jpeg_thumbnail_width * m_jpeg_thumbnail_height * 2; unsigned char *pInBuf = (unsigned char *)api_jpeg_get_encode_in_buf(m_jpeg_fd, thumbnail_size); if (pInBuf == NULL) { - LOGE("ERR(%s):JPEG input buffer is NULL!!", __func__); + ALOGE("ERR(%s):JPEG input buffer is NULL!!", __func__); return -1; } unsigned char *pOutBuf = (unsigned char *)api_jpeg_get_encode_out_buf(m_jpeg_fd); if (pOutBuf == NULL) { - LOGE("ERR(%s):JPEG output buffer is NULL!!", __func__); + ALOGE("ERR(%s):JPEG output buffer is NULL!!", __func__); return -1; } @@ -1834,7 +1834,7 @@ int SecCamera::getExif(unsigned char *pExifDst, unsigned char *pThumbSrc, int th enum jpeg_ret_type result = api_jpeg_encode_exe(m_jpeg_fd, &enc_param); if (result != JPEG_ENCODE_OK) { - LOGE("ERR(%s):encode failed", __func__); + ALOGE("ERR(%s):encode failed", __func__); return -1; } @@ -1843,10 +1843,10 @@ int SecCamera::getExif(unsigned char *pExifDst, unsigned char *pThumbSrc, int th setExifChangedAttribute(); - LOGV("%s: calling jpgEnc.makeExif, mExifInfo.width set to %d, height to %d", + ALOGV("%s: calling jpgEnc.makeExif, mExifInfo.width set to %d, height to %d", __func__, mExifInfo.width, mExifInfo.height); - LOGV("%s : enableThumb set to true", __func__); + ALOGV("%s : enableThumb set to true", __func__); mExifInfo.enableThumb = true; makeExif(pExifDst, pOutBuf, outbuf_size, &mExifInfo, &exifSize, true); @@ -1857,23 +1857,23 @@ int SecCamera::getExif(unsigned char *pExifDst, unsigned char *pThumbSrc, int th unsigned int exifSize; if (m_camera_use_ISP) { - LOGV("%s : m_jpeg_thumbnail_width = %d, height = %d", + ALOGV("%s : m_jpeg_thumbnail_width = %d, height = %d", __func__, m_jpeg_thumbnail_width, m_jpeg_thumbnail_height); m_jpeg_fd = jpeghal_enc_init(); - LOGV("(%s):JPEG device open ID = %d", __func__, m_jpeg_fd); + ALOGV("(%s):JPEG device open ID = %d", __func__, m_jpeg_fd); if (m_jpeg_fd <= 0) { if (m_jpeg_fd < 0) { m_jpeg_fd = 0; - LOGE("ERR(%s):Cannot open a jpeg device file", __func__); + ALOGE("ERR(%s):Cannot open a jpeg device file", __func__); return -1; } - LOGE("ERR(%s):JPEG device was closed", __func__); + ALOGE("ERR(%s):JPEG device was closed", __func__); return -1; } if (m_snapshot_v4lformat == V4L2_PIX_FMT_RGB565) { - LOGE("ERR(%s):It doesn't support V4L2_PIX_FMT_RGB565", __func__); + ALOGE("ERR(%s):It doesn't support V4L2_PIX_FMT_RGB565", __func__); return -1; } @@ -1921,7 +1921,7 @@ int SecCamera::getExif(unsigned char *pExifDst, unsigned char *pThumbSrc, int th m_jpeg_inbuf.num_planes = 1; if (jpeghal_set_inbuf(m_jpeg_fd, &m_jpeg_inbuf) < 0) { - LOGE("ERR(%s):Fail to JPEG input buffer!!", __func__); + ALOGE("ERR(%s):Fail to JPEG input buffer!!", __func__); return -1; } @@ -1930,36 +1930,36 @@ int SecCamera::getExif(unsigned char *pExifDst, unsigned char *pThumbSrc, int th m_jpeg_outbuf.num_planes = 1; if (jpeghal_set_outbuf(m_jpeg_fd, &m_jpeg_outbuf) < 0) { - LOGE("ERR(%s):Fail to JPEG output buffer!!", __func__); + ALOGE("ERR(%s):Fail to JPEG output buffer!!", __func__); return -1; } memcpy(m_jpeg_inbuf.start[0], pThumbSrc, m_jpeg_inbuf.length[0]); if (jpeghal_enc_exe(m_jpeg_fd, &m_jpeg_inbuf, &m_jpeg_outbuf) < 0) { - LOGE("ERR(%s):encode failed", __func__); + ALOGE("ERR(%s):encode failed", __func__); return -1; } int outbuf_size = jpeghal_g_ctrl(m_jpeg_fd, V4L2_CID_CAM_JPEG_ENCODEDSIZE); if (outbuf_size < 0) { - LOGE("ERR(%s): jpeghal_g_ctrl fail on V4L2_CID_CAM_JPEG_ENCODEDSIZE", __func__); + ALOGE("ERR(%s): jpeghal_g_ctrl fail on V4L2_CID_CAM_JPEG_ENCODEDSIZE", __func__); return -1; } setExifChangedAttribute(); - LOGV("%s: calling jpgEnc.makeExif, mExifInfo.width set to %d, height to %d", + ALOGV("%s: calling jpgEnc.makeExif, mExifInfo.width set to %d, height to %d", __func__, mExifInfo.width, mExifInfo.height); - LOGV("%s : enableThumb set to true", __func__); + ALOGV("%s : enableThumb set to true", __func__); mExifInfo.enableThumb = true; makeExif(pExifDst, (unsigned char *)m_jpeg_outbuf.start[0], (unsigned int)outbuf_size, &mExifInfo, &exifSize, true); if (m_jpeg_fd > 0) { if (jpeghal_deinit(m_jpeg_fd, &m_jpeg_inbuf, &m_jpeg_outbuf) < 0) - LOGE("ERR(%s):Fail on api_jpeg_encode_deinit", __func__); + ALOGE("ERR(%s):Fail on api_jpeg_encode_deinit", __func__); m_jpeg_fd = 0; } } else { @@ -1977,7 +1977,7 @@ void SecCamera::getPostViewConfig(int *width, int *height, int *size) *width = m_snapshot_width; *height = m_snapshot_height; *size = FRAME_SIZE(V4L2_PIX_2_HAL_PIXEL_FORMAT(m_snapshot_v4lformat), *width, *height); - LOGV("[5B] m_preview_width : %d, mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d", + ALOGV("[5B] m_preview_width : %d, mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d", m_preview_width, *width, *height, *size); } @@ -1996,7 +1996,7 @@ int SecCamera::getPostViewOffset(void) int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char *jpeg_buf, int *output_size) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); int ret = 0; int i; @@ -2007,21 +2007,21 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * index = getSnapshot(); if (index < 0) { - LOGE("ERR(%s): Invalid index!", __func__); + ALOGE("ERR(%s): Invalid index!", __func__); return -1; } #ifndef BOARD_USE_V4L2_ION ret = fimc_v4l2_s_ctrl(m_cap_fd, V4L2_CID_STREAM_PAUSE, 0); CHECK_PTR(ret); - LOGV("snapshot dequeued buffer = %d snapshot_width = %d snapshot_height = %d", + ALOGV("snapshot dequeued buffer = %d snapshot_width = %d snapshot_height = %d", index, m_snapshot_width, m_snapshot_height); getCaptureAddr(index, yuv_buf); #endif if (yuv_buf->virt.extP[0] == NULL) { - LOGE("ERR(%s):Fail on SecCamera getCaptureAddr = %0x ", + ALOGE("ERR(%s):Fail on SecCamera getCaptureAddr = %0x ", __func__, yuv_buf->virt.extP[0]); return UNKNOWN_ERROR; } @@ -2031,21 +2031,21 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * index = getSnapshot(); if (index < 0) { - LOGE("ERR(%s): Invalid index!", __func__); + ALOGE("ERR(%s): Invalid index!", __func__); return -1; } #ifndef BOARD_USE_V4L2_ION ret = fimc_v4l2_s_ctrl(m_cap_fd, V4L2_CID_STREAM_PAUSE, 0); CHECK_PTR(ret); - LOGV("snapshot dequeued buffer = %d snapshot_width = %d snapshot_height = %d", + ALOGV("snapshot dequeued buffer = %d snapshot_width = %d snapshot_height = %d", index, m_snapshot_width, m_snapshot_height); getCaptureAddr(index, yuv_buf); #endif if (yuv_buf->virt.extP[0] == NULL) { - LOGE("ERR(%s):Fail on SecCamera getCaptureAddr = %0x ", + ALOGE("ERR(%s):Fail on SecCamera getCaptureAddr = %0x ", __func__, yuv_buf->virt.extP[0]); return UNKNOWN_ERROR; } @@ -2055,25 +2055,25 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * /* JPEG encode for smdkv310 */ if (m_jpeg_fd > 0) { if (api_jpeg_encode_deinit(m_jpeg_fd) != JPEG_OK) - LOGE("ERR(%s):Fail on api_jpeg_encode_deinit", __func__); + ALOGE("ERR(%s):Fail on api_jpeg_encode_deinit", __func__); m_jpeg_fd = 0; } m_jpeg_fd = api_jpeg_encode_init(); - LOGV("(%s):JPEG device open ID = %d", __func__, m_jpeg_fd); + ALOGV("(%s):JPEG device open ID = %d", __func__, m_jpeg_fd); if (m_jpeg_fd <= 0) { if (m_jpeg_fd < 0) { m_jpeg_fd = 0; - LOGE("ERR(%s):Cannot open a jpeg device file", __func__); + ALOGE("ERR(%s):Cannot open a jpeg device file", __func__); return -1; } - LOGE("ERR(%s):JPEG device was closed", __func__); + ALOGE("ERR(%s):JPEG device was closed", __func__); return -1; } if (m_snapshot_v4lformat == V4L2_PIX_FMT_RGB565) { - LOGE("ERR(%s):It doesn't support V4L2_PIX_FMT_RGB565", __func__); + ALOGE("ERR(%s):It doesn't support V4L2_PIX_FMT_RGB565", __func__); return -1; } @@ -2118,13 +2118,13 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * unsigned int snapshot_size = m_snapshot_width * m_snapshot_height * 2; unsigned char *pInBuf = (unsigned char *)api_jpeg_get_encode_in_buf(m_jpeg_fd, snapshot_size); if (pInBuf == NULL) { - LOGE("ERR(%s):JPEG input buffer is NULL!!", __func__); + ALOGE("ERR(%s):JPEG input buffer is NULL!!", __func__); return -1; } unsigned char *pOutBuf = (unsigned char *)api_jpeg_get_encode_out_buf(m_jpeg_fd); if (pOutBuf == NULL) { - LOGE("ERR(%s):JPEG output buffer is NULL!!", __func__); + ALOGE("ERR(%s):JPEG output buffer is NULL!!", __func__); return -1; } @@ -2132,7 +2132,7 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * enum jpeg_ret_type result = api_jpeg_encode_exe(m_jpeg_fd, &enc_param); if (result != JPEG_ENCODE_OK) { - LOGE("ERR(%s):encode failed", __func__); + ALOGE("ERR(%s):encode failed", __func__); return -1; } @@ -2143,20 +2143,20 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * #ifdef SAMSUNG_EXYNOS4x12 /* JPEG encode for smdk4x12 */ m_jpeg_fd = jpeghal_enc_init(); - LOGV("(%s):JPEG device open ID = %d", __func__, m_jpeg_fd); + ALOGV("(%s):JPEG device open ID = %d", __func__, m_jpeg_fd); if (m_jpeg_fd <= 0) { if (m_jpeg_fd < 0) { m_jpeg_fd = 0; - LOGE("ERR(%s):Cannot open a jpeg device file", __func__); + ALOGE("ERR(%s):Cannot open a jpeg device file", __func__); return -1; } - LOGE("ERR(%s):JPEG device was closed", __func__); + ALOGE("ERR(%s):JPEG device was closed", __func__); return -1; } if (m_snapshot_v4lformat == V4L2_PIX_FMT_RGB565) { - LOGE("ERR(%s):It doesn't support V4L2_PIX_FMT_RGB565", __func__); + ALOGE("ERR(%s):It doesn't support V4L2_PIX_FMT_RGB565", __func__); return -1; } @@ -2217,16 +2217,16 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * #endif if (jpeghal_set_inbuf(m_jpeg_fd, &m_jpeg_inbuf) < 0) { - LOGE("ERR(%s):Fail to JPEG input buffer!!", __func__); + ALOGE("ERR(%s):Fail to JPEG input buffer!!", __func__); return -1; } for (i = 0; i < m_jpeg_inbuf.num_planes; i++) { if ((unsigned int)m_jpeg_inbuf.start[i] & (SIZE_4K - 1)) { - LOGE("ERR(%s): JPEG start address should be aligned to 4 Kbytes", __func__); + ALOGE("ERR(%s): JPEG start address should be aligned to 4 Kbytes", __func__); return -1; } else if ((unsigned int)enc_config.width & (16 - 1)) { - LOGE("ERR(%s): Image width should be multiple of 16", __func__); + ALOGE("ERR(%s): Image width should be multiple of 16", __func__); return -1; } } @@ -2236,7 +2236,7 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * m_jpeg_outbuf.num_planes = 1; if (jpeghal_set_outbuf(m_jpeg_fd, &m_jpeg_outbuf) < 0) { - LOGE("ERR(%s):Fail to JPEG output buffer!!", __func__); + ALOGE("ERR(%s):Fail to JPEG output buffer!!", __func__); return -1; } @@ -2245,13 +2245,13 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * #endif if (jpeghal_enc_exe(m_jpeg_fd, &m_jpeg_inbuf, &m_jpeg_outbuf) < 0) { - LOGE("ERR(%s):encode failed", __func__); + ALOGE("ERR(%s):encode failed", __func__); return -1; } ret = jpeghal_g_ctrl(m_jpeg_fd, V4L2_CID_CAM_JPEG_ENCODEDSIZE); if (ret < 0) { - LOGE("ERR(%s): jpeghal_g_ctrl fail on V4L2_CID_CAM_JPEG_ENCODEDSIZE", __func__); + ALOGE("ERR(%s): jpeghal_g_ctrl fail on V4L2_CID_CAM_JPEG_ENCODEDSIZE", __func__); return -1; } else { *output_size = (unsigned int)ret; @@ -2261,7 +2261,7 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * if (m_jpeg_fd > 0) { if (jpeghal_deinit(m_jpeg_fd, &m_jpeg_inbuf, &m_jpeg_outbuf) < 0) - LOGE("ERR(%s):Fail on api_jpeg_encode_deinit", __func__); + ALOGE("ERR(%s):Fail on api_jpeg_encode_deinit", __func__); m_jpeg_fd = 0; } #endif @@ -2271,7 +2271,7 @@ int SecCamera::getSnapshotAndJpeg(SecBuffer *yuv_buf, int index, unsigned char * int SecCamera::setVideosnapshotSize(int width, int height) { - LOGV("%s(width(%d), height(%d))", __func__, width, height); + ALOGV("%s(width(%d), height(%d))", __func__, width, height); m_videosnapshot_width = width; m_videosnapshot_height = height; @@ -2299,7 +2299,7 @@ int SecCamera::getVideosnapshotSize(int *width, int *height, int *frame_size) int SecCamera::setSnapshotSize(int width, int height) { - LOGV("%s(width(%d), height(%d))", __func__, width, height); + ALOGV("%s(width(%d), height(%d))", __func__, width, height); m_snapshot_width = width; m_snapshot_height = height; @@ -2341,25 +2341,25 @@ int SecCamera::setSnapshotPixelFormat(int pixel_format) m_snapshot_v4lformat = v4lpixelformat; } -#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0 +#if defined(ALOG_NDEBUG) && LOG_NDEBUG == 0 if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV420) - LOGE("%s : SnapshotFormat:V4L2_PIX_FMT_YUV420", __func__); + ALOGE("%s : SnapshotFormat:V4L2_PIX_FMT_YUV420", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12T) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12T", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12T", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV21) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV21", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV21", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV422P) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUV422P", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUV422P", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUYV) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUYV", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUYV", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_UYVY) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_UYVY", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_UYVY", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_RGB565) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_RGB565", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_RGB565", __func__); else - LOGD("SnapshotFormat:UnknownFormat"); + ALOGD("SnapshotFormat:UnknownFormat"); #endif return 0; } @@ -2376,55 +2376,55 @@ int SecCamera::getCameraId(void) int SecCamera::initSetParams(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_ISO, ISO_AUTO) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ISO", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ISO", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_METERING, METERING_CENTER) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_METERING", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_METERING", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SATURATION, SATURATION_DEFAULT) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SATURATION", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SATURATION", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SCENE_MODE, SCENE_MODE_NONE) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SCENE_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SCENE_MODE", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SHARPNESS, SHARPNESS_DEFAULT) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SHARPNESS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SHARPNESS", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_WHITE_BALANCE, WHITE_BALANCE_AUTO) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WHITE_BALANCE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WHITE_BALANCE", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_ANTI_BANDING, ANTI_BANDING_OFF) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_BANDING", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_BANDING", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_CAMERA_CONTRAST, IS_CONTRAST_DEFAULT) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_CONTRAST", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_CONTRAST", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_EFFECT, IMAGE_EFFECT_NONE) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_EFFECT", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_EFFECT", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_CAMERA_BRIGHTNESS, IS_BRIGHTNESS_DEFAULT) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_BRIGHTNESS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_BRIGHTNESS", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_CAMERA_EXPOSURE, IS_EXPOSURE_DEFAULT) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_EXPOSURE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_EXPOSURE", __func__); return -1; } /* TODO */ @@ -2432,7 +2432,7 @@ int SecCamera::initSetParams(void) * hue value tuning was not complete */ #ifdef USE_HUE if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_CAMERA_HUE, IS_HUE_DEFAULT) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_HUE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_HUE", __func__); return -1; } #endif @@ -2444,15 +2444,15 @@ int SecCamera::initSetParams(void) int SecCamera::setAutofocus(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SET_AUTO_FOCUS, AUTO_FOCUS_ON) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__); return -1; } @@ -2463,15 +2463,15 @@ int SecCamera::setAutofocus(void) int SecCamera::setTouchAF(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FOCUS_MODE, FOCUS_MODE_TOUCH) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODE", __func__); return -1; } @@ -2484,17 +2484,17 @@ int SecCamera::getAutoFocusResult(void) af_result = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_CAMERA_AUTO_FOCUS_RESULT); - LOGV("%s : returning %d", __func__, af_result); + ALOGV("%s : returning %d", __func__, af_result); return af_result; } int SecCamera::cancelAutofocus(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -2502,7 +2502,7 @@ int SecCamera::cancelAutofocus(void) if (m_flag_camera_start && m_auto_focus_state) { if (m_params->focus_mode == FOCUS_MODE_AUTO || m_params->focus_mode == FOCUS_MODE_MACRO) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SET_AUTO_FOCUS, AUTO_FOCUS_OFF) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__); return -1; } } @@ -2515,7 +2515,7 @@ int SecCamera::cancelAutofocus(void) int SecCamera::SetRotate(int angle) { - LOGE("%s(angle(%d))", __func__, angle); + ALOGE("%s(angle(%d))", __func__, angle); if (m_angle != angle) { switch (angle) { @@ -2541,13 +2541,13 @@ int SecCamera::SetRotate(int angle) break; default: - LOGE("ERR(%s):Invalid angle(%d)", __func__, angle); + ALOGE("ERR(%s):Invalid angle(%d)", __func__, angle); return -1; } if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_ROTATION, angle) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_ROTATION", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_ROTATION", __func__); return -1; } m_angle = angle; @@ -2559,23 +2559,23 @@ int SecCamera::SetRotate(int angle) int SecCamera::getRotate(void) { - LOGV("%s : angle(%d)", __func__, m_angle); + ALOGV("%s : angle(%d)", __func__, m_angle); return m_angle; } int SecCamera::setFrameRate(int frame_rate) { - LOGV("%s(FrameRate(%d))", __func__, frame_rate); + ALOGV("%s(FrameRate(%d))", __func__, frame_rate); if (frame_rate < FRAME_RATE_AUTO || FRAME_RATE_MAX < frame_rate ) { - LOGE("ERR(%s):Invalid frame_rate(%d)", __func__, frame_rate); + ALOGE("ERR(%s):Invalid frame_rate(%d)", __func__, frame_rate); return -1; } if (m_params->capture.timeperframe.denominator != frame_rate) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FRAME_RATE, frame_rate) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FRAME_RATE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FRAME_RATE", __func__); return -1; } m_params->capture.timeperframe.denominator = frame_rate; @@ -2587,15 +2587,15 @@ int SecCamera::setFrameRate(int frame_rate) int SecCamera::setVerticalMirror(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_VFLIP, 0) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_VFLIP", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_VFLIP", __func__); return -1; } @@ -2604,15 +2604,15 @@ int SecCamera::setVerticalMirror(void) int SecCamera::setHorizontalMirror(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_HFLIP, 0) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_HFLIP", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_HFLIP", __func__); return -1; } @@ -2621,18 +2621,18 @@ int SecCamera::setHorizontalMirror(void) int SecCamera::setWhiteBalance(int white_balance) { - LOGV("%s(white_balance(%d))", __func__, white_balance); + ALOGV("%s(white_balance(%d))", __func__, white_balance); if (white_balance <= WHITE_BALANCE_BASE || WHITE_BALANCE_MAX <= white_balance) { - LOGE("ERR(%s):Invalid white_balance(%d)", __func__, white_balance); + ALOGE("ERR(%s):Invalid white_balance(%d)", __func__, white_balance); return -1; } if (m_params->white_balance != white_balance) { if (m_flag_camera_create) { - LOGE("%s(white_balance(%d))", __func__, white_balance); + ALOGE("%s(white_balance(%d))", __func__, white_balance); if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_WHITE_BALANCE, white_balance) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WHITE_BALANCE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WHITE_BALANCE", __func__); return -1; } m_params->white_balance = white_balance; @@ -2644,29 +2644,29 @@ int SecCamera::setWhiteBalance(int white_balance) int SecCamera::getWhiteBalance(void) { - LOGV("%s : white_balance(%d)", __func__, m_params->white_balance); + ALOGV("%s : white_balance(%d)", __func__, m_params->white_balance); return m_params->white_balance; } int SecCamera::setBrightness(int brightness) { - LOGV("%s(brightness(%d))", __func__, brightness); + ALOGV("%s(brightness(%d))", __func__, brightness); if (m_camera_use_ISP) { brightness += IS_BRIGHTNESS_DEFAULT; if (brightness < IS_BRIGHTNESS_MINUS_2 || IS_BRIGHTNESS_PLUS_2 < brightness) { - LOGE("ERR(%s):Invalid brightness(%d)", __func__, brightness); + ALOGE("ERR(%s):Invalid brightness(%d)", __func__, brightness); return -1; } } else { - LOGW("WARN(%s):Not supported brightness setting", __func__); + ALOGW("WARN(%s):Not supported brightness setting", __func__); return 0; } if (m_params->brightness != brightness) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_CAMERA_BRIGHTNESS, brightness) < EV_MINUS_4) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_BRIGHTNESS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_BRIGHTNESS", __func__); return -1; } m_params->brightness = brightness; @@ -2678,24 +2678,24 @@ int SecCamera::setBrightness(int brightness) int SecCamera::getBrightness(void) { - LOGV("%s : brightness(%d)", __func__, m_params->brightness); + ALOGV("%s : brightness(%d)", __func__, m_params->brightness); return m_params->brightness; } int SecCamera::setExposure(int exposure) { - LOGV("%s(exposure(%d))", __func__, exposure); + ALOGV("%s(exposure(%d))", __func__, exposure); if (m_camera_use_ISP) { exposure += IS_EXPOSURE_DEFAULT; if (exposure < IS_EXPOSURE_MINUS_4 || IS_EXPOSURE_PLUS_4 < exposure) { - LOGE("ERR(%s):Invalid exposure(%d)", __func__, exposure); + ALOGE("ERR(%s):Invalid exposure(%d)", __func__, exposure); return -1; } } else { exposure += EV_DEFAULT; if (exposure < EV_MINUS_4 || EV_PLUS_4 < exposure) { - LOGE("ERR(%s):Invalid exposure(%d)", __func__, exposure); + ALOGE("ERR(%s):Invalid exposure(%d)", __func__, exposure); return -1; } } @@ -2704,12 +2704,12 @@ int SecCamera::setExposure(int exposure) if (m_flag_camera_create) { if (m_camera_use_ISP) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_CAMERA_EXPOSURE, exposure) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_EXPOSURE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_EXPOSURE", __func__); return -1; } } else { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_BRIGHTNESS, exposure) < EV_MINUS_4) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BRIGHTNESS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BRIGHTNESS", __func__); return -1; } } @@ -2722,23 +2722,23 @@ int SecCamera::setExposure(int exposure) int SecCamera::getExposure(void) { - LOGV("%s : exposure(%d)", __func__, m_params->exposure); + ALOGV("%s : exposure(%d)", __func__, m_params->exposure); return m_params->exposure; } int SecCamera::setImageEffect(int image_effect) { - LOGV("%s(image_effect(%d))", __func__, image_effect); + ALOGV("%s(image_effect(%d))", __func__, image_effect); if (image_effect <= IMAGE_EFFECT_BASE || IMAGE_EFFECT_MAX <= image_effect) { - LOGE("ERR(%s):Invalid image_effect(%d)", __func__, image_effect); + ALOGE("ERR(%s):Invalid image_effect(%d)", __func__, image_effect); return -1; } if (m_params->effects != image_effect) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_EFFECT, image_effect) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_EFFECT", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_EFFECT", __func__); return -1; } m_params->effects = image_effect; @@ -2750,23 +2750,23 @@ int SecCamera::setImageEffect(int image_effect) int SecCamera::getImageEffect(void) { - LOGV("%s : image_effect(%d)", __func__, m_params->effects); + ALOGV("%s : image_effect(%d)", __func__, m_params->effects); return m_params->effects; } int SecCamera::setAntiBanding(int anti_banding) { - LOGV("%s(anti_banding(%d))", __func__, anti_banding); + ALOGV("%s(anti_banding(%d))", __func__, anti_banding); if (anti_banding < ANTI_BANDING_AUTO || ANTI_BANDING_OFF < anti_banding) { - LOGE("ERR(%s):Invalid anti_banding (%d)", __func__, anti_banding); + ALOGE("ERR(%s):Invalid anti_banding (%d)", __func__, anti_banding); return -1; } if (m_params->anti_banding != anti_banding) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_ANTI_BANDING, anti_banding) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_BANDING", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_BANDING", __func__); return -1; } m_params->anti_banding = anti_banding; @@ -2778,18 +2778,18 @@ int SecCamera::setAntiBanding(int anti_banding) int SecCamera::setSceneMode(int scene_mode) { - LOGV("%s(scene_mode(%d))", __func__, scene_mode); + ALOGV("%s(scene_mode(%d))", __func__, scene_mode); if (scene_mode <= SCENE_MODE_BASE || SCENE_MODE_MAX <= scene_mode) { - LOGE("ERR(%s):Invalid scene_mode (%d)", __func__, scene_mode); + ALOGE("ERR(%s):Invalid scene_mode (%d)", __func__, scene_mode); return -1; } if (m_params->scene_mode != scene_mode) { if (m_flag_camera_create) { - LOGE("%s(scene_mode(%d))", __func__, scene_mode); + ALOGE("%s(scene_mode(%d))", __func__, scene_mode); if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SCENE_MODE, scene_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SCENE_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SCENE_MODE", __func__); return -1; } m_params->scene_mode = scene_mode; @@ -2806,17 +2806,17 @@ int SecCamera::getSceneMode(void) int SecCamera::setFlashMode(int flash_mode) { - LOGV("%s(flash_mode(%d))", __func__, flash_mode); + ALOGV("%s(flash_mode(%d))", __func__, flash_mode); if (flash_mode <= FLASH_MODE_BASE || FLASH_MODE_MAX <= flash_mode) { - LOGE("ERR(%s):Invalid flash_mode (%d)", __func__, flash_mode); + ALOGE("ERR(%s):Invalid flash_mode (%d)", __func__, flash_mode); return -1; } if (m_params->flash_mode != flash_mode) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FLASH_MODE, flash_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FLASH_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FLASH_MODE", __func__); return -1; } m_params->flash_mode = flash_mode; @@ -2833,7 +2833,7 @@ int SecCamera::getFlashMode(void) int SecCamera::setAutoExposureLock(int toggle) { - LOGV("%s(toggle value(%d))", __func__, toggle); + ALOGV("%s(toggle value(%d))", __func__, toggle); int aeawb_mode = m_params->aeawb_mode; @@ -2842,7 +2842,7 @@ int SecCamera::setAutoExposureLock(int toggle) aeawb_mode = aeawb_mode ^ 0x1; m_params->aeawb_mode = aeawb_mode; if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_AEAWB_LOCK_UNLOCK, aeawb_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_AEAWB_LOCK_UNLOCK", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_AEAWB_LOCK_UNLOCK", __func__); return -1; } } @@ -2852,7 +2852,7 @@ int SecCamera::setAutoExposureLock(int toggle) int SecCamera::setAutoWhiteBalanceLock(int toggle) { - LOGV("%s(toggle value(%d))", __func__, toggle); + ALOGV("%s(toggle value(%d))", __func__, toggle); int aeawb_mode = m_params->aeawb_mode; @@ -2861,7 +2861,7 @@ int SecCamera::setAutoWhiteBalanceLock(int toggle) aeawb_mode = aeawb_mode ^ (0x1 << 1); m_params->aeawb_mode = aeawb_mode; if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_AEAWB_LOCK_UNLOCK, aeawb_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_AEAWB_LOCK_UNLOCK", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_AEAWB_LOCK_UNLOCK", __func__); return -1; } } @@ -2871,17 +2871,17 @@ int SecCamera::setAutoWhiteBalanceLock(int toggle) int SecCamera::setISO(int iso_value) { - LOGV("%s(iso_value(%d))", __func__, iso_value); + ALOGV("%s(iso_value(%d))", __func__, iso_value); if (iso_value < ISO_AUTO || ISO_MAX <= iso_value) { - LOGE("ERR(%s):Invalid iso_value (%d)", __func__, iso_value); + ALOGE("ERR(%s):Invalid iso_value (%d)", __func__, iso_value); return -1; } if (m_params->iso != iso_value) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_ISO, iso_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ISO", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ISO", __func__); return -1; } m_params->iso = iso_value; @@ -2898,16 +2898,16 @@ int SecCamera::getISO(void) int SecCamera::setContrast(int contrast_value) { - LOGV("%s(contrast_value(%d))", __func__, contrast_value); + ALOGV("%s(contrast_value(%d))", __func__, contrast_value); if (m_camera_use_ISP) { if (contrast_value < IS_CONTRAST_AUTO || IS_CONTRAST_MAX <= contrast_value) { - LOGE("ERR(%s):Invalid contrast_value (%d)", __func__, contrast_value); + ALOGE("ERR(%s):Invalid contrast_value (%d)", __func__, contrast_value); return -1; } } else { if (contrast_value < CONTRAST_MINUS_2 || CONTRAST_MAX <= contrast_value) { - LOGE("ERR(%s):Invalid contrast_value (%d)", __func__, contrast_value); + ALOGE("ERR(%s):Invalid contrast_value (%d)", __func__, contrast_value); return -1; } } @@ -2916,12 +2916,12 @@ int SecCamera::setContrast(int contrast_value) if (m_flag_camera_create) { if (m_camera_use_ISP) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_CAMERA_CONTRAST, contrast_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_CONTRAST", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_CONTRAST", __func__); return -1; } } else { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_CONTRAST, contrast_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CONTRAST", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CONTRAST", __func__); return -1; } } @@ -2939,18 +2939,18 @@ int SecCamera::getContrast(void) int SecCamera::setSaturation(int saturation_value) { - LOGV("%s(saturation_value(%d))", __func__, saturation_value); + ALOGV("%s(saturation_value(%d))", __func__, saturation_value); saturation_value += SATURATION_DEFAULT; if (saturation_value < SATURATION_MINUS_2 || SATURATION_MAX <= saturation_value) { - LOGE("ERR(%s):Invalid saturation_value (%d)", __func__, saturation_value); + ALOGE("ERR(%s):Invalid saturation_value (%d)", __func__, saturation_value); return -1; } if (m_params->saturation != saturation_value) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SATURATION, saturation_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SATURATION", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SATURATION", __func__); return -1; } m_params->saturation = saturation_value; @@ -2967,18 +2967,18 @@ int SecCamera::getSaturation(void) int SecCamera::setSharpness(int sharpness_value) { - LOGV("%s(sharpness_value(%d))", __func__, sharpness_value); + ALOGV("%s(sharpness_value(%d))", __func__, sharpness_value); sharpness_value += SHARPNESS_DEFAULT; if (sharpness_value < SHARPNESS_MINUS_2 || SHARPNESS_MAX <= sharpness_value) { - LOGE("ERR(%s):Invalid sharpness_value (%d)", __func__, sharpness_value); + ALOGE("ERR(%s):Invalid sharpness_value (%d)", __func__, sharpness_value); return -1; } if (m_params->sharpness != sharpness_value) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SHARPNESS, sharpness_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SHARPNESS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SHARPNESS", __func__); return -1; } m_params->sharpness = sharpness_value; @@ -2995,7 +2995,7 @@ int SecCamera::getSharpness(void) int SecCamera::setHue(int hue_value) { - LOGV("%s(hue_value(%d))", __func__, hue_value); + ALOGV("%s(hue_value(%d))", __func__, hue_value); /* TODO */ /* This code is temporary implementation because * @@ -3004,18 +3004,18 @@ int SecCamera::setHue(int hue_value) if (m_camera_use_ISP) { hue_value += IS_HUE_DEFAULT; if (hue_value < IS_HUE_MINUS_2 || IS_HUE_MAX <= hue_value) { - LOGE("ERR(%s):Invalid hue_value (%d)", __func__, hue_value); + ALOGE("ERR(%s):Invalid hue_value (%d)", __func__, hue_value); return -1; } } else { - LOGW("WARN(%s):Not supported hue setting", __func__); + ALOGW("WARN(%s):Not supported hue setting", __func__); return 0; } if (m_params->hue != hue_value) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_CAMERA_HUE, hue_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_HUE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_HUE", __func__); return -1; } m_params->hue = hue_value; @@ -3033,16 +3033,16 @@ int SecCamera::getHue(void) int SecCamera::setWDR(int wdr_value) { - LOGV("%s(wdr_value(%d))", __func__, wdr_value); + ALOGV("%s(wdr_value(%d))", __func__, wdr_value); if (m_camera_use_ISP) { if (wdr_value < IS_DRC_BYPASS_DISABLE || IS_DRC_BYPASS_MAX <= wdr_value) { - LOGE("ERR(%s):Invalid drc_value (%d)", __func__, wdr_value); + ALOGE("ERR(%s):Invalid drc_value (%d)", __func__, wdr_value); return -1; } } else { if (wdr_value < WDR_OFF || WDR_MAX <= wdr_value) { - LOGE("ERR(%s):Invalid wdr_value (%d)", __func__, wdr_value); + ALOGE("ERR(%s):Invalid wdr_value (%d)", __func__, wdr_value); return -1; } } @@ -3051,12 +3051,12 @@ int SecCamera::setWDR(int wdr_value) if (m_flag_camera_create) { if (m_camera_use_ISP) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_SET_DRC, wdr_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_SET_DRC", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_SET_DRC", __func__); return -1; } } else { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_WDR, wdr_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WDR", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WDR", __func__); return -1; } } @@ -3074,17 +3074,17 @@ int SecCamera::getWDR(void) int SecCamera::setAntiShake(int anti_shake) { - LOGV("%s(anti_shake(%d))", __func__, anti_shake); + ALOGV("%s(anti_shake(%d))", __func__, anti_shake); if (anti_shake < ANTI_SHAKE_OFF || ANTI_SHAKE_MAX <= anti_shake) { - LOGE("ERR(%s):Invalid anti_shake (%d)", __func__, anti_shake); + ALOGE("ERR(%s):Invalid anti_shake (%d)", __func__, anti_shake); return -1; } if (m_anti_shake != anti_shake) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_ANTI_SHAKE, anti_shake) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_SHAKE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_SHAKE", __func__); return -1; } m_anti_shake = anti_shake; @@ -3101,17 +3101,17 @@ int SecCamera::getAntiShake(void) int SecCamera::setMetering(int metering_value) { - LOGV("%s(metering (%d))", __func__, metering_value); + ALOGV("%s(metering (%d))", __func__, metering_value); if (metering_value <= METERING_BASE || METERING_MAX <= metering_value) { - LOGE("ERR(%s):Invalid metering_value (%d)", __func__, metering_value); + ALOGE("ERR(%s):Invalid metering_value (%d)", __func__, metering_value); return -1; } if (m_params->metering != metering_value) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_METERING, metering_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_METERING", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_METERING", __func__); return -1; } m_params->metering = metering_value; @@ -3128,10 +3128,10 @@ int SecCamera::getMetering(void) int SecCamera::setJpegQuality(int jpeg_quality) { - LOGV("%s(jpeg_quality (%d))", __func__, jpeg_quality); + ALOGV("%s(jpeg_quality (%d))", __func__, jpeg_quality); if (jpeg_quality < JPEG_QUALITY_ECONOMY || JPEG_QUALITY_MAX <= jpeg_quality) { - LOGE("ERR(%s):Invalid jpeg_quality (%d)", __func__, jpeg_quality); + ALOGE("ERR(%s):Invalid jpeg_quality (%d)", __func__, jpeg_quality); return -1; } @@ -3140,7 +3140,7 @@ int SecCamera::setJpegQuality(int jpeg_quality) if (m_flag_camera_create && !m_camera_use_ISP) { jpeg_quality -= 5; if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAM_JPEG_QUALITY, jpeg_quality) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAM_JPEG_QUALITY", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAM_JPEG_QUALITY", __func__); return -1; } } @@ -3156,17 +3156,17 @@ int SecCamera::getJpegQuality(void) int SecCamera::setZoom(int zoom_level) { - LOGV("%s(zoom_level (%d))", __func__, zoom_level); + ALOGV("%s(zoom_level (%d))", __func__, zoom_level); if (zoom_level < ZOOM_LEVEL_0 || ZOOM_LEVEL_MAX <= zoom_level) { - LOGE("ERR(%s):Invalid zoom_level (%d)", __func__, zoom_level); + ALOGE("ERR(%s):Invalid zoom_level (%d)", __func__, zoom_level); return -1; } if (m_zoom_level != zoom_level) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_ZOOM, zoom_level) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ZOOM", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ZOOM", __func__); return -1; } m_zoom_level = zoom_level; @@ -3183,10 +3183,10 @@ int SecCamera::getZoom(void) int SecCamera::setObjectTracking(int object_tracking) { - LOGV("%s(object_tracking (%d))", __func__, object_tracking); + ALOGV("%s(object_tracking (%d))", __func__, object_tracking); if (object_tracking < OBJECT_TRACKING_OFF || OBJECT_TRACKING_MAX <= object_tracking) { - LOGE("ERR(%s):Invalid object_tracking (%d)", __func__, object_tracking); + ALOGE("ERR(%s):Invalid object_tracking (%d)", __func__, object_tracking); return -1; } @@ -3210,12 +3210,12 @@ int SecCamera::getObjectTrackingStatus(void) int SecCamera::setObjectTrackingStartStop(int start_stop) { - LOGV("%s(object_tracking_start_stop (%d))", __func__, start_stop); + ALOGV("%s(object_tracking_start_stop (%d))", __func__, start_stop); if (m_object_tracking_start_stop != start_stop) { m_object_tracking_start_stop = start_stop; if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_OBJ_TRACKING_START_STOP, start_stop) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJ_TRACKING_START_STOP", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJ_TRACKING_START_STOP", __func__); return -1; } } @@ -3225,12 +3225,12 @@ int SecCamera::setObjectTrackingStartStop(int start_stop) int SecCamera::setTouchAFStartStop(int start_stop) { - LOGV("%s(touch_af_start_stop (%d))", __func__, start_stop); + ALOGV("%s(touch_af_start_stop (%d))", __func__, start_stop); if (m_touch_af_start_stop != start_stop) { m_touch_af_start_stop = start_stop; if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_TOUCH_AF_START_STOP, start_stop) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_TOUCH_AF_START_STOP", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_TOUCH_AF_START_STOP", __func__); return -1; } } @@ -3240,17 +3240,17 @@ int SecCamera::setTouchAFStartStop(int start_stop) int SecCamera::setSmartAuto(int smart_auto) { - LOGV("%s(smart_auto (%d))", __func__, smart_auto); + ALOGV("%s(smart_auto (%d))", __func__, smart_auto); if (smart_auto < SMART_AUTO_OFF || SMART_AUTO_MAX <= smart_auto) { - LOGE("ERR(%s):Invalid smart_auto (%d)", __func__, smart_auto); + ALOGE("ERR(%s):Invalid smart_auto (%d)", __func__, smart_auto); return -1; } if (m_smart_auto != smart_auto) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SMART_AUTO, smart_auto) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SMART_AUTO", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SMART_AUTO", __func__); return -1; } m_smart_auto = smart_auto; @@ -3273,7 +3273,7 @@ int SecCamera::getAutosceneStatus(void) autoscene_status = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_CAMERA_SMART_AUTO_STATUS); if ((autoscene_status < SMART_AUTO_STATUS_AUTO) || (autoscene_status > SMART_AUTO_STATUS_MAX)) { - LOGE("ERR(%s):Invalid getAutosceneStatus (%d)", __func__, autoscene_status); + ALOGE("ERR(%s):Invalid getAutosceneStatus (%d)", __func__, autoscene_status); return -1; } } @@ -3282,17 +3282,17 @@ int SecCamera::getAutosceneStatus(void) int SecCamera::setBeautyShot(int beauty_shot) { - LOGV("%s(beauty_shot (%d))", __func__, beauty_shot); + ALOGV("%s(beauty_shot (%d))", __func__, beauty_shot); if (beauty_shot < BEAUTY_SHOT_OFF || BEAUTY_SHOT_MAX <= beauty_shot) { - LOGE("ERR(%s):Invalid beauty_shot (%d)", __func__, beauty_shot); + ALOGE("ERR(%s):Invalid beauty_shot (%d)", __func__, beauty_shot); return -1; } if (m_beauty_shot != beauty_shot) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_BEAUTY_SHOT, beauty_shot) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BEAUTY_SHOT", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BEAUTY_SHOT", __func__); return -1; } m_beauty_shot = beauty_shot; @@ -3311,17 +3311,17 @@ int SecCamera::getBeautyShot(void) int SecCamera::setVintageMode(int vintage_mode) { - LOGV("%s(vintage_mode(%d))", __func__, vintage_mode); + ALOGV("%s(vintage_mode(%d))", __func__, vintage_mode); if (vintage_mode <= VINTAGE_MODE_BASE || VINTAGE_MODE_MAX <= vintage_mode) { - LOGE("ERR(%s):Invalid vintage_mode (%d)", __func__, vintage_mode); + ALOGE("ERR(%s):Invalid vintage_mode (%d)", __func__, vintage_mode); return -1; } if (m_vintage_mode != vintage_mode) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_VINTAGE_MODE, vintage_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_VINTAGE_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_VINTAGE_MODE", __func__); return -1; } m_vintage_mode = vintage_mode; @@ -3338,10 +3338,10 @@ int SecCamera::getVintageMode(void) int SecCamera::setFocusMode(int focus_mode) { - LOGV("%s(focus_mode(%d))", __func__, focus_mode); + ALOGV("%s(focus_mode(%d))", __func__, focus_mode); if (FOCUS_MODE_MAX <= focus_mode) { - LOGE("ERR(%s):Invalid focus_mode (%d)", __func__, focus_mode); + ALOGE("ERR(%s):Invalid focus_mode (%d)", __func__, focus_mode); return -1; } @@ -3349,17 +3349,17 @@ int SecCamera::setFocusMode(int focus_mode) if (m_flag_camera_create) { if (m_params->focus_mode == FOCUS_MODE_AUTO || m_params->focus_mode == FOCUS_MODE_MACRO) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SET_AUTO_FOCUS, AUTO_FOCUS_OFF) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__); return -1; } } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FOCUS_MODE, focus_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODE", __func__); return -1; } if (!m_camera_use_ISP) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SET_AUTO_FOCUS, AUTO_FOCUS_ON) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__); return -1; } } @@ -3377,15 +3377,15 @@ int SecCamera::getFocusMode(void) int SecCamera::setFaceDetect(int face_detect) { - LOGV("%s(face_detect(%d))", __func__, face_detect); + ALOGV("%s(face_detect(%d))", __func__, face_detect); if (m_camera_use_ISP) { if (face_detect < IS_FD_COMMAND_STOP || IS_FD_COMMAND_MAX <= face_detect) { - LOGE("ERR(%s):Invalid face_detect value (%d)", __func__, face_detect); + ALOGE("ERR(%s):Invalid face_detect value (%d)", __func__, face_detect); return -1; } } else { if (face_detect < FACE_DETECTION_OFF || FACE_DETECTION_MAX <= face_detect) { - LOGE("ERR(%s):Invalid face_detect value (%d)", __func__, face_detect); + ALOGE("ERR(%s):Invalid face_detect value (%d)", __func__, face_detect); return -1; } } @@ -3394,12 +3394,12 @@ int SecCamera::setFaceDetect(int face_detect) if (m_flag_camera_create) { if (m_camera_use_ISP) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_IS_CMD_FD, face_detect) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CMD_FD", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CMD_FD", __func__); return -1; } } else { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FACE_DETECTION, face_detect) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACE_DETECTION", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACE_DETECTION", __func__); return -1; } } @@ -3418,7 +3418,7 @@ int SecCamera::getFaceDetect(void) int SecCamera::setGPSLatitude(const char *gps_latitude) { double conveted_latitude = 0; - LOGV("%s(gps_latitude(%s))", __func__, gps_latitude); + ALOGV("%s(gps_latitude(%s))", __func__, gps_latitude); if (gps_latitude == NULL) m_gps_latitude = 0; else { @@ -3426,14 +3426,14 @@ int SecCamera::setGPSLatitude(const char *gps_latitude) m_gps_latitude = (long)(conveted_latitude * 10000 / 1); } - LOGV("%s(m_gps_latitude(%ld))", __func__, m_gps_latitude); + ALOGV("%s(m_gps_latitude(%ld))", __func__, m_gps_latitude); return 0; } int SecCamera::setGPSLongitude(const char *gps_longitude) { double conveted_longitude = 0; - LOGV("%s(gps_longitude(%s))", __func__, gps_longitude); + ALOGV("%s(gps_longitude(%s))", __func__, gps_longitude); if (gps_longitude == NULL) m_gps_longitude = 0; else { @@ -3441,14 +3441,14 @@ int SecCamera::setGPSLongitude(const char *gps_longitude) m_gps_longitude = (long)(conveted_longitude * 10000 / 1); } - LOGV("%s(m_gps_longitude(%ld))", __func__, m_gps_longitude); + ALOGV("%s(m_gps_longitude(%ld))", __func__, m_gps_longitude); return 0; } int SecCamera::setGPSAltitude(const char *gps_altitude) { double conveted_altitude = 0; - LOGV("%s(gps_altitude(%s))", __func__, gps_altitude); + ALOGV("%s(gps_altitude(%s))", __func__, gps_altitude); if (gps_altitude == NULL) m_gps_altitude = 0; else { @@ -3456,25 +3456,25 @@ int SecCamera::setGPSAltitude(const char *gps_altitude) m_gps_altitude = (long)(conveted_altitude * 100 / 1); } - LOGV("%s(m_gps_altitude(%ld))", __func__, m_gps_altitude); + ALOGV("%s(m_gps_altitude(%ld))", __func__, m_gps_altitude); return 0; } int SecCamera::setGPSTimeStamp(const char *gps_timestamp) { - LOGV("%s(gps_timestamp(%s))", __func__, gps_timestamp); + ALOGV("%s(gps_timestamp(%s))", __func__, gps_timestamp); if (gps_timestamp == NULL) m_gps_timestamp = 0; else m_gps_timestamp = atol(gps_timestamp); - LOGV("%s(m_gps_timestamp(%ld))", __func__, m_gps_timestamp); + ALOGV("%s(m_gps_timestamp(%ld))", __func__, m_gps_timestamp); return 0; } int SecCamera::setGPSProcessingMethod(const char *gps_processing_method) { - LOGV("%s(gps_processing_method(%s))", __func__, gps_processing_method); + ALOGV("%s(gps_processing_method(%s))", __func__, gps_processing_method); memset(mExifInfo.gps_processing_method, 0, sizeof(mExifInfo.gps_processing_method)); if (gps_processing_method != NULL) { size_t len = strlen(gps_processing_method); @@ -3488,10 +3488,10 @@ int SecCamera::setGPSProcessingMethod(const char *gps_processing_method) int SecCamera::setFaceDetectLockUnlock(int facedetect_lockunlock) { - LOGV("%s(facedetect_lockunlock(%d))", __func__, facedetect_lockunlock); + ALOGV("%s(facedetect_lockunlock(%d))", __func__, facedetect_lockunlock); if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FACEDETECT_LOCKUNLOCK, facedetect_lockunlock) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACEDETECT_LOCKUNLOCK", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACEDETECT_LOCKUNLOCK", __func__); return -1; } @@ -3500,15 +3500,15 @@ int SecCamera::setFaceDetectLockUnlock(int facedetect_lockunlock) int SecCamera::setObjectPosition(int x, int y) { - LOGV("%s(setObjectPosition(x=%d, y=%d))", __func__, x, y); + ALOGV("%s(setObjectPosition(x=%d, y=%d))", __func__, x, y); if (m_flag_camera_start) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_OBJECT_POSITION_X, x) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_X", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_X", __func__); return -1; } if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_OBJECT_POSITION_Y, y) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_Y", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_Y", __func__); return -1; } } @@ -3518,17 +3518,17 @@ int SecCamera::setObjectPosition(int x, int y) int SecCamera::setGamma(int gamma) { - LOGV("%s(gamma(%d))", __func__, gamma); + ALOGV("%s(gamma(%d))", __func__, gamma); if (gamma < GAMMA_OFF || GAMMA_MAX <= gamma) { - LOGE("ERR(%s):Invalid gamma (%d)", __func__, gamma); + ALOGE("ERR(%s):Invalid gamma (%d)", __func__, gamma); return -1; } if (m_video_gamma != gamma) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SET_GAMMA, gamma) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_GAMMA", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_GAMMA", __func__); return -1; } m_video_gamma = gamma; @@ -3540,17 +3540,17 @@ int SecCamera::setGamma(int gamma) int SecCamera::setSlowAE(int slow_ae) { - LOGV("%s(slow_ae(%d))", __func__, slow_ae); + ALOGV("%s(slow_ae(%d))", __func__, slow_ae); if (slow_ae < GAMMA_OFF || GAMMA_MAX <= slow_ae) { - LOGE("ERR(%s):Invalid slow_ae (%d)", __func__, slow_ae); + ALOGE("ERR(%s):Invalid slow_ae (%d)", __func__, slow_ae); return -1; } if (m_slow_ae!= slow_ae) { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_SET_SLOW_AE, slow_ae) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_SLOW_AE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_SLOW_AE", __func__); return -1; } m_slow_ae = slow_ae; @@ -3562,7 +3562,7 @@ int SecCamera::setSlowAE(int slow_ae) int SecCamera::setRecordingSize(int width, int height) { - LOGV("%s(width(%d), height(%d))", __func__, width, height); + ALOGV("%s(width(%d), height(%d))", __func__, width, height); m_recording_width = width; m_recording_height = height; @@ -3580,10 +3580,10 @@ int SecCamera::getRecordingSize(int *width, int *height) int SecCamera::setExifOrientationInfo(int orientationInfo) { - LOGV("%s(orientationInfo(%d))", __func__, orientationInfo); + ALOGV("%s(orientationInfo(%d))", __func__, orientationInfo); if (orientationInfo < 0) { - LOGE("ERR(%s):Invalid orientationInfo (%d)", __func__, orientationInfo); + ALOGE("ERR(%s):Invalid orientationInfo (%d)", __func__, orientationInfo); return -1; } m_exif_orientation = orientationInfo; @@ -3595,7 +3595,7 @@ int SecCamera::setBatchReflection() { if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_BATCH_REFLECTION, 1) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BATCH_REFLECTION", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BATCH_REFLECTION", __func__); return -1; } } @@ -3606,10 +3606,10 @@ int SecCamera::setBatchReflection() /* Camcorder fix fps */ int SecCamera::setSensorMode(int sensor_mode) { - LOGV("%s(sensor_mode (%d))", __func__, sensor_mode); + ALOGV("%s(sensor_mode (%d))", __func__, sensor_mode); if (sensor_mode < SENSOR_MODE_CAMERA || SENSOR_MODE_MOVIE < sensor_mode) { - LOGE("ERR(%s):Invalid sensor mode (%d)", __func__, sensor_mode); + ALOGE("ERR(%s):Invalid sensor mode (%d)", __func__, sensor_mode); return -1; } @@ -3628,9 +3628,9 @@ int SecCamera::setSensorMode(int sensor_mode) */ int SecCamera::setShotMode(int shot_mode) { - LOGV("%s(shot_mode (%d))", __func__, shot_mode); + ALOGV("%s(shot_mode (%d))", __func__, shot_mode); if (shot_mode < SHOT_MODE_SINGLE || SHOT_MODE_SELF < shot_mode) { - LOGE("ERR(%s):Invalid shot_mode (%d)", __func__, shot_mode); + ALOGE("ERR(%s):Invalid shot_mode (%d)", __func__, shot_mode); return -1; } m_shot_mode = shot_mode; @@ -3640,10 +3640,10 @@ int SecCamera::setShotMode(int shot_mode) int SecCamera::setDataLineCheck(int chk_dataline) { - LOGV("%s(chk_dataline (%d))", __func__, chk_dataline); + ALOGV("%s(chk_dataline (%d))", __func__, chk_dataline); if (chk_dataline < CHK_DATALINE_OFF || CHK_DATALINE_MAX <= chk_dataline) { - LOGE("ERR(%s):Invalid chk_dataline (%d)", __func__, chk_dataline); + ALOGE("ERR(%s):Invalid chk_dataline (%d)", __func__, chk_dataline); return -1; } @@ -3659,11 +3659,11 @@ int SecCamera::getDataLineCheck(void) int SecCamera::setDataLineCheckStop(void) { - LOGV("%s", __func__); + ALOGV("%s", __func__); if (m_flag_camera_create) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_CHECK_DATALINE_STOP, 1) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CHECK_DATALINE_STOP", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CHECK_DATALINE_STOP", __func__); return -1; } } @@ -3672,14 +3672,14 @@ int SecCamera::setDataLineCheckStop(void) const __u8* SecCamera::getCameraSensorName(void) { - LOGV("%s", __func__); + ALOGV("%s", __func__); return fimc_v4l2_enuminput(m_cam_fd, getCameraId()); } bool SecCamera::getUseInternalISP(void) { - LOGV("%s", __func__); + ALOGV("%s", __func__); int ret = 0; /*TODO*/ @@ -3700,7 +3700,7 @@ bool SecCamera::getUseInternalISP(void) #ifdef ENABLE_ESD_PREVIEW_CHECK int SecCamera::getCameraSensorESDStatus(void) { - LOGV("%s", __func__); + ALOGV("%s", __func__); // 0 : normal operation, 1 : abnormal operation int status = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_ESD_INT); @@ -3711,7 +3711,7 @@ int SecCamera::getCameraSensorESDStatus(void) int SecCamera::setJpegThumbnailSize(int width, int height) { - LOGV("%s(width(%d), height(%d))", __func__, width, height); + ALOGV("%s(width(%d), height(%d))", __func__, width, height); m_jpeg_thumbnail_width = width; m_jpeg_thumbnail_height = height; @@ -3731,10 +3731,10 @@ int SecCamera::getJpegThumbnailSize(int *width, int *height) int SecCamera::setJpegThumbnailQuality(int jpeg_thumbnail_quality) { - LOGV("%s(jpeg_thumbnail_quality (%d))", __func__, jpeg_thumbnail_quality); + ALOGV("%s(jpeg_thumbnail_quality (%d))", __func__, jpeg_thumbnail_quality); if (jpeg_thumbnail_quality < JPEG_QUALITY_ECONOMY || JPEG_QUALITY_MAX <= jpeg_thumbnail_quality) { - LOGE("ERR(%s):Invalid jpeg_thumbnail_quality (%d)", __func__, jpeg_thumbnail_quality); + ALOGE("ERR(%s):Invalid jpeg_thumbnail_quality (%d)", __func__, jpeg_thumbnail_quality); return -1; } @@ -3852,14 +3852,14 @@ void SecCamera::setExifChangedAttribute() if (m_camera_use_ISP) { shutterSpeed = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_IS_CAMERA_EXIF_SHUTTERSPEED); if (shutterSpeed <= 0) { - LOGE("%s: error %d getting shutterSpeed, camera_id = %d, using 100", + ALOGE("%s: error %d getting shutterSpeed, camera_id = %d, using 100", __func__, shutterSpeed, m_camera_id); shutterSpeed = 100; } } else { shutterSpeed = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_CAMERA_EXIF_TV); if (shutterSpeed <= 0) { - LOGE("%s: error %d getting shutterSpeed, camera_id = %d, using 100", + ALOGE("%s: error %d getting shutterSpeed, camera_id = %d, using 100", __func__, shutterSpeed, m_camera_id); shutterSpeed = 100; } @@ -3870,7 +3870,7 @@ void SecCamera::setExifChangedAttribute() if (m_camera_use_ISP) { exptime = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_CAMERA_EXIF_EXPTIME); if (exptime <= 0) { - LOGE("%s: error %d getting exposure time, camera_id = %d, using 100", + ALOGE("%s: error %d getting exposure time, camera_id = %d, using 100", __func__, exptime, m_camera_id); exptime = 100; } @@ -3889,7 +3889,7 @@ void SecCamera::setExifChangedAttribute() else iso = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_CAMERA_EXIF_ISO); if (iso < 0) { - LOGE("%s: error %d getting iso, camera_id = %d, using 100", + ALOGE("%s: error %d getting iso, camera_id = %d, using 100", __func__, iso, m_camera_id); iso = 0; } @@ -3909,8 +3909,8 @@ void SecCamera::setExifChangedAttribute() bv = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_CAMERA_EXIF_BV); ev = fimc_v4l2_g_ctrl(m_cam_fd, V4L2_CID_CAMERA_EXIF_EBV); } - LOGD("Shutter speed=1/%d s, iso=%d", shutterSpeed, mExifInfo.iso_speed_rating); - LOGD("AV=%d, TV=%d, SV=%d, BV=%d, EV=%d", av, tv, sv, bv, ev); + ALOGD("Shutter speed=1/%d s, iso=%d", shutterSpeed, mExifInfo.iso_speed_rating); + ALOGD("AV=%d, TV=%d, SV=%d, BV=%d, EV=%d", av, tv, sv, bv, ev); //3 Shutter Speed mExifInfo.shutter_speed.num = 1; @@ -4262,7 +4262,7 @@ int SecCamera::makeExif (unsigned char *exifOut, unsigned char size_mm[2] = {(tmp >> 8) & 0xFF, tmp & 0xFF}; memcpy(pApp1Start, size_mm, 2); - LOGD("makeExif X"); + ALOGD("makeExif X"); return 0; } 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 @@ CameraHardwareSec::CameraHardwareSec(int cameraId, camera_device_t *dev) mTouched(0), mHalDevice(dev) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); memset(&mCapBuffer, 0, sizeof(struct SecBuffer)); int ret = 0; @@ -112,12 +112,12 @@ CameraHardwareSec::CameraHardwareSec(int cameraId, camera_device_t *dev) 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 @@ int CameraHardwareSec::getCameraId() const 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 @@ void CameraHardwareSec::initDefaultParameters(int cameraId) 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 @@ void CameraHardwareSec::initDefaultParameters(int cameraId) // 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 @@ void CameraHardwareSec::initDefaultParameters(int cameraId) CameraHardwareSec::~CameraHardwareSec() { - LOGV("%s", __func__); + ALOGV("%s", __func__); mSecCamera->DestroyCamera(); } @@ -445,33 +445,33 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) 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 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) 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 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) #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 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) 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 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) 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 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) #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::setCallbacks(camera_notify_callback notify_cb, 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 @@ void CameraHardwareSec::enableMsgType(int32_t msgType) } 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 @@ void CameraHardwareSec::setSkipFrame(int frame) 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 @@ int CameraHardwareSec::previewThread() 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 @@ int CameraHardwareSec::previewThread() 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 @@ int CameraHardwareSec::previewThread() 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 @@ int CameraHardwareSec::previewThread() 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 @@ int CameraHardwareSec::previewThread() #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 @@ int CameraHardwareSec::previewThread() #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 @@ callbacks: 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 @@ callbacks: 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 @@ callbacks: 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 @@ status_t CameraHardwareSec::startPreview() { 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 @@ status_t CameraHardwareSec::startPreview() 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::startPreview() 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 @@ status_t CameraHardwareSec::startPreviewInternal() 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 @@ status_t CameraHardwareSec::startPreviewInternal() *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 @@ status_t CameraHardwareSec::startPreviewInternal() #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 @@ status_t CameraHardwareSec::startPreviewInternal() 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 @@ status_t CameraHardwareSec::startPreviewInternal() void CameraHardwareSec::stopPreviewInternal() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); /* request that the preview thread stop. */ if (mPreviewRunning) { @@ -982,7 +982,7 @@ void CameraHardwareSec::stopPreviewInternal() 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 @@ void CameraHardwareSec::stopPreviewInternal() #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 @@ void CameraHardwareSec::stopPreview() 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 @@ status_t CameraHardwareSec::startRecording() 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 @@ status_t CameraHardwareSec::startRecording() 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 @@ void CameraHardwareSec::stopRecording() 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 CameraHardwareSec::autoFocusThread() 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 @@ int CameraHardwareSec::autoFocusThread() /* 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 @@ int CameraHardwareSec::autoFocusThread() /* 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 @@ int CameraHardwareSec::autoFocusThread() } 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 @@ int CameraHardwareSec::autoFocusThread() 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::autoFocus() 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 @@ int CameraHardwareSec::save_jpeg( unsigned char *real_jpeg, int jpeg_size) /* 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 @@ void CameraHardwareSec::save_postview(const char *fname, uint8_t *buf, uint32_t 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 @@ bool CameraHardwareSec::scaleDownYuv422(char *srcBuf, uint32_t srcWidth, uint32_ 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 @@ bool CameraHardwareSec::YUY2toNV21(void *srcBuf, void *dstBuf, uint32_t srcWidth int CameraHardwareSec::pictureThread() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); int jpeg_size = 0; int ret = NO_ERROR; @@ -1363,7 +1363,7 @@ int CameraHardwareSec::pictureThread() 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 @@ int CameraHardwareSec::pictureThread() 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 @@ int CameraHardwareSec::pictureThread() 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 @@ int CameraHardwareSec::pictureThread() JpegHeap->release(JpegHeap); return UNKNOWN_ERROR; } - LOGI("snapshotandjpeg done"); + ALOGI("snapshotandjpeg done"); #ifdef ZERO_SHUTTER_LAG if (!mRecordRunning) @@ -1443,14 +1443,14 @@ int CameraHardwareSec::pictureThread() #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 CameraHardwareSec::pictureThread() 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 @@ int CameraHardwareSec::pictureThread() } } - LOGV("%s : pictureThread end", __func__); + ALOGV("%s : pictureThread end", __func__); out: if (JpegHeap) { @@ -1517,7 +1517,7 @@ out: status_t CameraHardwareSec::takePicture() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); #ifdef ZERO_SHUTTER_LAG if (!mUseInternalISP) { @@ -1529,12 +1529,12 @@ status_t CameraHardwareSec::takePicture() 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::takePicture() 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 @@ status_t CameraHardwareSec::cancelPicture() 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::CheckVideoStartMarker(unsigned char *pBuf) 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::CheckEOIMarker(unsigned char *pBuf) 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 @@ bool CameraHardwareSec::SplitFrame(unsigned char *pFrame, int dwSize, 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 @@ bool CameraHardwareSec::SplitFrame(unsigned char *pFrame, int dwSize, 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 CameraHardwareSec::decodeInterleaveData(unsigned char *pInterleaveData, 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 @@ int CameraHardwareSec::decodeInterleaveData(unsigned char *pInterleaveData, } } } - LOGV("decodeInterleaveData End~~~"); + ALOGV("decodeInterleaveData End~~~"); return ret; } @@ -1829,13 +1829,13 @@ bool CameraHardwareSec::getVideosnapshotSize(int *width, int *height) 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 @@ bool CameraHardwareSec::getVideosnapshotSize(int *width, int *height) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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(¤t_picture_width, ¤t_picture_height, ¤t_picture_size); @@ -2003,7 +2003,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) } 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) } 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) } 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) /* 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) } // 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) } 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) //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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) //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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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(¤t_recording_width, ¤t_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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 @@ status_t CameraHardwareSec::sendCommand(int32_t command, int32_t arg1, int32_t a 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 @@ status_t CameraHardwareSec::sendCommand(int32_t command, int32_t arg1, int32_t a } 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 @@ status_t CameraHardwareSec::sendCommand(int32_t command, int32_t arg1, int32_t a 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 @@ status_t CameraHardwareSec::storeMetaDataInBuffers(bool enable) // 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 camera_device_t *g_cam_device; 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 inline CameraHardwareSec *obj(struct camera_device *dev) 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 @@ static void HAL_camera_device_set_callbacks(struct camera_device *dev, 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_set_callbacks(struct camera_device *dev, */ 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_enable_msg_type(struct camera_device *dev, int32_t */ 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 void HAL_camera_device_disable_msg_type(struct camera_device *dev, int32_ */ 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_msg_type_enabled(struct camera_device *dev, int32_t */ 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 int HAL_camera_device_start_preview(struct camera_device *dev) */ 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 void HAL_camera_device_stop_preview(struct camera_device *dev) */ 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_preview_enabled(struct camera_device *dev) */ 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_store_meta_data_in_buffers(struct camera_device *de */ 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 int HAL_camera_device_start_recording(struct camera_device *dev) */ 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 void HAL_camera_device_stop_recording(struct camera_device *dev) */ 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 int HAL_camera_device_recording_enabled(struct camera_device *dev) 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 void HAL_camera_device_release_recording_frame(struct camera_device *dev, */ 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_auto_focus(struct camera_device *dev) */ 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_cancel_auto_focus(struct camera_device *dev) */ 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_take_picture(struct camera_device *dev) */ 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_cancel_picture(struct camera_device *dev) 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 @@ static int HAL_camera_device_set_parameters(struct camera_device *dev, /** 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 @@ char *HAL_camera_device_get_parameters(struct camera_device *dev) 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 void HAL_camera_device_put_parameters(struct camera_device *dev, char *pa 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 int HAL_camera_device_send_command(struct camera_device *dev, */ static void HAL_camera_device_release(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); obj(dev)->release(); } @@ -3278,26 +3278,26 @@ static void HAL_camera_device_release(struct camera_device *dev) */ 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_getNumberOfCameras() 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 @@ static int HAL_camera_device_open(const struct hw_module_t* module, 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 @@ static int HAL_camera_device_open(const struct hw_module_t* module, 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; } diff --git a/exynos4/hal/libfimc/SecFimc.cpp b/exynos4/hal/libfimc/SecFimc.cpp index ab744a2..86728a8 100644 --- a/exynos4/hal/libfimc/SecFimc.cpp +++ b/exynos4/hal/libfimc/SecFimc.cpp @@ -29,7 +29,7 @@ * Adjust V4L2 architecture \n */ -#define LOG_TAG "libfimc" +#define ALOG_TAG "libfimc" #include <cutils/log.h> #include "SecFimc.h" @@ -86,67 +86,67 @@ struct yuv_fmt_list yuv_list[] = { #ifdef BOARD_USE_V4L2 void dump_pixfmt_mp(struct v4l2_pix_format_mplane *pix_mp) { - LOGI("w: %d", pix_mp->width); - LOGI("h: %d", pix_mp->height); - LOGI("color: %x", pix_mp->colorspace); + ALOGI("w: %d", pix_mp->width); + ALOGI("h: %d", pix_mp->height); + ALOGI("color: %x", pix_mp->colorspace); switch (pix_mp->pixelformat) { case V4L2_PIX_FMT_YUYV: - LOGI ("YUYV"); + ALOGI ("YUYV"); break; case V4L2_PIX_FMT_UYVY: - LOGI ("UYVY"); + ALOGI ("UYVY"); break; case V4L2_PIX_FMT_RGB565: - LOGI ("RGB565"); + ALOGI ("RGB565"); break; case V4L2_PIX_FMT_RGB565X: - LOGI ("RGB565X"); + ALOGI ("RGB565X"); break; default: - LOGI("not supported"); + ALOGI("not supported"); } } #endif void dump_pixfmt(struct v4l2_pix_format *pix) { - LOGI("w: %d", pix->width); - LOGI("h: %d", pix->height); - LOGI("color: %x", pix->colorspace); + ALOGI("w: %d", pix->width); + ALOGI("h: %d", pix->height); + ALOGI("color: %x", pix->colorspace); switch (pix->pixelformat) { case V4L2_PIX_FMT_YUYV: - LOGI ("YUYV"); + ALOGI ("YUYV"); break; case V4L2_PIX_FMT_UYVY: - LOGI ("UYVY"); + ALOGI ("UYVY"); break; case V4L2_PIX_FMT_RGB565: - LOGI ("RGB565"); + ALOGI ("RGB565"); break; case V4L2_PIX_FMT_RGB565X: - LOGI ("RGB565X"); + ALOGI ("RGB565X"); break; default: - LOGI("not supported"); + ALOGI("not supported"); } } void dump_crop(struct v4l2_crop *crop) { - LOGI("crop l: %d", crop->c.left); - LOGI("crop t: %d", crop->c.top); - LOGI("crop w: %d", crop->c.width); - LOGI("crop h: %d", crop->c.height); + ALOGI("crop l: %d", crop->c.left); + ALOGI("crop t: %d", crop->c.top); + ALOGI("crop w: %d", crop->c.width); + ALOGI("crop h: %d", crop->c.height); } void dump_window(struct v4l2_window *win) { - LOGI("window l: %d", win->w.left); - LOGI("window t: %d", win->w.top); - LOGI("window w: %d", win->w.width); - LOGI("window h: %d", win->w.height); + ALOGI("window l: %d", win->w.left); + ALOGI("window t: %d", win->w.top); + ALOGI("window w: %d", win->w.width); + ALOGI("window h: %d", win->w.height); } void v4l2_overlay_dump_state(int fd) @@ -158,7 +158,7 @@ void v4l2_overlay_dump_state(int fd) if (ioctl(fd, VIDIOC_G_FMT, &format) < 0) return; - LOGI("dumping driver state:"); + ALOGI("dumping driver state:"); #ifdef BOARD_USE_V4L2 dump_pixfmt_mp(&format.fmt.pix_mp); #else @@ -169,14 +169,14 @@ void v4l2_overlay_dump_state(int fd) if (ioctl(fd, VIDIOC_G_CROP, &crop) < 0) return; - LOGI("input window(crop):"); + ALOGI("input window(crop):"); dump_crop(&crop); crop.type = V4L2_BUF_TYPE_CAPTURE; if (ioctl(fd, VIDIOC_G_CROP, &crop) < 0) return; - LOGI("output crop:"); + ALOGI("output crop:"); dump_crop(&crop); } @@ -193,7 +193,7 @@ int fimc_v4l2_query_buf(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum #endif if (MAX_DST_BUFFERS <= buf_index || MAX_PLANES <= num_plane) { - LOGE("%s::exceed MAX! : buf_index=%d, num_plane=%d", __func__, buf_index, num_plane); + ALOGE("%s::exceed MAX! : buf_index=%d, num_plane=%d", __func__, buf_index, num_plane); return -1; } @@ -206,7 +206,7 @@ int fimc_v4l2_query_buf(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum #endif if (ioctl(fd, VIDIOC_QUERYBUF, &buf) < 0) { - LOGE("%s::VIDIOC_QUERYBUF failed, plane_cnt=%d", __func__, buf.length); + ALOGE("%s::VIDIOC_QUERYBUF failed, plane_cnt=%d", __func__, buf.length); return -1; } @@ -217,11 +217,11 @@ int fimc_v4l2_query_buf(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum if ((secBuf->virt.extP[i] = (char *)mmap(0, buf.m.planes[i].length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, buf.m.planes[i].m.mem_offset)) < 0) { - LOGE("%s::mmap failed", __func__); - LOGE("%s::Offset = 0x%x", __func__, buf.m.planes[i].m.mem_offset); - LOGE("%s::Legnth = %d" , __func__, buf.m.planes[i].length); - LOGE("%s::vaddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); - LOGE("%s::paddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->phys.extP[i]); + ALOGE("%s::mmap failed", __func__); + ALOGE("%s::Offset = 0x%x", __func__, buf.m.planes[i].m.mem_offset); + ALOGE("%s::Legnth = %d" , __func__, buf.m.planes[i].length); + ALOGE("%s::vaddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); + ALOGE("%s::paddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->phys.extP[i]); return -1; } } @@ -230,10 +230,10 @@ int fimc_v4l2_query_buf(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum if ((secBuf->virt.p = (char *)mmap(0, buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, buf.m.offset)) < 0) { - LOGE("%s::mmap failed", __func__); + ALOGE("%s::mmap failed", __func__); return -1; } - LOGI("%s::buffers[%d] vaddr = 0x%x", __func__, buf_index, (unsigned int)secBuf->virt.p); + ALOGI("%s::buffers[%d] vaddr = 0x%x", __func__, buf_index, (unsigned int)secBuf->virt.p); #endif return 0; @@ -248,16 +248,16 @@ int fimc_v4l2_req_buf(int fd, unsigned int num_bufs, enum v4l2_buf_type type, en reqbuf.count = num_bufs; if (ioctl(fd, VIDIOC_REQBUFS, &reqbuf) < 0) { - LOGE("%s::VIDIOC_REQBUFS failed", __func__); + ALOGE("%s::VIDIOC_REQBUFS failed", __func__); return -1; } #ifdef DEBUG_LIB_FIMC - LOGI("%d buffers allocated %d requested", reqbuf.count, 4); + ALOGI("%d buffers allocated %d requested", reqbuf.count, 4); #endif if (reqbuf.count < num_bufs) { - LOGE("%s::VIDIOC_REQBUFS failed ((reqbuf.count(%d) < num_bufs(%d))", + ALOGE("%s::VIDIOC_REQBUFS failed ((reqbuf.count(%d) < num_bufs(%d))", __func__, reqbuf.count, num_bufs); return -1; } @@ -272,7 +272,7 @@ int fimc_v4l2_s_ctrl(int fd, int id, int value) vc.value = value; if (ioctl(fd, VIDIOC_S_CTRL, &vc) < 0) { - LOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, id, value); + ALOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, id, value); return -1; } @@ -289,7 +289,7 @@ int fimc_v4l2_set_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, s5 fmt.type = type; if (ioctl(fd, VIDIOC_G_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_G_FMT failed", __func__); + ALOGE("%s::VIDIOC_G_FMT failed", __func__); return -1; } @@ -313,7 +313,7 @@ int fimc_v4l2_set_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, s5 #endif case V4L2_BUF_TYPE_VIDEO_OVERLAY: if (ioctl(fd, VIDIOC_G_FBUF, &fbuf) < 0) { - LOGE("%s::VIDIOC_G_FBUF failed", __func__); + ALOGE("%s::VIDIOC_G_FBUF failed", __func__); return -1; } @@ -323,7 +323,7 @@ int fimc_v4l2_set_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, s5 fbuf.fmt.pixelformat = img_info->color_space; if (ioctl(fd, VIDIOC_S_FBUF, &fbuf) < 0) { - LOGE("%s::VIDIOC_S_FBUF (w=%d, h=%d, color=%d) failed", + ALOGE("%s::VIDIOC_S_FBUF (w=%d, h=%d, color=%d) failed", __func__, img_info->full_width, img_info->full_height, @@ -339,7 +339,7 @@ int fimc_v4l2_set_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, s5 vc.value = (unsigned int)&fimc_dst_buf.base[0]; if (ioctl(fd, VIDIOC_S_CTRL, &vc) < 0) { - LOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, vc.id, vc.value); + ALOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, vc.id, vc.value); return -1; } @@ -349,13 +349,13 @@ int fimc_v4l2_set_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, s5 fmt.fmt.win.w.height = img_info->height; break; default: - LOGE("invalid buffer type"); + ALOGE("invalid buffer type"); return -1; break; } if (ioctl(fd, VIDIOC_S_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_S_FMT failed", __func__); + ALOGE("%s::VIDIOC_S_FMT failed", __func__); return -1; } @@ -367,7 +367,7 @@ int fimc_v4l2_set_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, s5 crop.c.height = img_info->height; if (ioctl(fd, VIDIOC_S_CROP, &crop) < 0) { - LOGE("%s::VIDIOC_S_CROP (x=%d, y=%d, w=%d, h=%d) failed", + ALOGE("%s::VIDIOC_S_CROP (x=%d, y=%d, w=%d, h=%d) failed", __func__, img_info->start_x, img_info->start_y, @@ -383,7 +383,7 @@ int fimc_v4l2_set_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, s5 int fimc_v4l2_stream_on(int fd, enum v4l2_buf_type type) { if (ioctl(fd, VIDIOC_STREAMON, &type) < 0) { - LOGE("%s::VIDIOC_STREAMON failed", __func__); + ALOGE("%s::VIDIOC_STREAMON failed", __func__); return -1; } @@ -425,7 +425,7 @@ int fimc_v4l2_queue(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum v4l #endif if (ioctl(fd, VIDIOC_QBUF, &buf) < 0) { - LOGE("%s::VIDIOC_QBUF failed", __func__); + ALOGE("%s::VIDIOC_QBUF failed", __func__); return -1; } @@ -450,7 +450,7 @@ int fimc_v4l2_dequeue(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, buf.m.planes = planes; #endif if (ioctl(fd, VIDIOC_DQBUF, &buf) < 0) { - LOGE("%s::VIDIOC_DQBUF failed", __func__); + ALOGE("%s::VIDIOC_DQBUF failed", __func__); return -1; } *index = buf.index; @@ -461,7 +461,7 @@ int fimc_v4l2_dequeue(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, int fimc_v4l2_stream_off(int fd, enum v4l2_buf_type type) { if (ioctl(fd, VIDIOC_STREAMOFF, &type) < 0) { - LOGE("%s::VIDIOC_STREAMOFF failed", __func__); + ALOGE("%s::VIDIOC_STREAMOFF failed", __func__); return -1; } @@ -477,7 +477,7 @@ int fimc_v4l2_clr_buf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory) req.memory = memory; if (ioctl(fd, VIDIOC_REQBUFS, &req) < 0) { - LOGE("%s::VIDIOC_REQBUFS", __func__); + ALOGE("%s::VIDIOC_REQBUFS", __func__); return -1; } @@ -543,16 +543,16 @@ SecFimc::SecFimc() SecFimc::~SecFimc() { if (mFlagCreate == true) { - LOGE("%s::this is not Destroyed fail", __func__); + ALOGE("%s::this is not Destroyed fail", __func__); if (destroy() == false) - LOGE("%s::destroy failed", __func__); + ALOGE("%s::destroy failed", __func__); } } bool SecFimc::create(enum DEV dev, enum MODE mode, int numOfBuf) { if (mFlagCreate == true) { - LOGE("%s::Already Created fail", __func__); + ALOGE("%s::Already Created fail", __func__); return false; } @@ -575,7 +575,7 @@ bool SecFimc::create(enum DEV dev, enum MODE mode, int numOfBuf) mFimcMode = FIMC_OVLY_DMA_AUTO; break; default: - LOGE("%s::Invalid mode(%d) fail", __func__, mode); + ALOGE("%s::Invalid mode(%d) fail", __func__, mode); mFimcMode = FIMC_OVLY_NOT_FIXED; goto err; break; @@ -601,7 +601,7 @@ bool SecFimc::create(enum DEV dev, enum MODE mode, int numOfBuf) mRealDev = 5; break; default: - LOGE("%s::invalid mDev(%d)", __func__, mDev); + ALOGE("%s::invalid mDev(%d)", __func__, mDev); goto err; break; } @@ -611,48 +611,48 @@ bool SecFimc::create(enum DEV dev, enum MODE mode, int numOfBuf) mFd = open(node, O_RDWR); if (mFd < 0) { - LOGE("%s::open(%s) failed", __func__, node); + ALOGE("%s::open(%s) failed", __func__, node); mFd = 0; goto err; } /* check capability */ if (ioctl(mFd, VIDIOC_QUERYCAP, &mFimcCap) < 0) { - LOGE("%s::VIDIOC_QUERYCAP failed", __func__); + ALOGE("%s::VIDIOC_QUERYCAP failed", __func__); goto err; } if (!(mFimcCap.capabilities & V4L2_CAP_STREAMING)) { - LOGE("%s::%s has no streaming support", __func__, node); + ALOGE("%s::%s has no streaming support", __func__, node); goto err; } #ifdef BOARD_USE_V4L2 if (!(mFimcCap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE)) { - LOGE("%s::%s is no video output mplane", __func__, node); + ALOGE("%s::%s is no video output mplane", __func__, node); goto err; } if (!(mFimcCap.capabilities & V4L2_CAP_VIDEO_CAPTURE_MPLANE)) { - LOGE("%s::%s is no video capture mplane", __func__, node); + ALOGE("%s::%s is no video capture mplane", __func__, node); goto err; } #else if (!(mFimcCap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) { - LOGE("%s::%s is no video output", __func__, node); + ALOGE("%s::%s is no video output", __func__, node); goto err; } fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; if (ioctl(mFd, VIDIOC_G_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_G_FMT failed", __func__); + ALOGE("%s::VIDIOC_G_FMT failed", __func__); goto err; } vc.id = V4L2_CID_RESERVED_MEM_BASE_ADDR; vc.value = 0; if (ioctl(mFd, VIDIOC_G_CTRL, &vc) < 0) { - LOGE("%s::VIDIOC_G_CTRL - V4L2_CID_RESERVED_MEM_BAES_ADDR", __func__); + ALOGE("%s::VIDIOC_G_CTRL - V4L2_CID_RESERVED_MEM_BAES_ADDR", __func__); goto err; } @@ -663,7 +663,7 @@ bool SecFimc::create(enum DEV dev, enum MODE mode, int numOfBuf) vc.id = V4L2_CID_FIMC_VERSION; vc.value = 0; if (ioctl(mFd, VIDIOC_G_CTRL, &vc) < 0) { - LOGE("%s::VIDIOC_G_CTRL - V4L2_CID_FIMC_VERSION failed, FIMC version is set with default", __func__); + ALOGE("%s::VIDIOC_G_CTRL - V4L2_CID_FIMC_VERSION failed, FIMC version is set with default", __func__); vc.value = 0x43; } @@ -672,7 +672,7 @@ bool SecFimc::create(enum DEV dev, enum MODE mode, int numOfBuf) vc.id = V4L2_CID_OVLY_MODE; vc.value = mFimcMode; if (ioctl(mFd, VIDIOC_S_CTRL, &vc) < 0) { - LOGE("%s::VIDIOC_S_CTRL - V4L2_CID_OVLY_MODE failed", __func__); + ALOGE("%s::VIDIOC_S_CTRL - V4L2_CID_OVLY_MODE failed", __func__); goto err; } #endif @@ -694,18 +694,18 @@ bool SecFimc::destroy() s5p_fimc_params_t *params = &(mS5pFimc.params); if (mFlagCreate == false) { - LOGE("%s::Already Destroyed fail", __func__); + ALOGE("%s::Already Destroyed fail", __func__); return false; } if (mFlagStreamOn == true) { if (fimc_v4l2_stream_off(mFd, V4L2_BUF_TYPE_SRC) < 0) { - LOGE("%s::fimc_v4l2_stream_off() failed", __func__); + ALOGE("%s::fimc_v4l2_stream_off() failed", __func__); return false; } #ifdef BOARD_USE_V4L2 if (fimc_v4l2_stream_off(mFd, V4L2_BUF_TYPE_DST) < 0) { - LOGE("%s::fimc_v4l2_stream_off() failed", __func__); + ALOGE("%s::fimc_v4l2_stream_off() failed", __func__); return false; } #endif @@ -713,13 +713,13 @@ bool SecFimc::destroy() } if (fimc_v4l2_clr_buf(mFd, V4L2_BUF_TYPE_SRC, V4L2_MEMORY_TYPE_SRC) < 0) { - LOGE("%s::fimc_v4l2_clr_buf()[src] failed", __func__); + ALOGE("%s::fimc_v4l2_clr_buf()[src] failed", __func__); return false; } #ifdef BOARD_USE_V4L2 if (fimc_v4l2_clr_buf(mFd, V4L2_BUF_TYPE_DST, V4L2_MEMORY_TYPE_DST) < 0) { - LOGE("%s::fimc_v4l2_clr_buf()[dst] failed", __func__); + ALOGE("%s::fimc_v4l2_clr_buf()[dst] failed", __func__); return false; } #endif @@ -750,7 +750,7 @@ int SecFimc::getFd(void) SecBuffer * SecFimc::getMemAddr(int index) { if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } @@ -760,7 +760,7 @@ SecBuffer * SecFimc::getMemAddr(int index) int SecFimc::getHWVersion(void) { if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } @@ -774,17 +774,17 @@ bool SecFimc::setSrcParams(unsigned int width, unsigned int height, bool forceChange) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } int v4l2ColorFormat = HAL_PIXEL_FORMAT_2_V4L2_PIX(colorFormat); if (v4l2ColorFormat < 0) { - LOGE("%s::not supported color format", __func__); + ALOGE("%s::not supported color format", __func__); return false; } @@ -803,11 +803,11 @@ bool SecFimc::setSrcParams(unsigned int width, unsigned int height, if (fimcWidth != *cropWidth || fimcHeight != *cropHeight) { if (forceChange == true) { #ifdef DEBUG_LIB_FIMC - LOGD("size is changed from [w = %d, h= %d] to [w = %d, h = %d]", + ALOGD("size is changed from [w = %d, h= %d] to [w = %d, h = %d]", *cropWidth, *cropHeight, fimcWidth, fimcHeight); #endif } else { - LOGE("%s::invalid source params", __func__); + ALOGE("%s::invalid source params", __func__); return false; } } @@ -832,18 +832,18 @@ bool SecFimc::setSrcParams(unsigned int width, unsigned int height, if (mFlagSetSrcParam == true) { if (fimc_v4l2_clr_buf(mFd, V4L2_BUF_TYPE_SRC, V4L2_MEMORY_TYPE_SRC) < 0) { - LOGE("%s::fimc_v4l2_clr_buf_src() failed", __func__); + ALOGE("%s::fimc_v4l2_clr_buf_src() failed", __func__); return false; } } if (fimc_v4l2_set_fmt(mFd, V4L2_BUF_TYPE_SRC, V4L2_FIELD_NONE, &(params->src), 0) < 0) { - LOGE("%s::fimc_v4l2_set_fmt()[src] failed", __func__); + ALOGE("%s::fimc_v4l2_set_fmt()[src] failed", __func__); return false; } if (fimc_v4l2_req_buf(mFd, 1, V4L2_BUF_TYPE_SRC, V4L2_MEMORY_TYPE_SRC) < 0) { - LOGE("%s::fimc_v4l2_req_buf()[src] failed", __func__); + ALOGE("%s::fimc_v4l2_req_buf()[src] failed", __func__); return false; } @@ -865,7 +865,7 @@ bool SecFimc::getSrcParams(unsigned int *width, unsigned int *height, fmt.type = V4L2_BUF_TYPE_SRC; if (ioctl(mFd, VIDIOC_G_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_G_FMT(fmt.type : %d) failed", __func__, fmt.type); + ALOGE("%s::VIDIOC_G_FMT(fmt.type : %d) failed", __func__, fmt.type); return false; } @@ -886,14 +886,14 @@ bool SecFimc::getSrcParams(unsigned int *width, unsigned int *height, break; #endif default: - LOGE("%s::Invalid buffer type", __func__); + ALOGE("%s::Invalid buffer type", __func__); return false; break; } crop.type = V4L2_BUF_TYPE_SRC; if (ioctl(mFd, VIDIOC_G_CROP, &crop) < 0) { - LOGE("%s::VIDIOC_G_CROP failed", __func__); + ALOGE("%s::VIDIOC_G_CROP failed", __func__); return false; } @@ -911,11 +911,11 @@ bool SecFimc::setSrcAddr(unsigned int physYAddr, int colorFormat) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } @@ -962,17 +962,17 @@ bool SecFimc::setDstParams(unsigned int width, unsigned int height, bool forceChange) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } int v4l2ColorFormat = HAL_PIXEL_FORMAT_2_V4L2_PIX(colorFormat); if (v4l2ColorFormat < 0) { - LOGE("%s::not supported color format", __func__); + ALOGE("%s::not supported color format", __func__); return false; } @@ -992,11 +992,11 @@ bool SecFimc::setDstParams(unsigned int width, unsigned int height, if (fimcWidth != *cropWidth || fimcHeight != *cropHeight) { if (forceChange == true) { #ifdef DEBUG_LIB_FIMC - LOGD("size is changed from [w = %d, h= %d] to [w = %d, h = %d]", + ALOGD("size is changed from [w = %d, h= %d] to [w = %d, h = %d]", *cropWidth, *cropHeight, fimcWidth, fimcHeight); #endif } else { - LOGE("%s::Invalid destination params", __func__); + ALOGE("%s::Invalid destination params", __func__); return false; } } @@ -1040,32 +1040,32 @@ bool SecFimc::setDstParams(unsigned int width, unsigned int height, #ifdef BOARD_USE_V4L2 if (mFlagSetDstParam == true) { if (fimc_v4l2_clr_buf(mFd, V4L2_BUF_TYPE_DST, V4L2_MEMORY_TYPE_DST) < 0) { - LOGE("%s::fimc_v4l2_clr_buf_dst() failed", __func__); + ALOGE("%s::fimc_v4l2_clr_buf_dst() failed", __func__); return false; } } #endif if (fimc_v4l2_s_ctrl(mFd, V4L2_ROTATE, mRotVal) < 0) { - LOGE("%s::fimc_v4l2_s_ctrl(V4L2_ROTATE)", __func__); + ALOGE("%s::fimc_v4l2_s_ctrl(V4L2_ROTATE)", __func__); return false; } if (fimc_v4l2_set_fmt(mFd, V4L2_BUF_TYPE_DST, V4L2_FIELD_ANY, &(params->dst), (unsigned int)mS5pFimc.out_buf.phys_addr) < 0) { - LOGE("%s::fimc_v4l2_set_fmt()[dst] failed", __func__); + ALOGE("%s::fimc_v4l2_set_fmt()[dst] failed", __func__); return false; } #ifdef BOARD_USE_V4L2 if (fimc_v4l2_req_buf(mFd, mNumOfBuf, V4L2_BUF_TYPE_DST, V4L2_MEMORY_TYPE_DST) < 0) { - LOGE("%s::fimc_v4l2_req_buf()[dst] failed", __func__); + ALOGE("%s::fimc_v4l2_req_buf()[dst] failed", __func__); return false; } for (int i = 0; i < mNumOfBuf; i++) { if (fimc_v4l2_query_buf(mFd, &(mDstBuffer[i]), V4L2_BUF_TYPE_DST, V4L2_MEMORY_TYPE_DST, i, dst_planes) < 0) { - LOGE("%s::fimc_v4l2_query_buf() failed", __func__); + ALOGE("%s::fimc_v4l2_query_buf() failed", __func__); } } #endif @@ -1088,7 +1088,7 @@ bool SecFimc::getDstParams(unsigned int *width, unsigned int *height, fmt.type = V4L2_BUF_TYPE_DST; if (ioctl(mFd, VIDIOC_G_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_G_FMT(fmt.type : %d) failed", __func__, fmt.type); + ALOGE("%s::VIDIOC_G_FMT(fmt.type : %d) failed", __func__, fmt.type); return false; } switch (fmt.type) { @@ -1113,7 +1113,7 @@ bool SecFimc::getDstParams(unsigned int *width, unsigned int *height, *cropHeight = fmt.fmt.win.w.height; if (ioctl(mFd, VIDIOC_G_FBUF, &fbuf) < 0) { - LOGE("%s::VIDIOC_G_FBUF failed", __func__); + ALOGE("%s::VIDIOC_G_FBUF failed", __func__); return false; } @@ -1122,7 +1122,7 @@ bool SecFimc::getDstParams(unsigned int *width, unsigned int *height, *colorFormat = fbuf.fmt.pixelformat; break; default: - LOGE("%s::Invalid buffer type", __func__); + ALOGE("%s::Invalid buffer type", __func__); return false; break; } @@ -1131,7 +1131,7 @@ bool SecFimc::getDstParams(unsigned int *width, unsigned int *height, crop.type = V4L2_BUF_TYPE_DST; if (ioctl(mFd, VIDIOC_G_CROP, &crop) < 0) { - LOGE("%s::VIDIOC_G_CROP(crop.type : %d) failed", __func__, crop.type); + ALOGE("%s::VIDIOC_G_CROP(crop.type : %d) failed", __func__, crop.type); return false; } @@ -1147,13 +1147,13 @@ bool SecFimc::getDstParams(unsigned int *width, unsigned int *height, bool SecFimc::setDstAddr(unsigned int physYAddr, unsigned int physCbAddr, unsigned int physCrAddr, int buf_index) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif s5p_fimc_params_t *params = &(mS5pFimc.params); if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } @@ -1176,12 +1176,12 @@ bool SecFimc::setDstAddr(unsigned int physYAddr, unsigned int physCbAddr, unsign mS5pFimc.use_ext_out_mem = 1; if (fimc_v4l2_s_ctrl(mFd, V4L2_ROTATE, mRotVal) < 0) { - LOGE("%s::fimc_v4l2_s_ctrl(V4L2_ROTATE)", __func__); + ALOGE("%s::fimc_v4l2_s_ctrl(V4L2_ROTATE)", __func__); return false; } if (fimc_v4l2_set_fmt(mFd, V4L2_BUF_TYPE_DST, V4L2_FIELD_ANY, &(params->dst), (unsigned int)mS5pFimc.out_buf.phys_addr) < 0) { - LOGE("%s::fimc_v4l2_set_fmt()[dst] failed", __func__); + ALOGE("%s::fimc_v4l2_set_fmt()[dst] failed", __func__); return false; } #endif @@ -1194,12 +1194,12 @@ bool SecFimc::setRotVal(unsigned int rotVal) struct v4l2_control vc; if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (fimc_v4l2_s_ctrl(mFd, V4L2_ROTATE, rotVal) < 0) { - LOGE("%s::fimc_v4l2_s_ctrl(V4L2_ROTATE) failed", __func__); + ALOGE("%s::fimc_v4l2_s_ctrl(V4L2_ROTATE) failed", __func__); return false; } @@ -1213,12 +1213,12 @@ bool SecFimc::setGlobalAlpha(bool enable, int alpha) struct v4l2_format fmt; if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagStreamOn == true) { - LOGE("%s::mFlagStreamOn == true", __func__); + ALOGE("%s::mFlagStreamOn == true", __func__); return false; } @@ -1228,7 +1228,7 @@ bool SecFimc::setGlobalAlpha(bool enable, int alpha) memset(&fbuf, 0, sizeof(fbuf)); if (ioctl(mFd, VIDIOC_G_FBUF, &fbuf) < 0) { - LOGE("%s::VIDIOC_G_FBUF failed", __func__); + ALOGE("%s::VIDIOC_G_FBUF failed", __func__); return false; } @@ -1238,7 +1238,7 @@ bool SecFimc::setGlobalAlpha(bool enable, int alpha) fbuf.flags &= ~V4L2_FBUF_FLAG_GLOBAL_ALPHA; if (ioctl(mFd, VIDIOC_S_FBUF, &fbuf) < 0) { - LOGE("%s::VIDIOC_S_FBUF failed", __func__); + ALOGE("%s::VIDIOC_S_FBUF failed", __func__); return false; } @@ -1247,13 +1247,13 @@ bool SecFimc::setGlobalAlpha(bool enable, int alpha) fmt.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; if (ioctl(mFd, VIDIOC_G_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_G_FMT failed", __func__); + ALOGE("%s::VIDIOC_G_FMT failed", __func__); return false; } fmt.fmt.win.global_alpha = alpha & 0xFF; if (ioctl(mFd, VIDIOC_S_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_S_FMT failed", __func__); + ALOGE("%s::VIDIOC_S_FMT failed", __func__); return false; } } @@ -1268,12 +1268,12 @@ bool SecFimc::setGlobalAlpha(bool enable, int alpha) bool SecFimc::setLocalAlpha(bool enable) { if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagStreamOn == true) { - LOGE("%s::mFlagStreamOn == true", __func__); + ALOGE("%s::mFlagStreamOn == true", __func__); return false; } @@ -1289,12 +1289,12 @@ bool SecFimc::setColorKey(bool enable, int colorKey) struct v4l2_format fmt; if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagStreamOn == true) { - LOGE("%s::mFlagStreamOn == true", __func__); + ALOGE("%s::mFlagStreamOn == true", __func__); return false; } @@ -1304,7 +1304,7 @@ bool SecFimc::setColorKey(bool enable, int colorKey) memset(&fbuf, 0, sizeof(fbuf)); if (ioctl(mFd, VIDIOC_G_FBUF, &fbuf) < 0) { - LOGE("%s::VIDIOC_G_FBUF failed", __func__); + ALOGE("%s::VIDIOC_G_FBUF failed", __func__); return false; } @@ -1314,7 +1314,7 @@ bool SecFimc::setColorKey(bool enable, int colorKey) fbuf.flags &= ~V4L2_FBUF_FLAG_CHROMAKEY; if (ioctl(mFd, VIDIOC_S_FBUF, &fbuf) < 0) { - LOGE("%s::VIDIOC_S_FBUF failed", __func__); + ALOGE("%s::VIDIOC_S_FBUF failed", __func__); return false; } @@ -1323,14 +1323,14 @@ bool SecFimc::setColorKey(bool enable, int colorKey) fmt.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; if (ioctl(mFd, VIDIOC_G_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_G_FMT failed", __func__); + ALOGE("%s::VIDIOC_G_FMT failed", __func__); return false; } fmt.fmt.win.chromakey = colorKey & 0xFFFFFF; if (ioctl(mFd, VIDIOC_S_FMT, &fmt) < 0) - LOGE("%s::VIDIOC_S_FMT failed", __func__); + ALOGE("%s::VIDIOC_S_FMT failed", __func__); } mFlagColorKey = enable; mColorKey = colorKey; @@ -1340,21 +1340,21 @@ bool SecFimc::setColorKey(bool enable, int colorKey) bool SecFimc::draw(int src_index, int dst_index) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagSetSrcParam == false) { - LOGE("%s::mFlagSetSrcParam == false fail", __func__); + ALOGE("%s::mFlagSetSrcParam == false fail", __func__); return false; } if (mFlagSetDstParam == false) { - LOGE("%s::mFlagSetDstParam == false fail", __func__); + ALOGE("%s::mFlagSetDstParam == false fail", __func__); return false; } @@ -1368,45 +1368,45 @@ bool SecFimc::draw(int src_index, int dst_index) #ifdef BOARD_USE_V4L2 if (mFlagStreamOn == false) { if (m_streamOn() == false) { - LOGE("%s::m_streamOn failed", __func__); + ALOGE("%s::m_streamOn failed", __func__); return false; } mFlagStreamOn = true; } if (fimc_v4l2_dequeue(mFd, V4L2_BUF_TYPE_DST, V4L2_MEMORY_TYPE_DST, &dst_index, dst_planes) < 0) { - LOGE("%s::fimc_v4l2_dequeue[dst](mNumOfBuf : %d) failed", __func__, mNumOfBuf); + ALOGE("%s::fimc_v4l2_dequeue[dst](mNumOfBuf : %d) failed", __func__, mNumOfBuf); return false; } if (fimc_v4l2_dequeue(mFd, V4L2_BUF_TYPE_SRC, V4L2_MEMORY_TYPE_SRC, &src_index, src_planes) < 0) { - LOGE("%s::fimc_v4l2_dequeue[src](mNumOfBuf : %d) failed", __func__, mNumOfBuf); + ALOGE("%s::fimc_v4l2_dequeue[src](mNumOfBuf : %d) failed", __func__, mNumOfBuf); return false; } if (fimc_v4l2_queue(mFd, &(mSrcBuffer), V4L2_BUF_TYPE_SRC, V4L2_MEMORY_TYPE_SRC, src_index, src_planes) < 0) { - LOGE("%s::fimc_v4l2_queue[src](index : %d) (mNumOfBuf : %d) failed", __func__, 0, mNumOfBuf); + ALOGE("%s::fimc_v4l2_queue[src](index : %d) (mNumOfBuf : %d) failed", __func__, 0, mNumOfBuf); return false; } if (fimc_v4l2_queue(mFd, &(mDstBuffer[dst_index]), V4L2_BUF_TYPE_DST, V4L2_MEMORY_TYPE_DST, dst_index, dst_planes) < 0) { - LOGE("%s::fimc_v4l2_queue[dst](index : %d) (mNumOfBuf : %d) failed", __func__, dst_index, mNumOfBuf); + ALOGE("%s::fimc_v4l2_queue[dst](index : %d) (mNumOfBuf : %d) failed", __func__, dst_index, mNumOfBuf); return false; } #else if (fimc_v4l2_stream_on(mFd, V4L2_BUF_TYPE_SRC) < 0) { - LOGE("%s::fimc_v4l2_stream_on() failed", __func__); + ALOGE("%s::fimc_v4l2_stream_on() failed", __func__); goto err; } flagStreamOn = true; if (fimc_v4l2_queue(mFd, &(mSrcBuffer), V4L2_BUF_TYPE_SRC, V4L2_MEMORY_TYPE_SRC, src_index, src_planes) < 0) { - LOGE("%s::fimc_v4l2_queue(index : %d) (mNumOfBuf : %d) failed", __func__, 0, mNumOfBuf); + ALOGE("%s::fimc_v4l2_queue(index : %d) (mNumOfBuf : %d) failed", __func__, 0, mNumOfBuf); goto err; } if (fimc_v4l2_dequeue(mFd, V4L2_BUF_TYPE_SRC, V4L2_MEMORY_TYPE_SRC, &src_index, src_planes) < 0) { - LOGE("%s::fimc_v4l2_dequeue (mNumOfBuf : %d) failed", __func__, mNumOfBuf); + ALOGE("%s::fimc_v4l2_dequeue (mNumOfBuf : %d) failed", __func__, mNumOfBuf); goto err; } #endif @@ -1415,7 +1415,7 @@ err : #ifndef BOARD_USE_V4L2 if (flagStreamOn == true) { if (fimc_v4l2_stream_off(mFd, V4L2_BUF_TYPE_SRC) < 0) { - LOGE("%s::fimc_v4l2_stream_off() failed", __func__); + ALOGE("%s::fimc_v4l2_stream_off() failed", __func__); return false; } } @@ -1427,7 +1427,7 @@ err : bool SecFimc::m_streamOn() { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif #ifdef BOARD_USE_V4L2 @@ -1454,26 +1454,26 @@ bool SecFimc::m_streamOn() } if (fimc_v4l2_queue(mFd, &(mSrcBuffer), V4L2_BUF_TYPE_SRC, V4L2_MEMORY_TYPE_SRC, 0, src_planes) < 0) { - LOGE("%s::fimc_v4l2_queue(index : %d) (mSrcBufNum : %d) failed", __func__, 0, 1); + ALOGE("%s::fimc_v4l2_queue(index : %d) (mSrcBufNum : %d) failed", __func__, 0, 1); return false; } for (int i = 0; i < mNumOfBuf; i++) { if (fimc_v4l2_queue(mFd, &(mDstBuffer[i]), V4L2_BUF_TYPE_DST, V4L2_MEMORY_TYPE_DST, i, dst_planes) < 0) { - LOGE("%s::fimc_v4l2_queue(index : %d) (mDstBufNum : %d) failed", __func__, i, mNumOfBuf); + ALOGE("%s::fimc_v4l2_queue(index : %d) (mDstBufNum : %d) failed", __func__, i, mNumOfBuf); return false; } } #endif if (fimc_v4l2_stream_on(mFd, V4L2_BUF_TYPE_SRC) < 0) { - LOGE("%s::fimc_v4l2_stream_on() failed", __func__); + ALOGE("%s::fimc_v4l2_stream_on() failed", __func__); return false; } #ifdef BOARD_USE_V4L2 if (fimc_v4l2_stream_on(mFd, V4L2_BUF_TYPE_DST) < 0) { - LOGE("%s::fimc_v4l2_stream_on() failed", __func__); + ALOGE("%s::fimc_v4l2_stream_on() failed", __func__); return false; } #endif diff --git a/exynos4/hal/libfimg3x/FimgApi.h b/exynos4/hal/libfimg3x/FimgApi.h index 3daac3d..8629ad0 100644 --- a/exynos4/hal/libfimg3x/FimgApi.h +++ b/exynos4/hal/libfimg3x/FimgApi.h @@ -30,8 +30,8 @@ #if defined(REAL_DEBUG) #ifdef ANDROID_LOG - #define PRINT LOGE - #define PRINTD LOGD + #define PRINT ALOGE + #define PRINTD ALOGD #else #define PRINT printf #define PRINTD printf diff --git a/exynos4/hal/libfimg3x/FimgC210.cpp b/exynos4/hal/libfimg3x/FimgC210.cpp index 129acae..472438f 100644 --- a/exynos4/hal/libfimg3x/FimgC210.cpp +++ b/exynos4/hal/libfimg3x/FimgC210.cpp @@ -20,8 +20,8 @@ /////////////////////////////////////////////////// // include /////////////////////////////////////////////////// -#define LOG_NDEBUG 0 -#define LOG_TAG "FimgC210" +#define ALOG_NDEBUG 0 +#define ALOG_TAG "FimgC210" #include <utils/Log.h> #include "FimgC210.h" diff --git a/exynos4/hal/libfimg4x/FimgApi.cpp b/exynos4/hal/libfimg4x/FimgApi.cpp index ff11b8d..57d0f27 100644 --- a/exynos4/hal/libfimg4x/FimgApi.cpp +++ b/exynos4/hal/libfimg4x/FimgApi.cpp @@ -17,8 +17,8 @@ ** */ -#define LOG_NDEBUG 0 -#define LOG_TAG "SKIA" +#define ALOG_NDEBUG 0 +#define ALOG_TAG "SKIA" #include <utils/Log.h> #include "FimgApi.h" @@ -270,14 +270,14 @@ extern "C" int SyncFimgApi(void) void printDataBlit(char *title, struct fimg2d_blit *cmd) { - LOGI("%s\n", title); + ALOGI("%s\n", title); - LOGI(" sequence_no. = %u\n", cmd->seq_no); - LOGI(" blit_op = %d(%s)\n", cmd->op, optbl[cmd->op].str); - LOGI(" fill_color = %X\n", cmd->solid_color); - LOGI(" global_alpha = %u\n", (unsigned int)cmd->g_alpha); - LOGI(" PREMULT = %s\n", cmd->premult == PREMULTIPLIED ? "PREMULTIPLIED" : "NON-PREMULTIPLIED"); - LOGI(" do_dither = %s\n", cmd->dither == true ? "dither" : "no-dither"); + ALOGI(" sequence_no. = %u\n", cmd->seq_no); + ALOGI(" blit_op = %d(%s)\n", cmd->op, optbl[cmd->op].str); + ALOGI(" fill_color = %X\n", cmd->solid_color); + ALOGI(" global_alpha = %u\n", (unsigned int)cmd->g_alpha); + ALOGI(" PREMULT = %s\n", cmd->premult == PREMULTIPLIED ? "PREMULTIPLIED" : "NON-PREMULTIPLIED"); + ALOGI(" do_dither = %s\n", cmd->dither == true ? "dither" : "no-dither"); printDataBlitRotate(cmd->rotate); @@ -297,80 +297,80 @@ void printDataBlit(char *title, struct fimg2d_blit *cmd) void printDataBlitImage(char *title, struct fimg2d_image *image) { if (NULL != image) { - LOGI(" Image_%s\n", title); - LOGI(" addr = %X\n", image->addr.start); - LOGI(" size = %u\n", image->addr.size); - LOGI(" (width, height) = (%d, %d)\n", image->width, image->height); - LOGI(" format = %d\n", image->fmt); + ALOGI(" Image_%s\n", title); + ALOGI(" addr = %X\n", image->addr.start); + ALOGI(" size = %u\n", image->addr.size); + ALOGI(" (width, height) = (%d, %d)\n", image->width, image->height); + ALOGI(" format = %d\n", image->fmt); } else - LOGI(" Image_%s : NULL\n", title); + ALOGI(" Image_%s : NULL\n", title); } void printDataBlitRect(char *title, struct fimg2d_rect *rect) { if (NULL != rect) { - LOGI(" RECT_%s\n", title); - LOGI(" (x1, y1) = (%d, %d)\n", rect->x1, rect->y1); - LOGI(" (x2, y2) = (%d, %d)\n", rect->x2, rect->y2); - LOGI(" (width, height) = (%d, %d)\n", rect->x2 - rect->x1, rect->y2 - rect->y1); + ALOGI(" RECT_%s\n", title); + ALOGI(" (x1, y1) = (%d, %d)\n", rect->x1, rect->y1); + ALOGI(" (x2, y2) = (%d, %d)\n", rect->x2, rect->y2); + ALOGI(" (width, height) = (%d, %d)\n", rect->x2 - rect->x1, rect->y2 - rect->y1); } else - LOGI(" RECT_%s : NULL\n", title); + ALOGI(" RECT_%s : NULL\n", title); } void printDataBlitRotate(enum rotation rotate) { - LOGI(" ROTATE : %d\n", rotate); + ALOGI(" ROTATE : %d\n", rotate); } void printDataBlitClip(struct fimg2d_clip *clip) { if (NULL != clip) { - LOGI(" CLIP\n"); - LOGI(" clip %s\n", clip->enable == true ? "enabled" : "disabled"); - LOGI(" (x1, y1) = (%d, %d)\n", clip->x1, clip->y1); - LOGI(" (x2, y2) = (%d, %d)\n", clip->x2, clip->y2); - LOGI(" (width, hight) = (%d, %d)\n", clip->x2 - clip->x1, clip->y2 - clip->y1); + ALOGI(" CLIP\n"); + ALOGI(" clip %s\n", clip->enable == true ? "enabled" : "disabled"); + ALOGI(" (x1, y1) = (%d, %d)\n", clip->x1, clip->y1); + ALOGI(" (x2, y2) = (%d, %d)\n", clip->x2, clip->y2); + ALOGI(" (width, hight) = (%d, %d)\n", clip->x2 - clip->x1, clip->y2 - clip->y1); } else - LOGI(" CLIP : NULL\n"); + ALOGI(" CLIP : NULL\n"); } void printDataBlitScale(struct fimg2d_scale *scaling) { if (NULL != scaling) { - LOGI(" SCALING\n"); - LOGI(" scale_mode : %s\n", scaling->mode == 0 ? + ALOGI(" SCALING\n"); + ALOGI(" scale_mode : %s\n", scaling->mode == 0 ? "NO_SCALING" : (scaling->mode == 1 ? "SCALING_NEAREST" : "SCALING_BILINEAR")); - LOGI(" scaling_factor_unit : %s\n", scaling->factor == 0 ? "PERCENT" : "PIXEL"); + ALOGI(" scaling_factor_unit : %s\n", scaling->factor == 0 ? "PERCENT" : "PIXEL"); if (scaling->factor == 0) - LOGI(" scaling_factor : (scale_w, scale_y) = (%d, %d)\n", scaling->scale_w, scaling->scale_h); + ALOGI(" scaling_factor : (scale_w, scale_y) = (%d, %d)\n", scaling->scale_w, scaling->scale_h); else { - LOGI(" src : (src_w, src_h) = (%d, %d)\n", scaling->src_w, scaling->src_h); - LOGI(" dst : (dst_w, dst_h) = (%d, %d)\n", scaling->dst_w, scaling->dst_h); - LOGI(" scaling_factor : (scale_w, scale_y) = (%3.2f, %3.2f)\n", (double)scaling->dst_w / scaling->src_w, (double)scaling->dst_h / scaling->src_h); + ALOGI(" src : (src_w, src_h) = (%d, %d)\n", scaling->src_w, scaling->src_h); + ALOGI(" dst : (dst_w, dst_h) = (%d, %d)\n", scaling->dst_w, scaling->dst_h); + ALOGI(" scaling_factor : (scale_w, scale_y) = (%3.2f, %3.2f)\n", (double)scaling->dst_w / scaling->src_w, (double)scaling->dst_h / scaling->src_h); } } else - LOGI(" SCALING : NULL(NO SCALE MODE)\n"); + ALOGI(" SCALING : NULL(NO SCALE MODE)\n"); } void printDataMatrix(int matrixType) { - LOGI(" MATRIX\n"); + ALOGI(" MATRIX\n"); if (matrixType & SkMatrix::kIdentity_Mask) - LOGI(" Matrix_type : Identity_Mask\n"); + ALOGI(" Matrix_type : Identity_Mask\n"); if (matrixType & SkMatrix::kTranslate_Mask) - LOGI(" Matrix_type : Translate_Mask(the matrix has translation)\n"); + ALOGI(" Matrix_type : Translate_Mask(the matrix has translation)\n"); if (matrixType & SkMatrix::kScale_Mask) - LOGI(" Matrix_type : Scale_Mask(the matrix has X or Y scale)\n"); + ALOGI(" Matrix_type : Scale_Mask(the matrix has X or Y scale)\n"); if (matrixType & SkMatrix::kAffine_Mask) - LOGI(" Matrix_type : Affine_Mask(the matrix skews or rotates)\n"); + ALOGI(" Matrix_type : Affine_Mask(the matrix skews or rotates)\n"); if (matrixType & SkMatrix::kPerspective_Mask) - LOGI(" Matrix_type : Perspective_Mask(the matrix is in perspective)\n"); + ALOGI(" Matrix_type : Perspective_Mask(the matrix is in perspective)\n"); } diff --git a/exynos4/hal/libfimg4x/FimgApi.h b/exynos4/hal/libfimg4x/FimgApi.h index a2c9eac..925345e 100644 --- a/exynos4/hal/libfimg4x/FimgApi.h +++ b/exynos4/hal/libfimg4x/FimgApi.h @@ -26,12 +26,12 @@ #include "sec_g2d_4x.h" #define REAL_DEBUG -#define ANDROID_LOG +#define ANDROID_ALOG #if defined(REAL_DEBUG) -#ifdef ANDROID_LOG -#define PRINT LOGE -#define PRINTD LOGD +#ifdef ANDROID_ALOG +#define PRINT ALOGE +#define PRINTD ALOGD #else #define PRINT printf #define PRINTD printf diff --git a/exynos4/hal/libfimg4x/FimgExynos4.cpp b/exynos4/hal/libfimg4x/FimgExynos4.cpp index f9a7f1e..a203683 100644 --- a/exynos4/hal/libfimg4x/FimgExynos4.cpp +++ b/exynos4/hal/libfimg4x/FimgExynos4.cpp @@ -17,8 +17,8 @@ ** */ -#define LOG_NDEBUG 0 -#define LOG_TAG "FimgExynos4" +#define ALOG_NDEBUG 0 +#define ALOG_TAG "FimgExynos4" #include <utils/Log.h> #include "FimgExynos4.h" diff --git a/exynos4/hal/libgralloc_ump/Android.mk b/exynos4/hal/libgralloc_ump/Android.mk index 20584a4..a2141e8 100644 --- a/exynos4/hal/libgralloc_ump/Android.mk +++ b/exynos4/hal/libgralloc_ump/Android.mk @@ -26,7 +26,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_PRELINK_MODULE := false LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw -LOCAL_SHARED_LIBRARIES := liblog libcutils libUMP libGLESv1_CM libion +LOCAL_SHARED_LIBRARIES := liblog libcutils libUMP libGLESv1_CM libsamsungion # Include the UMP header files LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include @@ -39,7 +39,7 @@ LOCAL_SRC_FILES := \ LOCAL_MODULE_TAGS := eng #LOCAL_MODULE := gralloc.default LOCAL_MODULE := gralloc.$(TARGET_DEVICE) -LOCAL_CFLAGS:= -DLOG_TAG=\"gralloc\" -DGRALLOC_32_BITS -DSTANDARD_LINUX_SCREEN +LOCAL_CFLAGS:= -DALOG_TAG=\"gralloc\" -DGRALLOC_32_BITS -DSTANDARD_LINUX_SCREEN #LOCAL_CFLAGS+= -DMALI_VSYNC_EVENT_REPORT_ENABLE LOCAL_CFLAGS += -DSAMSUNG_EXYNOS diff --git a/exynos4/hal/libgralloc_ump/alloc_device.cpp b/exynos4/hal/libgralloc_ump/alloc_device.cpp index 982f1b8..953f017 100644 --- a/exynos4/hal/libgralloc_ump/alloc_device.cpp +++ b/exynos4/hal/libgralloc_ump/alloc_device.cpp @@ -117,7 +117,7 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage, gfd = open(node, O_RDWR); if (gfd < 0) { - LOGE("%s:: %s Post processor open error\n", __func__, node); + ALOGE("%s:: %s Post processor open error\n", __func__, node); return false; } } @@ -126,7 +126,7 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage, vc.value = 0; ret = ioctl(gfd, VIDIOC_G_CTRL, &vc); if (ret < 0) { - LOGE("Error in video VIDIOC_G_CTRL - V4L2_CID_RESERVED_MEM_BAES_ADDR (%d)\n", ret); + ALOGE("Error in video VIDIOC_G_CTRL - V4L2_CID_RESERVED_MEM_BAES_ADDR (%d)\n", ret); return false; } paddr = (unsigned int)vc.value; @@ -160,7 +160,7 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage, if (usage & GRALLOC_USAGE_HW_ION) { if (!ion_dev_open) { - LOGE("ERROR, failed to open ion"); + ALOGE("ERROR, failed to open ion"); return -1; } @@ -169,14 +169,14 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage, ion_fd = ion_alloc(m->ion_client, size, 0, ion_flags); if (ion_fd < 0) { - LOGE("Failed to ion_alloc"); + ALOGE("Failed to ion_alloc"); return -1; } cpu_ptr = ion_map(ion_fd, size, 0); if (NULL == cpu_ptr) { - LOGE("Failed to ion_map"); + ALOGE("Failed to ion_map"); ion_free(ion_fd); return -1; } @@ -186,7 +186,7 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage, if (UMP_INVALID_MEMORY_HANDLE != ump_mem_handle) { priv_alloc_flag = private_handle_t::PRIV_FLAGS_USES_ION; } else { - LOGE("gralloc_alloc_buffer() failed to import ION memory"); + ALOGE("gralloc_alloc_buffer() failed to import ION memory"); ion_unmap(cpu_ptr, size); ion_free(ion_fd); return -1; @@ -233,20 +233,20 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage, hnd->voffset = ((EXYNOS4_ALIGN((hnd->width >> 1), 16) * EXYNOS4_ALIGN((hnd->height >> 1), 16))); return 0; } else { - LOGE("gralloc_alloc_buffer() failed to allocate handle"); + ALOGE("gralloc_alloc_buffer() failed to allocate handle"); } } else { - LOGE("gralloc_alloc_buffer() failed to retrieve valid secure id"); + ALOGE("gralloc_alloc_buffer() failed to retrieve valid secure id"); } ump_mapped_pointer_release(ump_mem_handle); } else { - LOGE("gralloc_alloc_buffer() failed to map UMP memory"); + ALOGE("gralloc_alloc_buffer() failed to map UMP memory"); } ump_reference_release(ump_mem_handle); } else { - LOGE("gralloc_alloc_buffer() failed to allcoate UMP memory"); + ALOGE("gralloc_alloc_buffer() failed to allcoate UMP memory"); } } return -1; @@ -275,7 +275,7 @@ static int gralloc_alloc_framebuffer_locked(alloc_device_t* dev, size_t size, in * screen when post is called. */ int newUsage = (usage & ~GRALLOC_USAGE_HW_FB) | GRALLOC_USAGE_HW_2D; - LOGE("fallback to single buffering"); + ALOGE("fallback to single buffering"); return gralloc_alloc_buffer(dev, bufferSize, newUsage, pHandle, w, h, format, bpp, 0, 0); } @@ -427,14 +427,14 @@ static int alloc_device_free(alloc_device_t* dev, buffer_handle_t handle) } else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_UMP) { #ifdef USE_PARTIAL_FLUSH if (!release_rect((int)hnd->ump_id)) - LOGE("secure id: 0x%x, release error",(int)hnd->ump_id); + ALOGE("secure id: 0x%x, release error",(int)hnd->ump_id); #endif ump_mapped_pointer_release((ump_handle)hnd->ump_mem_handle); ump_reference_release((ump_handle)hnd->ump_mem_handle); } else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION) { #ifdef USE_PARTIAL_FLUSH if (!release_rect((int)hnd->ump_id)) - LOGE("secure id: 0x%x, release error",(int)hnd->ump_id); + ALOGE("secure id: 0x%x, release error",(int)hnd->ump_id); #endif ump_mapped_pointer_release((ump_handle)hnd->ump_mem_handle); ump_reference_release((ump_handle)hnd->ump_mem_handle); @@ -476,7 +476,7 @@ int alloc_device_open(hw_module_t const* module, const char* name, hw_device_t** if (0 > m->ion_client) ion_dev_open = false; if (UMP_OK != ump_res) { - LOGE("UMP open failed ump_res %d", ump_res); + ALOGE("UMP open failed ump_res %d", ump_res); delete dev; return -1; } diff --git a/exynos4/hal/libgralloc_ump/framebuffer_device.cpp b/exynos4/hal/libgralloc_ump/framebuffer_device.cpp index 9413112..03c2606 100644 --- a/exynos4/hal/libgralloc_ump/framebuffer_device.cpp +++ b/exynos4/hal/libgralloc_ump/framebuffer_device.cpp @@ -93,7 +93,7 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer) #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) #define S3CFB_SET_VSYNC_INT _IOW('F', 206, unsigned int) if (ioctl(m->framebuffer->fd, FBIOPAN_DISPLAY, &m->info) == -1) { - LOGE("FBIOPAN_DISPLAY failed"); + ALOGE("FBIOPAN_DISPLAY failed"); m->base.unlock(&m->base, buffer); return 0; } @@ -102,7 +102,7 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer) /* enable VSYNC */ interrupt = 1; if (ioctl(m->framebuffer->fd, S3CFB_SET_VSYNC_INT, &interrupt) < 0) { - LOGE("S3CFB_SET_VSYNC_INT enable failed"); + ALOGE("S3CFB_SET_VSYNC_INT enable failed"); return 0; } /* wait for VSYNC */ @@ -113,7 +113,7 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer) int crtc; crtc = 0; if (ioctl(m->framebuffer->fd, FBIO_WAITFORVSYNC, &crtc) < 0) { - LOGE("FBIO_WAITFORVSYNC failed"); + ALOGE("FBIO_WAITFORVSYNC failed"); #ifdef MALI_VSYNC_EVENT_REPORT_ENABLE gralloc_mali_vsync_report(MALI_VSYNC_EVENT_END_WAIT); #endif @@ -125,7 +125,7 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer) // disable VSYNC interrupt = 0; if (ioctl(m->framebuffer->fd, S3CFB_SET_VSYNC_INT, &interrupt) < 0) { - LOGE("S3CFB_SET_VSYNC_INT disable failed"); + ALOGE("S3CFB_SET_VSYNC_INT disable failed"); return 0; } #else @@ -134,7 +134,7 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer) gralloc_mali_vsync_report(MALI_VSYNC_EVENT_BEGIN_WAIT); #endif if (ioctl(m->framebuffer->fd, FBIOPUT_VSCREENINFO, &m->info) == -1) { - LOGE("FBIOPUT_VSCREENINFO failed"); + ALOGE("FBIOPUT_VSCREENINFO failed"); #ifdef MALI_VSYNC_EVENT_REPORT_ENABLE gralloc_mali_vsync_report(MALI_VSYNC_EVENT_END_WAIT); #endif @@ -246,14 +246,14 @@ int init_frame_buffer_locked(struct private_module_t* module) if (ioctl(fd, FBIOPUT_VSCREENINFO, &info) == -1) { info.yres_virtual = info.yres; flags &= ~PAGE_FLIP; - LOGW("FBIOPUT_VSCREENINFO failed, page flipping not supported"); + ALOGW("FBIOPUT_VSCREENINFO failed, page flipping not supported"); } if (info.yres_virtual < info.yres * 2) { // we need at least 2 for page-flipping info.yres_virtual = info.yres; flags &= ~PAGE_FLIP; - LOGW("page flipping not supported (yres_virtual=%d, requested=%d)", + ALOGW("page flipping not supported (yres_virtual=%d, requested=%d)", info.yres_virtual, info.yres * 2); } @@ -280,7 +280,7 @@ int init_frame_buffer_locked(struct private_module_t* module) float ydpi = (info.yres * 25.4f) / info.height; float fps = refreshRate / 1000.0f; - LOGI("using (fd=%d)\n" + ALOGI("using (fd=%d)\n" "id = %s\n" "xres = %d px\n" "yres = %d px\n" @@ -301,7 +301,7 @@ int init_frame_buffer_locked(struct private_module_t* module) info.green.offset, info.green.length, info.blue.offset, info.blue.length); - LOGI("width = %d mm (%f dpi)\n" + ALOGI("width = %d mm (%f dpi)\n" "height = %d mm (%f dpi)\n" "refresh rate = %.2f Hz\n", info.width, xdpi, @@ -330,7 +330,7 @@ int init_frame_buffer_locked(struct private_module_t* module) size_t fbSize = round_up_to_page_size(finfo.line_length * info.yres_virtual); void* vaddr = mmap(0, fbSize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if (vaddr == MAP_FAILED) { - LOGE("Error mapping the framebuffer (%s)", strerror(errno)); + ALOGE("Error mapping the framebuffer (%s)", strerror(errno)); return -errno; } @@ -355,13 +355,13 @@ int enableScreen(struct framebuffer_device_t* dev, int enable) if (enable == 1) { if (ioctl(m->framebuffer->fd, FBIOBLANK, FB_BLANK_UNBLANK) < 0) { - LOGE("%s: FBIOBLANK failed : (%d:%s)", + ALOGE("%s: FBIOBLANK failed : (%d:%s)", __func__, m->framebuffer->fd, strerror(errno)); return -EINVAL; } } else if (enable == 0) { if (ioctl(m->framebuffer->fd, FBIOBLANK, FB_BLANK_POWERDOWN) < 0) { - LOGE("%s: FBIOBLANK failed : (%d:%s)", + ALOGE("%s: FBIOBLANK failed : (%d:%s)", __func__, m->framebuffer->fd, strerror(errno)); return -EINVAL; } diff --git a/exynos4/hal/libgralloc_ump/gralloc_module.cpp b/exynos4/hal/libgralloc_ump/gralloc_module.cpp index fb8fc43..16fe2ec 100644 --- a/exynos4/hal/libgralloc_ump/gralloc_module.cpp +++ b/exynos4/hal/libgralloc_ump/gralloc_module.cpp @@ -123,7 +123,7 @@ static int gralloc_map(gralloc_module_t const* module, void *mappedAddress = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, gMemfd, (hnd->paddr - hnd->offset)); if (mappedAddress == MAP_FAILED) { - LOGE("Could not mmap %s fd(%d)", strerror(errno),hnd->fd); + ALOGE("Could not mmap %s fd(%d)", strerror(errno),hnd->fd); return -errno; } hnd->base = intptr_t(mappedAddress) + hnd->offset; @@ -133,7 +133,7 @@ static int gralloc_map(gralloc_module_t const* module, void *mappedAddress = ion_map(hnd->fd, size, 0); if (mappedAddress == MAP_FAILED) { - LOGE("Could not ion_map %s fd(%d)", strerror(errno), hnd->fd); + ALOGE("Could not ion_map %s fd(%d)", strerror(errno), hnd->fd); return -errno; } @@ -146,7 +146,7 @@ static int gralloc_map(gralloc_module_t const* module, void *mappedAddress = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, hnd->fd, 0); if (mappedAddress == MAP_FAILED) { - LOGE("Could not mmap %s fd(%d)", strerror(errno),hnd->fd); + ALOGE("Could not mmap %s fd(%d)", strerror(errno),hnd->fd); return -errno; } hnd->base = intptr_t(mappedAddress) + hnd->offset; @@ -165,12 +165,12 @@ static int gralloc_unmap(gralloc_module_t const* module, void* base = (void*)(intptr_t(hnd->base) - hnd->offset); size_t size = FIMC1_RESERVED_SIZE * 1024; if (munmap(base, size) < 0) - LOGE("Could not unmap %s", strerror(errno)); + ALOGE("Could not unmap %s", strerror(errno)); } else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION) { void* base = (void*)hnd->base; size_t size = hnd->size; if (ion_unmap(base, size) < 0) - LOGE("Could not ion_unmap %s", strerror(errno)); + ALOGE("Could not ion_unmap %s", strerror(errno)); ion_client_destroy(hnd->ion_client); } else { void* base = (void*)hnd->base; @@ -180,7 +180,7 @@ static int gralloc_unmap(gralloc_module_t const* module, size += hnd->offset; #endif if (munmap(base, size) < 0) - LOGE("Could not unmap %s", strerror(errno)); + ALOGE("Could not unmap %s", strerror(errno)); } } hnd->base = 0; @@ -205,7 +205,7 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle int retval = -EINVAL; void *vaddr; if (private_handle_t::validate(handle) < 0) { - LOGE("Registering invalid buffer, returning error"); + ALOGE("Registering invalid buffer, returning error"); return -EINVAL; } @@ -235,7 +235,7 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle ump_result res = ump_open(); /* TODO: Fix a ump_close() somewhere??? */ if (res != UMP_OK) { pthread_mutex_unlock(&s_map_lock); - LOGE("Failed to open UMP library"); + ALOGE("Failed to open UMP library"); return retval; } s_ump_is_open = 1; @@ -253,12 +253,12 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle pthread_mutex_unlock(&s_map_lock); return 0; } else { - LOGE("Failed to map UMP handle"); + ALOGE("Failed to map UMP handle"); } ump_reference_release((ump_handle)hnd->ump_mem_handle); } else { - LOGE("Failed to create UMP handle"); + ALOGE("Failed to create UMP handle"); } } else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_PMEM) { pthread_mutex_unlock(&s_map_lock); @@ -269,7 +269,7 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle if (gMemfd == 0) { gMemfd = open(PFX_NODE_MEM, O_RDWR); if (gMemfd < 0) { - LOGE("%s:: %s exynos-mem open error\n", __func__, PFX_NODE_MEM); + ALOGE("%s:: %s exynos-mem open error\n", __func__, PFX_NODE_MEM); return false; } } @@ -289,14 +289,14 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle pthread_mutex_unlock(&s_map_lock); return 0; } else { - LOGE("Failed to map UMP handle"); + ALOGE("Failed to map UMP handle"); } ump_reference_release((ump_handle)hnd->ump_mem_handle); } else { - LOGE("Failed to create UMP handle"); + ALOGE("Failed to create UMP handle"); } } else { - LOGE("registering non-UMP buffer not supported"); + ALOGE("registering non-UMP buffer not supported"); } pthread_mutex_unlock(&s_map_lock); @@ -306,7 +306,7 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle static int gralloc_unregister_buffer(gralloc_module_t const* module, buffer_handle_t handle) { if (private_handle_t::validate(handle) < 0) { - LOGE("unregistering invalid buffer, returning error"); + ALOGE("unregistering invalid buffer, returning error"); return -EINVAL; } @@ -315,9 +315,9 @@ static int gralloc_unregister_buffer(gralloc_module_t const* module, buffer_hand #ifdef USE_PARTIAL_FLUSH if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_UMP) if (!release_rect((int)hnd->ump_id)) - LOGE("secureID: 0x%x, release error", (int)hnd->ump_id); + ALOGE("secureID: 0x%x, release error", (int)hnd->ump_id); #endif - LOGE_IF(hnd->lockState & private_handle_t::LOCK_STATE_READ_MASK, + ALOGE_IF(hnd->lockState & private_handle_t::LOCK_STATE_READ_MASK, "[unregister] handle %p still locked (state=%08x)", hnd, hnd->lockState); /* never unmap buffers that were created in this process */ @@ -347,7 +347,7 @@ static int gralloc_unregister_buffer(gralloc_module_t const* module, buffer_hand hnd->lockState = 0; hnd->writeOwner = 0; } else { - LOGE("unregistering non-UMP buffer not supported"); + ALOGE("unregistering non-UMP buffer not supported"); } pthread_mutex_unlock(&s_map_lock); @@ -361,7 +361,7 @@ static int gralloc_lock(gralloc_module_t const* module, buffer_handle_t handle, { int err = 0; if (private_handle_t::validate(handle) < 0) { - LOGE("Locking invalid buffer, returning error"); + ALOGE("Locking invalid buffer, returning error"); return -EINVAL; } @@ -394,7 +394,7 @@ static int gralloc_lock(gralloc_module_t const* module, buffer_handle_t handle, static int gralloc_unlock(gralloc_module_t const* module, buffer_handle_t handle) { if (private_handle_t::validate(handle) < 0) { - LOGE("Unlocking invalid buffer, returning error"); + ALOGE("Unlocking invalid buffer, returning error"); return -EINVAL; } @@ -423,7 +423,7 @@ static int gralloc_unlock(gralloc_module_t const* module, buffer_handle_t handle ret = ioctl(gMemfd, EXYNOS_MEM_PADDR_CACHE_FLUSH, &mem); if (ret < 0) { - LOGE("Error in exynos-mem : EXYNOS_MEM_PADDR_CACHE_FLUSH (%d)\n", ret); + ALOGE("Error in exynos-mem : EXYNOS_MEM_PADDR_CACHE_FLUSH (%d)\n", ret); return false; } } diff --git a/exynos4/hal/libhdmi/SecHdmi/Android.mk b/exynos4/hal/libhdmi/SecHdmi/Android.mk index e728309..a6921fc 100644 --- a/exynos4/hal/libhdmi/SecHdmi/Android.mk +++ b/exynos4/hal/libhdmi/SecHdmi/Android.mk @@ -79,7 +79,7 @@ endif ifeq ($(BOARD_USE_V4L2_ION),true) LOCAL_CFLAGS += -DBOARD_USE_V4L2_ION -LOCAL_SHARED_LIBRARIES += libion +LOCAL_SHARED_LIBRARIES += libsamsungion endif LOCAL_MODULE := libhdmi diff --git a/exynos4/hal/libhdmi/SecHdmi/SecHdmi.cpp b/exynos4/hal/libhdmi/SecHdmi/SecHdmi.cpp index 21c84ad..e6be6e7 100644 --- a/exynos4/hal/libhdmi/SecHdmi/SecHdmi.cpp +++ b/exynos4/hal/libhdmi/SecHdmi/SecHdmi.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -//#define LOG_NDEBUG 0 -//#define LOG_TAG "libhdmi" +//#define ALOG_NDEBUG 0 +//#define ALOG_TAG "libhdmi" #include <cutils/log.h> #if defined(BOARD_USE_V4L2_ION) @@ -55,7 +55,7 @@ extern unsigned int g2d_buf_index; SecHdmi::CECThread::~CECThread() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif mFlagRunning = false; } @@ -87,18 +87,18 @@ bool SecHdmi::CECThread::threadLoop() opcode = buffer[1]; if (CECIgnoreMessage(opcode, lsrc)) { - LOGE("### ignore message coming from address 15 (unregistered)\n"); + ALOGE("### ignore message coming from address 15 (unregistered)\n"); return true; } if (!CECCheckMessageSize(opcode, size)) { - LOGE("### invalid message size: %d(opcode: 0x%x) ###\n", size, opcode); + ALOGE("### invalid message size: %d(opcode: 0x%x) ###\n", size, opcode); return true; } /* check if message broadcasted/directly addressed */ if (!CECCheckMessageMode(opcode, (buffer[0] & 0x0F) == CEC_MSG_BROADCAST ? 1 : 0)) { - LOGE("### invalid message mode (directly addressed/broadcast) ###\n"); + ALOGE("### invalid message mode (directly addressed/broadcast) ###\n"); return true; } @@ -119,14 +119,14 @@ bool SecHdmi::CECThread::threadLoop() break; case CEC_OPCODE_REQUEST_ACTIVE_SOURCE: - LOGD("[CEC_OPCODE_REQUEST_ACTIVE_SOURCE]\n"); + ALOGD("[CEC_OPCODE_REQUEST_ACTIVE_SOURCE]\n"); /* responce with "Active Source" */ buffer[0] = (mLaddr << 4) | CEC_MSG_BROADCAST; buffer[1] = CEC_OPCODE_ACTIVE_SOURCE; buffer[2] = (mPaddr >> 8) & 0xFF; buffer[3] = mPaddr & 0xFF; size = 4; - LOGD("Tx : [CEC_OPCODE_ACTIVE_SOURCE]\n"); + ALOGD("Tx : [CEC_OPCODE_ACTIVE_SOURCE]\n"); break; case CEC_OPCODE_ABORT: @@ -142,7 +142,7 @@ bool SecHdmi::CECThread::threadLoop() } if (CECSendMessage(buffer, size) != size) - LOGE("CECSendMessage() failed!!!\n"); + ALOGE("CECSendMessage() failed!!!\n"); } return true; @@ -151,33 +151,33 @@ bool SecHdmi::CECThread::threadLoop() bool SecHdmi::CECThread::start() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mThreadControlLock); if (exitPending()) { if (requestExitAndWait() == WOULD_BLOCK) { - LOGE("mCECThread.requestExitAndWait() == WOULD_BLOCK"); + ALOGE("mCECThread.requestExitAndWait() == WOULD_BLOCK"); return false; } } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("EDIDGetCECPhysicalAddress"); + ALOGD("EDIDGetCECPhysicalAddress"); #endif /* set to not valid physical address */ mPaddr = CEC_NOT_VALID_PHYSICAL_ADDRESS; if (!EDIDGetCECPhysicalAddress(&mPaddr)) { - LOGE("Error: EDIDGetCECPhysicalAddress() failed.\n"); + ALOGE("Error: EDIDGetCECPhysicalAddress() failed.\n"); return false; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("CECOpen"); + ALOGD("CECOpen"); #endif if (!CECOpen()) { - LOGE("CECOpen() failed!!!\n"); + ALOGE("CECOpen() failed!!!\n"); return false; } @@ -191,24 +191,24 @@ bool SecHdmi::CECThread::start() */ #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("CECAllocLogicalAddress"); + ALOGD("CECAllocLogicalAddress"); #endif mLaddr = CECAllocLogicalAddress(mPaddr, mDevtype); if (!mLaddr) { - LOGE("CECAllocLogicalAddress() failed!!!\n"); + ALOGE("CECAllocLogicalAddress() failed!!!\n"); if (!CECClose()) - LOGE("CECClose() failed!\n"); + ALOGE("CECClose() failed!\n"); return false; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("request to run CECThread"); + ALOGD("request to run CECThread"); #endif status_t ret = run("SecHdmi::CECThread", PRIORITY_DISPLAY); if (ret != NO_ERROR) { - LOGE("%s fail to run thread", __func__); + ALOGE("%s fail to run thread", __func__); return false; } return true; @@ -217,16 +217,16 @@ bool SecHdmi::CECThread::start() bool SecHdmi::CECThread::stop() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s request Exit", __func__); + ALOGD("%s request Exit", __func__); #endif Mutex::Autolock lock(mThreadControlLock); if (requestExitAndWait() == WOULD_BLOCK) { - LOGE("mCECThread.requestExitAndWait() == WOULD_BLOCK"); + ALOGE("mCECThread.requestExitAndWait() == WOULD_BLOCK"); return false; } if (!CECClose()) - LOGE("CECClose() failed!\n"); + ALOGE("CECClose() failed!\n"); mFlagRunning = false; return true; @@ -266,7 +266,7 @@ SecHdmi::SecHdmi(): mDisplayHeight(DEFALULT_DISPLAY_HEIGHT) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif for (int i = 0; i < HDMI_LAYER_MAX; i++) { mFlagLayerEnable[i] = false; @@ -328,10 +328,10 @@ SecHdmi::SecHdmi(): SecHdmi::~SecHdmi() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == true) - LOGE("%s::this is not Destroyed fail", __func__); + ALOGE("%s::this is not Destroyed fail", __func__); else disconnect(); } @@ -371,17 +371,17 @@ bool SecHdmi::create(int width, int height) #endif #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == true) { - LOGE("%s::Already Created fail", __func__); + ALOGE("%s::Already Created fail", __func__); goto CREATE_FAIL; } if (mDefaultFBFd <= 0) { if ((mDefaultFBFd = fb_open(DEFAULT_FB)) < 0) { - LOGE("%s:Failed to open default FB", __func__); + ALOGE("%s:Failed to open default FB", __func__); return false; } } @@ -393,25 +393,25 @@ bool SecHdmi::create(int width, int height) #endif if (mSecFimc.create(SecFimc::DEV_3, SecFimc::MODE_SINGLE_BUF, BufNum) == false) { - LOGE("%s::SecFimc create() fail", __func__); + ALOGE("%s::SecFimc create() fail", __func__); goto CREATE_FAIL; } #if defined(BOARD_USE_V4L2_ION) IonClient = ion_client_create(); if (IonClient < 0) { - LOGE("%s::ion_client_create() failed", __func__); + ALOGE("%s::ion_client_create() failed", __func__); goto CREATE_FAIL; } #if defined(BOARD_USES_FIMGAPI) IonFd = ion_alloc(IonClient, g2d_reserved_memory_size * HDMI_G2D_OUTPUT_BUF_NUM, 0, ION_HEAP_EXYNOS_MASK); if (IonFd < 0) { - LOGE("%s::ION memory allocation failed", __func__); + ALOGE("%s::ION memory allocation failed", __func__); } else { ion_base_addr = ion_map(IonFd, ALIGN(g2d_reserved_memory_size * HDMI_G2D_OUTPUT_BUF_NUM, PAGE_SIZE), 0); if (ion_base_addr == MAP_FAILED) - LOGE("%s::ION mmap failed", __func__); + ALOGE("%s::ION mmap failed", __func__); } for (int i = 0; i < HDMI_G2D_OUTPUT_BUF_NUM; i++) @@ -437,16 +437,16 @@ bool SecHdmi::create(int width, int height) v4l2_std_id std_id; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::mHdmiOutputMode(%d) \n", __func__, mHdmiOutputMode); + ALOGD("%s::mHdmiOutputMode(%d) \n", __func__, mHdmiOutputMode); #endif if (mHdmiOutputMode == COMPOSITE_OUTPUT_MODE) { std_id = composite_std_2_v4l2_std_id(mCompositeStd); if ((int)std_id < 0) { - LOGE("%s::composite_std_2_v4l2_std_id(%d) fail\n", __func__, mCompositeStd); + ALOGE("%s::composite_std_2_v4l2_std_id(%d) fail\n", __func__, mCompositeStd); goto CREATE_FAIL; } if (m_setCompositeResolution(mCompositeStd) == false) { - LOGE("%s::m_setCompositeResolution(%d) fail\n", __func__, mCompositeStd); + ALOGE("%s::m_setCompositeResolution(%d) fail\n", __func__, mCompositeStd); goto CREATE_FAIL; } } else if (mHdmiOutputMode >= HDMI_OUTPUT_MODE_YCBCR && @@ -455,12 +455,12 @@ bool SecHdmi::create(int width, int height) unsigned int preset_id; if (hdmi_resolution_2_preset_id(mHdmiResolutionValue, &mHdmiDstWidth, &mHdmiDstHeight, &preset_id) < 0) { - LOGE("%s::hdmi_resolution_2_preset_id(%d) fail\n", __func__, mHdmiResolutionValue); + ALOGE("%s::hdmi_resolution_2_preset_id(%d) fail\n", __func__, mHdmiResolutionValue); goto CREATE_FAIL; } #else if (hdmi_resolution_2_std_id(mHdmiResolutionValue, &mHdmiDstWidth, &mHdmiDstHeight, &std_id) < 0) { - LOGE("%s::hdmi_resolution_2_std_id(%d) fail\n", __func__, mHdmiResolutionValue); + ALOGE("%s::hdmi_resolution_2_std_id(%d) fail\n", __func__, mHdmiResolutionValue); goto CREATE_FAIL; } #endif @@ -474,7 +474,7 @@ CREATE_FAIL : if (mSecFimc.flagCreate() == true && mSecFimc.destroy() == false) - LOGE("%s::fimc destory fail", __func__); + ALOGE("%s::fimc destory fail", __func__); return false; } @@ -482,24 +482,24 @@ CREATE_FAIL : bool SecHdmi::destroy(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Already Destroyed fail \n", __func__); + ALOGE("%s::Already Destroyed fail \n", __func__); goto DESTROY_FAIL; } for (int layer = HDMI_LAYER_BASE + 1; layer <= HDMI_LAYER_GRAPHIC_0; layer++) { if (mFlagHdmiStart[layer] == true && m_stopHdmi(layer) == false) { - LOGE("%s::m_stopHdmi: layer[%d] fail \n", __func__, layer); + ALOGE("%s::m_stopHdmi: layer[%d] fail \n", __func__, layer); goto DESTROY_FAIL; } if (hdmi_deinit_layer(layer) < 0) { - LOGE("%s::hdmi_deinit_layer(%d) fail \n", __func__, layer); + ALOGE("%s::hdmi_deinit_layer(%d) fail \n", __func__, layer); goto DESTROY_FAIL; } } @@ -509,7 +509,7 @@ bool SecHdmi::destroy(void) #endif if (mSecFimc.flagCreate() == true && mSecFimc.destroy() == false) { - LOGE("%s::fimc destory fail \n", __func__); + ALOGE("%s::fimc destory fail \n", __func__); goto DESTROY_FAIL; } @@ -550,37 +550,37 @@ DESTROY_FAIL : bool SecHdmi::connect(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif { Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (mFlagConnected == true) { - LOGD("%s::Already Connected.. \n", __func__); + ALOGD("%s::Already Connected.. \n", __func__); return true; } if (mHdmiOutputMode >= HDMI_OUTPUT_MODE_YCBCR && mHdmiOutputMode <= HDMI_OUTPUT_MODE_DVI) { if (m_flagHWConnected() == false) { - LOGD("%s::m_flagHWConnected() fail \n", __func__); + ALOGD("%s::m_flagHWConnected() fail \n", __func__); return false; } #if defined(BOARD_USES_EDID) if (!EDIDOpen()) - LOGE("EDIDInit() failed!\n"); + ALOGE("EDIDInit() failed!\n"); if (!EDIDRead()) { - LOGE("EDIDRead() failed!\n"); + ALOGE("EDIDRead() failed!\n"); if (!EDIDClose()) - LOGE("EDIDClose() failed!\n"); + ALOGE("EDIDClose() failed!\n"); } #endif @@ -592,15 +592,15 @@ bool SecHdmi::connect(void) } if (this->setHdmiOutputMode(mHdmiOutputMode, true) == false) - LOGE("%s::setHdmiOutputMode(%d) fail \n", __func__, mHdmiOutputMode); + ALOGE("%s::setHdmiOutputMode(%d) fail \n", __func__, mHdmiOutputMode); if (mHdmiOutputMode >= HDMI_OUTPUT_MODE_YCBCR && mHdmiOutputMode <= HDMI_OUTPUT_MODE_DVI) { if (this->setHdmiResolution(mHdmiResolutionValue, true) == false) - LOGE("%s::setHdmiResolution(%d) fail \n", __func__, mHdmiResolutionValue); + ALOGE("%s::setHdmiResolution(%d) fail \n", __func__, mHdmiResolutionValue); if (this->setHdcpMode(mHdcpMode, false) == false) - LOGE("%s::setHdcpMode(%d) fail \n", __func__, mHdcpMode); + ALOGE("%s::setHdcpMode(%d) fail \n", __func__, mHdcpMode); mHdmiInfoChange = true; mFlagConnected = true; @@ -617,18 +617,18 @@ bool SecHdmi::connect(void) bool SecHdmi::disconnect(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (mFlagConnected == false) { - LOGE("%s::Already Disconnected.. \n", __func__); + ALOGE("%s::Already Disconnected.. \n", __func__); return true; } @@ -641,7 +641,7 @@ bool SecHdmi::disconnect(void) #if defined(BOARD_USES_EDID) if (!EDIDClose()) { - LOGE("EDIDClose() failed!\n"); + ALOGE("EDIDClose() failed!\n"); return false; } #endif @@ -649,7 +649,7 @@ bool SecHdmi::disconnect(void) for (int layer = SecHdmi::HDMI_LAYER_BASE + 1; layer <= SecHdmi::HDMI_LAYER_GRAPHIC_0; layer++) { if (mFlagHdmiStart[layer] == true && m_stopHdmi(layer) == false) { - LOGE("%s::hdmiLayer(%d) layer fail \n", __func__, layer); + ALOGE("%s::hdmiLayer(%d) layer fail \n", __func__, layer); return false; } } @@ -657,7 +657,7 @@ bool SecHdmi::disconnect(void) #if defined(BOARD_USE_V4L2) for (int layer = HDMI_LAYER_BASE + 1; layer < HDMI_LAYER_MAX; layer++) { if (hdmi_deinit_layer(layer) < 0) - LOGE("%s::hdmi_deinit_layer(%d) fail", __func__, layer); + ALOGE("%s::hdmi_deinit_layer(%d) fail", __func__, layer); } #else tvout_deinit(); @@ -685,13 +685,13 @@ bool SecHdmi::disconnect(void) bool SecHdmi::flagConnected(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } @@ -705,14 +705,14 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, int num_of_hwc_layer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s [srcW=%d, srcH=%d, srcColorFormat=0x%x, srcYAddr=0x%x, srcCbAddr=0x%x, srcCrAddr=0x%x, dstX=%d, dstY=%d, hdmiLayer=%d]", + ALOGD("%s [srcW=%d, srcH=%d, srcColorFormat=0x%x, srcYAddr=0x%x, srcCbAddr=0x%x, srcCrAddr=0x%x, dstX=%d, dstY=%d, hdmiLayer=%d]", __func__, srcW, srcH, srcColorFormat, srcYAddr, srcCbAddr, srcCrAddr, dstX, dstY, hdmiLayer); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } @@ -744,7 +744,7 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, } } #ifdef DEBUG_MSG_ENABLE - LOGE("m_reset param(%d, %d, %d, %d)", + ALOGE("m_reset param(%d, %d, %d, %d)", mDstWidth[hdmiLayer], mDstHeight[hdmiLayer], \ mPrevDstWidth[hdmiLayer], mPrevDstHeight[hdmiLayer]); #endif @@ -761,7 +761,7 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, #endif mHdmiInfoChange == true) { #ifdef DEBUG_MSG_ENABLE - LOGD("m_reset param(%d, %d, %d, %d, %d, %d, %d)", + ALOGD("m_reset param(%d, %d, %d, %d, %d, %d, %d)", srcW, mSrcWidth[hdmiLayer], \ srcH, mSrcHeight[hdmiLayer], \ srcColorFormat,mSrcColorFormat[hdmiLayer], \ @@ -769,7 +769,7 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, #endif if (m_reset(srcW, srcH, srcColorFormat, hdmiLayer, num_of_hwc_layer) == false) { - LOGE("%s::m_reset(%d, %d, %d, %d, %d) fail", __func__, srcW, srcH, srcColorFormat, hdmiLayer, num_of_hwc_layer); + ALOGE("%s::m_reset(%d, %d, %d, %d, %d) fail", __func__, srcW, srcH, srcColorFormat, hdmiLayer, num_of_hwc_layer); return false; } } @@ -787,13 +787,13 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, // get framebuffer virtual address for LCD if (ioctl(mDefaultFBFd, S3CFB_GET_ION_USER_HANDLE, &ion_handle) < 0) { - LOGE("%s:ioctl(S3CFB_GET_ION_USER_HANDLE) fail", __func__); + ALOGE("%s:ioctl(S3CFB_GET_ION_USER_HANDLE) fail", __func__); return false; } virFBAddr = ion_map(ion_handle.fd, ALIGN(FB_size * 2, PAGE_SIZE), 0); if (virFBAddr == MAP_FAILED) { - LOGE("%s::ion_map fail", __func__); + ALOGE("%s::ion_map fail", __func__); ion_free(ion_handle.fd); mFBaddr = NULL; return false; @@ -815,7 +815,7 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, // get physical framebuffer address for LCD if (ioctl(mDefaultFBFd, S3CFB_GET_FB_PHY_ADDR, &phyFBAddr) == -1) { - LOGE("%s:ioctl(S3CFB_GET_FB_PHY__ADDR) fail", __func__); + ALOGE("%s:ioctl(S3CFB_GET_FB_PHY__ADDR) fail", __func__); return false; } @@ -825,7 +825,7 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, * so JUST RETURN. */ if (phyFBAddr == 0) { - LOGE("%s::S3CFB_GET_FB_PHY_ADDR fail", __func__); + ALOGE("%s::S3CFB_GET_FB_PHY_ADDR fail", __func__); return true; } srcYAddr = phyFBAddr; @@ -868,7 +868,7 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, #endif } else { if (mSecFimc.setSrcAddr(srcYAddr, srcCbAddr, srcCrAddr, srcColorFormat) == false) { - LOGE("%s::setSrcAddr(%d, %d, %d) fail", + ALOGE("%s::setSrcAddr(%d, %d, %d) fail", __func__, srcYAddr, srcCbAddr, srcCrAddr); return false; } @@ -886,13 +886,13 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, mHdmiSrcCbCrAddr = mFimcReservedMem[mFimcCurrentOutBufIndex].phys.extP[0] + y_size; #endif if (mSecFimc.setDstAddr(mHdmiSrcYAddr, mHdmiSrcCbCrAddr, 0, mFimcCurrentOutBufIndex) == false) { - LOGE("%s::mSecFimc.setDstAddr(%d, %d) fail \n", + ALOGE("%s::mSecFimc.setDstAddr(%d, %d) fail \n", __func__, mHdmiSrcYAddr, mHdmiSrcCbCrAddr); return false; } if (mSecFimc.draw(0, mFimcCurrentOutBufIndex) == false) { - LOGE("%s::mSecFimc.draw() fail \n", __func__); + ALOGE("%s::mSecFimc.draw() fail \n", __func__); return false; } #if defined(BOARD_USE_V4L2) @@ -920,13 +920,13 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, srcColorFormat != HAL_PIXEL_FORMAT_RGBA_8888 && srcColorFormat != HAL_PIXEL_FORMAT_RGB_565) { if (mSecFimc.setSrcAddr(srcYAddr, srcCbAddr, srcCrAddr, srcColorFormat) == false) { - LOGE("%s::setSrcAddr(%d, %d, %d) fail", + ALOGE("%s::setSrcAddr(%d, %d, %d) fail", __func__, srcYAddr, srcCbAddr, srcCrAddr); return false; } if (mSecFimc.draw(0, mFimcCurrentOutBufIndex) == false) { - LOGE("%s::mSecFimc.draw() failed", __func__); + ALOGE("%s::mSecFimc.draw() failed", __func__); return false; } #if defined(BOARD_USE_V4L2) @@ -1008,7 +1008,7 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, } #if CHECK_GRAPHIC_LAYER_TIME end = systemTime(); - LOGD("[UI] hdmi_gl_set_param[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); + ALOGD("[UI] hdmi_gl_set_param[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); #endif } } @@ -1018,17 +1018,17 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, unsigned int num_of_plane; if (hdmi_get_src_plane(srcColorFormat, &num_of_plane) < 0) { - LOGE("%s::hdmi_get_src_plane(%d) fail", __func__, srcColorFormat); + ALOGE("%s::hdmi_get_src_plane(%d) fail", __func__, srcColorFormat); return false; } if (mFlagHdmiStart[hdmiLayer] == false && m_startHdmi(hdmiLayer, num_of_plane) == false) { - LOGE("%s::hdmiLayer(%d) fail", __func__, hdmiLayer); + ALOGE("%s::hdmiLayer(%d) fail", __func__, hdmiLayer); return false; } #else if (mFlagHdmiStart[hdmiLayer] == false && m_startHdmi(hdmiLayer) == false) { - LOGE("%s::hdmiLayer(%d) fail", __func__, hdmiLayer); + ALOGE("%s::hdmiLayer(%d) fail", __func__, hdmiLayer); return false; } #endif @@ -1040,17 +1040,17 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, bool SecHdmi::clear(int hdmiLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s || hdmiLayer = %d", __func__, hdmiLayer); + ALOGD("%s || hdmiLayer = %d", __func__, hdmiLayer); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (mFlagHdmiStart[hdmiLayer] == true && m_stopHdmi(hdmiLayer) == false) { - LOGE("%s::m_stopHdmi: layer[%d] fail \n", __func__, hdmiLayer); + ALOGE("%s::m_stopHdmi: layer[%d] fail \n", __func__, hdmiLayer); return false; } return true; @@ -1059,19 +1059,19 @@ bool SecHdmi::clear(int hdmiLayer) bool SecHdmi::setHdmiOutputMode(int hdmiOutputMode, bool forceRun) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::hdmiOutputMode = %d, forceRun = %d", __func__, hdmiOutputMode, forceRun); + ALOGD("%s::hdmiOutputMode = %d, forceRun = %d", __func__, hdmiOutputMode, forceRun); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (forceRun == false && mHdmiOutputMode == hdmiOutputMode) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdmiOutputMode(%d) \n", __func__, hdmiOutputMode); + ALOGD("%s::same hdmiOutputMode(%d) \n", __func__, hdmiOutputMode); #endif return true; } @@ -1080,7 +1080,7 @@ bool SecHdmi::setHdmiOutputMode(int hdmiOutputMode, bool forceRun) int v4l2OutputType = hdmi_outputmode_2_v4l2_output_type(hdmiOutputMode); if (v4l2OutputType < 0) { - LOGD("%s::hdmi_outputmode_2_v4l2_output_type(%d) fail\n", __func__, hdmiOutputMode); + ALOGD("%s::hdmi_outputmode_2_v4l2_output_type(%d) fail\n", __func__, hdmiOutputMode); return false; } @@ -1089,11 +1089,11 @@ bool SecHdmi::setHdmiOutputMode(int hdmiOutputMode, bool forceRun) if (newV4l2OutputType != v4l2OutputType) { newHdmiOutputMode = hdmi_v4l2_output_type_2_outputmode(newV4l2OutputType); if (newHdmiOutputMode < 0) { - LOGD("%s::hdmi_v4l2_output_type_2_outputmode(%d) fail\n", __func__, newV4l2OutputType); + ALOGD("%s::hdmi_v4l2_output_type_2_outputmode(%d) fail\n", __func__, newV4l2OutputType); return false; } - LOGD("%s::calibration mode(%d -> %d)... \n", __func__, hdmiOutputMode, newHdmiOutputMode); + ALOGD("%s::calibration mode(%d -> %d)... \n", __func__, hdmiOutputMode, newHdmiOutputMode); mHdmiInfoChange = true; } #endif @@ -1109,19 +1109,19 @@ bool SecHdmi::setHdmiOutputMode(int hdmiOutputMode, bool forceRun) bool SecHdmi::setHdmiResolution(unsigned int hdmiResolutionValue, bool forceRun) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s:: hdmiResolutionValue = %d, forceRun = %d", __func__, hdmiResolutionValue, forceRun); + ALOGD("%s:: hdmiResolutionValue = %d, forceRun = %d", __func__, hdmiResolutionValue, forceRun); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (forceRun == false && mHdmiResolutionValue == hdmiResolutionValue) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdmiResolutionValue(%d) \n", __func__, hdmiResolutionValue); + ALOGD("%s::same hdmiResolutionValue(%d) \n", __func__, hdmiResolutionValue); #endif return true; } @@ -1149,11 +1149,11 @@ bool SecHdmi::setHdmiResolution(unsigned int hdmiResolutionValue, bool forceRun) } if (flagFoundIndex == false) { - LOGE("%s::hdmi cannot control this resolution(%d) fail \n", __func__, hdmiResolutionValue); + ALOGE("%s::hdmi cannot control this resolution(%d) fail \n", __func__, hdmiResolutionValue); // Set resolution to 480P newHdmiResolutionValue = mHdmiResolutionValueList[mHdmiSizeOfResolutionValueList-2]; } else { - LOGD("%s::HDMI resolutions size is calibrated(%d -> %d)..\n", __func__, hdmiResolutionValue, newHdmiResolutionValue); + ALOGD("%s::HDMI resolutions size is calibrated(%d -> %d)..\n", __func__, hdmiResolutionValue, newHdmiResolutionValue); } } #else @@ -1173,17 +1173,17 @@ bool SecHdmi::setHdmiResolution(unsigned int hdmiResolutionValue, bool forceRun) } if (flagFoundIndex == false) { - LOGE("%s::hdmi cannot control this resolution(%d) fail \n", __func__, hdmiResolutionValue); + ALOGE("%s::hdmi cannot control this resolution(%d) fail \n", __func__, hdmiResolutionValue); // Set resolution to 480P newHdmiResolutionValue = mHdmiResolutionValueList[mHdmiSizeOfResolutionValueList-2]; } else { - LOGD("%s::HDMI resolutions size is calibrated(%d -> %d)..\n", __func__, hdmiResolutionValue, newHdmiResolutionValue); + ALOGD("%s::HDMI resolutions size is calibrated(%d -> %d)..\n", __func__, hdmiResolutionValue, newHdmiResolutionValue); } } #endif else { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::find resolutions(%d) at once\n", __func__, hdmiResolutionValue); + ALOGD("%s::find resolutions(%d) at once\n", __func__, hdmiResolutionValue); #endif } #endif @@ -1199,19 +1199,19 @@ bool SecHdmi::setHdmiResolution(unsigned int hdmiResolutionValue, bool forceRun) bool SecHdmi::setHdcpMode(bool hdcpMode, bool forceRun) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (forceRun == false && mHdcpMode == hdcpMode) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdcpMode(%d) \n", __func__, hdcpMode); + ALOGD("%s::same hdcpMode(%d) \n", __func__, hdcpMode); #endif return true; } @@ -1225,18 +1225,18 @@ bool SecHdmi::setHdcpMode(bool hdcpMode, bool forceRun) bool SecHdmi::setUIRotation(unsigned int rotVal, unsigned int hwcLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (rotVal % 90 != 0) { - LOGE("%s::Invalid rotation value(%d)", __func__, rotVal); + ALOGE("%s::Invalid rotation value(%d)", __func__, rotVal); return false; } @@ -1276,11 +1276,11 @@ bool SecHdmi::setDisplaySize(int width, int height) bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called", __func__); + ALOGD("### %s called", __func__); #endif v4l2_std_id std_id = 0; mFimcCurrentOutBufIndex = 0; @@ -1290,14 +1290,14 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer #if defined(BOARD_USE_V4L2) if (mFlagHdmiStart[hdmiLayer] == true && m_stopHdmi(hdmiLayer) == false) { - LOGE("%s::m_stopHdmi: layer[%d] fail", __func__, hdmiLayer); + ALOGE("%s::m_stopHdmi: layer[%d] fail", __func__, hdmiLayer); return false; } #else // stop all.. for (int layer = HDMI_LAYER_BASE + 1; layer < HDMI_LAYER_MAX; layer++) { if (mFlagHdmiStart[layer] == true && m_stopHdmi(layer) == false) { - LOGE("%s::m_stopHdmi: layer[%d] fail", __func__, layer); + ALOGE("%s::m_stopHdmi: layer[%d] fail", __func__, layer); return false; } } @@ -1305,14 +1305,14 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer #if defined(BOARD_USE_V4L2) if (hdmi_deinit_layer(hdmiLayer) < 0) - LOGE("%s::hdmi_deinit_layer(%d) fail", __func__, hdmiLayer); + ALOGE("%s::hdmi_deinit_layer(%d) fail", __func__, hdmiLayer); mHdmiFd[hdmiLayer] = hdmi_init_layer(hdmiLayer); if (mHdmiFd[hdmiLayer] < 0) - LOGE("%s::hdmi_init_layer(%d) fail", __func__, hdmiLayer); + ALOGE("%s::hdmi_init_layer(%d) fail", __func__, hdmiLayer); if (tvout_std_v4l2_init(mHdmiFd[hdmiLayer], mHdmiPresetId) < 0) - LOGE("%s::tvout_std_v4l2_init fail", __func__); + ALOGE("%s::tvout_std_v4l2_init fail", __func__); #endif if (w != mSrcWidth [hdmiLayer] || @@ -1332,7 +1332,7 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer preVideoSrcColorFormat != HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP && preVideoSrcColorFormat != HAL_PIXEL_FORMAT_CUSTOM_YCrCb_420_SP && preVideoSrcColorFormat != HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED) { - LOGI("%s: Unsupported preVideoSrcColorFormat = 0x%x\n", __func__, preVideoSrcColorFormat); + ALOGI("%s: Unsupported preVideoSrcColorFormat = 0x%x\n", __func__, preVideoSrcColorFormat); preVideoSrcColorFormat = HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED; } @@ -1343,14 +1343,14 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer colorFormat != HAL_PIXEL_FORMAT_CUSTOM_YCrCb_420_SP && colorFormat != HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s call mSecFimc.setSrcParams\n", __func__); + ALOGD("### %s call mSecFimc.setSrcParams\n", __func__); #endif unsigned int full_wdith = ALIGN(w, 16); unsigned int full_height = ALIGN(h, 2); if (mSecFimc.setSrcParams(full_wdith, full_height, 0, 0, (unsigned int*)&w, (unsigned int*)&h, colorFormat, true) == false) { - LOGE("%s::mSecFimc.setSrcParams(%d, %d, %d) fail \n", + ALOGE("%s::mSecFimc.setSrcParams(%d, %d, %d) fail \n", __func__, w, h, colorFormat); return false; } @@ -1358,12 +1358,12 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer mFimcDstColorFormat = HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s call mSecFimc.setDstParams\n", __func__); + ALOGD("### %s call mSecFimc.setDstParams\n", __func__); #endif if (mUIRotVal == 0 || mUIRotVal == 180) { if (mSecFimc.setDstParams((unsigned int)w, (unsigned int)h, 0, 0, (unsigned int*)&w, (unsigned int*)&h, mFimcDstColorFormat, true) == false) { - LOGE("%s::mSecFimc.setDstParams(%d, %d, %d) fail \n", + ALOGE("%s::mSecFimc.setDstParams(%d, %d, %d) fail \n", __func__, w, h, mFimcDstColorFormat); return false; } @@ -1376,7 +1376,7 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer } else { if (mSecFimc.setDstParams((unsigned int)h, (unsigned int)w, 0, 0, (unsigned int*)&h, (unsigned int*)&w, mFimcDstColorFormat, true) == false) { - LOGE("%s::mSecFimc.setDstParams(%d, %d, %d) fail \n", + ALOGE("%s::mSecFimc.setDstParams(%d, %d, %d) fail \n", __func__, w, h, mFimcDstColorFormat); return false; } @@ -1445,7 +1445,7 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer mHdmiResolutionHeight[hdmiLayer] = mHdmiDstHeight; #ifdef DEBUG_MSG_ENABLE - LOGD("m_reset saved param(%d, %d, %d, %d, %d, %d, %d) \n", + ALOGD("m_reset saved param(%d, %d, %d, %d, %d, %d, %d) \n", srcW, mSrcWidth[hdmiLayer], \ srcH, mSrcHeight[hdmiLayer], \ colorFormat,mSrcColorFormat[hdmiLayer], \ @@ -1455,7 +1455,7 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer if (mHdmiInfoChange == true) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("mHdmiInfoChange: %d\n", mHdmiInfoChange); + ALOGD("mHdmiInfoChange: %d\n", mHdmiInfoChange); #endif // stop all.. #if defined(BOARD_USES_CEC) @@ -1467,28 +1467,28 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer #endif if (m_setHdmiOutputMode(mHdmiOutputMode) == false) { - LOGE("%s::m_setHdmiOutputMode() fail \n", __func__); + ALOGE("%s::m_setHdmiOutputMode() fail \n", __func__); return false; } if (mHdmiOutputMode == COMPOSITE_OUTPUT_MODE) { std_id = composite_std_2_v4l2_std_id(mCompositeStd); if ((int)std_id < 0) { - LOGE("%s::composite_std_2_v4l2_std_id(%d) fail\n", __func__, mCompositeStd); + ALOGE("%s::composite_std_2_v4l2_std_id(%d) fail\n", __func__, mCompositeStd); return false; } if (m_setCompositeResolution(mCompositeStd) == false) { - LOGE("%s::m_setCompositeRsolution() fail \n", __func__); + ALOGE("%s::m_setCompositeRsolution() fail \n", __func__); return false; } } else if (mHdmiOutputMode >= HDMI_OUTPUT_MODE_YCBCR && mHdmiOutputMode <= HDMI_OUTPUT_MODE_DVI) { if (m_setHdmiResolution(mHdmiResolutionValue) == false) { - LOGE("%s::m_setHdmiResolution() fail \n", __func__); + ALOGE("%s::m_setHdmiResolution() fail \n", __func__); return false; } if (m_setHdcpMode(mHdcpMode) == false) { - LOGE("%s::m_setHdcpMode() fail \n", __func__); + ALOGE("%s::m_setHdcpMode() fail \n", __func__); return false; } #if !defined(BOARD_USE_V4L2) @@ -1501,12 +1501,12 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer for (int layer = HDMI_LAYER_BASE + 1; layer < HDMI_LAYER_MAX; layer++) { if (hdmi_deinit_layer(layer) < 0) - LOGE("%s::hdmi_init_layer(%d) fail \n", __func__, layer); + ALOGE("%s::hdmi_init_layer(%d) fail \n", __func__, layer); } for (int layer = HDMI_LAYER_BASE + 1; layer < HDMI_LAYER_MAX; layer++) { if (hdmi_init_layer(layer) < 0) - LOGE("%s::hdmi_init_layer(%d) fail \n", __func__, layer); + ALOGE("%s::hdmi_init_layer(%d) fail \n", __func__, layer); } #endif @@ -1518,7 +1518,7 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer #endif if (m_setAudioMode(mAudioMode) == false) - LOGE("%s::m_setAudioMode() fail \n", __func__); + ALOGE("%s::m_setAudioMode() fail \n", __func__); } mHdmiInfoChange = false; @@ -1535,14 +1535,14 @@ bool SecHdmi::m_reset(int w, int h, int colorFormat, int hdmiLayer, int hwcLayer bool SecHdmi::m_startHdmi(int hdmiLayer, unsigned int num_of_plane) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif bool ret = true; int buf_index = 0; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s: hdmiLayer(%d) called\n", __func__, hdmiLayer); + ALOGD("### %s: hdmiLayer(%d) called\n", __func__, hdmiLayer); #endif if (mFlagLayerEnable[hdmiLayer]) { @@ -1552,13 +1552,13 @@ bool SecHdmi::m_startHdmi(int hdmiLayer, unsigned int num_of_plane) index = 0; if (tvout_std_v4l2_qbuf(mHdmiFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, index, num_of_plane, &mMixerBuffer[hdmiLayer][0]) < 0) { - LOGE("%s::tvout_std_v4l2_qbuf(index : %d) (mSrcBufNum : %d) failed", __func__, index, HDMI_NUM_MIXER_BUF); + ALOGE("%s::tvout_std_v4l2_qbuf(index : %d) (mSrcBufNum : %d) failed", __func__, index, HDMI_NUM_MIXER_BUF); return false; } index++; if (tvout_std_v4l2_streamon(mHdmiFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) < 0) { - LOGE("%s::tvout_std_v4l2_streamon() failed", __func__); + ALOGE("%s::tvout_std_v4l2_streamon() failed", __func__); return false; } @@ -1566,12 +1566,12 @@ bool SecHdmi::m_startHdmi(int hdmiLayer, unsigned int num_of_plane) } else { if (tvout_std_v4l2_qbuf(mHdmiFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, index, num_of_plane, &mMixerBuffer[hdmiLayer][0]) < 0) { - LOGE("%s::tvout_std_v4l2_qbuf() failed", __func__); + ALOGE("%s::tvout_std_v4l2_qbuf() failed", __func__); return false; } if (tvout_std_v4l2_dqbuf(mHdmiFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, &buf_index, num_of_plane) < 0) { - LOGE("%s::tvout_std_v4l2_dqbuf() failed", __func__); + ALOGE("%s::tvout_std_v4l2_dqbuf() failed", __func__); return false; } index = buf_index; @@ -1584,14 +1584,14 @@ bool SecHdmi::m_startHdmi(int hdmiLayer, unsigned int num_of_plane) bool SecHdmi::m_startHdmi(int hdmiLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif bool ret = true; int buf_index = 0; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s: hdmiLayer(%d) called\n", __func__, hdmiLayer); + ALOGD("### %s: hdmiLayer(%d) called\n", __func__, hdmiLayer); #endif switch (hdmiLayer) { @@ -1612,7 +1612,7 @@ bool SecHdmi::m_startHdmi(int hdmiLayer) } break; default : - LOGE("%s::unmathced layer(%d) fail", __func__, hdmiLayer); + ALOGE("%s::unmathced layer(%d) fail", __func__, hdmiLayer); ret = false; break; } @@ -1624,17 +1624,17 @@ bool SecHdmi::m_startHdmi(int hdmiLayer) bool SecHdmi::m_stopHdmi(int hdmiLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif bool ret = true; if (mFlagHdmiStart[hdmiLayer] == false) { - LOGD("%s::already HDMI(%d layer) stopped.. \n", __func__, hdmiLayer); + ALOGD("%s::already HDMI(%d layer) stopped.. \n", __func__, hdmiLayer); return true; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s : layer[%d] called\n", __func__, hdmiLayer); + ALOGD("### %s : layer[%d] called\n", __func__, hdmiLayer); #endif #if defined(BOARD_USE_V4L2) @@ -1652,20 +1652,20 @@ bool SecHdmi::m_stopHdmi(int hdmiLayer) #endif break; default : - LOGE("%s::unmathced layer(%d) fail", __func__, hdmiLayer); + ALOGE("%s::unmathced layer(%d) fail", __func__, hdmiLayer); ret = false; break; } if (mFlagLayerEnable[hdmiLayer]) { if (tvout_std_v4l2_streamoff(mHdmiFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) < 0) { - LOGE("%s::tvout_std_v4l2_streamon layer(%d) failed", __func__, hdmiLayer); + ALOGE("%s::tvout_std_v4l2_streamon layer(%d) failed", __func__, hdmiLayer); return false; } /* clear buffer */ if (tvout_std_v4l2_reqbuf(mHdmiFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, 0) < 0) { - LOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d)[graphic layer] failed", __func__, 0); + ALOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d)[graphic layer] failed", __func__, 0); return -1; } @@ -1694,7 +1694,7 @@ bool SecHdmi::m_stopHdmi(int hdmiLayer) } break; default : - LOGE("%s::unmathced layer(%d) fail", __func__, hdmiLayer); + ALOGE("%s::unmathced layer(%d) fail", __func__, hdmiLayer); ret = false; break; } @@ -1706,23 +1706,23 @@ bool SecHdmi::m_stopHdmi(int hdmiLayer) bool SecHdmi::m_setHdmiOutputMode(int hdmiOutputMode) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (hdmiOutputMode == mCurrentHdmiOutputMode) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdmiOutputMode(%d) \n", __func__, hdmiOutputMode); + ALOGD("%s::same hdmiOutputMode(%d) \n", __func__, hdmiOutputMode); #endif return true; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif int v4l2OutputType = hdmi_outputmode_2_v4l2_output_type(hdmiOutputMode); if (v4l2OutputType < 0) { - LOGE("%s::hdmi_outputmode_2_v4l2_output_type(%d) fail\n", __func__, hdmiOutputMode); + ALOGE("%s::hdmi_outputmode_2_v4l2_output_type(%d) fail\n", __func__, hdmiOutputMode); return false; } @@ -1736,18 +1736,18 @@ bool SecHdmi::m_setHdmiOutputMode(int hdmiOutputMode) bool SecHdmi::m_setCompositeResolution(unsigned int compositeStdId) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif int w = 0; int h = 0; if (mHdmiOutputMode != COMPOSITE_OUTPUT_MODE) { - LOGE("%s:: not supported output type \n", __func__); + ALOGE("%s:: not supported output type \n", __func__); return false; } @@ -1766,7 +1766,7 @@ bool SecHdmi::m_setCompositeResolution(unsigned int compositeStdId) h = 576; break; default: - LOGE("%s::unmathced composite_std(%d)", __func__, compositeStdId); + ALOGE("%s::unmathced composite_std(%d)", __func__, compositeStdId); return false; } @@ -1782,18 +1782,18 @@ bool SecHdmi::m_setCompositeResolution(unsigned int compositeStdId) bool SecHdmi::m_setHdmiResolution(unsigned int hdmiResolutionValue) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (hdmiResolutionValue == mCurrentHdmiResolutionValue) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdmiResolutionValue(%d) \n", __func__, hdmiResolutionValue); + ALOGD("%s::same hdmiResolutionValue(%d) \n", __func__, hdmiResolutionValue); #endif return true; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif int w = 0; @@ -1809,19 +1809,19 @@ bool SecHdmi::m_setHdmiResolution(unsigned int hdmiResolutionValue) mHdmiOutputMode <= HDMI_OUTPUT_MODE_DVI) { #if defined(BOARD_USE_V4L2) if (hdmi_resolution_2_preset_id(hdmiResolutionValue, &w, &h, &preset_id) < 0) { - LOGE("%s::hdmi_resolution_2_std_id(%d) fail\n", __func__, hdmiResolutionValue); + ALOGE("%s::hdmi_resolution_2_std_id(%d) fail\n", __func__, hdmiResolutionValue); return false; } mHdmiPresetId = preset_id; #else if (hdmi_resolution_2_std_id(hdmiResolutionValue, &w, &h, &std_id) < 0) { - LOGE("%s::hdmi_resolution_2_std_id(%d) fail\n", __func__, hdmiResolutionValue); + ALOGE("%s::hdmi_resolution_2_std_id(%d) fail\n", __func__, hdmiResolutionValue); return false; } mHdmiStdId = std_id; #endif } else { - LOGE("%s:: not supported output type \n", __func__); + ALOGE("%s:: not supported output type \n", __func__); return false; } @@ -1838,14 +1838,14 @@ bool SecHdmi::m_setHdmiResolution(unsigned int hdmiResolutionValue) #ifdef DEBUG_HDMI_HW_LEVEL #if defined(BOARD_USE_V4L2) - LOGD("%s:: mHdmiDstWidth = %d, mHdmiDstHeight = %d, mHdmiPresetId = 0x%x, hdmiResolutionValue = 0x%x\n", + ALOGD("%s:: mHdmiDstWidth = %d, mHdmiDstHeight = %d, mHdmiPresetId = 0x%x, hdmiResolutionValue = 0x%x\n", __func__, mHdmiDstWidth, mHdmiDstHeight, mHdmiPresetId, hdmiResolutionValue); #else - LOGD("%s:: mHdmiDstWidth = %d, mHdmiDstHeight = %d, mHdmiStdId = 0x%x, hdmiResolutionValue = 0x%x\n", + ALOGD("%s:: mHdmiDstWidth = %d, mHdmiDstHeight = %d, mHdmiStdId = 0x%x, hdmiResolutionValue = 0x%x\n", __func__, mHdmiDstWidth, mHdmiDstHeight, @@ -1860,19 +1860,19 @@ bool SecHdmi::m_setHdmiResolution(unsigned int hdmiResolutionValue) bool SecHdmi::m_setHdcpMode(bool hdcpMode) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (hdcpMode == mCurrentHdcpMode) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdcpMode(%d) \n", __func__, hdcpMode); + ALOGD("%s::same hdcpMode(%d) \n", __func__, hdcpMode); #endif return true; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif if (hdcpMode == true) @@ -1888,22 +1888,22 @@ bool SecHdmi::m_setHdcpMode(bool hdcpMode) bool SecHdmi::m_setAudioMode(int audioMode) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (audioMode == mCurrentAudioMode) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same audioMode(%d) \n", __func__, audioMode); + ALOGD("%s::same audioMode(%d) \n", __func__, audioMode); #endif return true; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif if (hdmi_check_audio() < 0) { - LOGE("%s::hdmi_check_audio() fail \n", __func__); + ALOGE("%s::hdmi_check_audio() fail \n", __func__); return false; } @@ -1915,7 +1915,7 @@ bool SecHdmi::m_setAudioMode(int audioMode) int SecHdmi::m_resolutionValueIndex(unsigned int ResolutionValue) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int index = -1; @@ -1932,11 +1932,11 @@ int SecHdmi::m_resolutionValueIndex(unsigned int ResolutionValue) bool SecHdmi::m_flagHWConnected(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif bool ret = true; @@ -1944,7 +1944,7 @@ bool SecHdmi::m_flagHWConnected(void) if (hdmiStatus <= 0) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::hdmi_cable_status() fail \n", __func__); + ALOGD("%s::hdmi_cable_status() fail \n", __func__); #endif ret = false; } else { diff --git a/exynos4/hal/libhdmi/SecHdmi/SecHdmiCommon.h b/exynos4/hal/libhdmi/SecHdmi/SecHdmiCommon.h index 203dfe4..a90e687 100644 --- a/exynos4/hal/libhdmi/SecHdmi/SecHdmiCommon.h +++ b/exynos4/hal/libhdmi/SecHdmi/SecHdmiCommon.h @@ -18,8 +18,8 @@ ** */ -//#define LOG_NDEBUG 0 -//#define LOG_TAG "libhdmi" +//#define ALOG_NDEBUG 0 +//#define ALOG_TAG "libhdmi" #include <cutils/log.h> #include "videodev2.h" diff --git a/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp b/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp index 217ce51..fd135f1 100644 --- a/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp +++ b/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -//#define LOG_NDEBUG 0 -//#define LOG_TAG "libhdmi" +//#define ALOG_NDEBUG 0 +//#define ALOG_TAG "libhdmi" #include <cutils/log.h> #include <sys/types.h> @@ -81,7 +81,7 @@ void display_menu(void) struct HDMIAudioParameter audio; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif audio.formatCode = LPCM_FORMAT; @@ -89,142 +89,142 @@ void display_menu(void) audio.channelNum = CH_2; audio.sampleFreq = SF_44KHZ; - LOGI("=============== HDMI Audio =============\n"); + ALOGI("=============== HDMI Audio =============\n"); if (EDIDAudioModeSupport(&audio)) - LOGI("= 2CH_PCM 44100Hz audio supported =\n"); + ALOGI("= 2CH_PCM 44100Hz audio supported =\n"); - LOGI("========= HDMI Mode & Color Space =======\n"); + ALOGI("========= HDMI Mode & Color Space =======\n"); video.mode = HDMI; if (EDIDHDMIModeSupport(&video)) { video.colorSpace = HDMI_CS_YCBCR444; if (EDIDColorSpaceSupport(&video)) - LOGI("= 1. HDMI(YCbCr) =\n"); + ALOGI("= 1. HDMI(YCbCr) =\n"); video.colorSpace = HDMI_CS_RGB; if (EDIDColorSpaceSupport(&video)) - LOGI("= 2. HDMI(RGB) =\n"); + ALOGI("= 2. HDMI(RGB) =\n"); } else { video.mode = DVI; if (EDIDHDMIModeSupport(&video)) - LOGI("= 3. DVI =\n"); + ALOGI("= 3. DVI =\n"); } - LOGI("=========== HDMI Rseolution ========\n"); + ALOGI("=========== HDMI Rseolution ========\n"); /* 480P */ video.resolution = v720x480p_60Hz; video.pixelAspectRatio = HDMI_PIXEL_RATIO_16_9; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 4. 480P_60_16_9 (0x04000000) =\n"); + ALOGI("= 4. 480P_60_16_9 (0x04000000) =\n"); video.resolution = v640x480p_60Hz; video.pixelAspectRatio = HDMI_PIXEL_RATIO_4_3; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 5. 480P_60_4_3 (0x05000000) =\n"); + ALOGI("= 5. 480P_60_4_3 (0x05000000) =\n"); /* 576P */ video.resolution = v720x576p_50Hz; video.pixelAspectRatio = HDMI_PIXEL_RATIO_16_9; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 6. 576P_50_16_9 (0x06000000) =\n"); + ALOGI("= 6. 576P_50_16_9 (0x06000000) =\n"); video.pixelAspectRatio = HDMI_PIXEL_RATIO_4_3; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 7. 576P_50_4_3 (0x07000000) =\n"); + ALOGI("= 7. 576P_50_4_3 (0x07000000) =\n"); /* 720P 60 */ video.resolution = v1280x720p_60Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 8. 720P_60 (0x08000000) =\n"); + ALOGI("= 8. 720P_60 (0x08000000) =\n"); /* 720P_50 */ video.resolution = v1280x720p_50Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 9. 720P_50 (0x09000000) =\n"); + ALOGI("= 9. 720P_50 (0x09000000) =\n"); /* 1080P_60 */ video.resolution = v1920x1080p_60Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= a. 1080P_60 (0x0a000000) =\n"); + ALOGI("= a. 1080P_60 (0x0a000000) =\n"); /* 1080P_50 */ video.resolution = v1920x1080p_50Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= b. 1080P_50 (0x0b000000) =\n"); + ALOGI("= b. 1080P_50 (0x0b000000) =\n"); /* 1080I_60 */ video.resolution = v1920x1080i_60Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= c. 1080I_60 (0x0c000000) =\n"); + ALOGI("= c. 1080I_60 (0x0c000000) =\n"); /* 1080I_50 */ video.resolution = v1920x1080i_50Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= d. 1080I_50 (0x0d000000) =\n"); + ALOGI("= d. 1080I_50 (0x0d000000) =\n"); /* 1080P_30 */ video.resolution = v1920x1080p_30Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= e. 1080P_30 (0x12000000) =\n"); + ALOGI("= e. 1080P_30 (0x12000000) =\n"); - LOGI("=========== HDMI 3D Format ========\n"); + ALOGI("=========== HDMI 3D Format ========\n"); /* 720P_60_SBS_HALF */ video.resolution = v1280x720p_60Hz; video.hdmi_3d_format = HDMI_3D_SSH_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= f. 720P_60_SBS_HALF (0x13000000) =\n"); + ALOGI("= f. 720P_60_SBS_HALF (0x13000000) =\n"); /* 720P_59_SBS_HALF */ video.resolution = v1280x720p_60Hz; video.hdmi_3d_format = HDMI_3D_SSH_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 10. 720P_59_SBS_HALF (0x14000000) =\n"); + ALOGI("= 10. 720P_59_SBS_HALF (0x14000000) =\n"); /* 720P_50_TB */ video.resolution = v1280x720p_50Hz; video.hdmi_3d_format = HDMI_3D_TB_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 11. 720P_50_TB (0x15000000) =\n"); + ALOGI("= 11. 720P_50_TB (0x15000000) =\n"); /* 1080P_24_TB */ video.resolution = v1920x1080p_24Hz; video.hdmi_3d_format = HDMI_3D_TB_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 12. 1080P_24_TB (0x16000000) =\n"); + ALOGI("= 12. 1080P_24_TB (0x16000000) =\n"); /* 1080P_23_TB */ video.resolution = v1920x1080p_24Hz; video.hdmi_3d_format = HDMI_3D_TB_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 13. 1080P_24_TB (0x17000000) =\n"); - LOGI("=========================================\n"); + ALOGI("= 13. 1080P_24_TB (0x17000000) =\n"); + ALOGI("=========================================\n"); } int tvout_open(const char *fp_name) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int fp; fp = open(fp_name, O_RDWR); if (fp < 0) - LOGE("drv (%s) open failed!!\n", fp_name); + ALOGE("drv (%s) open failed!!\n", fp_name); return fp; } @@ -232,7 +232,7 @@ int tvout_open(const char *fp_name) int tvout_std_v4l2_init(int fd, unsigned int preset_id) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s:: preset_id = 0x%x", __func__, preset_id); + ALOGD("%s:: preset_id = 0x%x", __func__, preset_id); #endif int ret; @@ -246,7 +246,7 @@ int tvout_std_v4l2_init(int fd, unsigned int preset_id) if (output_type >= V4L2_OUTPUT_TYPE_DIGITAL && output_type <= V4L2_OUTPUT_TYPE_DVI) if (ioctl(fd_tvout, VIDIOC_HDCP_ENABLE, g_hdcp_en) < 0) - LOGE("%s::VIDIOC_HDCP_ENABLE failed %d", __func__, errno); + ALOGE("%s::VIDIOC_HDCP_ENABLE failed %d", __func__, errno); */ i = 0; @@ -254,7 +254,7 @@ int tvout_std_v4l2_init(int fd, unsigned int preset_id) do { output.index = i; ret = tvout_std_v4l2_enum_output(fd, &output); - LOGD("tvout_v4l2_enum_output():: output_type=%d output.index=%d output.name=%s", output.type, output.index, output.name); + ALOGD("tvout_v4l2_enum_output():: output_type=%d output.index=%d output.name=%s", output.type, output.index, output.name); if (output.type == output_type) { matched = 1; break; @@ -263,7 +263,7 @@ int tvout_std_v4l2_init(int fd, unsigned int preset_id) } while (ret >=0); if (!matched) { - LOGE("%s::no matched output type [type=%d]", __func__, output_type); + ALOGE("%s::no matched output type [type=%d]", __func__, output_type); // return -1; } @@ -276,7 +276,7 @@ int tvout_std_v4l2_init(int fd, unsigned int preset_id) tvout_std_v4l2_enum_dv_presets(fd); preset.preset = preset_id; if (tvout_std_v4l2_s_dv_preset(fd, &preset) < 0 ) { - LOGE("%s::tvout_std_v4l2_s_dv_preset failed", __func__); + ALOGE("%s::tvout_std_v4l2_s_dv_preset failed", __func__); return -1; } // } @@ -287,23 +287,23 @@ int tvout_std_v4l2_init(int fd, unsigned int preset_id) int tvout_std_v4l2_querycap(int fd, char *node) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_capability v4l2cap; if (ioctl(fd, VIDIOC_QUERYCAP, &v4l2cap) < 0) { - LOGE("%s::VIDIOC_QUERYCAP failed", __func__); + ALOGE("%s::VIDIOC_QUERYCAP failed", __func__); return -1; } if (!(v4l2cap.capabilities & V4L2_CAP_STREAMING)) { - LOGE("%s::%s is not support streaming", __func__, node); + ALOGE("%s::%s is not support streaming", __func__, node); return -1; } if (!(v4l2cap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE)) { - LOGE("%s::%s is not support video output mplane", __func__, node); + ALOGE("%s::%s is not support video output mplane", __func__, node); return -1; } @@ -313,7 +313,7 @@ int tvout_std_v4l2_querycap(int fd, char *node) int tvout_std_v4l2_enum_dv_presets(int fd) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_dv_enum_preset enum_preset; @@ -326,11 +326,11 @@ int tvout_std_v4l2_enum_dv_presets(int fd) if (ret < 0) { if (errno == EINVAL) break; - LOGE("%s::VIDIOC_ENUM_DV_PRESETS", __func__); + ALOGE("%s::VIDIOC_ENUM_DV_PRESETS", __func__); return -1; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::index=%d, preset=0x%08x, name=%s, w=%d, h=%d", + ALOGD("%s::index=%d, preset=0x%08x, name=%s, w=%d, h=%d", __func__, enum_preset.index, enum_preset.preset, enum_preset.name, enum_preset.width, enum_preset.height); #endif } @@ -341,11 +341,11 @@ int tvout_std_v4l2_enum_dv_presets(int fd) int tvout_std_v4l2_s_dv_preset(int fd, struct v4l2_dv_preset *preset) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (ioctl(fd, VIDIOC_S_DV_PRESET, preset) < 0) { - LOGE("%s::VIDIOC_S_DV_PRESET failed", __func__); + ALOGE("%s::VIDIOC_S_DV_PRESET failed", __func__); return -1; } @@ -361,7 +361,7 @@ int tvout_std_v4l2_s_dv_preset(int fd, struct v4l2_dv_preset *preset) int tvout_std_v4l2_enum_output(int fd, struct v4l2_output *output) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; @@ -369,7 +369,7 @@ int tvout_std_v4l2_enum_output(int fd, struct v4l2_output *output) ret = ioctl(fd, VIDIOC_ENUMOUTPUT, output); if (ret >=0) - LOGV("tvout_v4l2_enum_output" "enum. output [index = %d] :: type : 0x%08x , name = %s\n", + ALOGV("tvout_v4l2_enum_output" "enum. output [index = %d] :: type : 0x%08x , name = %s\n", output->index,output->type,output->name); return ret; @@ -384,14 +384,14 @@ int tvout_std_v4l2_enum_output(int fd, struct v4l2_output *output) int tvout_std_v4l2_s_output(int fd, int index) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s:: index = 0x%x", __func__, index); + ALOGD("%s:: index = 0x%x", __func__, index); #endif int ret; ret = ioctl(fd, VIDIOC_S_OUTPUT, &index); if (ret < 0) { - LOGE("tvout_v4l2_s_output" "VIDIOC_S_OUTPUT failed %d\n", errno); + ALOGE("tvout_v4l2_s_output" "VIDIOC_S_OUTPUT failed %d\n", errno); return ret; } @@ -401,17 +401,17 @@ int tvout_std_v4l2_s_output(int fd, int index) int tvout_std_v4l2_g_output(int fd, int *index) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; ret = ioctl(fd, VIDIOC_G_OUTPUT, index); if (ret < 0) { - LOGE("tvout_v4l2_g_output" "VIDIOC_G_OUTPUT failed %d\n", errno); + ALOGE("tvout_v4l2_g_output" "VIDIOC_G_OUTPUT failed %d\n", errno); return ret; } else { - LOGV("tvout_v4l2_g_output" "Current output index %d\n", *index); + ALOGV("tvout_v4l2_g_output" "Current output index %d\n", *index); } return ret; @@ -420,14 +420,14 @@ int tvout_std_v4l2_g_output(int fd, int *index) int tvout_std_v4l2_s_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, int w, int h, int colorformat, int num_planes) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_format fmt; fmt.type = type; // if (ioctl(fd, VIDIOC_G_FMT, &fmt) < 0) { -// LOGE("%s::VIDIOC_G_FMT failed", __func__); +// ALOGE("%s::VIDIOC_G_FMT failed", __func__); // return -1; // } @@ -448,13 +448,13 @@ int tvout_std_v4l2_s_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, fmt.fmt.pix_mp.num_planes = num_planes; break; default: - LOGE("%s::invalid buffer type", __func__); + ALOGE("%s::invalid buffer type", __func__); return -1; break; } if (ioctl(fd, VIDIOC_S_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_S_FMT failed", __func__); + ALOGE("%s::VIDIOC_S_FMT failed", __func__); return -1; } @@ -464,7 +464,7 @@ int tvout_std_v4l2_s_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, int tvout_std_v4l2_s_crop(int fd, enum v4l2_buf_type type, enum v4l2_field, int x, int y, int w, int h) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_crop crop; @@ -476,7 +476,7 @@ int tvout_std_v4l2_s_crop(int fd, enum v4l2_buf_type type, enum v4l2_field, int crop.c.height = h; if (ioctl(fd, VIDIOC_S_CROP, &crop) < 0) { - LOGE("%s::VIDIOC_S_CROP (x=%d, y=%d, w=%d, h=%d) failed", + ALOGE("%s::VIDIOC_S_CROP (x=%d, y=%d, w=%d, h=%d) failed", __func__, x, y, w, h); return -1; } @@ -487,7 +487,7 @@ int tvout_std_v4l2_s_crop(int fd, enum v4l2_buf_type type, enum v4l2_field, int int tvout_std_v4l2_s_ctrl(int fd, int id, int value) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_control vc; @@ -496,7 +496,7 @@ int tvout_std_v4l2_s_ctrl(int fd, int id, int value) vc.value = value; if (ioctl(fd, VIDIOC_S_CTRL, &vc) < 0) { - LOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, id, value); + ALOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, id, value); return -1; } @@ -506,7 +506,7 @@ int tvout_std_v4l2_s_ctrl(int fd, int id, int value) int tvout_std_v4l2_reqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, unsigned int num_bufs) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_requestbuffers reqbuf; @@ -516,12 +516,12 @@ int tvout_std_v4l2_reqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memo reqbuf.count = num_bufs; if (ioctl(fd, VIDIOC_REQBUFS, &reqbuf) < 0) { - LOGE("%s::VIDIOC_REQBUFS failed", __func__); + ALOGE("%s::VIDIOC_REQBUFS failed", __func__); return -1; } if (reqbuf.count < num_bufs) { - LOGE("%s::VIDIOC_REQBUFS failed ((reqbuf.count(%d) < num_bufs(%d))", + ALOGE("%s::VIDIOC_REQBUFS failed ((reqbuf.count(%d) < num_bufs(%d))", __func__, reqbuf.count, num_bufs); return -1; } @@ -532,7 +532,7 @@ int tvout_std_v4l2_reqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memo int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, unsigned int buf_index, unsigned int num_planes, SecBuffer *secBuf) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_buffer buf; @@ -544,7 +544,7 @@ int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory me memset(&planes[i], 0, sizeof(struct v4l2_plane)); if (MAX_BUFFERS_MIXER <= buf_index || MAX_PLANES_MIXER <= num_planes) { - LOGE("%s::exceed MAX! : buf_index=%d, num_plane=%d", __func__, buf_index, num_planes); + ALOGE("%s::exceed MAX! : buf_index=%d, num_plane=%d", __func__, buf_index, num_planes); return -1; } @@ -555,24 +555,24 @@ int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory me buf.m.planes = planes; if (ioctl(fd, VIDIOC_QUERYBUF, &buf) < 0) { - LOGE("%s::VIDIOC_QUERYBUF failed, plane_cnt=%d", __func__, buf.length); + ALOGE("%s::VIDIOC_QUERYBUF failed, plane_cnt=%d", __func__, buf.length); return -1; } for (unsigned int i = 0; i < num_planes; i++) { if ((secBuf->virt.extP[i] = (char *)mmap(0, buf.m.planes[i].length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, buf.m.planes[i].m.mem_offset)) < 0) { - LOGE("%s::mmap failed", __func__); - LOGE("%s::Offset = 0x%x", __func__, buf.m.planes[i].m.mem_offset); - LOGE("%s::Legnth = %d" , __func__, buf.m.planes[i].length); - LOGE("%s::vaddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); + ALOGE("%s::mmap failed", __func__); + ALOGE("%s::Offset = 0x%x", __func__, buf.m.planes[i].m.mem_offset); + ALOGE("%s::Legnth = %d" , __func__, buf.m.planes[i].length); + ALOGE("%s::vaddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); return -1; } secBuf->size.extS[i] = buf.m.planes[i].length; #ifdef DEBUG_LIB_FIMC - LOGD("%s::vaddr[bufidx=%d][planeidx=%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); - LOGD("%s::Legnth = %d" , __func__, buf.m.planes[i].length); + ALOGD("%s::vaddr[bufidx=%d][planeidx=%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); + ALOGD("%s::Legnth = %d" , __func__, buf.m.planes[i].length); #endif } @@ -582,7 +582,7 @@ int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory me int tvout_std_v4l2_qbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, int buf_index, int num_planes, SecBuffer *secBuf) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_buffer buf; @@ -605,7 +605,7 @@ int tvout_std_v4l2_qbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory } if (ioctl(fd, VIDIOC_QBUF, &buf) < 0) { - LOGE("%s::VIDIOC_QBUF failed", __func__); + ALOGE("%s::VIDIOC_QBUF failed", __func__); return -1; } @@ -615,7 +615,7 @@ int tvout_std_v4l2_qbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory int tvout_std_v4l2_dqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, int *buf_index, int num_planes) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_buffer buf; @@ -632,7 +632,7 @@ int tvout_std_v4l2_dqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memor buf.m.planes = planes; if (ioctl(fd, VIDIOC_DQBUF, &buf) < 0) { - LOGE("%s::VIDIOC_DQBUF failed", __func__); + ALOGE("%s::VIDIOC_DQBUF failed", __func__); return -1; } *buf_index = buf.index; @@ -643,11 +643,11 @@ int tvout_std_v4l2_dqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memor int tvout_std_v4l2_streamon(int fd, enum v4l2_buf_type type) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (ioctl(fd, VIDIOC_STREAMON, &type) < 0) { - LOGE("%s::VIDIOC_STREAMON failed", __func__); + ALOGE("%s::VIDIOC_STREAMON failed", __func__); return -1; } @@ -657,11 +657,11 @@ int tvout_std_v4l2_streamon(int fd, enum v4l2_buf_type type) int tvout_std_v4l2_streamoff(int fd, enum v4l2_buf_type type) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (ioctl(fd, VIDIOC_STREAMOFF, &type) < 0) { - LOGE("%s::VIDIOC_STREAMOFF failed", __func__); + ALOGE("%s::VIDIOC_STREAMOFF failed", __func__); return -1; } @@ -671,7 +671,7 @@ int tvout_std_v4l2_streamoff(int fd, enum v4l2_buf_type type) int tvout_init(v4l2_std_id std_id) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s:: std_id = 0x%x", __func__, std_id); + ALOGD("%s:: std_id = 0x%x", __func__, std_id); #endif int ret; @@ -687,7 +687,7 @@ int tvout_init(v4l2_std_id std_id) if (fp_tvout <= 0) { fp_tvout = tvout_open(TVOUT_DEV); if (fp_tvout < 0) { - LOGE("tvout video drv open failed\n"); + ALOGE("tvout video drv open failed\n"); return -1; } } @@ -695,7 +695,7 @@ int tvout_init(v4l2_std_id std_id) if (output_type >= V4L2_OUTPUT_TYPE_DIGITAL && output_type <= V4L2_OUTPUT_TYPE_DVI) if (ioctl(fp_tvout, VIDIOC_HDCP_ENABLE, g_hdcp_en) < 0) - LOGE("tvout_init" "VIDIOC_HDCP_ENABLE failed %d\n", errno); + ALOGE("tvout_init" "VIDIOC_HDCP_ENABLE failed %d\n", errno); /* ============== query capability============== */ tvout_v4l2_querycap(fp_tvout); @@ -719,7 +719,7 @@ int tvout_init(v4l2_std_id std_id) } while (ret >=0); if (!matched) { - LOGE("no matched output type [type : 0x%08x]\n", output_type); + ALOGE("no matched output type [type : 0x%08x]\n", output_type); return -1; } @@ -747,7 +747,7 @@ int tvout_init(v4l2_std_id std_id) int tvout_deinit() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (0 < fp_tvout) { @@ -760,7 +760,7 @@ int tvout_deinit() int tvout_v4l2_querycap(int fp) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s:: fp = 0x%x", __func__, fp); + ALOGD("%s:: fp = 0x%x", __func__, fp); #endif struct v4l2_capability cap; @@ -769,12 +769,12 @@ int tvout_v4l2_querycap(int fp) ret = ioctl(fp, VIDIOC_QUERYCAP, &cap); if (ret < 0) { - LOGE("tvout_v4l2_querycap" "VIDIOC_QUERYCAP failed %d\n", errno); + ALOGE("tvout_v4l2_querycap" "VIDIOC_QUERYCAP failed %d\n", errno); return ret; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("tvout_v4l2_querycap" "DRIVER : %s, CARD : %s, CAP.: 0x%08x\n", + ALOGD("tvout_v4l2_querycap" "DRIVER : %s, CARD : %s, CAP.: 0x%08x\n", cap.driver, cap.card, cap.capabilities); #endif @@ -791,14 +791,14 @@ int tvout_v4l2_querycap(int fp) int tvout_v4l2_g_std(int fp, v4l2_std_id *std_id) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; ret = ioctl(fp, VIDIOC_G_STD, std_id); if (ret < 0) { - LOGE("tvout_v4l2_g_std" "VIDIOC_G_STD failed %d\n", errno); + ALOGE("tvout_v4l2_g_std" "VIDIOC_G_STD failed %d\n", errno); return ret; } @@ -808,14 +808,14 @@ int tvout_v4l2_g_std(int fp, v4l2_std_id *std_id) int tvout_v4l2_s_std(int fp, v4l2_std_id std_id) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s:: std_id = 0x%x", __func__, std_id); + ALOGD("%s:: std_id = 0x%x", __func__, std_id); #endif int ret; ret = ioctl(fp, VIDIOC_S_STD, &std_id); if (ret < 0) { - LOGE("tvout_v4l2_s_std" "VIDIOC_S_STD failed %d\n", errno); + ALOGE("tvout_v4l2_s_std" "VIDIOC_S_STD failed %d\n", errno); return ret; } @@ -832,13 +832,13 @@ int tvout_v4l2_s_std(int fp, v4l2_std_id std_id) int tvout_v4l2_enum_std(int fp, struct v4l2_standard *std, v4l2_std_id std_id) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif std->index = 0; while (0 == ioctl (fp, VIDIOC_ENUMSTD, std)) { if (std->id & std_id) - LOGV("tvout_v4l2_enum_std" "Current video standard: %s\n", std->name); + ALOGV("tvout_v4l2_enum_std" "Current video standard: %s\n", std->name); std->index++; } @@ -855,7 +855,7 @@ int tvout_v4l2_enum_std(int fp, struct v4l2_standard *std, v4l2_std_id std_id) int tvout_v4l2_enum_output(int fp, struct v4l2_output *output) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; @@ -863,7 +863,7 @@ int tvout_v4l2_enum_output(int fp, struct v4l2_output *output) ret = ioctl(fp, VIDIOC_ENUMOUTPUT, output); if (ret >=0) - LOGV("tvout_v4l2_enum_output" "enum. output [index = %d] :: type : 0x%08x , name = %s\n", + ALOGV("tvout_v4l2_enum_output" "enum. output [index = %d] :: type : 0x%08x , name = %s\n", output->index,output->type,output->name); return ret; @@ -878,14 +878,14 @@ int tvout_v4l2_enum_output(int fp, struct v4l2_output *output) int tvout_v4l2_s_output(int fp, int index) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s:: index = 0x%x", __func__, index); + ALOGD("%s:: index = 0x%x", __func__, index); #endif int ret; ret = ioctl(fp, VIDIOC_S_OUTPUT, &index); if (ret < 0) { - LOGE("tvout_v4l2_s_output" "VIDIOC_S_OUTPUT failed %d\n", errno); + ALOGE("tvout_v4l2_s_output" "VIDIOC_S_OUTPUT failed %d\n", errno); return ret; } @@ -895,17 +895,17 @@ int tvout_v4l2_s_output(int fp, int index) int tvout_v4l2_g_output(int fp, int *index) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; ret = ioctl(fp, VIDIOC_G_OUTPUT, index); if (ret < 0) { - LOGE("tvout_v4l2_g_output" "VIDIOC_G_OUTPUT failed %d\n", errno); + ALOGE("tvout_v4l2_g_output" "VIDIOC_G_OUTPUT failed %d\n", errno); return ret; } else { - LOGV("tvout_v4l2_g_output" "Current output index %d\n", *index); + ALOGV("tvout_v4l2_g_output" "Current output index %d\n", *index); } return ret; @@ -921,12 +921,12 @@ int tvout_v4l2_g_output(int fp, int *index) int tvout_v4l2_enum_fmt(int fp, struct v4l2_fmtdesc *desc) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif desc->index = 0; while (0 == ioctl(fp, VIDIOC_ENUM_FMT, desc)) { - LOGV("tvout_v4l2_enum_fmt" "enum. fmt [id : 0x%08x] :: type = 0x%08x, name = %s, pxlfmt = 0x%08x\n", + ALOGV("tvout_v4l2_enum_fmt" "enum. fmt [id : 0x%08x] :: type = 0x%08x, name = %s, pxlfmt = 0x%08x\n", desc->index, desc->type, desc->description, @@ -940,7 +940,7 @@ int tvout_v4l2_enum_fmt(int fp, struct v4l2_fmtdesc *desc) int tvout_v4l2_g_fmt(int fp, int buf_type, void* ptr) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; @@ -951,11 +951,11 @@ int tvout_v4l2_g_fmt(int fp, int buf_type, void* ptr) ret = ioctl(fp, VIDIOC_G_FMT, &format); if (ret < 0) { - LOGE("tvout_v4l2_g_fmt" "type : %d, VIDIOC_G_FMT failed %d\n", buf_type, errno); + ALOGE("tvout_v4l2_g_fmt" "type : %d, VIDIOC_G_FMT failed %d\n", buf_type, errno); return ret; } else { memcpy(fmt_param, format.fmt.raw_data, sizeof(struct v4l2_pix_format_s5p_tvout)); - LOGV("tvout_v4l2_g_fmt" "get. fmt [base_c : 0x%08x], [base_y : 0x%08x] type = 0x%08x, width = %d, height = %d\n", + ALOGV("tvout_v4l2_g_fmt" "get. fmt [base_c : 0x%08x], [base_y : 0x%08x] type = 0x%08x, width = %d, height = %d\n", fmt_param->base_c, fmt_param->base_y, fmt_param->pix_fmt.pixelformat, @@ -969,7 +969,7 @@ int tvout_v4l2_g_fmt(int fp, int buf_type, void* ptr) int tvout_v4l2_s_fmt(int fp, int buf_type, void *ptr) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_format format; @@ -1002,7 +1002,7 @@ int tvout_v4l2_s_fmt(int fp, int buf_type, void *ptr) ret = ioctl(fp, VIDIOC_S_FMT, &format); if (ret < 0) { - LOGE("tvout_v4l2_s_fmt [tvout_v4l2_s_fmt] : type : %d, VIDIOC_S_FMT failed %d\n", + ALOGE("tvout_v4l2_s_fmt [tvout_v4l2_s_fmt] : type : %d, VIDIOC_S_FMT failed %d\n", buf_type, errno); return ret; } @@ -1013,18 +1013,18 @@ int tvout_v4l2_s_fmt(int fp, int buf_type, void *ptr) int tvout_v4l2_g_fbuf(int fp, struct v4l2_framebuffer *frame) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; ret = ioctl(fp, VIDIOC_G_FBUF, frame); if (ret < 0) { - LOGE("tvout_v4l2_g_fbuf" "VIDIOC_STREAMON failed %d\n", errno); + ALOGE("tvout_v4l2_g_fbuf" "VIDIOC_STREAMON failed %d\n", errno); return ret; } - LOGV("tvout_v4l2_g_fbuf" "get. fbuf: base = 0x%08X, pixel format = %d\n", + ALOGV("tvout_v4l2_g_fbuf" "get. fbuf: base = 0x%08X, pixel format = %d\n", frame->base, frame->fmt.pixelformat); return 0; @@ -1033,14 +1033,14 @@ int tvout_v4l2_g_fbuf(int fp, struct v4l2_framebuffer *frame) int tvout_v4l2_s_fbuf(int fp, struct v4l2_framebuffer *frame) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; ret = ioctl(fp, VIDIOC_S_FBUF, frame); if (ret < 0) { - LOGE("tvout_v4l2_s_fbuf" "VIDIOC_STREAMON failed %d\n", errno); + ALOGE("tvout_v4l2_s_fbuf" "VIDIOC_STREAMON failed %d\n", errno); return ret; } return 0; @@ -1049,14 +1049,14 @@ int tvout_v4l2_s_fbuf(int fp, struct v4l2_framebuffer *frame) int tvout_v4l2_s_baseaddr(int fp, void *base_addr) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; ret = ioctl(fp, S5PTVFB_WIN_SET_ADDR, base_addr); if (ret < 0) { - LOGE("tvout_v4l2_baseaddr" "VIDIOC_S_BASEADDR failed %d\n", errno); + ALOGE("tvout_v4l2_baseaddr" "VIDIOC_S_BASEADDR failed %d\n", errno); return ret; } return 0; @@ -1065,7 +1065,7 @@ int tvout_v4l2_s_baseaddr(int fp, void *base_addr) int tvout_v4l2_g_crop(int fp, unsigned int type, struct v4l2_rect *rect) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; @@ -1073,7 +1073,7 @@ int tvout_v4l2_g_crop(int fp, unsigned int type, struct v4l2_rect *rect) crop.type = (enum v4l2_buf_type)type; ret = ioctl(fp, VIDIOC_G_CROP, &crop); if (ret < 0) { - LOGE("tvout_v4l2_g_crop" "VIDIOC_G_CROP failed %d\n", errno); + ALOGE("tvout_v4l2_g_crop" "VIDIOC_G_CROP failed %d\n", errno); return ret; } @@ -1082,7 +1082,7 @@ int tvout_v4l2_g_crop(int fp, unsigned int type, struct v4l2_rect *rect) rect->width = crop.c.width; rect->height = crop.c.height; - LOGV("tvout_v4l2_g_crop" "get. crop : left = %d, top = %d, width = %d, height = %d\n", + ALOGV("tvout_v4l2_g_crop" "get. crop : left = %d, top = %d, width = %d, height = %d\n", rect->left, rect->top, rect->width, @@ -1093,7 +1093,7 @@ int tvout_v4l2_g_crop(int fp, unsigned int type, struct v4l2_rect *rect) int tvout_v4l2_s_crop(int fp, unsigned int type, struct v4l2_rect *rect) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_crop crop; @@ -1108,7 +1108,7 @@ int tvout_v4l2_s_crop(int fp, unsigned int type, struct v4l2_rect *rect) ret = ioctl(fp, VIDIOC_S_CROP, &crop); if (ret < 0) { - LOGE("tvout_v4l2_s_crop" "VIDIOC_S_CROP failed %d\n", errno); + ALOGE("tvout_v4l2_s_crop" "VIDIOC_S_CROP failed %d\n", errno); return ret; } @@ -1118,14 +1118,14 @@ int tvout_v4l2_s_crop(int fp, unsigned int type, struct v4l2_rect *rect) int tvout_v4l2_start_overlay(int fp) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret, start = 1; ret = ioctl(fp, VIDIOC_OVERLAY, &start); if (ret < 0) { - LOGE("tvout_v4l2_start_overlay" "VIDIOC_OVERLAY failed\n"); + ALOGE("tvout_v4l2_start_overlay" "VIDIOC_OVERLAY failed\n"); return ret; } @@ -1135,14 +1135,14 @@ int tvout_v4l2_start_overlay(int fp) int tvout_v4l2_stop_overlay(int fp) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret, stop =0; ret = ioctl(fp, VIDIOC_OVERLAY, &stop); if (ret < 0) { - LOGE("tvout_v4l2_stop_overlay" "VIDIOC_OVERLAY failed\n"); + ALOGE("tvout_v4l2_stop_overlay" "VIDIOC_OVERLAY failed\n"); return ret; } @@ -1154,7 +1154,7 @@ int hdmi_init_layer(int layer) { int fd = -1; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s (layer = %d) called", __func__, layer); + ALOGD("### %s (layer = %d) called", __func__, layer); #endif switch (layer) { @@ -1162,7 +1162,7 @@ int hdmi_init_layer(int layer) if (fp_tvout_v <= 0) { fp_tvout_v = tvout_open(TVOUT_DEV_V); if (fp_tvout_v < 0) { - LOGE("tvout video layer open failed\n"); + ALOGE("tvout video layer open failed\n"); return -1; } fd = fp_tvout_v; @@ -1176,7 +1176,7 @@ int hdmi_init_layer(int layer) fp_tvout_g0 = fb_open(TVOUT_FB_G0); #endif if (fp_tvout_g0 < 0) { - LOGE("tvout graphic layer 0 open failed\n"); + ALOGE("tvout graphic layer 0 open failed\n"); return -1; } fd = fp_tvout_g0; @@ -1190,14 +1190,14 @@ int hdmi_init_layer(int layer) fp_tvout_g1 = fb_open(TVOUT_FB_G1); #endif if (fp_tvout_g1 < 0) { - LOGE("tvout graphic layer 1 open failed\n"); + ALOGE("tvout graphic layer 1 open failed\n"); return -1; } fd = fp_tvout_g1; } break; default : - LOGE("%s::unmathced layer(%d) fail", __func__, layer); + ALOGE("%s::unmathced layer(%d) fail", __func__, layer); fd = -1; break; } @@ -1209,7 +1209,7 @@ int hdmi_deinit_layer(int layer) { int ret = 0; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s(layer = %d) called", __func__, layer); + ALOGD("### %s(layer = %d) called", __func__, layer); #endif switch (layer) { case HDMI_LAYER_VIDEO : @@ -1231,7 +1231,7 @@ int hdmi_deinit_layer(int layer) } break; default : - LOGE("%s::unmathced layer(%d) fail", __func__, layer); + ALOGE("%s::unmathced layer(%d) fail", __func__, layer); ret = -1; break; } @@ -1277,7 +1277,7 @@ int hdmi_get_src_plane(int srcColorFormat, unsigned int *num_of_plane) *num_of_plane = 2; break; default: - LOGE("%s::invalid color type", __func__); + ALOGE("%s::invalid color type", __func__); return -1; } @@ -1293,7 +1293,7 @@ int hdmi_set_v_param(int fd, int layer, int dst_x, int dst_y, int dst_w, int dst_h) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int v4l2ColorFormat = HAL_PIXEL_FORMAT_2_V4L2_PIX(srcColorFormat); @@ -1324,7 +1324,7 @@ int hdmi_set_v_param(int fd, int layer, num_of_plane = 2; break; default: - LOGE("%s::invalid color type", __func__); + ALOGE("%s::invalid color type", __func__); return false; break; } @@ -1334,25 +1334,25 @@ int hdmi_set_v_param(int fd, int layer, /* set format for VP input */ if (tvout_std_v4l2_s_fmt(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_ANY, round_up_src_w, round_up_src_h, v4l2ColorFormat, num_of_plane) < 0) { - LOGE("%s::tvout_std_v4l2_s_fmt()[video layer] failed", __func__); + ALOGE("%s::tvout_std_v4l2_s_fmt()[video layer] failed", __func__); return -1; } /* set crop for VP input */ if (tvout_std_v4l2_s_crop(fd, V4L2_BUF_TYPE_VIDEO_OVERLAY, V4L2_FIELD_ANY, 0, 0, src_w, src_h) < 0) { - LOGE("%s::tvout_std_v4l2_s_crop()[video layer] failed", __func__); + ALOGE("%s::tvout_std_v4l2_s_crop()[video layer] failed", __func__); return -1; } /* set crop for VP output */ if (tvout_std_v4l2_s_crop(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_ANY, rect.left, rect.top, rect.width, rect.height) < 0) { - LOGE("%s::tvout_std_v4l2_s_crop()[video layer] failed", __func__); + ALOGE("%s::tvout_std_v4l2_s_crop()[video layer] failed", __func__); return -1; } /* request buffer for VP input */ if (tvout_std_v4l2_reqbuf(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, HDMI_NUM_MIXER_BUF) < 0) { - LOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d)[video layer] failed", __func__, HDMI_NUM_MIXER_BUF); + ALOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d)[video layer] failed", __func__, HDMI_NUM_MIXER_BUF); return -1; } @@ -1366,7 +1366,7 @@ int hdmi_set_g_param(int fd, int layer, int dst_x, int dst_y, int dst_w, int dst_h) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_rect rect; @@ -1392,44 +1392,44 @@ int hdmi_set_g_param(int fd, int layer, dstBuffer->size.s = rect.width * rect.height << 1; break; default: - LOGE("%s::invalid color type", __func__); + ALOGE("%s::invalid color type", __func__); return false; break; } /* set format for mixer graphic layer input device*/ if (tvout_std_v4l2_s_fmt(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_ANY, rect.width, rect.height, v4l2ColorFormat, 1) < 0) { - LOGE("%s::tvout_std_v4l2_s_fmt() [layer=%d] failed", __func__, layer); + ALOGE("%s::tvout_std_v4l2_s_fmt() [layer=%d] failed", __func__, layer); return -1; } /* set crop for mixer graphic layer input device*/ if (tvout_std_v4l2_s_crop(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_ANY, rect.left, rect.top, rect.width, rect.height) < 0) { - LOGE("%s::tvout_std_v4l2_s_crop() [layer=%d] failed", __func__, layer); + ALOGE("%s::tvout_std_v4l2_s_crop() [layer=%d] failed", __func__, layer); return -1; } /* request buffer for mixer graphic layer input device */ if (tvout_std_v4l2_reqbuf(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, HDMI_NUM_MIXER_BUF) < 0) { - LOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d) [layer=%d] failed", __func__, HDMI_NUM_MIXER_BUF, layer); + ALOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d) [layer=%d] failed", __func__, HDMI_NUM_MIXER_BUF, layer); return -1; } /* enable alpha blending for mixer graphic layer */ if (tvout_std_v4l2_s_ctrl(fd, V4L2_CID_TV_LAYER_BLEND_ENABLE, 1) < 0) { - LOGE("%s::tvout_std_v4l2_s_ctrl() [layer=%d] failed", __func__, layer); + ALOGE("%s::tvout_std_v4l2_s_ctrl() [layer=%d] failed", __func__, layer); return -1; } /* enable per-pixel blending for mixer graphic layer */ if (tvout_std_v4l2_s_ctrl(fd, V4L2_CID_TV_PIXEL_BLEND_ENABLE, 1) < 0) { - LOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] failed", __func__, layer); + ALOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] failed", __func__, layer); return false; } /* set global alpha value for mixer graphic layer */ if (tvout_std_v4l2_s_ctrl(fd, V4L2_CID_TV_LAYER_BLEND_ALPHA, 255) < 0) { - LOGE("%s::tvout_std_v4l2_s_ctrl() [layer=%d] failed", __func__, layer); + ALOGE("%s::tvout_std_v4l2_s_ctrl() [layer=%d] failed", __func__, layer); return -1; } @@ -1522,7 +1522,7 @@ int hdmi_set_g_scaling(int layer, g2d_rotation = ROT_270; break; default: - LOGE("%s::invalid rotVal(%d) fail", __func__, rotVal); + ALOGE("%s::invalid rotVal(%d) fail", __func__, rotVal); return -1; break; } @@ -1530,12 +1530,12 @@ int hdmi_set_g_scaling(int layer, BlitParam = {BLIT_OP_SRC, NON_PREMULTIPLIED, 0xff, 0, g2d_rotation, &Scaling, 0, 0, &dstClip, 0, &srcImage, &dstImage, NULL, &srcRect, &dstRect, NULL, 0}; if (stretchFimgApi(&BlitParam) < 0) { - LOGE("%s::stretchFimgApi() fail", __func__); + ALOGE("%s::stretchFimgApi() fail", __func__); return -1; } #ifdef DEBUG_MSG_ENABLE - LOGD("hdmi_set_g_scaling:: \n \\ + ALOGD("hdmi_set_g_scaling:: \n \\ layer=%d,\n \\ srcColorFormat=%d,\n \\ src_w=%d, src_h=%d,\n\\ @@ -1562,13 +1562,13 @@ int hdmi_set_v_param(int layer, int dst_w, int dst_h) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int round_up_src_w; int round_up_src_h; if (fp_tvout_v <= 0) { - LOGE("fp_tvout is < 0 fail\n"); + ALOGE("fp_tvout is < 0 fail\n"); return -1; } @@ -1714,7 +1714,7 @@ int hdmi_gl_set_param(int layer, g2d_rotation = ROT_270; break; default: - LOGE("%s::invalid rotVal(%d) fail", __func__, rotVal); + ALOGE("%s::invalid rotVal(%d) fail", __func__, rotVal); return -1; break; } @@ -1722,7 +1722,7 @@ int hdmi_gl_set_param(int layer, BlitParam = {BLIT_OP_SRC, NON_PREMULTIPLIED, 0xff, 0, g2d_rotation, &Scaling, 0, 0, &dstClip, 0, &srcImage, &dstImage, NULL, &srcRect, &dstRect, NULL, 0}; if (stretchFimgApi(&BlitParam) < 0) { - LOGE("%s::stretchFimgApi() fail", __func__); + ALOGE("%s::stretchFimgApi() fail", __func__); return -1; } @@ -1744,7 +1744,7 @@ int hdmi_gl_set_param(int layer, put_vscreeninfo(fp_tvout_g, &var); if (ioctl(fp_tvout_g, S5PTVFB_WIN_POSITION, &window) < 0) { - LOGE("%s::S5PTVFB_WIN_POSITION ioctl failed.", __func__); + ALOGE("%s::S5PTVFB_WIN_POSITION ioctl failed.", __func__); return -1; } } @@ -1760,7 +1760,7 @@ int hdmi_gl_set_param(int layer, int fp_tvout_g; #ifdef DEBUG_MSG_ENABLE - LOGD("hdmi_gl_set_param:: \n \\ + ALOGD("hdmi_gl_set_param:: \n \\ layer=%d,\n \\ srcColorFormat=%d,\n \\ src_w=%d, src_h=%d,\n\\ @@ -1802,7 +1802,7 @@ int hdmi_gl_set_param(int layer, tvout_v4l2_s_baseaddr(fp_tvout_g, (void *)src_y_address); put_vscreeninfo(fp_tvout_g, &var); if (ioctl(fp_tvout_g, S5PTVFB_WIN_POSITION, &window) < 0) { - LOGE("%s:: S5PTVFB_WIN_POSITION ioctl failed.", __func__); + ALOGE("%s:: S5PTVFB_WIN_POSITION ioctl failed.", __func__); return -1; } @@ -1815,7 +1815,7 @@ int hdmi_cable_status() { #if defined(BOARD_USE_V4L2) #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int cable_status = 0; @@ -1824,21 +1824,21 @@ int hdmi_cable_status() fd = open(TVOUT_DEV_G0, O_RDWR); if (fd <= 0) { - LOGE("%s: graphic layer 0 drv open failed", __func__); + ALOGE("%s: graphic layer 0 drv open failed", __func__); return -1; } ctrl.id = V4L2_CID_TV_HPD_STATUS; if (ioctl(fd, VIDIOC_S_CTRL, &ctrl) < 0) { - LOGE("Get HPD_STATUS fail"); + ALOGE("Get HPD_STATUS fail"); cable_status = -1; } else { cable_status = ctrl.value; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("HPD_STATUS = %d", cable_status); + ALOGD("HPD_STATUS = %d", cable_status); #endif close(fd); @@ -1850,14 +1850,14 @@ int hdmi_cable_status() fp_hpd = open(HPD_DEV, O_RDWR); if (fp_hpd <= 0) { - LOGE("hpd drv open failed\n"); + ALOGE("hpd drv open failed\n"); return -1; } //Delay about 0.3s usleep(500000); if (ioctl(fp_hpd, HPD_GET_STATE, &cable_status) < 0) { - LOGE("hpd drv HPD_GET_STATE ioctl failed\n"); + ALOGE("hpd drv HPD_GET_STATE ioctl failed\n"); cable_status = -1; } @@ -1885,7 +1885,7 @@ int hdmi_outputmode_2_v4l2_output_type(int output_mode) v4l2_output_type = V4L2_OUTPUT_TYPE_COMPOSITE; break; default: - LOGE("%s::unmathced HDMI_mode(%d)", __func__, output_mode); + ALOGE("%s::unmathced HDMI_mode(%d)", __func__, output_mode); v4l2_output_type = -1; break; } @@ -1911,7 +1911,7 @@ int hdmi_v4l2_output_type_2_outputmode(int v4l2_output_type) outputMode = COMPOSITE_OUTPUT_MODE; break; default: - LOGE("%s::unmathced v4l2_output_type(%d)", __func__, v4l2_output_type); + ALOGE("%s::unmathced v4l2_output_type(%d)", __func__, v4l2_output_type); outputMode = -1; break; } @@ -1946,7 +1946,7 @@ int composite_std_2_v4l2_std_id(int std) std_id = V4L2_STD_PAL_60; break; default: - LOGE("%s::unmathced composite_std(%d)", __func__, std); + ALOGE("%s::unmathced composite_std(%d)", __func__, std); break; } @@ -1969,14 +1969,14 @@ int hdmi_check_output_mode(int v4l2_output_type) video.mode = HDMI; if (!EDIDHDMIModeSupport(&video)) { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DVI; - LOGI("Change mode into DVI\n"); + ALOGI("Change mode into DVI\n"); break; } video.colorSpace = HDMI_CS_YCBCR444; if (!EDIDColorSpaceSupport(&video)) { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_HDMI_RGB; - LOGI("Change mode into HDMI_RGB\n"); + ALOGI("Change mode into HDMI_RGB\n"); } break; @@ -1984,14 +1984,14 @@ int hdmi_check_output_mode(int v4l2_output_type) video.mode = HDMI; if (!EDIDHDMIModeSupport(&video)) { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DVI; - LOGI("Change mode into DVI\n"); + ALOGI("Change mode into DVI\n"); break; } video.colorSpace = HDMI_CS_RGB; if (!EDIDColorSpaceSupport(&video)) { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DIGITAL; - LOGI("Change mode into HDMI_YCBCR\n"); + ALOGI("Change mode into HDMI_YCBCR\n"); } break; @@ -2001,10 +2001,10 @@ int hdmi_check_output_mode(int v4l2_output_type) video.colorSpace = HDMI_CS_YCBCR444; if (!EDIDColorSpaceSupport(&video)) { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_HDMI_RGB; - LOGI("Change mode into HDMI_RGB\n"); + ALOGI("Change mode into HDMI_RGB\n"); } else { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DIGITAL; - LOGI("Change mode into HDMI_YCBCR\n"); + ALOGI("Change mode into HDMI_YCBCR\n"); } break; } @@ -2099,14 +2099,14 @@ int hdmi_check_resolution(unsigned int preset_id) video.hdmi_3d_format = HDMI_3D_TB_FORMAT; break; default: - LOGE("%s::unmathced preset_id(%d)", __func__, preset_id); + ALOGE("%s::unmathced preset_id(%d)", __func__, preset_id); return -1; break; } if (!EDIDVideoResolutionSupport(&video)) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::EDIDVideoResolutionSupport(%d) fail (not suppoted preset_id) \n", __func__, preset_id); + ALOGD("%s::EDIDVideoResolutionSupport(%d) fail (not suppoted preset_id) \n", __func__, preset_id); #endif return -1; } @@ -2190,7 +2190,7 @@ int hdmi_resolution_2_preset_id(unsigned int resolution, int * w, int * h, unsig *preset_id = V4L2_DV_480P60; break; default: - LOGE("%s::unmathced resolution(%d)", __func__, resolution); + ALOGE("%s::unmathced resolution(%d)", __func__, resolution); ret = -1; break; } @@ -2289,14 +2289,14 @@ int hdmi_check_resolution(v4l2_std_id std_id) video.hdmi_3d_format = HDMI_3D_TB_FORMAT; break; default: - LOGE("%s::unmathced std_id(%lld)", __func__, std_id); + ALOGE("%s::unmathced std_id(%lld)", __func__, std_id); return -1; break; } if (!EDIDVideoResolutionSupport(&video)) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::EDIDVideoResolutionSupport(%llx) fail (not suppoted std_id) \n", __func__, std_id); + ALOGD("%s::EDIDVideoResolutionSupport(%llx) fail (not suppoted std_id) \n", __func__, std_id); #endif return -1; } @@ -2380,7 +2380,7 @@ int hdmi_resolution_2_std_id(unsigned int resolution, int * w, int * h, v4l2_std *h = 480; break; default: - LOGE("%s::unmathced resolution(%d)", __func__, resolution); + ALOGE("%s::unmathced resolution(%d)", __func__, resolution); ret = -1; break; } @@ -2392,7 +2392,7 @@ int hdmi_resolution_2_std_id(unsigned int resolution, int * w, int * h, v4l2_std int hdmi_enable_hdcp(unsigned int hdcp_en) { if (ioctl(fp_tvout, VIDIOC_HDCP_ENABLE, hdcp_en) < 0) { - LOGD("%s::VIDIOC_HDCP_ENABLE(%d) fail \n", __func__, hdcp_en); + ALOGD("%s::VIDIOC_HDCP_ENABLE(%d) fail \n", __func__, hdcp_en); return -1; } @@ -2418,12 +2418,12 @@ int hdmi_check_audio(void) #endif if (audio_state == ON) { if (ioctl(fp_tvout, VIDIOC_INIT_AUDIO, 1) < 0) { - LOGE("%s::VIDIOC_INIT_AUDIO(1) fail", __func__); + ALOGE("%s::VIDIOC_INIT_AUDIO(1) fail", __func__); ret = -1; } } else { if (ioctl(fp_tvout, VIDIOC_INIT_AUDIO, 0) < 0) { - LOGE("%s::VIDIOC_INIT_AUDIO(0) fail", __func__); + ALOGE("%s::VIDIOC_INIT_AUDIO(0) fail", __func__); ret = -1; } } diff --git a/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.h b/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.h index a4aa69c..f31169e 100644 --- a/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.h +++ b/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.h @@ -17,8 +17,8 @@ #ifndef __HDMI_HAL_V4L2_UTILS_H__ #define __HDMI_HAL_V4L2_UTILS_H__ -//#define LOG_NDEBUG 0 -//#define LOG_TAG "libhdmi" +//#define ALOG_NDEBUG 0 +//#define ALOG_TAG "libhdmi" #if defined(BOARD_USE_V4L2) #include "SecBuffer.h" #endif diff --git a/exynos4/hal/libhdmi/SecHdmi/fimd_api.c b/exynos4/hal/libhdmi/SecHdmi/fimd_api.c index 0e07ef3..0f14f5d 100644 --- a/exynos4/hal/libhdmi/SecHdmi/fimd_api.c +++ b/exynos4/hal/libhdmi/SecHdmi/fimd_api.c @@ -41,7 +41,7 @@ int fb_open(int win) fp = open(node, O_RDWR); if (fp < 0) - LOGE("%s: fb[%d] open failed", __func__, win); + ALOGE("%s: fb[%d] open failed", __func__, win); return fp; } @@ -51,7 +51,7 @@ int fb_close(int fp) if (fp) close(fp); else - LOGE("%s: fb is not allocated %d", __func__, fp); + ALOGE("%s: fb is not allocated %d", __func__, fp); return 0; } @@ -62,7 +62,7 @@ int get_fscreeninfo(int fp, struct fb_fix_screeninfo *fix) ret = ioctl(fp, FBIOGET_FSCREENINFO, fix); if (ret) - LOGE("%s: FBIOGET_FSCREENINFO failed", __func__); + ALOGE("%s: FBIOGET_FSCREENINFO failed", __func__); return ret; } @@ -73,7 +73,7 @@ int get_vscreeninfo(int fp, struct fb_var_screeninfo *var) ret = ioctl(fp, FBIOGET_VSCREENINFO, var); if (ret) - LOGE("%s:: FBIOGET_VSCREENINFO failed", __func__); + ALOGE("%s:: FBIOGET_VSCREENINFO failed", __func__); return ret; } @@ -84,7 +84,7 @@ int put_vscreeninfo(int fp, struct fb_var_screeninfo *var) ret = ioctl(fp, FBIOPUT_VSCREENINFO, var); if (ret) - LOGE("%s:: FBIOPUT_VSCREENINFO failed", __func__); + ALOGE("%s:: FBIOPUT_VSCREENINFO failed", __func__); return ret; } @@ -102,7 +102,7 @@ char *fb_mmap(__u32 size, int fp) buffer = (char *)mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fp, 0); if (!buffer) { - LOGE("%s:: mmap failed", __func__); + ALOGE("%s:: mmap failed", __func__); return NULL; } @@ -115,7 +115,7 @@ int fb_ioctl(int fp, __u32 cmd, void *arg) ret = ioctl(fp, cmd, arg); if (ret < 0) - LOGE("%s:: ioctl (%d) failed", __func__, cmd); + ALOGE("%s:: ioctl (%d) failed", __func__, cmd); return ret; } @@ -126,7 +126,7 @@ int fb_on(int fp) ret = ioctl(fp, FBIOBLANK, FB_BLANK_UNBLANK); if (ret) - LOGE("%s:: FBIOBLANK failed", __func__); + ALOGE("%s:: FBIOBLANK failed", __func__); return ret; } @@ -137,7 +137,7 @@ int fb_off(int fp) ret = ioctl(fp, FBIOBLANK, FB_BLANK_POWERDOWN); if (ret) - LOGE("%s:: FBIOBLANK failed", __func__); + ALOGE("%s:: FBIOBLANK failed", __func__); return ret; } @@ -152,7 +152,7 @@ int fb_off_all() return -1; if (ioctl(fp, FBIOBLANK, FB_BLANK_POWERDOWN) < 0) - LOGE("%s:: FBIOBLANK failed", __func__); + ALOGE("%s:: FBIOBLANK failed", __func__); fb_off(fp); fb_close(fp); diff --git a/exynos4/hal/libhdmi/libhdmiservice/MessageQueue.cpp b/exynos4/hal/libhdmi/libhdmiservice/MessageQueue.cpp index aebe1b8..9441019 100644 --- a/exynos4/hal/libhdmi/libhdmiservice/MessageQueue.cpp +++ b/exynos4/hal/libhdmi/libhdmiservice/MessageQueue.cpp @@ -111,7 +111,7 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout) } if (nextEventTime >= 0) { - //LOGD("nextEventTime = %lld ms", nextEventTime); + //ALOGD("nextEventTime = %lld ms", nextEventTime); if (nextEventTime > 0) { // we're about to wait, flush the binder command buffer IPCThreadState::self()->flushCommands(); @@ -121,7 +121,7 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout) } } } else { - //LOGD("going to wait"); + //ALOGD("going to wait"); // we're about to wait, flush the binder command buffer IPCThreadState::self()->flushCommands(); mCondition.wait(mLock); @@ -165,7 +165,7 @@ status_t MessageQueue::queueMessage( message->when = systemTime() + relTime; mMessages.insert(message); - //LOGD("MessageQueue::queueMessage time = %lld ms", message->when); + //ALOGD("MessageQueue::queueMessage time = %lld ms", message->when); //dumpLocked(message); mCondition.signal(); @@ -185,7 +185,7 @@ void MessageQueue::dumpLocked(const sp<MessageBase>& message) int c = 0; while (cur != end) { const char tick = (*cur == message) ? '>' : ' '; - LOGD("%c %d: msg{.what=%08x, when=%lld}", + ALOGD("%c %d: msg{.what=%08x, when=%lld}", tick, c, (*cur)->what, (*cur)->when); ++cur; c++; diff --git a/exynos4/hal/libhdmi/libhdmiservice/SecHdmiClient.cpp b/exynos4/hal/libhdmi/libhdmiservice/SecHdmiClient.cpp index c5cca78..9fd330c 100644 --- a/exynos4/hal/libhdmi/libhdmiservice/SecHdmiClient.cpp +++ b/exynos4/hal/libhdmi/libhdmiservice/SecHdmiClient.cpp @@ -22,7 +22,7 @@ ** @date 2011-07-06 */ -#define LOG_TAG "libhdmiclient" +#define ALOG_TAG "libhdmiclient" #include "SecHdmiClient.h" @@ -48,7 +48,7 @@ SecHdmiClient * SecHdmiClient::getInstance(void) void SecHdmiClient::setHdmiCableStatus(int status) { - //LOGD("%s HDMI status: %d\n", __func__, status); + //ALOGD("%s HDMI status: %d\n", __func__, status); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiCableStatus(status); @@ -56,7 +56,7 @@ void SecHdmiClient::setHdmiCableStatus(int status) void SecHdmiClient::setHdmiMode(int mode) { - //LOGD("%s HDMI Mode: %d\n", __func__, mode); + //ALOGD("%s HDMI Mode: %d\n", __func__, mode); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiMode(mode); @@ -64,7 +64,7 @@ void SecHdmiClient::setHdmiMode(int mode) void SecHdmiClient::setHdmiResolution(int resolution) { - //LOGD("%s HDMI Resolution: %d\n", __func__, resolution); + //ALOGD("%s HDMI Resolution: %d\n", __func__, resolution); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiResolution(resolution); @@ -72,7 +72,7 @@ void SecHdmiClient::setHdmiResolution(int resolution) void SecHdmiClient::setHdmiHdcp(int enHdcp) { - //LOGD("%s HDMI HDCP: %d\n", __func__, enHdcp); + //ALOGD("%s HDMI HDCP: %d\n", __func__, enHdcp); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiHdcp(enHdcp); @@ -80,7 +80,7 @@ void SecHdmiClient::setHdmiHdcp(int enHdcp) void SecHdmiClient::setHdmiRotate(int rotVal, uint32_t hwcLayer) { - //LOGD("%s HDMI ROTATE: %d\n", __func__, rotVal); + //ALOGD("%s HDMI ROTATE: %d\n", __func__, rotVal); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiRotate(rotVal, hwcLayer); @@ -88,7 +88,7 @@ void SecHdmiClient::setHdmiRotate(int rotVal, uint32_t hwcLayer) void SecHdmiClient::setHdmiHwcLayer(uint32_t hwcLayer) { - //LOGD("%s HDMI HWCLAYER: %d\n", __func__, hwcLayer); + //ALOGD("%s HDMI HWCLAYER: %d\n", __func__, hwcLayer); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiHwcLayer(hwcLayer); @@ -96,7 +96,7 @@ void SecHdmiClient::setHdmiHwcLayer(uint32_t hwcLayer) void SecHdmiClient::setHdmiEnable(uint32_t enable) { - //LOGD("%s HDMI ENABLE: %d\n", __func__, enable); + //ALOGD("%s HDMI ENABLE: %d\n", __func__, enable); if (g_SecTVOutService != 0) mEnable = enable; @@ -128,7 +128,7 @@ sp<ISecTVOut> SecHdmiClient::m_getSecTVOutService(void) for(getSvcTimes = 0; getSvcTimes < GETSERVICETIMEOUT; getSvcTimes++) { binder = sm->getService(String16("SecTVOutService")); if (binder == 0) { - LOGW("SecTVOutService not published, waiting..."); + ALOGW("SecTVOutService not published, waiting..."); usleep(500000); // 0.5 s } else { break; @@ -139,7 +139,7 @@ sp<ISecTVOut> SecHdmiClient::m_getSecTVOutService(void) sc = interface_cast<ISecTVOut>(binder); g_SecTVOutService = sc; } else { - LOGW("Failed to get SecTVOutService... SecHdmiClient will get it later.."); + ALOGW("Failed to get SecTVOutService... SecHdmiClient will get it later.."); } } return g_SecTVOutService; diff --git a/exynos4/hal/libhdmi/libhdmiservice/SecTVOutService.cpp b/exynos4/hal/libhdmi/libhdmiservice/SecTVOutService.cpp index de98810..7308473 100644 --- a/exynos4/hal/libhdmi/libhdmiservice/SecTVOutService.cpp +++ b/exynos4/hal/libhdmi/libhdmiservice/SecTVOutService.cpp @@ -22,7 +22,7 @@ ** @date 2011-07-06 */ -#define LOG_TAG "SecTVOutService" +#define ALOG_TAG "SecTVOutService" #include <binder/IServiceManager.h> #include <utils/RefBase.h> @@ -61,15 +61,15 @@ namespace android { int SecTVOutService::instantiate() { - LOGD("SecTVOutService instantiate"); + ALOGD("SecTVOutService instantiate"); int r = defaultServiceManager()->addService(String16( "SecTVOutService"), new SecTVOutService ()); - LOGD("SecTVOutService r=%d", r); + ALOGD("SecTVOutService r=%d", r); return r; } SecTVOutService::SecTVOutService () { - LOGV("SecTVOutService created"); + ALOGV("SecTVOutService created"); mHdmiCableInserted = false; #ifdef SUPPORT_G2D_UI_MODE mUILayerMode = SecHdmi::HDMI_LAYER_GRAPHIC_1; @@ -81,7 +81,7 @@ namespace android { setLCDsize(); if (mSecHdmi.create(mLCD_width, mLCD_height) == false) - LOGE("%s::mSecHdmi.create() fail", __func__); + ALOGE("%s::mSecHdmi.create() fail", __func__); else setHdmiStatus(1); @@ -118,7 +118,7 @@ namespace android { } SecTVOutService::~SecTVOutService () { - LOGV ("SecTVOutService destroyed"); + ALOGV ("SecTVOutService destroyed"); if (mHdmiFlushThread != NULL) { mHdmiFlushThread->requestExit(); @@ -178,7 +178,7 @@ namespace android { } break; default : - LOGE ( "onTransact::default"); + ALOGE ( "onTransact::default"); return BBinder::onTransact (code, data, reply, flags); } @@ -188,7 +188,7 @@ namespace android { void SecTVOutService::setHdmiStatus(uint32_t status) { - LOGD("%s HDMI cable status = %d", __func__, status); + ALOGD("%s HDMI cable status = %d", __func__, status); { Mutex::Autolock _l(mLock); @@ -199,12 +199,12 @@ namespace android { if (hdmiCableInserted == true) { if (mSecHdmi.connect() == false) { - LOGE("%s::mSecHdmi.connect() fail", __func__); + ALOGE("%s::mSecHdmi.connect() fail", __func__); hdmiCableInserted = false; } } else { if (mSecHdmi.disconnect() == false) - LOGE("%s::mSecHdmi.disconnect() fail", __func__); + ALOGE("%s::mSecHdmi.disconnect() fail", __func__); } mHdmiCableInserted = hdmiCableInserted; @@ -216,51 +216,51 @@ namespace android { void SecTVOutService::setHdmiMode(uint32_t mode) { - LOGD("%s TV mode = %d", __func__, mode); + ALOGD("%s TV mode = %d", __func__, mode); Mutex::Autolock _l(mLock); if ((hdmiCableInserted() == true) && (mSecHdmi.setHdmiOutputMode(mode)) == false) { - LOGE("%s::mSecHdmi.setHdmiOutputMode() fail", __func__); + ALOGE("%s::mSecHdmi.setHdmiOutputMode() fail", __func__); return; } } void SecTVOutService::setHdmiResolution(uint32_t resolution) { - //LOGD("%s TV resolution = %d", __func__, resolution); + //ALOGD("%s TV resolution = %d", __func__, resolution); Mutex::Autolock _l(mLock); if ((hdmiCableInserted() == true) && (mSecHdmi.setHdmiResolution(resolution)) == false) { - LOGE("%s::mSecHdmi.setHdmiResolution() fail", __func__); + ALOGE("%s::mSecHdmi.setHdmiResolution() fail", __func__); return; } } void SecTVOutService::setHdmiHdcp(uint32_t hdcp_en) { - LOGD("%s TV HDCP = %d", __func__, hdcp_en); + ALOGD("%s TV HDCP = %d", __func__, hdcp_en); Mutex::Autolock _l(mLock); if ((hdmiCableInserted() == true) && (mSecHdmi.setHdcpMode(hdcp_en)) == false) { - LOGE("%s::mSecHdmi.setHdcpMode() fail", __func__); + ALOGE("%s::mSecHdmi.setHdcpMode() fail", __func__); return; } } void SecTVOutService::setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer) { - //LOGD("%s TV ROTATE = %d", __func__, rotVal); + //ALOGD("%s TV ROTATE = %d", __func__, rotVal); Mutex::Autolock _l(mLock); if ((hdmiCableInserted() == true) && (mSecHdmi.setUIRotation(rotVal, hwcLayer)) == false) { - LOGE("%s::mSecHdmi.setUIRotation() fail", __func__); + ALOGE("%s::mSecHdmi.setUIRotation() fail", __func__); return; } } void SecTVOutService::setHdmiHwcLayer(uint32_t hwcLayer) { - //LOGD("%s TV HWCLAYER = %d", __func__, hwcLayer); + //ALOGD("%s TV HWCLAYER = %d", __func__, hwcLayer); Mutex::Autolock _l(mLock); mHwcLayer = hwcLayer; @@ -301,15 +301,15 @@ namespace android { #ifdef SUPPORT_G2D_UI_MODE if (mHwcLayer == 0) { if (mSecHdmi.clear(SecHdmi::HDMI_LAYER_VIDEO) == false) - LOGE("%s::mSecHdmi.clear(%d) fail", __func__, SecHdmi::HDMI_LAYER_VIDEO); + ALOGE("%s::mSecHdmi.clear(%d) fail", __func__, SecHdmi::HDMI_LAYER_VIDEO); if (mSecHdmi.clear(SecHdmi::HDMI_LAYER_GRAPHIC_0) == false) - LOGE("%s::mSecHdmi.clear(%d) fail", __func__, SecHdmi::HDMI_LAYER_GRAPHIC_0); + ALOGE("%s::mSecHdmi.clear(%d) fail", __func__, SecHdmi::HDMI_LAYER_GRAPHIC_0); } #endif if (mUILayerMode != hdmiLayer) { if (mSecHdmi.clear(mUILayerMode) == false) - LOGE("%s::mSecHdmi.clear(%d) fail", __func__, mUILayerMode); + ALOGE("%s::mSecHdmi.clear(%d) fail", __func__, mUILayerMode); } mUILayerMode = hdmiLayer; @@ -324,10 +324,10 @@ namespace android { #endif if (mSecHdmi.flush(w, h, colorFormat, pPhyYAddr, pPhyCbAddr, pPhyCrAddr, dstX, dstY, mUILayerMode, mHwcLayer) == false) - LOGE("%s::mSecHdmi.flush() on HDMI_MODE_UI fail", __func__); + ALOGE("%s::mSecHdmi.flush() on HDMI_MODE_UI fail", __func__); #ifdef CHECK_UI_TIME end = systemTime(); - LOGD("[UI] mSecHdmi.flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); + ALOGD("[UI] mSecHdmi.flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); #endif } #else @@ -345,9 +345,9 @@ namespace android { #if !defined(BOARD_USES_HDMI_SUBTITLES) #ifdef SUPPORT_G2D_UI_MODE if (mSecHdmi.clear(SecHdmi::HDMI_LAYER_GRAPHIC_0) == false) - LOGE("%s::mSecHdmi.clear(%d) fail", __func__, SecHdmi::HDMI_LAYER_GRAPHIC_0); + ALOGE("%s::mSecHdmi.clear(%d) fail", __func__, SecHdmi::HDMI_LAYER_GRAPHIC_0); if (mSecHdmi.clear(SecHdmi::HDMI_LAYER_GRAPHIC_1) == false) - LOGE("%s::mSecHdmi.clear(%d) fail", __func__, SecHdmi::HDMI_LAYER_GRAPHIC_1); + ALOGE("%s::mSecHdmi.clear(%d) fail", __func__, SecHdmi::HDMI_LAYER_GRAPHIC_1); #endif #endif @@ -357,10 +357,10 @@ namespace android { #endif if (mSecHdmi.flush(w, h, colorFormat, pPhyYAddr, pPhyCbAddr, pPhyCrAddr, dstX, dstY, SecHdmi::HDMI_LAYER_VIDEO, mHwcLayer) == false) - LOGE("%s::mSecHdmi.flush() on HDMI_MODE_VIDEO fail", __func__); + ALOGE("%s::mSecHdmi.flush() on HDMI_MODE_VIDEO fail", __func__); #ifdef CHECK_VIDEO_TIME end = systemTime(); - LOGD("[Video] mSecHdmi.flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); + ALOGD("[Video] mSecHdmi.flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); #endif #else msg = new SecHdmiEventMsg(&mSecHdmi, w, h, colorFormat, pPhyYAddr, pPhyCbAddr, pPhyCrAddr, @@ -372,7 +372,7 @@ namespace android { break; default: - LOGE("unmatched HDMI_MODE : %d", hdmiMode); + ALOGE("unmatched HDMI_MODE : %d", hdmiMode); break; } diff --git a/exynos4/hal/libhdmi/libhdmiservice/SecTVOutService.h b/exynos4/hal/libhdmi/libhdmiservice/SecTVOutService.h index 1f5f251..b1048b5 100644 --- a/exynos4/hal/libhdmi/libhdmiservice/SecTVOutService.h +++ b/exynos4/hal/libhdmi/libhdmiservice/SecTVOutService.h @@ -139,12 +139,12 @@ namespace android { #endif if (pSecHdmi->flush(mSrcWidth, mSrcHeight, mSrcColorFormat, mSrcYAddr, mSrcCbAddr, mSrcCrAddr, mDstX, mDstY, mHdmiLayer, mHwcLayer) == false) { - LOGE("%s::pSecHdmi->flush() fail on HDMI_MODE_UI", __func__); + ALOGE("%s::pSecHdmi->flush() fail on HDMI_MODE_UI", __func__); ret = false; } #ifdef CHECK_UI_TIME end = systemTime(); - LOGD("[UI] pSecHdmi->flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); + ALOGD("[UI] pSecHdmi->flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); #endif break; case HDMI_MODE_VIDEO: @@ -153,16 +153,16 @@ namespace android { #endif if (pSecHdmi->flush(mSrcWidth, mSrcHeight, mSrcColorFormat, mSrcYAddr, mSrcCbAddr, mSrcCrAddr, mDstX, mDstY, mHdmiLayer, mHwcLayer) == false) { - LOGE("%s::pSecHdmi->flush() fail on HDMI_MODE_VIDEO", __func__); + ALOGE("%s::pSecHdmi->flush() fail on HDMI_MODE_VIDEO", __func__); ret = false; } #ifdef CHECK_VIDEO_TIME end = systemTime(); - LOGD("[VIDEO] pSecHdmi->flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); + ALOGD("[VIDEO] pSecHdmi->flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); #endif break; default: - LOGE("Undefined HDMI_MODE"); + ALOGE("Undefined HDMI_MODE"); ret = false; break; } diff --git a/exynos4/hal/libhdmi/libsForhdmi/libcec/libcec.c b/exynos4/hal/libhdmi/libsForhdmi/libcec/libcec.c index e688051..e088346 100644 --- a/exynos4/hal/libhdmi/libsForhdmi/libcec/libcec.c +++ b/exynos4/hal/libhdmi/libsForhdmi/libcec/libcec.c @@ -74,7 +74,7 @@ int CECOpen() CECClose(); if ((fd = open(CEC_DEVICE_NAME, O_RDWR)) < 0) { - LOGE("Can't open %s!\n", CEC_DEVICE_NAME); + ALOGE("Can't open %s!\n", CEC_DEVICE_NAME); res = 0; } @@ -92,7 +92,7 @@ int CECClose() if (fd != -1) { if (close(fd) != 0) { - LOGE("close() failed!\n"); + ALOGE("close() failed!\n"); res = 0; } fd = -1; @@ -115,12 +115,12 @@ int CECAllocLogicalAddress(int paddr, enum CECDeviceType devtype) int i = 0; if (fd == -1) { - LOGE("open device first!\n"); + ALOGE("open device first!\n"); return 0; } if (CECSetLogicalAddr(laddr) < 0) { - LOGE("CECSetLogicalAddr() failed!\n"); + ALOGE("CECSetLogicalAddr() failed!\n"); return 0; } @@ -141,12 +141,12 @@ int CECAllocLogicalAddress(int paddr, enum CECDeviceType devtype) } if (laddr == CEC_LADDR_UNREGISTERED) { - LOGE("All LA addresses in use!!!\n"); + ALOGE("All LA addresses in use!!!\n"); return CEC_LADDR_UNREGISTERED; } if (CECSetLogicalAddr(laddr) < 0) { - LOGE("CECSetLogicalAddr() failed!\n"); + ALOGE("CECSetLogicalAddr() failed!\n"); return 0; } @@ -159,7 +159,7 @@ int CECAllocLogicalAddress(int paddr, enum CECDeviceType devtype) buffer[4] = devtype; if (CECSendMessage(buffer, 5) != 5) { - LOGE("CECSendMessage() failed!\n"); + ALOGE("CECSendMessage() failed!\n"); return 0; } @@ -177,17 +177,17 @@ int CECAllocLogicalAddress(int paddr, enum CECDeviceType devtype) int CECSendMessage(unsigned char *buffer, int size) { if (fd == -1) { - LOGE("open device first!\n"); + ALOGE("open device first!\n"); return 0; } if (size > CEC_MAX_FRAME_SIZE) { - LOGE("size should not exceed %d\n", CEC_MAX_FRAME_SIZE); + ALOGE("size should not exceed %d\n", CEC_MAX_FRAME_SIZE); return 0; } #if CEC_DEBUG - LOGI("CECSendMessage() : "); + ALOGI("CECSendMessage() : "); CECPrintFrame(buffer, size); #endif @@ -211,7 +211,7 @@ int CECReceiveMessage(unsigned char *buffer, int size, long timeout) int retval; if (fd == -1) { - LOGE("open device first!\n"); + ALOGE("open device first!\n"); return 0; } @@ -228,7 +228,7 @@ int CECReceiveMessage(unsigned char *buffer, int size, long timeout) } else if (retval) { bytes = read(fd, buffer, size); #if CEC_DEBUG - LOGI("CECReceiveMessage() : size(%d)", bytes); + ALOGI("CECReceiveMessage() : size(%d)", bytes); if(bytes > 0) CECPrintFrame(buffer, bytes); #endif @@ -245,7 +245,7 @@ int CECReceiveMessage(unsigned char *buffer, int size, long timeout) int CECSetLogicalAddr(unsigned int laddr) { if (ioctl(fd, CEC_IOC_SETLADDR, &laddr)) { - LOGE("ioctl(CEC_IOC_SETLA) failed!\n"); + ALOGE("ioctl(CEC_IOC_SETLA) failed!\n"); return 0; } @@ -260,12 +260,12 @@ void CECPrintFrame(unsigned char *buffer, unsigned int size) { if (size > 0) { int i; - LOGI("fsize: %d ", size); - LOGI("frame: "); + ALOGI("fsize: %d ", size); + ALOGI("frame: "); for (i = 0; i < size; i++) - LOGI("0x%02x ", buffer[i]); + ALOGI("0x%02x ", buffer[i]); - LOGI("\n"); + ALOGI("\n"); } } #endif diff --git a/exynos4/hal/libhdmi/libsForhdmi/libddc/libddc.c b/exynos4/hal/libhdmi/libsForhdmi/libddc/libddc.c index 12910fb..d283b6a 100644 --- a/exynos4/hal/libhdmi/libsForhdmi/libddc/libddc.c +++ b/exynos4/hal/libhdmi/libsForhdmi/libddc/libddc.c @@ -83,7 +83,7 @@ int DDCOpen() // open if ((ddc_fd = open(DEV_NAME,O_RDWR)) < 0) { - LOGE("%s: Cannot open I2C_DDC : %s",__func__, DEV_NAME); + ALOGE("%s: Cannot open I2C_DDC : %s",__func__, DEV_NAME); ret = 0; } @@ -102,7 +102,7 @@ int DDCClose() // check if fd is available if (ref_cnt == 0) { #if DDC_DEBUG - LOGE("%s: I2C_DDC is not available!!!!", __func__); + ALOGE("%s: I2C_DDC is not available!!!!", __func__); #endif return 1; } @@ -115,7 +115,7 @@ int DDCClose() if (close(ddc_fd) < 0) { #if DDC_DEBUG - LOGE("%s: Cannot close I2C_DDC : %s",__func__,DEV_NAME); + ALOGE("%s: Cannot close I2C_DDC : %s",__func__,DEV_NAME); #endif ret = 0; } @@ -143,7 +143,7 @@ int DDCRead(unsigned char addr, unsigned char offset, if (!DDCFileAvailable()) { #if DDC_DEBUG - LOGE("%s: I2C_DDC is not available!!!!", __func__); + ALOGE("%s: I2C_DDC is not available!!!!", __func__); #endif return 0; } @@ -193,7 +193,7 @@ int EDDCRead(unsigned char segpointer, unsigned char segment, unsigned char addr if (!DDCFileAvailable()) { #if DDC_DEBUG - LOGE("%s: I2C_DDC is not available!!!!", __func__); + ALOGE("%s: I2C_DDC is not available!!!!", __func__); #endif return 0; } @@ -227,7 +227,7 @@ int EDDCRead(unsigned char segpointer, unsigned char segment, unsigned char addr // eddc read if (ioctl(ddc_fd, I2C_RDWR, &msgset) < 0) { #if DDC_DEBUG - LOGE("%s: ioctl(I2C_RDWR) failed!!!", __func__); + ALOGE("%s: ioctl(I2C_RDWR) failed!!!", __func__); #endif ret = 0; } @@ -251,7 +251,7 @@ int DDCWrite(unsigned char addr, unsigned char offset, unsigned int size, unsign // allocate temporary buffer temp = (unsigned char*) malloc((size+1)*sizeof(unsigned char)); if (!temp) { - LOGE("%s: not enough resources at %s", __FUNCTION__); + ALOGE("%s: not enough resources at %s", __FUNCTION__); goto exit; } @@ -259,18 +259,18 @@ int DDCWrite(unsigned char addr, unsigned char offset, unsigned int size, unsign memcpy(temp+1,buffer,size); if (!DDCFileAvailable()) { - LOGE("%s: I2C_DDC is not available!!!!", __func__); + ALOGE("%s: I2C_DDC is not available!!!!", __func__); goto exit; } if (ioctl(ddc_fd, I2C_SLAVE, addr>>1) < 0) { - LOGE("%s: cannot set slave address 0x%02x", __func__,addr); + ALOGE("%s: cannot set slave address 0x%02x", __func__,addr); goto exit; } // write temp buffer if ((bytes = write(ddc_fd,temp,size+1)) != (size+1)) { - LOGE("%s: fail to write %d bytes, only write %d bytes",__func__, size, bytes); + ALOGE("%s: fail to write %d bytes, only write %d bytes",__func__, size, bytes); goto exit; } diff --git a/exynos4/hal/libhdmi/libsForhdmi/libedid/libedid.c b/exynos4/hal/libhdmi/libsForhdmi/libedid/libedid.c index c4af587..7a81913 100644 --- a/exynos4/hal/libhdmi/libsForhdmi/libedid/libedid.c +++ b/exynos4/hal/libhdmi/libsForhdmi/libedid/libedid.c @@ -27,7 +27,7 @@ //#define EDID_DEBUG 1 #ifdef EDID_DEBUG -#define DPRINTF(args...) LOGI(args) +#define DPRINTF(args...) ALOGI(args) #else #define DPRINTF(args...) #endif @@ -219,11 +219,11 @@ static int ReadEDIDBlock(const unsigned int blockNum, unsigned char* const outBu #ifdef EDID_DEBUG offset = 0; do { - LOGI("0x%02X", outBuffer[offset++]); + ALOGI("0x%02X", outBuffer[offset++]); if (offset % 16) - LOGI(" "); + ALOGI(" "); else - LOGI("\n"); + ALOGI("\n"); } while (SIZEOFEDIDBLOCK > offset); #endif // EDID_DEBUG return 1; diff --git a/exynos4/hal/libhwcomposer/SecHWC.cpp b/exynos4/hal/libhwcomposer/SecHWC.cpp index d2f3ecc..b76a885 100644 --- a/exynos4/hal/libhwcomposer/SecHWC.cpp +++ b/exynos4/hal/libhwcomposer/SecHWC.cpp @@ -75,7 +75,7 @@ hwc_module_t HAL_MODULE_INFO_SYM = { /*****************************************************************************/ static void dump_layer(hwc_layer_t const* l) { - LOGD("\ttype=%d, flags=%08x, handle=%p, tr=%02x, blend=%04x, " + ALOGD("\ttype=%d, flags=%08x, handle=%p, tr=%02x, blend=%04x, " "{%d,%d,%d,%d}, {%d,%d,%d,%d}", l->compositionType, l->flags, l->handle, l->transform, l->blending, l->sourceCrop.left, @@ -486,7 +486,7 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) } else { ret = assign_overlay_window(ctx, cur, overlay_win_cnt, i); if (ret != 0) { - LOGE("assign_overlay_window fail, change to frambuffer"); + ALOGE("assign_overlay_window fail, change to frambuffer"); cur->compositionType = HWC_FRAMEBUFFER; ctx->num_of_fb_layer++; continue; @@ -603,7 +603,7 @@ static int hwc_set(hwc_composer_device_t *dev, * double buffered (2 or more) this buffer is already rendered. * It is the redundant src buffer for FIMC rendering. */ - LOGD("SKIP FIMC rendering for Layer%d", win->layer_index); + ALOGD("SKIP FIMC rendering for Layer%d", win->layer_index); #if defined(BOARD_USES_HDMI) skip_hdmi_rendering = 1; #endif @@ -776,7 +776,7 @@ g2d_error: android::SecHdmiClient::HDMI_MODE_VIDEO, ctx->num_of_hwc_layer); } else { - LOGE("%s: Unsupported format = %d", __func__, src_img.format); + ALOGE("%s: Unsupported format = %d", __func__, src_img.format); } } #endif diff --git a/exynos4/hal/libhwcomposer/SecHWCUtils.h b/exynos4/hal/libhwcomposer/SecHWCUtils.h index 005b694..9873003 100644 --- a/exynos4/hal/libhwcomposer/SecHWCUtils.h +++ b/exynos4/hal/libhwcomposer/SecHWCUtils.h @@ -55,7 +55,7 @@ #include "s3c_mem.h" #include "sec_format.h" -//#define HWC_DEBUG +#define HWC_DEBUG #if defined(BOARD_USES_FIMGAPI) #include "sec_g2d.h" //#define SUB_TITLES_HWC diff --git a/exynos4/hal/libhwconverter/Android.mk b/exynos4/hal/libhwconverter/Android.mk index c1ded53..f21783a 100644 --- a/exynos4/hal/libhwconverter/Android.mk +++ b/exynos4/hal/libhwconverter/Android.mk @@ -30,6 +30,7 @@ LOCAL_C_INCLUDES := \ LOCAL_MODULE_TAGS := eng LOCAL_MODULE := libhwconverter + include $(BUILD_SHARED_LIBRARY) endif diff --git a/exynos4/hal/libhwconverter/HardwareConverter.cpp b/exynos4/hal/libhwconverter/HardwareConverter.cpp index 9ff6e55..21306c5 100644 --- a/exynos4/hal/libhwconverter/HardwareConverter.cpp +++ b/exynos4/hal/libhwconverter/HardwareConverter.cpp @@ -68,7 +68,7 @@ bool HardwareConverter::convert( if (!handle_fimc->setSrcParams(width, height, src_crop_x, src_crop_y, &src_crop_width, &src_crop_height, src_har_format)) { - LOGE("%s:: setSrcParms() failed", __func__); + ALOGE("%s:: setSrcParms() failed", __func__); return false; } @@ -76,19 +76,19 @@ bool HardwareConverter::convert( (unsigned int)src_addr_array[1], (unsigned int)src_addr_array[1], src_har_format)) { - LOGE("%s:: setSrcPhyAddr() failed", __func__); + ALOGE("%s:: setSrcPhyAddr() failed", __func__); return false; } if (!handle_fimc->setRotVal(rotate_value)) { - LOGE("%s:: setRotVal() failed", __func__); + ALOGE("%s:: setRotVal() failed", __func__); return false; } if (!handle_fimc->setDstParams(width, height, dst_crop_x, dst_crop_y, &dst_crop_width, &dst_crop_height, dst_har_format)) { - LOGE("%s:: setDstParams() failed", __func__); + ALOGE("%s:: setDstParams() failed", __func__); return false; } @@ -97,7 +97,7 @@ bool HardwareConverter::convert( if (!handle_fimc->setDstAddr((unsigned int)(dst_addr_array[0]), (unsigned int)(dst_addr_array[1]), (unsigned int)(dst_addr_array[1]))) { - LOGE("%s:: setDstPhyAddr() failed", __func__); + ALOGE("%s:: setDstPhyAddr() failed", __func__); return false; } break; @@ -106,14 +106,14 @@ bool HardwareConverter::convert( if (!handle_fimc->setDstAddr((unsigned int)(dst_addr_array[0]), (unsigned int)(dst_addr_array[1]), (unsigned int)(dst_addr_array[2]))) { - LOGE("%s:: setDstPhyAddr() failed", __func__); + ALOGE("%s:: setDstPhyAddr() failed", __func__); return false; } break; } if (!handle_fimc->draw(0, 0)) { - LOGE("%s:: handleOneShot() failed", __func__); + ALOGE("%s:: handleOneShot() failed", __func__); return false; } diff --git a/exynos4/hal/libhwjpeg/jpeg_hal_unit.c b/exynos4/hal/libhwjpeg/jpeg_hal_unit.c index a0b4224..00363f5 100644 --- a/exynos4/hal/libhwjpeg/jpeg_hal_unit.c +++ b/exynos4/hal/libhwjpeg/jpeg_hal_unit.c @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "libhwjpeg" +#define ALOG_TAG "libhwjpeg" #include <stdio.h> #include <stdlib.h> @@ -63,13 +63,13 @@ static int jpeg_v4l2_querycap(int fd) ret = ioctl(fd, VIDIOC_QUERYCAP, &cap); if (!(cap.capabilities & V4L2_CAP_STREAMING)) - LOGE("[%s]: does not support streaming", __func__); + ALOGE("[%s]: does not support streaming", __func__); if (!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) - LOGE("[%s]: does not support output", __func__); + ALOGE("[%s]: does not support output", __func__); if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) - LOGE("[%s]: does not support capture", __func__); + ALOGE("[%s]: does not support capture", __func__); return ret; } @@ -122,7 +122,7 @@ static int jpeg_v4l2_s_fmt(int fd, enum v4l2_buf_type type, struct jpeg_config * } break; default: - LOGE("[%s]: invalid v4l2 buf type", __func__); + ALOGE("[%s]: invalid v4l2 buf type", __func__); return -1; } @@ -161,7 +161,7 @@ static int jpeg_v4l2_g_fmt(int fd, enum v4l2_buf_type type, struct jpeg_config * config->pix.dec_fmt.out_fmt = fmt.fmt.pix_mp.pixelformat; break; default: - LOGE("[%s]: invalid v4l2 buf type", __func__); + ALOGE("[%s]: invalid v4l2 buf type", __func__); return -1; } @@ -174,13 +174,13 @@ int jpeghal_getconfig(int fd, struct jpeg_config *config) ret = jpeg_v4l2_g_fmt(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, config); if (ret < 0) { - LOGE("[%s]: input G_FMT failed", __func__); + ALOGE("[%s]: input G_FMT failed", __func__); return -1; } ret = jpeg_v4l2_g_fmt(fd, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, config); if (ret < 0) - LOGE("[%s]: output G_FMT failed", __func__); + ALOGE("[%s]: output G_FMT failed", __func__); return ret; } @@ -219,7 +219,7 @@ static int jpeg_v4l2_querybuf(int fd, struct jpeg_buf *buf) ret = ioctl(fd, VIDIOC_QUERYBUF, &v4l2_buf); if (ret < 0) { - LOGE("[%s:%d]: VIDIOC_QUERYBUF failed", __func__, ret); + ALOGE("[%s:%d]: VIDIOC_QUERYBUF failed", __func__, ret); return ret; } @@ -229,9 +229,9 @@ static int jpeg_v4l2_querybuf(int fd, struct jpeg_buf *buf) PROT_READ | PROT_WRITE, MAP_SHARED, fd, v4l2_buf.m.planes[i].m.mem_offset); - //LOGI("[%s]: buf.start[%d] = %p, length = %d", __func__, 0, buf->start[0], buf->length[0]); + //ALOGI("[%s]: buf.start[%d] = %p, length = %d", __func__, 0, buf->start[0], buf->length[0]); if (buf->start[0] == MAP_FAILED) { - LOGE("[%s]: mmap failed", __func__); + ALOGE("[%s]: mmap failed", __func__); return -1; } } @@ -264,7 +264,7 @@ static int jpeg_v4l2_qbuf(int fd, struct jpeg_buf *buf) ret = ioctl(fd, VIDIOC_QBUF, &v4l2_buf); if (ret < 0) { - LOGE("[%s:%d] QBUF failed", __func__, ret); + ALOGE("[%s:%d] QBUF failed", __func__, ret); return -1; } @@ -283,7 +283,7 @@ static int jpeg_v4l2_dqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory mem ret = ioctl(fd, VIDIOC_DQBUF, &buf); if (ret < 0) { - LOGE("[%s:%d] DQBUF failed", __func__, ret); + ALOGE("[%s:%d] DQBUF failed", __func__, ret); return -1; } @@ -296,7 +296,7 @@ static int jpeg_v4l2_streamon(int fd, enum v4l2_buf_type type) ret = ioctl(fd, VIDIOC_STREAMON, &type); if (ret < 0) { - LOGE("[%s:%d] STREAMON failed", __func__, ret); + ALOGE("[%s:%d] STREAMON failed", __func__, ret); return -1; } @@ -309,7 +309,7 @@ static int jpeg_v4l2_streamoff(int fd, enum v4l2_buf_type type) ret = ioctl(fd, VIDIOC_STREAMOFF, &type); if (ret < 0) { - LOGE("[%s:%d] STREAMOFF failed", __func__, ret); + ALOGE("[%s:%d] STREAMOFF failed", __func__, ret); return -1; } @@ -324,13 +324,13 @@ int jpeghal_dec_init() fd = open(JPEG_DEC_NODE, O_RDWR, 0); if (fd < 0) { - LOGE("[%s]: JPEG dec open failed", __func__); + ALOGE("[%s]: JPEG dec open failed", __func__); return -1; } ret = jpeg_v4l2_querycap(fd); if (ret < 0) { - LOGE("[%s]: QUERYCAP failed", __func__); + ALOGE("[%s]: QUERYCAP failed", __func__); return -1; } @@ -344,13 +344,13 @@ int jpeghal_enc_init() fd = open(JPEG_ENC_NODE, O_RDWR, 0); if (fd < 0) { - LOGE("[%s]: JPEG enc open failed", __func__); + ALOGE("[%s]: JPEG enc open failed", __func__); return -1; } ret = jpeg_v4l2_querycap(fd); if (ret < 0) { - LOGE("[%s]: QUERYCAP failed", __func__); + ALOGE("[%s]: QUERYCAP failed", __func__); return -1; } @@ -365,13 +365,13 @@ int jpeghal_dec_setconfig(int fd, struct jpeg_config *config) ret = jpeg_v4l2_s_fmt(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, config); if (ret < 0) { - LOGE("[%s]: decoder input S_FMT failed", __func__); + ALOGE("[%s]: decoder input S_FMT failed", __func__); return -1; } ret = jpeg_v4l2_s_fmt(fd, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, config); if (ret < 0) { - LOGE("[%s]: decoder output S_FMT failed", __func__); + ALOGE("[%s]: decoder output S_FMT failed", __func__); return -1; } @@ -393,7 +393,7 @@ int jpeghal_enc_setconfig(int fd, struct jpeg_config *config) ret = jpeg_v4l2_s_jpegcomp(fd, config->enc_qual); if (ret < 0) { - LOGE("[%s]: S_JPEGCOMP failed", __func__); + ALOGE("[%s]: S_JPEGCOMP failed", __func__); return -1; } @@ -401,13 +401,13 @@ int jpeghal_enc_setconfig(int fd, struct jpeg_config *config) ret = jpeg_v4l2_s_fmt(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, config); if (ret < 0) { - LOGE("[%s]: encoder input S_FMT failed", __func__); + ALOGE("[%s]: encoder input S_FMT failed", __func__); return -1; } ret = jpeg_v4l2_s_fmt(fd, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, config); if (ret < 0) { - LOGE("[%s]: encoder output S_FMT failed", __func__); + ALOGE("[%s]: encoder output S_FMT failed", __func__); return -1; } @@ -431,14 +431,14 @@ int jpeghal_set_inbuf(int fd, struct jpeg_buf *buf) ret = jpeg_v4l2_reqbufs(fd, 1, buf); if (ret < 0) { - LOGE("[%s:%d]: Input REQBUFS failed", __func__, ret); + ALOGE("[%s:%d]: Input REQBUFS failed", __func__, ret); return -1; } if (buf->memory == V4L2_MEMORY_MMAP) { ret = jpeg_v4l2_querybuf(fd, buf); if (ret < 0) { - LOGE("[%s:%d]: Input QUERYBUF failed", __func__, ret); + ALOGE("[%s:%d]: Input QUERYBUF failed", __func__, ret); return -1; } } @@ -454,14 +454,14 @@ int jpeghal_set_outbuf(int fd, struct jpeg_buf *buf) ret = jpeg_v4l2_reqbufs(fd, 1, buf); if (ret < 0) { - LOGE("[%s:%d]: Output REQBUFS failed", __func__, ret); + ALOGE("[%s:%d]: Output REQBUFS failed", __func__, ret); return -1; } if (buf->memory == V4L2_MEMORY_MMAP) { ret = jpeg_v4l2_querybuf(fd, buf); if (ret < 0) { - LOGE("[%s:%d]: Output QUERYBUF failed", __func__, ret); + ALOGE("[%s:%d]: Output QUERYBUF failed", __func__, ret); return -1; } } @@ -475,13 +475,13 @@ static int jpeg_exe(int fd, struct jpeg_buf *in_buf, struct jpeg_buf *out_buf) ret = jpeg_v4l2_qbuf(fd, in_buf); if (ret < 0) { - LOGE("[%s:%d]: Input QBUF failed", __func__, ret); + ALOGE("[%s:%d]: Input QBUF failed", __func__, ret); return -1; } ret = jpeg_v4l2_qbuf(fd, out_buf); if (ret < 0) { - LOGE("[%s:%d]: Output QBUF failed", __func__, ret); + ALOGE("[%s:%d]: Output QBUF failed", __func__, ret); return -1; } @@ -500,7 +500,7 @@ int jpeghal_dec_exe(int fd, struct jpeg_buf *in_buf, struct jpeg_buf *out_buf) ret = jpeg_exe(fd, in_buf, out_buf); if (ret < 0) - LOGE("[%s]: JPEG decoding is failed", __func__); + ALOGE("[%s]: JPEG decoding is failed", __func__); return ret; } @@ -511,7 +511,7 @@ int jpeghal_enc_exe(int fd, struct jpeg_buf *in_buf, struct jpeg_buf *out_buf) ret = jpeg_exe(fd, in_buf, out_buf); if (ret < 0) - LOGE("[%s]: JPEG Encoding is failed", __func__); + ALOGE("[%s]: JPEG Encoding is failed", __func__); return ret; } @@ -548,7 +548,7 @@ int jpeghal_s_ctrl(int fd, int cid, int value) ret = ioctl(fd, VIDIOC_S_CTRL, &vc); if (ret != 0) { - LOGE("[%s] ioctl : cid(%d), value(%d)\n", __func__, cid, value); + ALOGE("[%s] ioctl : cid(%d), value(%d)\n", __func__, cid, value); return -1; } @@ -564,7 +564,7 @@ int jpeghal_g_ctrl(int fd, int id) ret = ioctl(fd, VIDIOC_G_CTRL, &ctrl); if (ret < 0) { - LOGE("[%s] ioctl : cid(%d)\n", __func__, ctrl.id); + ALOGE("[%s] ioctl : cid(%d)\n", __func__, ctrl.id); return -1; } diff --git a/exynos4/hal/libs5pjpeg/jpeg_api.c b/exynos4/hal/libs5pjpeg/jpeg_api.c index eb80e07..d557a13 100644 --- a/exynos4/hal/libs5pjpeg/jpeg_api.c +++ b/exynos4/hal/libs5pjpeg/jpeg_api.c @@ -16,8 +16,8 @@ ** limitations under the License. */ -//#define LOG_NDEBUG 0 -#define LOG_TAG "Jpeg-api" +//#define ALOG_NDEBUG 0 +#define ALOG_TAG "Jpeg-api" #include <utils/Log.h> #include <stdio.h> @@ -66,11 +66,11 @@ static unsigned int get_yuv_size(enum jpeg_frame_format out_format, break; default: - LOGV("get_yuv_size return fmt(%d)\n", out_format); + ALOGV("get_yuv_size return fmt(%d)\n", out_format); return(0); } - LOGV("get_yuv_size width(%d) height(%d)\n", width, height); + ALOGV("get_yuv_size width(%d) height(%d)\n", width, height); switch (out_format) { case YUV_422 : @@ -114,13 +114,13 @@ int api_jpeg_decode_init() jpeg_ctx->jpeg_fd = open(JPEG_DRIVER_NAME, O_RDWR); if (jpeg_ctx->jpeg_fd < 0) { - LOGE("JPEG driver open failed\n"); + ALOGE("JPEG driver open failed\n"); return -1; } #ifdef S5P_VMEM mem_fp = s5p_vmem_open(); - LOGV("s5p_vmem_open\n"); + ALOGV("s5p_vmem_open\n"); #else jpeg_ctx->args.mmapped_addr = (char *) mmap(0, JPEG_TOTAL_BUF_SIZE, @@ -129,10 +129,10 @@ int api_jpeg_decode_init() jpeg_ctx->jpeg_fd, 0); if (jpeg_ctx->args.mmapped_addr == NULL) { - LOGE("JPEG mmap failed\n"); + ALOGE("JPEG mmap failed\n"); return -1; } - LOGV("api_jpeg_decode_init jpeg_ctx->args.mmapped_addr 0x%08x\n", + ALOGV("api_jpeg_decode_init jpeg_ctx->args.mmapped_addr 0x%08x\n", jpeg_ctx->args.mmapped_addr); #endif /* S5P_VMEM */ @@ -145,13 +145,13 @@ int api_jpeg_encode_init() jpeg_ctx->jpeg_fd = open(JPEG_DRIVER_NAME, O_RDWR); if (jpeg_ctx->jpeg_fd < 0) { - LOGE("JPEG driver open failed %d\n", jpeg_ctx->jpeg_fd); + ALOGE("JPEG driver open failed %d\n", jpeg_ctx->jpeg_fd); return -1; } #ifdef S5P_VMEM mem_fp = s5p_vmem_open(); - LOGI("s5p_vmem_open\n"); + ALOGI("s5p_vmem_open\n"); #else jpeg_ctx->args.mmapped_addr = (char *) mmap(0, @@ -161,10 +161,10 @@ int api_jpeg_encode_init() jpeg_ctx->jpeg_fd, 0); if (jpeg_ctx->args.mmapped_addr == NULL) { - LOGE("JPEG mmap failed\n"); + ALOGE("JPEG mmap failed\n"); return -1; } - LOGV("api_jpeg_encode_init jpeg_ctx->args.mmapped_addr 0x%08x\n", + ALOGV("api_jpeg_encode_init jpeg_ctx->args.mmapped_addr 0x%08x\n", jpeg_ctx->args.mmapped_addr); #endif /* S5P_VMEM */ return jpeg_ctx->jpeg_fd; @@ -214,7 +214,7 @@ int api_jpeg_encode_deinit(int dev_fd) void *api_jpeg_get_decode_in_buf(int dev_fd, unsigned int size) { if (size < 0 || size > MAX_JPEG_RES) { - LOGE("Invalid decode input buffer size\r\n"); + ALOGE("Invalid decode input buffer size\r\n"); return NULL; } #ifdef S5P_VMEM @@ -246,7 +246,7 @@ void *api_jpeg_get_encode_in_buf(int dev_fd, unsigned int size) jpeg_ctx->args.mmapped_addr); #endif - LOGV("api_jpeg_get_encode_in_buf: 0x%x\n", + ALOGV("api_jpeg_get_encode_in_buf: 0x%x\n", jpeg_ctx->args.in_buf); return (void *)(jpeg_ctx->args.in_buf); @@ -266,7 +266,7 @@ void *api_jpeg_get_decode_out_buf(int dev_fd) jpeg_ctx->args.mmapped_addr); #endif /* S5P_VMEM */ /* - LOGV("api_jpeg_get_decode_out_buf: 0x%x\n", + ALOGV("api_jpeg_get_decode_out_buf: 0x%x\n", jpeg_ctx->args.out_buf); */ return (void *)(jpeg_ctx->args.out_buf); @@ -286,7 +286,7 @@ void *api_jpeg_get_encode_out_buf(int dev_fd) jpeg_ctx->args.mmapped_addr); #endif /* S5P_VMEM */ - LOGV("api_jpeg_get_encode_out_buf: 0x%x\n", + ALOGV("api_jpeg_get_encode_out_buf: 0x%x\n", jpeg_ctx->args.out_buf); return (void *)(jpeg_ctx->args.out_buf); @@ -312,7 +312,7 @@ enum jpeg_ret_type api_jpeg_decode_exe(int dev_fd, arg = &(jpeg_ctx->args); ioctl(jpeg_ctx->jpeg_fd, IOCTL_JPEG_DEC_EXE, arg->dec_param); - LOGV("api_jpeg_decode_exe dec_param->out_fmt :%d \ + ALOGV("api_jpeg_decode_exe dec_param->out_fmt :%d \ dec_param->width : %d dec_param->height : %d\n", arg->dec_param->out_fmt, arg->dec_param->width, @@ -335,7 +335,7 @@ enum jpeg_ret_type api_jpeg_encode_exe(int dev_fd, // check MCU validation width & height & sampling mode if (check_input_size(jpeg_ctx->args.enc_param->width, jpeg_ctx->args.enc_param->height) < 0) { - LOGV("width/height doesn't match with MCU\r\n"); + ALOGV("width/height doesn't match with MCU\r\n"); return JPEG_FAIL; } diff --git a/exynos4/hal/libswconverter/Android.mk b/exynos4/hal/libswconverter/Android.mk index e52aea7..daf5d87 100644 --- a/exynos4/hal/libswconverter/Android.mk +++ b/exynos4/hal/libswconverter/Android.mk @@ -26,8 +26,6 @@ LOCAL_MODULE := libswconverter LOCAL_PRELINK_MODULE := false -LOCAL_CFLAGS := - LOCAL_ARM_MODE := arm LOCAL_STATIC_LIBRARIES := diff --git a/exynos5/hal/include/sec_utils.h b/exynos5/hal/include/sec_utils.h index 4aed6e0..26b63a1 100644 --- a/exynos5/hal/include/sec_utils.h +++ b/exynos5/hal/include/sec_utils.h @@ -134,7 +134,7 @@ inline int HAL_PIXEL_FORMAT_2_V4L2_PIX(int HAL_PIXEL_FORMAT) break; default: - LOGE("%s::unmatched HAL_PIXEL_FORMAT color_space(0x%x)\n", + ALOGE("%s::unmatched HAL_PIXEL_FORMAT color_space(0x%x)\n", __func__, HAL_PIXEL_FORMAT); break; } @@ -216,7 +216,7 @@ inline int V4L2_PIX_2_HAL_PIXEL_FORMAT(int V4L2_PIX) break; default: - LOGE("%s::unmatched V4L2_PIX color_space(%d)\n", + ALOGE("%s::unmatched V4L2_PIX color_space(%d)\n", __func__, V4L2_PIX); break; } @@ -295,7 +295,7 @@ inline unsigned int FRAME_SIZE(int HAL_PIXEL_FORMAT, int w, int h) break; default: - LOGD("%s::no matching source colorformat(0x%x), w(%d), h(%d) fail\n", + ALOGD("%s::no matching source colorformat(0x%x), w(%d), h(%d) fail\n", __func__, HAL_PIXEL_FORMAT, w, h); break; } diff --git a/exynos5/hal/include/sec_utils_v4l2.h b/exynos5/hal/include/sec_utils_v4l2.h index 5c05c1d..b74eaed 100644 --- a/exynos5/hal/include/sec_utils_v4l2.h +++ b/exynos5/hal/include/sec_utils_v4l2.h @@ -151,7 +151,7 @@ inline int HAL_PIXEL_FORMAT_2_V4L2_PIX(int HAL_PIXEL_FORMAT) break; default: - LOGE("%s::unmatched HAL_PIXEL_FORMAT color_space(0x%x)\n", + ALOGE("%s::unmatched HAL_PIXEL_FORMAT color_space(0x%x)\n", __func__, HAL_PIXEL_FORMAT); break; } @@ -239,7 +239,7 @@ inline int V4L2_PIX_2_HAL_PIXEL_FORMAT(int V4L2_PIX) break; default: - LOGE("%s::unmatched V4L2_PIX color_space(%d)\n", + ALOGE("%s::unmatched V4L2_PIX color_space(%d)\n", __func__, V4L2_PIX); break; } @@ -319,7 +319,7 @@ inline unsigned int FRAME_SIZE(int HAL_PIXEL_FORMAT, int w, int h) break; default: - LOGD("%s::no matching source colorformat(0x%x), w(%d), h(%d) fail\n", + ALOGD("%s::no matching source colorformat(0x%x), w(%d), h(%d) fail\n", __func__, HAL_PIXEL_FORMAT, w, h); break; } diff --git a/exynos5/hal/libcamera/SecCamera.cpp b/exynos5/hal/libcamera/SecCamera.cpp index 2b434c5..bd18479 100644 --- a/exynos5/hal/libcamera/SecCamera.cpp +++ b/exynos5/hal/libcamera/SecCamera.cpp @@ -23,8 +23,8 @@ ************************************* */ -//#define LOG_NDEBUG 0 -#define LOG_TAG "SecCamera" +//#define ALOG_NDEBUG 0 +#define ALOG_TAG "SecCamera" #include <utils/Log.h> #include <string.h> @@ -40,14 +40,14 @@ using namespace android; #define CHECK(return_value) \ if (return_value < 0) { \ - LOGE("%s::%d fail. errno: %s, m_camera_id = %d", \ + ALOGE("%s::%d fail. errno: %s, m_camera_id = %d", \ __func__, __LINE__, strerror(errno), m_camera_id); \ return -1; \ } #define CHECK_PTR(return_value) \ if (return_value < 0) { \ - LOGE("%s::%d fail, errno: %s, m_camera_id = %d", \ + ALOGE("%s::%d fail, errno: %s, m_camera_id = %d", \ __func__,__LINE__, strerror(errno), m_camera_id); \ return NULL; \ } @@ -60,7 +60,7 @@ static struct timeval time_start; static struct timeval time_stop; int cam_fd1, cam_fd2; -#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0 +#if defined(ALOG_NDEBUG) && LOG_NDEBUG == 0 unsigned long measure_time_camera(struct timeval *start, struct timeval *stop) { unsigned long sec, usec, time; @@ -87,14 +87,14 @@ static int gsc_cap_open(int id) id += GSC_VD_NODE_OFFSET; sprintf(node, "%s%d", PFX_NODE_GSC, id); - LOGE("(%s): %s%d", __func__, PFX_NODE_GSC, id); + ALOGE("(%s): %s%d", __func__, PFX_NODE_GSC, id); fd = open(node, O_RDWR, 0); if(fd < 0) { - LOGE("ERR(%s): Open gscaler video device failed", __func__); + ALOGE("ERR(%s): Open gscaler video device failed", __func__); return -1; } - LOGE("%s open", node); + ALOGE("%s open", node); return fd; } @@ -152,7 +152,7 @@ static int get_pixel_depth(unsigned int fmt) break; default: - LOGE("ERR(%s):Get depth failed.", __func__); + ALOGE("ERR(%s):Get depth failed.", __func__); break; } @@ -168,12 +168,12 @@ static int gsc_cap_poll(struct pollfd *events) */ ret = poll(events, 1, 10000); if (ret < 0) { - LOGE("ERR(%s):poll error", __func__); + ALOGE("ERR(%s):poll error", __func__); return ret; } if (ret == 0) { - LOGE("ERR(%s):No data in 10 secs..", __func__); + ALOGE("ERR(%s):No data in 10 secs..", __func__); return ret; } @@ -185,16 +185,16 @@ static int v4l2_gsc_cap_querycap(int fp) struct v4l2_capability cap; if (ioctl(fp, VIDIOC_QUERYCAP, &cap) < 0) { - LOGE("ERR(%s):VIDIOC_QUERYCAP failed", __func__); + ALOGE("ERR(%s):VIDIOC_QUERYCAP failed", __func__); return -1; } if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE_MPLANE)) { - LOGE("ERR(%s):no capture devices", __func__); + ALOGE("ERR(%s):no capture devices", __func__); return -1; } if (!(cap.capabilities & V4L2_CAP_STREAMING)) { - LOGE("ERR(%s):no streaming capture devices", __func__); + ALOGE("ERR(%s):no streaming capture devices", __func__); return -1; } @@ -207,10 +207,10 @@ static const __u8* v4l2_gsc_cap_enuminput(int fp, int index) input.index = index; if (ioctl(fp, VIDIOC_ENUMINPUT, &input) != 0) { - LOGE("ERR(%s):No matching index found", __func__); + ALOGE("ERR(%s):No matching index found", __func__); return NULL; } - LOGI("Name of input channel[%d] is %s", input.index, input.name); + ALOGI("Name of input channel[%d] is %s", input.index, input.name); return input.name; } @@ -222,7 +222,7 @@ static int v4l2_gsc_cap_s_input(int fp, int index) input.index = index; if (ioctl(fp, VIDIOC_S_INPUT, &input) < 0) { - LOGE("ERR(%s):VIDIOC_S_INPUT failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_INPUT failed", __func__); return -1; } @@ -236,7 +236,7 @@ static int v4l2_gsc_cap_g_fmt(int fp) v4l2_fmt.type = V4L2_BUF_TYPE; if(ioctl(fp, VIDIOC_G_FMT, &v4l2_fmt) < 0){ - LOGE("ERR(%s):VIDIOC_G_FMT failed", __func__); + ALOGE("ERR(%s):VIDIOC_G_FMT failed", __func__); return -1; } @@ -268,14 +268,14 @@ static int v4l2_gsc_cap_s_fmt(int fp, int width, int height, unsigned int fmt, e v4l2_fmt.fmt.pix_mp.plane_fmt[1].sizeimage = ALIGN(width/2, 8) * ALIGN(height/2, 8); v4l2_fmt.fmt.pix_mp.plane_fmt[2].sizeimage = ALIGN(width/2, 8) * ALIGN(height/2, 8); } else { - LOGE("ERR(%s): Invalid plane number", __func__); + ALOGE("ERR(%s): Invalid plane number", __func__); return -1; } v4l2_fmt.fmt.pix_mp.num_planes = num_plane; /* Set up for capture */ if (ioctl(fp, VIDIOC_S_FMT, &v4l2_fmt) < 0) { - LOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); return -1; } @@ -301,7 +301,7 @@ static int v4l2_gsc_cap_s_fmt_cap(int fp, int width, int height, unsigned int fm /* Set up for capture */ if (ioctl(fp, VIDIOC_S_FMT, &v4l2_fmt) < 0) { - LOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); return -1; } @@ -326,7 +326,7 @@ int v4l2_gsc_cap_s_fmt_is(int fp, int width, int height, unsigned int fmt, enum /* Set up for capture */ if (ioctl(fp, VIDIOC_S_FMT, &v4l2_fmt) < 0) { - LOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_FMT failed", __func__); return -1; } @@ -343,7 +343,7 @@ static int v4l2_gsc_cap_enum_fmt(int fp, unsigned int fmt) while (ioctl(fp, VIDIOC_ENUM_FMT, &fmtdesc) == 0) { if (fmtdesc.pixelformat == fmt) { - LOGV("Passed fmt = %#x found pixel format[%d]: %s", fmt, fmtdesc.index, fmtdesc.description); + ALOGV("Passed fmt = %#x found pixel format[%d]: %s", fmt, fmtdesc.index, fmtdesc.description); found = 1; break; } @@ -352,7 +352,7 @@ static int v4l2_gsc_cap_enum_fmt(int fp, unsigned int fmt) } if (!found) { - LOGE("unsupported pixel format"); + ALOGE("unsupported pixel format"); return -1; } @@ -368,12 +368,12 @@ static int v4l2_gsc_cap_reqbufs(int fp, enum v4l2_buf_type type, int nr_bufs) req.memory = V4L2_MEMORY_TYPE; if (ioctl(fp, VIDIOC_REQBUFS, &req) < 0) { - LOGE("ERR(%s):VIDIOC_REQBUFS failed", __func__); + ALOGE("ERR(%s):VIDIOC_REQBUFS failed", __func__); return -1; } if (req.count > MAX_BUFFERS ) { - LOGE("ERR(%s):Insufficient buffer memory on", __func__); + ALOGE("ERR(%s):Insufficient buffer memory on", __func__); return -1; } @@ -392,28 +392,28 @@ static int v4l2_gsc_cap_querybuf(int fp, struct SecBuffer *buffers, enum v4l2_bu v4l2_buf.index = i; v4l2_buf.m.planes = planes; v4l2_buf.length = num_plane; // this is for multi-planar - LOGV("QUERYBUF(index=%d)", i); - LOGV("Memory plane is %d", v4l2_buf.length); + ALOGV("QUERYBUF(index=%d)", i); + ALOGV("Memory plane is %d", v4l2_buf.length); if (ioctl(fp, VIDIOC_QUERYBUF, &v4l2_buf) < 0) { - LOGE("ERR(%s):VIDIOC_QUERYBUF failed", __func__); + ALOGE("ERR(%s):VIDIOC_QUERYBUF failed", __func__); return -1; } for (plane_index = 0; plane_index < num_plane; plane_index++) { - LOGV("Offset : 0x%x", v4l2_buf.m.planes[plane_index].m.mem_offset); - LOGV("Plane Length : 0x%x", v4l2_buf.m.planes[plane_index].length); + ALOGV("Offset : 0x%x", v4l2_buf.m.planes[plane_index].m.mem_offset); + ALOGV("Plane Length : 0x%x", v4l2_buf.m.planes[plane_index].length); buffers[i].phys.extP[plane_index] = (unsigned int)v4l2_buf.m.planes[plane_index].cookie; buffers[i].size.extS[plane_index] = v4l2_buf.m.planes[plane_index].length; - LOGV("Length[%d] : 0x%x", i, buffers[i].size.extS[plane_index]); + ALOGV("Length[%d] : 0x%x", i, buffers[i].size.extS[plane_index]); if ((buffers[i].virt.extP[plane_index] = (char *)mmap(0, v4l2_buf.m.planes[plane_index].length, PROT_READ | PROT_WRITE, MAP_SHARED, fp, v4l2_buf.m.planes[plane_index].m.mem_offset)) < 0) { - LOGE("mmap failed"); + ALOGE("mmap failed"); return -1; } - LOGV("vaddr[%d][%d] : 0x%x", i, plane_index, (__u32) buffers[i].virt.extP[plane_index]); + ALOGV("vaddr[%d][%d] : 0x%x", i, plane_index, (__u32) buffers[i].virt.extP[plane_index]); } } return 0; @@ -424,10 +424,10 @@ static int v4l2_gsc_cap_streamon(int fp) enum v4l2_buf_type type = V4L2_BUF_TYPE; int ret; - LOGV("%s : On streaming I/O", __func__); + ALOGV("%s : On streaming I/O", __func__); ret = ioctl(fp, VIDIOC_STREAMON, &type); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_STREAMON failed", __func__); + ALOGE("ERR(%s):VIDIOC_STREAMON failed", __func__); return ret; } @@ -439,10 +439,10 @@ static int v4l2_gsc_cap_streamoff(int fp) enum v4l2_buf_type type = V4L2_BUF_TYPE; int ret; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); ret = ioctl(fp, VIDIOC_STREAMOFF, &type); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_STREAMOFF failed", __func__); + ALOGE("ERR(%s):VIDIOC_STREAMOFF failed", __func__); return ret; } @@ -480,7 +480,7 @@ static int v4l2_gsc_cap_qbuf(int fp, int width, int height, struct SecBuffer *va v4l2_buf.m.planes[2].m.userptr = (long unsigned int)vaddr[index].virt.extP[2]; v4l2_buf.m.planes[2].length = ALIGN(width/2, 8) * ALIGN(height/2, 8); } else { - LOGE("ERR(%s): Invalid plane number", __func__); + ALOGE("ERR(%s): Invalid plane number", __func__); return -1; } } @@ -496,7 +496,7 @@ static int v4l2_gsc_cap_qbuf(int fp, int width, int height, struct SecBuffer *va ret = ioctl(fp, VIDIOC_QBUF, &v4l2_buf); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_QBUF failed", __func__); + ALOGE("ERR(%s):VIDIOC_QBUF failed", __func__); return ret; } @@ -518,7 +518,7 @@ static int v4l2_gsc_cap_dqbuf(int fp, int num_plane) ret = ioctl(fp, VIDIOC_DQBUF, &v4l2_buf); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_DQBUF failed, dropped frame", __func__); + ALOGE("ERR(%s):VIDIOC_DQBUF failed, dropped frame", __func__); return ret; } @@ -534,7 +534,7 @@ static int v4l2_gsc_cap_g_ctrl(int fp, unsigned int id) ret = ioctl(fp, VIDIOC_G_CTRL, &ctrl); if (ret < 0) { - LOGE("ERR(%s): VIDIOC_G_CTRL(id = 0x%x (%d)) failed, ret = %d", + ALOGE("ERR(%s): VIDIOC_G_CTRL(id = 0x%x (%d)) failed, ret = %d", __func__, id, id-V4L2_CID_PRIVATE_BASE, ret); return ret; } @@ -552,7 +552,7 @@ static int v4l2_gsc_cap_s_ctrl(int fp, unsigned int id, unsigned int value) ret = ioctl(fp, VIDIOC_S_CTRL, &ctrl); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_S_CTRL(id = %#x (%d), value = %d) failed ret = %d", + ALOGE("ERR(%s):VIDIOC_S_CTRL(id = %#x (%d), value = %d) failed ret = %d", __func__, id, id-V4L2_CID_PRIVATE_BASE, value, ret); return ret; @@ -575,7 +575,7 @@ static int v4l2_gsc_cap_s_ext_ctrl(int fp, unsigned int id, void *value) ret = ioctl(fp, VIDIOC_S_EXT_CTRLS, &ctrls); if (ret < 0) - LOGE("ERR(%s):VIDIOC_S_EXT_CTRLS failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_EXT_CTRLS failed", __func__); return ret; } @@ -588,11 +588,11 @@ static int v4l2_gsc_cap_g_parm(int fp, struct v4l2_streamparm *streamparm) ret = ioctl(fp, VIDIOC_G_PARM, streamparm); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_G_PARM failed", __func__); + ALOGE("ERR(%s):VIDIOC_G_PARM failed", __func__); return ret; } - LOGV("%s : timeperframe: numerator %d, denominator %d", __func__, + ALOGV("%s : timeperframe: numerator %d, denominator %d", __func__, streamparm->parm.capture.timeperframe.numerator, streamparm->parm.capture.timeperframe.denominator); @@ -607,7 +607,7 @@ static int v4l2_gsc_cap_s_parm(int fp, struct v4l2_streamparm *streamparm) ret = ioctl(fp, VIDIOC_S_PARM, streamparm); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_S_PARM failed", __func__); + ALOGE("ERR(%s):VIDIOC_S_PARM failed", __func__); return ret; } @@ -620,7 +620,7 @@ static int v4l2_subdev_open(struct media_entity *entity) fd = open(entity->devname, O_RDWR, 0); if(fd < 0){ - LOGE("ERR(%s): Open failed.", __func__); + ALOGE("ERR(%s): Open failed.", __func__); return -1; } @@ -630,7 +630,7 @@ static int v4l2_subdev_open(struct media_entity *entity) static int v4l2_subdev_get_fmt(int fd, struct v4l2_subdev_format *fmt) { if(ioctl(fd, VIDIOC_SUBDEV_G_FMT, fmt)) { - LOGE("ERR(%s): subdev get foramt failed.", __func__); + ALOGE("ERR(%s): subdev get foramt failed.", __func__); return -1; } @@ -718,18 +718,18 @@ SecCamera::SecCamera() : SecCamera::~SecCamera() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); DestroyCamera(); } bool SecCamera::CreateCamera(int index) { - LOGV("%s:", __func__); + ALOGV("%s:", __func__); char node[30]; int i; int ret = 0; - LOGV("%s: m_flagCreate : %d", __func__, m_flagCreate); + ALOGV("%s: m_flagCreate : %d", __func__, m_flagCreate); if (!m_flagCreate) { /* Arun C * Reset the lense position only during camera starts; don't do @@ -739,11 +739,11 @@ bool SecCamera::CreateCamera(int index) m_camera_af_flag = -1; /* media device open */ - LOGV("%s: m_flagCreate : %d", __func__, m_flagCreate); + ALOGV("%s: m_flagCreate : %d", __func__, m_flagCreate); media = media_open(); if (media == NULL) { - LOGE("ERR(%s):Cannot open media device (error : %s)", __func__, strerror(errno)); + ALOGE("ERR(%s):Cannot open media device (error : %s)", __func__, strerror(errno)); return -1; } @@ -753,39 +753,39 @@ bool SecCamera::CreateCamera(int index) ////////////////// /* camera subdev */ strcpy(node, M5MOLS_ENTITY_NAME); - LOGV("%s : node : %s", __func__, node); + ALOGV("%s : node : %s", __func__, node); camera_sd_entity = media_get_entity_by_name(media, node, strlen(node)); - LOGV("%s : camera_sd_entity : 0x%p", __func__, camera_sd_entity); + ALOGV("%s : camera_sd_entity : 0x%p", __func__, camera_sd_entity); /* mipi-csis subdev */ sprintf(node, "%s.%d", PFX_SUBDEV_ENTITY_MIPI_CSIS, MIPI_NUM); - LOGV("%s : node : %s", __func__, node); + ALOGV("%s : node : %s", __func__, node); mipi_sd_entity = media_get_entity_by_name(media, node, strlen(node)); - LOGV("%s : mipi_sd_entity : 0x%p", __func__, mipi_sd_entity); + ALOGV("%s : mipi_sd_entity : 0x%p", __func__, mipi_sd_entity); /* fimc-lite subdev */ sprintf(node, "%s.%d", PFX_SUBDEV_ENTITY_FLITE, FLITE_NUM); - LOGV("%s : node : %s", __func__, node); + ALOGV("%s : node : %s", __func__, node); flite_sd_entity = media_get_entity_by_name(media, node, strlen(node)); - LOGV("%s : flite_sd_entity : 0x%p", __func__, flite_sd_entity); + ALOGV("%s : flite_sd_entity : 0x%p", __func__, flite_sd_entity); /* gscaler-capture subdev */ sprintf(node, "%s.%d", PFX_SUBDEV_ENTITY_GSC_CAP, GSC_NUM); - LOGV("%s : node : %s", __func__, node); + ALOGV("%s : node : %s", __func__, node); gsc_cap_sd_entity = media_get_entity_by_name(media, node, strlen(node)); - LOGV("%s : gsc_cap_sd_entity : 0x%p", __func__, gsc_cap_sd_entity); + ALOGV("%s : gsc_cap_sd_entity : 0x%p", __func__, gsc_cap_sd_entity); /* gscaler-capture subdev */ sprintf(node, "%s.%d", PFX_VIDEODEV_ENTITY_GSC_CAP, GSC_NUM); - LOGV("%s : node : %s", __func__, node); + ALOGV("%s : node : %s", __func__, node); gsc_cap_vd_entity = media_get_entity_by_name(media, node, strlen(node)); - LOGV("%s : gsc_cap_vd_entity : 0x%p", __func__, gsc_cap_vd_entity); + ALOGV("%s : gsc_cap_vd_entity : 0x%p", __func__, gsc_cap_vd_entity); - LOGV("camera_sd : numlink : %d", camera_sd_entity->num_links); - LOGV("mipi_sd : numlink : %d", mipi_sd_entity->num_links); - LOGV("flite_sd : numlink : %d", flite_sd_entity->num_links); - LOGV("gsc_cap_sd : numlink : %d", gsc_cap_sd_entity->num_links); - LOGV("gsc_cap_vd : numlink : %d", gsc_cap_vd_entity->num_links); + ALOGV("camera_sd : numlink : %d", camera_sd_entity->num_links); + ALOGV("mipi_sd : numlink : %d", mipi_sd_entity->num_links); + ALOGV("flite_sd : numlink : %d", flite_sd_entity->num_links); + ALOGV("gsc_cap_sd : numlink : %d", gsc_cap_sd_entity->num_links); + ALOGV("gsc_cap_vd : numlink : %d", gsc_cap_vd_entity->num_links); ////////////////// /* SETUP LINKS */ @@ -795,68 +795,68 @@ bool SecCamera::CreateCamera(int index) if (links == NULL || links->source->entity != camera_sd_entity || links->sink->entity != mipi_sd_entity) { - LOGE("ERR(%s): Cannot make link camera sensor to mipi-csis", __func__); + ALOGE("ERR(%s): Cannot make link camera sensor to mipi-csis", __func__); return -1; } if (media_setup_link(media, links->source, links->sink, MEDIA_LNK_FL_ENABLED) < 0) { - LOGE("ERR(%s): Cannot make setup camera sensor to mipi-csis", __func__); + ALOGE("ERR(%s): Cannot make setup camera sensor to mipi-csis", __func__); return -1; } - LOGV("[LINK SUCCESS] camera seneor to mipi-csis"); + ALOGV("[LINK SUCCESS] camera seneor to mipi-csis"); /*mipi-csis to fimc-lite*/ for(i = 0; i < mipi_sd_entity->num_links; i++) { links = &mipi_sd_entity->links[i]; - LOGV("(%s), i=%d: links->source->entity : %p, mipi_sd_entity : %p", __func__, i, + ALOGV("(%s), i=%d: links->source->entity : %p, mipi_sd_entity : %p", __func__, i, links->source->entity, mipi_sd_entity); - LOGV("(%s), i=%d: links->sink->entity : %p, flite_sd_entity : %p", __func__, i, + ALOGV("(%s), i=%d: links->sink->entity : %p, flite_sd_entity : %p", __func__, i, links->sink->entity, flite_sd_entity); if (links == NULL || links->source->entity != mipi_sd_entity || links->sink->entity != flite_sd_entity) { continue; } else if (media_setup_link(media, links->source, links->sink, MEDIA_LNK_FL_ENABLED) < 0) { - LOGE("ERR(%s): Cannot make setup mipi-csis to fimc-lite", __func__); + ALOGE("ERR(%s): Cannot make setup mipi-csis to fimc-lite", __func__); return -1; } } - LOGV("[LINK SUCCESS] mipi-csis to fimc-lite"); + ALOGV("[LINK SUCCESS] mipi-csis to fimc-lite"); /*fimc-lite to gscaler capture device*/ for(i = 0; i < gsc_cap_sd_entity->num_links; i++) { links = &gsc_cap_sd_entity->links[i]; - LOGV("(%s), i=%d: links->source->entity : %p, flite_sd_entity : %p", __func__, i, + ALOGV("(%s), i=%d: links->source->entity : %p, flite_sd_entity : %p", __func__, i, links->source->entity, flite_sd_entity); - LOGV("(%s), i=%d: links->sink->entity : %p, gsc_cap_sd_entity : %p", __func__, i, + ALOGV("(%s), i=%d: links->sink->entity : %p, gsc_cap_sd_entity : %p", __func__, i, links->sink->entity, gsc_cap_sd_entity); if (links == NULL || links->source->entity != flite_sd_entity || links->sink->entity != gsc_cap_sd_entity) { continue; } else if (media_setup_link(media, links->source, links->sink, MEDIA_LNK_FL_ENABLED) < 0) { - LOGE("ERR(%s): Cannot make setup fimc-lite to gscaler capture device", __func__); + ALOGE("ERR(%s): Cannot make setup fimc-lite to gscaler capture device", __func__); return -1; } } - LOGV("[LINK SUCCESS] fimc-lite to gscaler capture device"); + ALOGV("[LINK SUCCESS] fimc-lite to gscaler capture device"); /*gscaler capture device to gscaler video device*/ for(i = 0; i < gsc_cap_vd_entity->num_links; i++) { links = &gsc_cap_vd_entity->links[i]; - LOGV("(%s), i=%d: links->source->entity : %p, gsc_cap_sd_entity : %p", __func__, i, + ALOGV("(%s), i=%d: links->source->entity : %p, gsc_cap_sd_entity : %p", __func__, i, links->source->entity, gsc_cap_sd_entity); - LOGV("(%s), i=%d: links->sink->entity : %p, gsc_cap_vd_entity : %p", __func__, i, + ALOGV("(%s), i=%d: links->sink->entity : %p, gsc_cap_vd_entity : %p", __func__, i, links->sink->entity, gsc_cap_vd_entity); if (links == NULL || links->source->entity != gsc_cap_sd_entity || links->sink->entity != gsc_cap_vd_entity) { continue; } else if (media_setup_link(media, links->source, links->sink, MEDIA_LNK_FL_ENABLED) < 0) { - LOGE("ERR(%s): Cannot make setup gscaler capture device to gscaler video device", __func__); + ALOGE("ERR(%s): Cannot make setup gscaler capture device to gscaler video device", __func__); return -1; } } - LOGV("[LINK SUCCESS] gscaler capture device to gscaler video device"); + ALOGV("[LINK SUCCESS] gscaler capture device to gscaler video device"); #else ////////////////////////////// // internal IS @@ -895,12 +895,12 @@ bool SecCamera::CreateCamera(int index) strcpy(node, ISP_VIDEO_3DNR_NAME); isp_3dnr_entity = media_get_entity_by_name(media, node, strlen(node)); - LOGV("isp_sensor_entity : numlink : %d", isp_sensor_entity->num_links); - LOGV("isp_front_entity : numlink : %d", isp_front_entity->num_links); - LOGV("isp_back_entity : numlink : %d", isp_back_entity->num_links); - LOGV("isp_scalerc_entity : numlink : %d", isp_scalerc_entity->num_links); - LOGV("isp_scalerp_entity : numlink : %d", isp_scalerp_entity->num_links); - LOGV("isp_3dnr_entity : numlink : %d", isp_3dnr_entity->num_links); + ALOGV("isp_sensor_entity : numlink : %d", isp_sensor_entity->num_links); + ALOGV("isp_front_entity : numlink : %d", isp_front_entity->num_links); + ALOGV("isp_back_entity : numlink : %d", isp_back_entity->num_links); + ALOGV("isp_scalerc_entity : numlink : %d", isp_scalerc_entity->num_links); + ALOGV("isp_scalerp_entity : numlink : %d", isp_scalerp_entity->num_links); + ALOGV("isp_3dnr_entity : numlink : %d", isp_3dnr_entity->num_links); ////////////////// /* SETUP LINKS */ @@ -910,14 +910,14 @@ bool SecCamera::CreateCamera(int index) if (links == NULL || links->source->entity != isp_sensor_entity || links->sink->entity != isp_front_entity) { - LOGE("[ERR] Can not make link isp_sensor to isp_front\n"); + ALOGE("[ERR] Can not make link isp_sensor to isp_front\n"); return -1; } if(media_setup_link(media, links->source, links->sink, MEDIA_LNK_FL_ENABLED) < 0) { - LOGE("[ERR] Can not make setup isp_sensor to isp_front\n"); + ALOGE("[ERR] Can not make setup isp_sensor to isp_front\n"); return -1; } - LOGV("[LINK SUCCESS] Sensor to front"); + ALOGV("[LINK SUCCESS] Sensor to front"); /* FRONT TO BACK */ for (i = 0; i < isp_front_entity->num_links; i++){ @@ -925,17 +925,17 @@ bool SecCamera::CreateCamera(int index) if (links == NULL || links->source->entity != isp_front_entity || links->sink->entity != isp_back_entity) { - LOGV("(%s), i=%d: links->source->entity : %p, isp_front_entity : %p", __func__, i, + ALOGV("(%s), i=%d: links->source->entity : %p, isp_front_entity : %p", __func__, i, links->source->entity, isp_front_entity); - LOGV("(%s), i=%d: links->sink->entity : %p, isp_back_entity : %p", __func__, i, + ALOGV("(%s), i=%d: links->sink->entity : %p, isp_back_entity : %p", __func__, i, links->sink->entity, isp_back_entity); continue; } else if(media_setup_link(media, links->source, links->sink, MEDIA_LNK_FL_ENABLED) < 0) { - LOGE("[ERR] Can not make setup isp_front to isp_back\n"); + ALOGE("[ERR] Can not make setup isp_front to isp_back\n"); return -1; } } - LOGV("[LINK SUCCESS] front to back"); + ALOGV("[LINK SUCCESS] front to back"); /* BACK TO ScalerP Video*/ for (i = 0; i < isp_back_entity->num_links; i++){ @@ -943,30 +943,30 @@ bool SecCamera::CreateCamera(int index) if (links == NULL || links->source->entity != isp_back_entity || links->sink->entity != isp_scalerp_entity) { - LOGV("(%s), i=%d: links->source->entity : %p, isp_front_entity : %p", __func__, i, + ALOGV("(%s), i=%d: links->source->entity : %p, isp_front_entity : %p", __func__, i, links->source->entity, isp_front_entity); - LOGV("(%s), i=%d: links->sink->entity : %p, isp_back_entity : %p", __func__, i, + ALOGV("(%s), i=%d: links->sink->entity : %p, isp_back_entity : %p", __func__, i, links->sink->entity, isp_back_entity); continue; } if(media_setup_link(media, links->source, links->sink, MEDIA_LNK_FL_ENABLED) < 0) { - LOGE("[ERR] Can not make setup isp_back to scalerP\n"); + ALOGE("[ERR] Can not make setup isp_back to scalerP\n"); return -1; } } - LOGV("[LINK SUCCESS] back to scalerP"); + ALOGV("[LINK SUCCESS] back to scalerP"); #endif m_gsc_vd_fd = gsc_cap_open(0); cam_fd1 = m_gsc_vd_fd; if (m_gsc_vd_fd < 0) { - LOGE("ERR(%s):Cannot open %s (error : %s)", __func__, PFX_NODE_GSC, strerror(errno)); + ALOGE("ERR(%s):Cannot open %s (error : %s)", __func__, PFX_NODE_GSC, strerror(errno)); return -1; } #ifndef GAIA_FW_BETA if (!v4l2_gsc_cap_enuminput(m_gsc_vd_fd, index)) { - LOGE("m_gsc_vd_fd(%d) v4l2_gsc_cap_enuminput fail", m_gsc_vd_fd); + ALOGE("m_gsc_vd_fd(%d) v4l2_gsc_cap_enuminput fail", m_gsc_vd_fd); return -1; } @@ -999,14 +999,14 @@ bool SecCamera::CreateCamera(int index) void SecCamera::resetCamera() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); DestroyCamera(); CreateCamera(m_camera_id); } bool SecCamera::DestroyCamera() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_flagCreate) { @@ -1015,13 +1015,13 @@ bool SecCamera::DestroyCamera() /* close m_gsc_vd_fd after stopRecord() because stopRecord() * uses m_gsc_vd_fd to change frame rate */ - LOGI("DestroyCamera: m_gsc_vd_fd(%d)", m_gsc_vd_fd); + ALOGI("DestroyCamera: m_gsc_vd_fd(%d)", m_gsc_vd_fd); if (m_gsc_vd_fd > -1) { close(m_gsc_vd_fd); m_gsc_vd_fd = -1; } - LOGI("DestroyCamera: m_cam_fd2(%d)", m_cam_fd2); + ALOGI("DestroyCamera: m_cam_fd2(%d)", m_cam_fd2); if (m_cam_fd2 > -1) { close(m_cam_fd2); m_cam_fd2 = -1; @@ -1029,7 +1029,7 @@ bool SecCamera::DestroyCamera() m_flagCreate = 0; } else - LOGI("%s : already deinitialized", __func__); + ALOGI("%s : already deinitialized", __func__); return 0; } @@ -1051,16 +1051,16 @@ int SecCamera::startPreview(void) int ret; parms = (struct sec_cam_parm*)&streamparm.parm.raw_data; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); // check preview is aleady started. if (m_flag_camera_start > 0) { - LOGE("ERR(%s):Preview was already started", __func__); + ALOGE("ERR(%s):Preview was already started", __func__); return 0; } if (m_gsc_vd_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -1074,7 +1074,7 @@ int SecCamera::startPreview(void) CHECK(ret); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); - LOGV("Internal_is(%d), %s", Internal_is, (const char*)getCameraSensorName()); + ALOGV("Internal_is(%d), %s", Internal_is, (const char*)getCameraSensorName()); if (Internal_is) { if (!m_recording_en) @@ -1104,10 +1104,10 @@ int SecCamera::startPreview(void) ret = v4l2_gsc_cap_reqbufs(m_gsc_vd_fd, V4L2_BUF_TYPE, MAX_BUFFERS); CHECK(ret); - LOGV("%s : m_preview_width: %d m_preview_height: %d m_angle: %d", + ALOGV("%s : m_preview_width: %d m_preview_height: %d m_angle: %d", __func__, m_preview_width, m_preview_height, m_angle); - LOGV("m_camera_id : %d", m_camera_id); + ALOGV("m_camera_id : %d", m_camera_id); /* start with all buffers in queue */ for (int i = 0; i < MAX_BUFFERS; i++) { @@ -1121,10 +1121,10 @@ int SecCamera::startPreview(void) m_flag_camera_start = 1; /* TO DO : Frame Rate set is will be availeable. if (setFrameRate(m_params->capture.timeperframe.denominator) < 0) - LOGE("ERR(%s):Fail on setFrameRate(%d)", + ALOGE("ERR(%s):Fail on setFrameRate(%d)", __func__, m_params->capture.timeperframe.denominator); */ - LOGV("%s: got the first frame of the preview", __func__); + ALOGV("%s: got the first frame of the preview", __func__); return 0; } @@ -1133,10 +1133,10 @@ int SecCamera::stopPreview(void) { int ret; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_flag_camera_start == 0) { - LOGW("%s: doing nothing because m_flag_camera_start is zero", __func__); + ALOGW("%s: doing nothing because m_flag_camera_start is zero", __func__); return 0; } @@ -1144,7 +1144,7 @@ int SecCamera::stopPreview(void) setFlashMode(FLASH_MODE_OFF); if (m_gsc_vd_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -1165,16 +1165,16 @@ int SecCamera::startRecord(void) { int ret, i; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); // aleady started if (m_flag_record_start > 0) { - LOGE("ERR(%s):Preview was already started", __func__); + ALOGE("ERR(%s):Preview was already started", __func__); return 0; } if (m_cam_fd2 <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -1182,11 +1182,11 @@ int SecCamera::startRecord(void) ret = v4l2_gsc_cap_enum_fmt(m_cam_fd2, RECORD_PIX_FMT); CHECK(ret); - LOGI("%s: m_recording_width = %d, m_recording_height = %d", + ALOGI("%s: m_recording_width = %d, m_recording_height = %d", __func__, m_recording_width, m_recording_height); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); - LOGV("Internal_is(%d), %s", Internal_is, (const char*)getCameraSensorName()); + ALOGV("Internal_is(%d), %s", Internal_is, (const char*)getCameraSensorName()); // if (Internal_is) // v4l2_gsc_cap_s_fmt_is(m_cam_fd2, m_recording_width, m_recording_height, RECORD_PIX_FMT, (enum v4l2_field) IS_MODE_CAPTURE_VIDEO); @@ -1221,15 +1221,15 @@ int SecCamera::stopRecord(void) { int ret; - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_flag_record_start == 0) { - LOGW("%s: doing nothing because m_flag_record_start is zero", __func__); + ALOGW("%s: doing nothing because m_flag_record_start is zero", __func__); return 0; } if (m_cam_fd2 <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -1270,7 +1270,7 @@ void SecCamera::setUserBufferAddr(void *ptr, int index, int mode) m_buffers_record[index].virt.extP[0] = (char *)ptr; m_buffers_record[index].virt.extP[1] = (char *)ptr + ((ALIGN(m_recording_width, 16) * ALIGN(m_recording_height, 16))); } else - LOGE("%s: Invalid fd!!!", __func__); + ALOGE("%s: Invalid fd!!!", __func__); } int SecCamera::getPreview() @@ -1278,9 +1278,9 @@ int SecCamera::getPreview() int index; int ret; - LOGV("%s: ", __func__); + ALOGV("%s: ", __func__); if (m_flag_camera_start == 0 || gsc_cap_poll(&m_events_c) == 0) { - LOGE("ERR(%s):Start Camera Device Reset", __func__); + ALOGE("ERR(%s):Start Camera Device Reset", __func__); /* * When there is no data for more than 1 second from the camera we inform * the FIMC driver by calling v4l2_gsc_cap_s_input() with a special value = 1000 @@ -1301,14 +1301,14 @@ int SecCamera::getPreview() return -1; ret = startPreview(); if (ret < 0) { - LOGE("ERR(%s): startPreview() return %d", __func__, ret); + ALOGE("ERR(%s): startPreview() return %d", __func__, ret); return 0; } } index = v4l2_gsc_cap_dqbuf(m_gsc_vd_fd, PREVIEW_NUM_PLANE); if (!(0 <= index && index < MAX_BUFFERS)) { - LOGE("ERR(%s):wrong index = %d", __func__, index); + ALOGE("ERR(%s):wrong index = %d", __func__, index); return -1; } @@ -1327,14 +1327,14 @@ int SecCamera::setPreviewFrame(int index) int SecCamera::getRecordFrame() { if (m_flag_record_start == 0) { - LOGE("%s: m_flag_record_start is 0", __func__); + ALOGE("%s: m_flag_record_start is 0", __func__); return -1; } gsc_cap_poll(&m_events_c2); int index = v4l2_gsc_cap_dqbuf(m_cam_fd2, RECORD_NUM_PLANE); if (!(0 <= index && index < MAX_BUFFERS)) { - LOGE("ERR(%s):wrong index = %d", __func__, index); + ALOGE("ERR(%s):wrong index = %d", __func__, index); return -1; } @@ -1350,7 +1350,7 @@ int SecCamera::releaseRecordFrame(int index) * cases where fimc could crash if we called qbuf and it * wasn't expecting it. */ - LOGI("%s: recording not in progress, ignoring", __func__); + ALOGI("%s: recording not in progress, ignoring", __func__); return 0; } @@ -1359,33 +1359,33 @@ int SecCamera::releaseRecordFrame(int index) int SecCamera::setPreviewSize(int width, int height, int pixel_format) { - LOGV("%s(width(%d), height(%d), format(%d))", __func__, width, height, pixel_format); + ALOGV("%s(width(%d), height(%d), format(%d))", __func__, width, height, pixel_format); int v4lpixelformat = pixel_format; -#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0 +#if defined(ALOG_NDEBUG) && LOG_NDEBUG == 0 if (v4lpixelformat == V4L2_PIX_FMT_YUV420) - LOGV("PreviewFormat:V4L2_PIX_FMT_YUV420"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_YUV420"); else if (v4lpixelformat == V4L2_PIX_FMT_YVU420) - LOGV("PreviewFormat:V4L2_PIX_FMT_YVU420"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_YVU420"); else if (v4lpixelformat == V4L2_PIX_FMT_YVU420M) - LOGV("PreviewFormat:V4L2_PIX_FMT_YVU420M"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_YVU420M"); else if (v4lpixelformat == V4L2_PIX_FMT_NV12) - LOGV("PreviewFormat:V4L2_PIX_FMT_NV12"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_NV12"); else if (v4lpixelformat == V4L2_PIX_FMT_NV12M) - LOGV("PreviewFormat:V4L2_PIX_FMT_NV12M"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_NV12M"); else if (v4lpixelformat == V4L2_PIX_FMT_NV12T) - LOGV("PreviewFormat:V4L2_PIX_FMT_NV12T"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_NV12T"); else if (v4lpixelformat == V4L2_PIX_FMT_NV21) - LOGV("PreviewFormat:V4L2_PIX_FMT_NV21"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_NV21"); else if (v4lpixelformat == V4L2_PIX_FMT_YUV422P) - LOGV("PreviewFormat:V4L2_PIX_FMT_YUV422P"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_YUV422P"); else if (v4lpixelformat == V4L2_PIX_FMT_YUYV) - LOGV("PreviewFormat:V4L2_PIX_FMT_YUYV"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_YUYV"); else if (v4lpixelformat == V4L2_PIX_FMT_RGB565) - LOGV("PreviewFormat:V4L2_PIX_FMT_RGB565"); + ALOGV("PreviewFormat:V4L2_PIX_FMT_RGB565"); else - LOGV("PreviewFormat:UnknownFormat"); + ALOGV("PreviewFormat:UnknownFormat"); #endif m_preview_width = width; m_preview_height = height; @@ -1421,17 +1421,17 @@ int SecCamera::getPreviewPixelFormat(void) */ int SecCamera::setSnapshotCmd(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); int ret = 0; if (m_gsc_vd_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return 0; } if (m_flag_camera_start > 0) { - LOGW("WARN(%s):Camera was in preview, should have been stopped", __func__); + ALOGW("WARN(%s):Camera was in preview, should have been stopped", __func__); stopPreview(); } @@ -1465,10 +1465,10 @@ int SecCamera::endSnapshot(void) { int ret; - LOGI("%s :", __func__); + ALOGI("%s :", __func__); if (m_capture_buf.virt.extP[0]) { munmap(m_capture_buf.virt.extP[0], m_capture_buf.size.extS[0]); - LOGI("munmap():virt. addr %p size = %d", + ALOGI("munmap():virt. addr %p size = %d", m_capture_buf.virt.extP[0], m_capture_buf.size.extS[0]); m_capture_buf.virt.extP[0] = NULL; m_capture_buf.size.extS[0] = 0; @@ -1491,7 +1491,7 @@ unsigned char* SecCamera::getJpeg(int *jpeg_size, unsigned int *phyaddr) index = v4l2_gsc_cap_dqbuf(m_gsc_vd_fd, 1); if (index != 0) { - LOGE("ERR(%s):wrong index = %d", __func__, index); + ALOGE("ERR(%s):wrong index = %d", __func__, index); return NULL; } @@ -1505,7 +1505,7 @@ unsigned char* SecCamera::getJpeg(int *jpeg_size, unsigned int *phyaddr) ret = v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_STREAM_PAUSE, 0); CHECK_PTR(ret); - LOGV("\nsnapshot dqueued buffer = %d snapshot_width = %d snapshot_height = %d, size = %d", + ALOGV("\nsnapshot dqueued buffer = %d snapshot_width = %d snapshot_height = %d, size = %d", index, m_snapshot_width, m_snapshot_height, *jpeg_size); addr = (unsigned char*)(m_capture_buf.virt.extP[0]) + main_offset; @@ -1529,7 +1529,7 @@ void SecCamera::getPostViewConfig(int *width, int *height, int *size) *width = m_snapshot_width; *height = m_snapshot_height; *size = FRAME_SIZE(V4L2_PIX_2_HAL_PIXEL_FORMAT(m_snapshot_v4lformat), *width, *height); - LOGV("[5B] m_preview_width : %d, mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d", + ALOGV("[5B] m_preview_width : %d, mPostViewWidth = %d mPostViewHeight = %d mPostViewSize = %d", m_preview_width, *width, *height, *size); } @@ -1548,19 +1548,19 @@ int SecCamera::getPostViewOffset(void) int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_buf, unsigned int *output_size) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); int index; unsigned char *addr; int ret = 0; if (m_gsc_vd_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } if (m_flag_camera_start > 0) { - LOGW("WARN(%s):Camera was in preview, should have been stopped", __func__); + ALOGW("WARN(%s):Camera was in preview, should have been stopped", __func__); stopPreview(); } @@ -1568,25 +1568,25 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu m_events_c.fd = m_gsc_vd_fd; m_events_c.events = POLLIN | POLLERR; -#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0 +#if defined(ALOG_NDEBUG) && LOG_NDEBUG == 0 if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV420) - LOGV("SnapshotFormat:V4L2_PIX_FMT_YUV420"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_YUV420"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12) - LOGV("SnapshotFormat:V4L2_PIX_FMT_NV12"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_NV12"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12T) - LOGV("SnapshotFormat:V4L2_PIX_FMT_NV12T"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_NV12T"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV21) - LOGV("SnapshotFormat:V4L2_PIX_FMT_NV21"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_NV21"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV422P) - LOGV("SnapshotFormat:V4L2_PIX_FMT_YUV422P"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_YUV422P"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUYV) - LOGV("SnapshotFormat:V4L2_PIX_FMT_YUYV"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_YUYV"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_UYVY) - LOGV("SnapshotFormat:V4L2_PIX_FMT_UYVY"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_UYVY"); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_RGB565) - LOGV("SnapshotFormat:V4L2_PIX_FMT_RGB565"); + ALOGV("SnapshotFormat:V4L2_PIX_FMT_RGB565"); else - LOGV("SnapshotFormat:UnknownFormat"); + ALOGV("SnapshotFormat:UnknownFormat"); #endif int nframe = 1; @@ -1595,7 +1595,7 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu CHECK(ret); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); - LOGV("Internal_is(%d), %s", Internal_is, (const char*)getCameraSensorName()); + ALOGV("Internal_is(%d), %s", Internal_is, (const char*)getCameraSensorName()); ret = v4l2_gsc_cap_s_fmt_cap(m_gsc_vd_fd, m_snapshot_width, m_snapshot_height, m_snapshot_v4lformat); CHECK(ret); @@ -1631,7 +1631,7 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu #ifdef GAIA_FW_BETA ret = v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_STREAM_PAUSE, 0); CHECK_PTR(ret); - LOGV("\nsnapshot dequeued buffer = %d snapshot_width = %d snapshot_height = %d", + ALOGV("\nsnapshot dequeued buffer = %d snapshot_width = %d snapshot_height = %d", index, m_snapshot_width, m_snapshot_height); yuv_buf = (unsigned char*)m_capture_buf.virt.extP[0]; @@ -1646,7 +1646,7 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu int SecCamera::setSnapshotSize(int width, int height) { - LOGV("%s(width(%d), height(%d))", __func__, width, height); + ALOGV("%s(width(%d), height(%d))", __func__, width, height); m_snapshot_width = width; m_snapshot_height = height; @@ -1701,25 +1701,25 @@ int SecCamera::setSnapshotPixelFormat(int pixel_format) m_snapshot_v4lformat = v4lpixelformat; } -#if defined(LOG_NDEBUG) && LOG_NDEBUG == 0 +#if defined(ALOG_NDEBUG) && LOG_NDEBUG == 0 if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV420) - LOGE("%s : SnapshotFormat:V4L2_PIX_FMT_YUV420", __func__); + ALOGE("%s : SnapshotFormat:V4L2_PIX_FMT_YUV420", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12T) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12T", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12T", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV21) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV21", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV21", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUV422P) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUV422P", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUV422P", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_YUYV) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUYV", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_YUYV", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_UYVY) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_UYVY", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_UYVY", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_RGB565) - LOGD("%s : SnapshotFormat:V4L2_PIX_FMT_RGB565", __func__); + ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_RGB565", __func__); else - LOGD("SnapshotFormat:UnknownFormat"); + ALOGD("SnapshotFormat:UnknownFormat"); #endif return 0; } @@ -1736,15 +1736,15 @@ int SecCamera::getCameraId(void) int SecCamera::setAutofocus(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_gsc_vd_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_SET_AUTO_FOCUS, AUTO_FOCUS_ON) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_AUTO_FOCUS", __func__); return -1; } @@ -1757,17 +1757,17 @@ int SecCamera::getAutoFocusResult(void) af_result = v4l2_gsc_cap_g_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_AUTO_FOCUS_RESULT); - LOGV("%s : returning %d", __func__, af_result); + ALOGV("%s : returning %d", __func__, af_result); return af_result; } int SecCamera::cancelAutofocus(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_gsc_vd_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } @@ -1776,7 +1776,7 @@ int SecCamera::cancelAutofocus(void) int SecCamera::SetRotate(int angle) { - LOGE("%s(angle(%d))", __func__, angle); + ALOGE("%s(angle(%d))", __func__, angle); if (m_angle != angle) { switch (angle) { @@ -1802,13 +1802,13 @@ int SecCamera::SetRotate(int angle) break; default: - LOGE("ERR(%s):Invalid angle(%d)", __func__, angle); + ALOGE("ERR(%s):Invalid angle(%d)", __func__, angle); return -1; } if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_ROTATION, angle) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_ROTATION", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_ROTATION", __func__); return -1; } } @@ -1819,21 +1819,21 @@ int SecCamera::SetRotate(int angle) int SecCamera::getRotate(void) { - LOGV("%s : angle(%d)", __func__, m_angle); + ALOGV("%s : angle(%d)", __func__, m_angle); return m_angle; } int SecCamera::setFrameRate(int frame_rate) { - LOGV("%s(FrameRate(%d))", __func__, frame_rate); + ALOGV("%s(FrameRate(%d))", __func__, frame_rate); if (frame_rate < FRAME_RATE_AUTO || FRAME_RATE_MAX < frame_rate ) - LOGE("ERR(%s):Invalid frame_rate(%d)", __func__, frame_rate); + ALOGE("ERR(%s):Invalid frame_rate(%d)", __func__, frame_rate); m_params->capture.timeperframe.denominator = frame_rate; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_FRAME_RATE, frame_rate) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FRAME_RATE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FRAME_RATE", __func__); return -1; } } @@ -1843,15 +1843,15 @@ int SecCamera::setFrameRate(int frame_rate) int SecCamera::setVerticalMirror(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_gsc_vd_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_VFLIP, 0) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_VFLIP", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_VFLIP", __func__); return -1; } @@ -1860,15 +1860,15 @@ int SecCamera::setVerticalMirror(void) int SecCamera::setHorizontalMirror(void) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); if (m_gsc_vd_fd <= 0) { - LOGE("ERR(%s):Camera was closed", __func__); + ALOGE("ERR(%s):Camera was closed", __func__); return -1; } if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_HFLIP, 0) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_HFLIP", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_HFLIP", __func__); return -1; } @@ -1877,17 +1877,17 @@ int SecCamera::setHorizontalMirror(void) int SecCamera::setWhiteBalance(int white_balance) { - LOGV("%s(white_balance(%d))", __func__, white_balance); + ALOGV("%s(white_balance(%d))", __func__, white_balance); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { if (white_balance < IS_AWB_AUTO || IS_AWB_MAX <= white_balance) { - LOGE("ERR(%s):Invalid white_balance(%d)", __func__, white_balance); + ALOGE("ERR(%s):Invalid white_balance(%d)", __func__, white_balance); return -1; } } else { if (white_balance <= WHITE_BALANCE_BASE || WHITE_BALANCE_MAX <= white_balance) { - LOGE("ERR(%s):Invalid white_balance(%d)", __func__, white_balance); + ALOGE("ERR(%s):Invalid white_balance(%d)", __func__, white_balance); return -1; } } @@ -1897,12 +1897,12 @@ int SecCamera::setWhiteBalance(int white_balance) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_AWB_MODE, white_balance) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_AWB_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_AWB_MODE", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_WHITE_BALANCE, white_balance) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WHITE_BALANCE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WHITE_BALANCE", __func__); return -1; } } @@ -1914,23 +1914,23 @@ int SecCamera::setWhiteBalance(int white_balance) int SecCamera::getWhiteBalance(void) { - LOGV("%s : white_balance(%d)", __func__, m_params->white_balance); + ALOGV("%s : white_balance(%d)", __func__, m_params->white_balance); return m_params->white_balance; } int SecCamera::setBrightness(int brightness) { - LOGV("%s(brightness(%d))", __func__, brightness); + ALOGV("%s(brightness(%d))", __func__, brightness); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { brightness += IS_BRIGHTNESS_DEFAULT; if (brightness < IS_BRIGHTNESS_MINUS_2 || IS_BRIGHTNESS_PLUS2 < brightness) { - LOGE("ERR(%s):Invalid brightness(%d)", __func__, brightness); + ALOGE("ERR(%s):Invalid brightness(%d)", __func__, brightness); return -1; } } else { - LOGW("WARN(%s):Not supported brightness setting", __func__); + ALOGW("WARN(%s):Not supported brightness setting", __func__); return 0; } @@ -1938,7 +1938,7 @@ int SecCamera::setBrightness(int brightness) m_params->brightness = brightness; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_BRIGHTNESS, brightness) < EV_MINUS_4) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_BRIGHTNESS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_BRIGHTNESS", __func__); return -1; } } @@ -1949,25 +1949,25 @@ int SecCamera::setBrightness(int brightness) int SecCamera::getBrightness(void) { - LOGV("%s : brightness(%d)", __func__, m_params->brightness); + ALOGV("%s : brightness(%d)", __func__, m_params->brightness); return m_params->brightness; } int SecCamera::setExposure(int exposure) { - LOGV("%s(exposure(%d))", __func__, exposure); + ALOGV("%s(exposure(%d))", __func__, exposure); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { exposure += IS_EXPOSURE_DEFAULT; if (exposure < IS_EXPOSURE_MINUS_2 || IS_EXPOSURE_PLUS2 < exposure) { - LOGE("ERR(%s):Invalid exposure(%d)", __func__, exposure); + ALOGE("ERR(%s):Invalid exposure(%d)", __func__, exposure); return -1; } } else { exposure += EV_DEFAULT; if (exposure < EV_MINUS_4 || EV_PLUS_4 < exposure) { - LOGE("ERR(%s):Invalid exposure(%d)", __func__, exposure); + ALOGE("ERR(%s):Invalid exposure(%d)", __func__, exposure); return -1; } } @@ -1977,12 +1977,12 @@ int SecCamera::setExposure(int exposure) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_EXPOSURE, exposure) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_EXPOSURE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_EXPOSURE", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_BRIGHTNESS, exposure) < EV_MINUS_4) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BRIGHTNESS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BRIGHTNESS", __func__); return -1; } } @@ -1994,23 +1994,23 @@ int SecCamera::setExposure(int exposure) int SecCamera::getExposure(void) { - LOGV("%s : exposure(%d)", __func__, m_params->exposure); + ALOGV("%s : exposure(%d)", __func__, m_params->exposure); return m_params->exposure; } int SecCamera::setImageEffect(int image_effect) { - LOGV("%s(image_effect(%d))", __func__, image_effect); + ALOGV("%s(image_effect(%d))", __func__, image_effect); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { if (image_effect < IS_IMAGE_EFFECT_DISABLE || IS_IMAGE_EFFECT_MAX <= image_effect) { - LOGE("ERR(%s):Invalid image_effect(%d)", __func__, image_effect); + ALOGE("ERR(%s):Invalid image_effect(%d)", __func__, image_effect); return -1; } } else { if (image_effect <= IMAGE_EFFECT_BASE || IMAGE_EFFECT_MAX <= image_effect) { - LOGE("ERR(%s):Invalid image_effect(%d)", __func__, image_effect); + ALOGE("ERR(%s):Invalid image_effect(%d)", __func__, image_effect); return -1; } } @@ -2020,12 +2020,12 @@ int SecCamera::setImageEffect(int image_effect) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_IMAGE_EFFECT, image_effect) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_IMAGE_EFFECT", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_IMAGE_EFFECT", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_EFFECT, image_effect) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_EFFECT", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_EFFECT", __func__); return -1; } } @@ -2037,23 +2037,23 @@ int SecCamera::setImageEffect(int image_effect) int SecCamera::getImageEffect(void) { - LOGV("%s : image_effect(%d)", __func__, m_params->effects); + ALOGV("%s : image_effect(%d)", __func__, m_params->effects); return m_params->effects; } int SecCamera::setAntiBanding(int anti_banding) { - LOGV("%s(anti_banding(%d))", __func__, anti_banding); + ALOGV("%s(anti_banding(%d))", __func__, anti_banding); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { if (anti_banding < IS_AFC_DISABLE || IS_AFC_MAX <= anti_banding) { - LOGE("ERR(%s):Invalid anti_banding (%d)", __func__, anti_banding); + ALOGE("ERR(%s):Invalid anti_banding (%d)", __func__, anti_banding); return -1; } } else { if (anti_banding < ANTI_BANDING_AUTO || ANTI_BANDING_OFF < anti_banding) { - LOGE("ERR(%s):Invalid anti_banding (%d)", __func__, anti_banding); + ALOGE("ERR(%s):Invalid anti_banding (%d)", __func__, anti_banding); return -1; } } @@ -2063,12 +2063,12 @@ int SecCamera::setAntiBanding(int anti_banding) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_AFC_MODE, anti_banding) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_AFC_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_AFC_MODE", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_ANTI_BANDING, anti_banding) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_BANDING", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_BANDING", __func__); return -1; } } @@ -2080,10 +2080,10 @@ int SecCamera::setAntiBanding(int anti_banding) int SecCamera::setSceneMode(int scene_mode) { - LOGV("%s(scene_mode(%d))", __func__, scene_mode); + ALOGV("%s(scene_mode(%d))", __func__, scene_mode); if (scene_mode <= SCENE_MODE_BASE || SCENE_MODE_MAX <= scene_mode) { - LOGE("ERR(%s):Invalid scene_mode (%d)", __func__, scene_mode); + ALOGE("ERR(%s):Invalid scene_mode (%d)", __func__, scene_mode); return -1; } @@ -2091,7 +2091,7 @@ int SecCamera::setSceneMode(int scene_mode) m_params->scene_mode = scene_mode; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_SCENE_MODE, scene_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SCENE_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SCENE_MODE", __func__); return -1; } } @@ -2107,17 +2107,17 @@ int SecCamera::getSceneMode(void) int SecCamera::setFlashMode(int flash_mode) { - LOGV("%s(flash_mode(%d))", __func__, flash_mode); + ALOGV("%s(flash_mode(%d))", __func__, flash_mode); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { if (flash_mode <= IS_FLASH_MODE_OFF || IS_FLASH_MODE_MAX <= flash_mode) { - LOGE("ERR(%s):Invalid flash_mode (%d)", __func__, flash_mode); + ALOGE("ERR(%s):Invalid flash_mode (%d)", __func__, flash_mode); return -1; } } else { if (flash_mode <= FLASH_MODE_BASE || FLASH_MODE_MAX <= flash_mode) { - LOGE("ERR(%s):Invalid flash_mode (%d)", __func__, flash_mode); + ALOGE("ERR(%s):Invalid flash_mode (%d)", __func__, flash_mode); return -1; } } @@ -2127,12 +2127,12 @@ int SecCamera::setFlashMode(int flash_mode) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_FLASH_MODE, flash_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_FLASH_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_FLASH_MODE", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_FLASH_MODE, flash_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FLASH_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FLASH_MODE", __func__); return -1; } } @@ -2149,17 +2149,17 @@ int SecCamera::getFlashMode(void) int SecCamera::setISO(int iso_value) { - LOGV("%s(iso_value(%d))", __func__, iso_value); + ALOGV("%s(iso_value(%d))", __func__, iso_value); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { if (iso_value < IS_ISO_AUTO || IS_ISO_MAX <= iso_value) { - LOGE("ERR(%s):Invalid iso_value (%d)", __func__, iso_value); + ALOGE("ERR(%s):Invalid iso_value (%d)", __func__, iso_value); return -1; } } else { if (iso_value < ISO_AUTO || ISO_MAX <= iso_value) { - LOGE("ERR(%s):Invalid iso_value (%d)", __func__, iso_value); + ALOGE("ERR(%s):Invalid iso_value (%d)", __func__, iso_value); return -1; } } @@ -2169,12 +2169,12 @@ int SecCamera::setISO(int iso_value) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_ISO, iso_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_ISO", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_ISO", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_ISO, iso_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ISO", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ISO", __func__); return -1; } } @@ -2191,17 +2191,17 @@ int SecCamera::getISO(void) int SecCamera::setContrast(int contrast_value) { - LOGV("%s(contrast_value(%d))", __func__, contrast_value); + ALOGV("%s(contrast_value(%d))", __func__, contrast_value); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { if (contrast_value < IS_CONTRAST_AUTO || IS_CONTRAST_MAX <= contrast_value) { - LOGE("ERR(%s):Invalid contrast_value (%d)", __func__, contrast_value); + ALOGE("ERR(%s):Invalid contrast_value (%d)", __func__, contrast_value); return -1; } } else { if (contrast_value < CONTRAST_MINUS_2 || CONTRAST_MAX <= contrast_value) { - LOGE("ERR(%s):Invalid contrast_value (%d)", __func__, contrast_value); + ALOGE("ERR(%s):Invalid contrast_value (%d)", __func__, contrast_value); return -1; } } @@ -2211,12 +2211,12 @@ int SecCamera::setContrast(int contrast_value) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_CONTRAST, contrast_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_CONTRAST", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_CONTRAST", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_CONTRAST, contrast_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CONTRAST", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CONTRAST", __func__); return -1; } } @@ -2233,19 +2233,19 @@ int SecCamera::getContrast(void) int SecCamera::setSaturation(int saturation_value) { - LOGV("%s(saturation_value(%d))", __func__, saturation_value); + ALOGV("%s(saturation_value(%d))", __func__, saturation_value); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { saturation_value += IS_SATURATION_DEFAULT; if (saturation_value < IS_SATURATION_MINUS_2 || IS_SATURATION_MAX <= saturation_value) { - LOGE("ERR(%s):Invalid saturation_value (%d)", __func__, saturation_value); + ALOGE("ERR(%s):Invalid saturation_value (%d)", __func__, saturation_value); return -1; } } else { saturation_value += SATURATION_DEFAULT; if (saturation_value < SATURATION_MINUS_2 || SATURATION_MAX <= saturation_value) { - LOGE("ERR(%s):Invalid saturation_value (%d)", __func__, saturation_value); + ALOGE("ERR(%s):Invalid saturation_value (%d)", __func__, saturation_value); return -1; } } @@ -2255,12 +2255,12 @@ int SecCamera::setSaturation(int saturation_value) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_SATURATION, saturation_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SATURATION", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SATURATION", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_SATURATION, saturation_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SATURATION", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SATURATION", __func__); return -1; } } @@ -2277,19 +2277,19 @@ int SecCamera::getSaturation(void) int SecCamera::setSharpness(int sharpness_value) { - LOGV("%s(sharpness_value(%d))", __func__, sharpness_value); + ALOGV("%s(sharpness_value(%d))", __func__, sharpness_value); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { sharpness_value += IS_SHARPNESS_DEFAULT; if (sharpness_value < IS_SHARPNESS_MINUS_2 || IS_SHARPNESS_MAX <= sharpness_value) { - LOGE("ERR(%s):Invalid sharpness_value (%d)", __func__, sharpness_value); + ALOGE("ERR(%s):Invalid sharpness_value (%d)", __func__, sharpness_value); return -1; } } else { sharpness_value += SHARPNESS_DEFAULT; if (sharpness_value < SHARPNESS_MINUS_2 || SHARPNESS_MAX <= sharpness_value) { - LOGE("ERR(%s):Invalid sharpness_value (%d)", __func__, sharpness_value); + ALOGE("ERR(%s):Invalid sharpness_value (%d)", __func__, sharpness_value); return -1; } } @@ -2299,12 +2299,12 @@ int SecCamera::setSharpness(int sharpness_value) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_SHARPNESS, sharpness_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SHARPNESS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SHARPNESS", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_SHARPNESS, sharpness_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SHARPNESS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SHARPNESS", __func__); return -1; } } @@ -2321,17 +2321,17 @@ int SecCamera::getSharpness(void) int SecCamera::setHue(int hue_value) { - LOGV("%s(hue_value(%d))", __func__, hue_value); + ALOGV("%s(hue_value(%d))", __func__, hue_value); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { hue_value += IS_HUE_DEFAULT; if (hue_value < IS_HUE_MINUS_2 || IS_HUE_MAX <= hue_value) { - LOGE("ERR(%s):Invalid hue_value (%d)", __func__, hue_value); + ALOGE("ERR(%s):Invalid hue_value (%d)", __func__, hue_value); return -1; } } else { - LOGW("WARN(%s):Not supported hue setting", __func__); + ALOGW("WARN(%s):Not supported hue setting", __func__); return 0; } @@ -2339,7 +2339,7 @@ int SecCamera::setHue(int hue_value) m_params->hue = hue_value; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_HUE, hue_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_HUE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_HUE", __func__); return -1; } } @@ -2355,17 +2355,17 @@ int SecCamera::getHue(void) int SecCamera::setWDR(int wdr_value) { - LOGV("%s(wdr_value(%d))", __func__, wdr_value); + ALOGV("%s(wdr_value(%d))", __func__, wdr_value); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { if (wdr_value < IS_DRC_BYPASS_DISABLE || IS_DRC_BYPASS_MAX <= wdr_value) { - LOGE("ERR(%s):Invalid drc_value (%d)", __func__, wdr_value); + ALOGE("ERR(%s):Invalid drc_value (%d)", __func__, wdr_value); return -1; } } else { if (wdr_value < WDR_OFF || WDR_MAX <= wdr_value) { - LOGE("ERR(%s):Invalid wdr_value (%d)", __func__, wdr_value); + ALOGE("ERR(%s):Invalid wdr_value (%d)", __func__, wdr_value); return -1; } } @@ -2375,12 +2375,12 @@ int SecCamera::setWDR(int wdr_value) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_SET_DRC, wdr_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_SET_DRC", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_SET_DRC", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_WDR, wdr_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WDR", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_WDR", __func__); return -1; } } @@ -2397,10 +2397,10 @@ int SecCamera::getWDR(void) int SecCamera::setAntiShake(int anti_shake) { - LOGV("%s(anti_shake(%d))", __func__, anti_shake); + ALOGV("%s(anti_shake(%d))", __func__, anti_shake); if (anti_shake < ANTI_SHAKE_OFF || ANTI_SHAKE_MAX <= anti_shake) { - LOGE("ERR(%s):Invalid anti_shake (%d)", __func__, anti_shake); + ALOGE("ERR(%s):Invalid anti_shake (%d)", __func__, anti_shake); return -1; } @@ -2408,7 +2408,7 @@ int SecCamera::setAntiShake(int anti_shake) m_anti_shake = anti_shake; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_ANTI_SHAKE, anti_shake) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_SHAKE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ANTI_SHAKE", __func__); return -1; } } @@ -2424,17 +2424,17 @@ int SecCamera::getAntiShake(void) int SecCamera::setMetering(int metering_value) { - LOGV("%s(metering (%d))", __func__, metering_value); + ALOGV("%s(metering (%d))", __func__, metering_value); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { if (metering_value < IS_METERING_AVERAGE || IS_METERING_MAX <= metering_value) { - LOGE("ERR(%s):Invalid metering_value (%d)", __func__, metering_value); + ALOGE("ERR(%s):Invalid metering_value (%d)", __func__, metering_value); return -1; } } else { if (metering_value <= METERING_BASE || METERING_MAX <= metering_value) { - LOGE("ERR(%s):Invalid metering_value (%d)", __func__, metering_value); + ALOGE("ERR(%s):Invalid metering_value (%d)", __func__, metering_value); return -1; } } @@ -2444,12 +2444,12 @@ int SecCamera::setMetering(int metering_value) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_METERING, metering_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_METERING", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_METERING", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_METERING, metering_value) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_METERING", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_METERING", __func__); return -1; } } @@ -2466,10 +2466,10 @@ int SecCamera::getMetering(void) int SecCamera::setJpegQuality(int jpeg_quality) { - LOGV("%s(jpeg_quality (%d))", __func__, jpeg_quality); + ALOGV("%s(jpeg_quality (%d))", __func__, jpeg_quality); if (jpeg_quality < JPEG_QUALITY_ECONOMY || JPEG_QUALITY_MAX <= jpeg_quality) { - LOGE("ERR(%s):Invalid jpeg_quality (%d)", __func__, jpeg_quality); + ALOGE("ERR(%s):Invalid jpeg_quality (%d)", __func__, jpeg_quality); return -1; } @@ -2478,7 +2478,7 @@ int SecCamera::setJpegQuality(int jpeg_quality) #ifdef JPEG_FROM_SENSOR if (m_flag_camera_start && (m_camera_id == CAMERA_ID_BACK)) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAM_JPEG_QUALITY, jpeg_quality) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAM_JPEG_QUALITY", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAM_JPEG_QUALITY", __func__); return -1; } } @@ -2495,10 +2495,10 @@ int SecCamera::getJpegQuality(void) int SecCamera::setZoom(int zoom_level) { - LOGV("%s(zoom_level (%d))", __func__, zoom_level); + ALOGV("%s(zoom_level (%d))", __func__, zoom_level); if (zoom_level < ZOOM_LEVEL_0 || ZOOM_LEVEL_MAX <= zoom_level) { - LOGE("ERR(%s):Invalid zoom_level (%d)", __func__, zoom_level); + ALOGE("ERR(%s):Invalid zoom_level (%d)", __func__, zoom_level); return -1; } @@ -2506,7 +2506,7 @@ int SecCamera::setZoom(int zoom_level) m_zoom_level = zoom_level; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_ZOOM, zoom_level) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ZOOM", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_ZOOM", __func__); return -1; } } @@ -2522,10 +2522,10 @@ int SecCamera::getZoom(void) int SecCamera::setObjectTracking(int object_tracking) { - LOGV("%s(object_tracking (%d))", __func__, object_tracking); + ALOGV("%s(object_tracking (%d))", __func__, object_tracking); if (object_tracking < OBJECT_TRACKING_OFF || OBJECT_TRACKING_MAX <= object_tracking) { - LOGE("ERR(%s):Invalid object_tracking (%d)", __func__, object_tracking); + ALOGE("ERR(%s):Invalid object_tracking (%d)", __func__, object_tracking); return -1; } @@ -2549,12 +2549,12 @@ int SecCamera::getObjectTrackingStatus(void) int SecCamera::setObjectTrackingStartStop(int start_stop) { - LOGV("%s(object_tracking_start_stop (%d))", __func__, start_stop); + ALOGV("%s(object_tracking_start_stop (%d))", __func__, start_stop); if (m_object_tracking_start_stop != start_stop) { m_object_tracking_start_stop = start_stop; if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_OBJ_TRACKING_START_STOP, start_stop) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJ_TRACKING_START_STOP", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJ_TRACKING_START_STOP", __func__); return -1; } } @@ -2564,12 +2564,12 @@ int SecCamera::setObjectTrackingStartStop(int start_stop) int SecCamera::setTouchAFStartStop(int start_stop) { - LOGV("%s(touch_af_start_stop (%d))", __func__, start_stop); + ALOGV("%s(touch_af_start_stop (%d))", __func__, start_stop); if (m_touch_af_start_stop != start_stop) { m_touch_af_start_stop = start_stop; if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_TOUCH_AF_START_STOP, start_stop) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_TOUCH_AF_START_STOP", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_TOUCH_AF_START_STOP", __func__); return -1; } } @@ -2579,10 +2579,10 @@ int SecCamera::setTouchAFStartStop(int start_stop) int SecCamera::setSmartAuto(int smart_auto) { - LOGV("%s(smart_auto (%d))", __func__, smart_auto); + ALOGV("%s(smart_auto (%d))", __func__, smart_auto); if (smart_auto < SMART_AUTO_OFF || SMART_AUTO_MAX <= smart_auto) { - LOGE("ERR(%s):Invalid smart_auto (%d)", __func__, smart_auto); + ALOGE("ERR(%s):Invalid smart_auto (%d)", __func__, smart_auto); return -1; } @@ -2590,7 +2590,7 @@ int SecCamera::setSmartAuto(int smart_auto) m_smart_auto = smart_auto; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_SMART_AUTO, smart_auto) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SMART_AUTO", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SMART_AUTO", __func__); return -1; } } @@ -2612,7 +2612,7 @@ int SecCamera::getAutosceneStatus(void) autoscene_status = v4l2_gsc_cap_g_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_SMART_AUTO_STATUS); if ((autoscene_status < SMART_AUTO_STATUS_AUTO) || (autoscene_status > SMART_AUTO_STATUS_MAX)) { - LOGE("ERR(%s):Invalid getAutosceneStatus (%d)", __func__, autoscene_status); + ALOGE("ERR(%s):Invalid getAutosceneStatus (%d)", __func__, autoscene_status); return -1; } } @@ -2621,10 +2621,10 @@ int SecCamera::getAutosceneStatus(void) int SecCamera::setBeautyShot(int beauty_shot) { - LOGV("%s(beauty_shot (%d))", __func__, beauty_shot); + ALOGV("%s(beauty_shot (%d))", __func__, beauty_shot); if (beauty_shot < BEAUTY_SHOT_OFF || BEAUTY_SHOT_MAX <= beauty_shot) { - LOGE("ERR(%s):Invalid beauty_shot (%d)", __func__, beauty_shot); + ALOGE("ERR(%s):Invalid beauty_shot (%d)", __func__, beauty_shot); return -1; } @@ -2632,7 +2632,7 @@ int SecCamera::setBeautyShot(int beauty_shot) m_beauty_shot = beauty_shot; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_BEAUTY_SHOT, beauty_shot) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BEAUTY_SHOT", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BEAUTY_SHOT", __func__); return -1; } } @@ -2650,10 +2650,10 @@ int SecCamera::getBeautyShot(void) int SecCamera::setVintageMode(int vintage_mode) { - LOGV("%s(vintage_mode(%d))", __func__, vintage_mode); + ALOGV("%s(vintage_mode(%d))", __func__, vintage_mode); if (vintage_mode <= VINTAGE_MODE_BASE || VINTAGE_MODE_MAX <= vintage_mode) { - LOGE("ERR(%s):Invalid vintage_mode (%d)", __func__, vintage_mode); + ALOGE("ERR(%s):Invalid vintage_mode (%d)", __func__, vintage_mode); return -1; } @@ -2661,7 +2661,7 @@ int SecCamera::setVintageMode(int vintage_mode) m_vintage_mode = vintage_mode; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_VINTAGE_MODE, vintage_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_VINTAGE_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_VINTAGE_MODE", __func__); return -1; } } @@ -2677,17 +2677,17 @@ int SecCamera::getVintageMode(void) int SecCamera::setFocusMode(int focus_mode) { - LOGV("%s(focus_mode(%d))", __func__, focus_mode); + ALOGV("%s(focus_mode(%d))", __func__, focus_mode); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (Internal_is) { if (IS_FOCUS_MODE_MAX <= focus_mode) { - LOGE("ERR(%s):Invalid focus_mode (%d)", __func__, focus_mode); + ALOGE("ERR(%s):Invalid focus_mode (%d)", __func__, focus_mode); return -1; } } else { if (FOCUS_MODE_MAX <= focus_mode) { - LOGE("ERR(%s):Invalid focus_mode (%d)", __func__, focus_mode); + ALOGE("ERR(%s):Invalid focus_mode (%d)", __func__, focus_mode); return -1; } } @@ -2698,12 +2698,12 @@ int SecCamera::setFocusMode(int focus_mode) if (m_flag_camera_start) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_FOCUS_MODE, focus_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_FOCUS_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_FOCUS_MODE", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_FOCUS_MODE, focus_mode) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODE", __func__); return -1; } } @@ -2721,7 +2721,7 @@ int SecCamera::getFocusMode(void) int SecCamera::setFaceDetect(int face_detect) { - LOGV("%s(face_detect(%d))", __func__, face_detect); + ALOGV("%s(face_detect(%d))", __func__, face_detect); int Internal_is = !strncmp((const char*)getCameraSensorName(), "ISP Camera", 10); if (m_face_detect != face_detect) { @@ -2730,24 +2730,24 @@ int SecCamera::setFaceDetect(int face_detect) if (m_face_detect != FACE_DETECTION_OFF) { if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CAMERA_FOCUS_MODE, IS_FOCUS_MODE_AUTO) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_FOCUS_MODin face detecion", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CAMERA_FOCUS_MODin face detecion", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_FOCUS_MODE, FOCUS_MODE_AUTO) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODin face detecion", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODin face detecion", __func__); return -1; } } } if (Internal_is) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_IS_CMD_FD, face_detect) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_IS_CMD_FD", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_IS_CMD_FD", __func__); return -1; } } else { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_FACE_DETECTION, face_detect) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACE_DETECTION", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACE_DETECTION", __func__); return -1; } } @@ -2765,7 +2765,7 @@ int SecCamera::getFaceDetect(void) int SecCamera::setGPSLatitude(const char *gps_latitude) { double conveted_latitude = 0; - LOGV("%s(gps_latitude(%s))", __func__, gps_latitude); + ALOGV("%s(gps_latitude(%s))", __func__, gps_latitude); if (gps_latitude == NULL) m_gps_latitude = 0; else { @@ -2773,14 +2773,14 @@ int SecCamera::setGPSLatitude(const char *gps_latitude) m_gps_latitude = (long)(conveted_latitude * 10000 / 1); } - LOGV("%s(m_gps_latitude(%ld))", __func__, m_gps_latitude); + ALOGV("%s(m_gps_latitude(%ld))", __func__, m_gps_latitude); return 0; } int SecCamera::setGPSLongitude(const char *gps_longitude) { double conveted_longitude = 0; - LOGV("%s(gps_longitude(%s))", __func__, gps_longitude); + ALOGV("%s(gps_longitude(%s))", __func__, gps_longitude); if (gps_longitude == NULL) m_gps_longitude = 0; else { @@ -2788,14 +2788,14 @@ int SecCamera::setGPSLongitude(const char *gps_longitude) m_gps_longitude = (long)(conveted_longitude * 10000 / 1); } - LOGV("%s(m_gps_longitude(%ld))", __func__, m_gps_longitude); + ALOGV("%s(m_gps_longitude(%ld))", __func__, m_gps_longitude); return 0; } int SecCamera::setGPSAltitude(const char *gps_altitude) { double conveted_altitude = 0; - LOGV("%s(gps_altitude(%s))", __func__, gps_altitude); + ALOGV("%s(gps_altitude(%s))", __func__, gps_altitude); if (gps_altitude == NULL) m_gps_altitude = 0; else { @@ -2803,25 +2803,25 @@ int SecCamera::setGPSAltitude(const char *gps_altitude) m_gps_altitude = (long)(conveted_altitude * 100 / 1); } - LOGV("%s(m_gps_altitude(%ld))", __func__, m_gps_altitude); + ALOGV("%s(m_gps_altitude(%ld))", __func__, m_gps_altitude); return 0; } int SecCamera::setGPSTimeStamp(const char *gps_timestamp) { - LOGV("%s(gps_timestamp(%s))", __func__, gps_timestamp); + ALOGV("%s(gps_timestamp(%s))", __func__, gps_timestamp); if (gps_timestamp == NULL) m_gps_timestamp = 0; else m_gps_timestamp = atol(gps_timestamp); - LOGV("%s(m_gps_timestamp(%ld))", __func__, m_gps_timestamp); + ALOGV("%s(m_gps_timestamp(%ld))", __func__, m_gps_timestamp); return 0; } int SecCamera::setGPSProcessingMethod(const char *gps_processing_method) { - LOGV("%s(gps_processing_method(%s))", __func__, gps_processing_method); + ALOGV("%s(gps_processing_method(%s))", __func__, gps_processing_method); memset(mExifInfo.gps_processing_method, 0, sizeof(mExifInfo.gps_processing_method)); if (gps_processing_method != NULL) { size_t len = strlen(gps_processing_method); @@ -2835,10 +2835,10 @@ int SecCamera::setGPSProcessingMethod(const char *gps_processing_method) int SecCamera::setFaceDetectLockUnlock(int facedetect_lockunlock) { - LOGV("%s(facedetect_lockunlock(%d))", __func__, facedetect_lockunlock); + ALOGV("%s(facedetect_lockunlock(%d))", __func__, facedetect_lockunlock); if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_FACEDETECT_LOCKUNLOCK, facedetect_lockunlock) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACEDETECT_LOCKUNLOCK", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FACEDETECT_LOCKUNLOCK", __func__); return -1; } @@ -2847,18 +2847,18 @@ int SecCamera::setFaceDetectLockUnlock(int facedetect_lockunlock) int SecCamera::setObjectPosition(int x, int y) { - LOGV("%s(setObjectPosition(x=%d, y=%d))", __func__, x, y); + ALOGV("%s(setObjectPosition(x=%d, y=%d))", __func__, x, y); if (m_preview_width ==640) x = x - 80; if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_OBJECT_POSITION_X, x) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_X", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_X", __func__); return -1; } if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_OBJECT_POSITION_Y, y) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_Y", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_Y", __func__); return -1; } @@ -2867,10 +2867,10 @@ int SecCamera::setObjectPosition(int x, int y) int SecCamera::setGamma(int gamma) { - LOGV("%s(gamma(%d))", __func__, gamma); + ALOGV("%s(gamma(%d))", __func__, gamma); if (gamma < GAMMA_OFF || GAMMA_MAX <= gamma) { - LOGE("ERR(%s):Invalid gamma (%d)", __func__, gamma); + ALOGE("ERR(%s):Invalid gamma (%d)", __func__, gamma); return -1; } @@ -2878,7 +2878,7 @@ int SecCamera::setGamma(int gamma) m_video_gamma = gamma; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_SET_GAMMA, gamma) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_GAMMA", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_GAMMA", __func__); return -1; } } @@ -2889,10 +2889,10 @@ int SecCamera::setGamma(int gamma) int SecCamera::setSlowAE(int slow_ae) { - LOGV("%s(slow_ae(%d))", __func__, slow_ae); + ALOGV("%s(slow_ae(%d))", __func__, slow_ae); if (slow_ae < GAMMA_OFF || GAMMA_MAX <= slow_ae) { - LOGE("ERR(%s):Invalid slow_ae (%d)", __func__, slow_ae); + ALOGE("ERR(%s):Invalid slow_ae (%d)", __func__, slow_ae); return -1; } @@ -2900,7 +2900,7 @@ int SecCamera::setSlowAE(int slow_ae) m_slow_ae = slow_ae; if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_SET_SLOW_AE, slow_ae) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_SLOW_AE", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_SLOW_AE", __func__); return -1; } } @@ -2911,7 +2911,7 @@ int SecCamera::setSlowAE(int slow_ae) int SecCamera::setRecording(int recording_en) { - LOGV("%s(recoding_en(%d))", __func__, recording_en); + ALOGV("%s(recoding_en(%d))", __func__, recording_en); m_recording_en = recording_en; @@ -2920,7 +2920,7 @@ int SecCamera::setRecording(int recording_en) int SecCamera::setRecordingSize(int width, int height) { - LOGV("%s(width(%d), height(%d))", __func__, width, height); + ALOGV("%s(width(%d), height(%d))", __func__, width, height); m_recording_width = width; m_recording_height = height; @@ -2938,10 +2938,10 @@ int SecCamera::getRecordingSize(int *width, int *height) int SecCamera::setExifOrientationInfo(int orientationInfo) { - LOGV("%s(orientationInfo(%d))", __func__, orientationInfo); + ALOGV("%s(orientationInfo(%d))", __func__, orientationInfo); if (orientationInfo < 0) { - LOGE("ERR(%s):Invalid orientationInfo (%d)", __func__, orientationInfo); + ALOGE("ERR(%s):Invalid orientationInfo (%d)", __func__, orientationInfo); return -1; } m_exif_orientation = orientationInfo; @@ -2953,7 +2953,7 @@ int SecCamera::setBatchReflection() { if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_BATCH_REFLECTION, 1) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BATCH_REFLECTION", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BATCH_REFLECTION", __func__); return -1; } } @@ -2964,10 +2964,10 @@ int SecCamera::setBatchReflection() /* Camcorder fix fps */ int SecCamera::setSensorMode(int sensor_mode) { - LOGV("%s(sensor_mode (%d))", __func__, sensor_mode); + ALOGV("%s(sensor_mode (%d))", __func__, sensor_mode); if (sensor_mode < SENSOR_MODE_CAMERA || SENSOR_MODE_MOVIE < sensor_mode) { - LOGE("ERR(%s):Invalid sensor mode (%d)", __func__, sensor_mode); + ALOGE("ERR(%s):Invalid sensor mode (%d)", __func__, sensor_mode); return -1; } @@ -2986,9 +2986,9 @@ int SecCamera::setSensorMode(int sensor_mode) */ int SecCamera::setShotMode(int shot_mode) { - LOGV("%s(shot_mode (%d))", __func__, shot_mode); + ALOGV("%s(shot_mode (%d))", __func__, shot_mode); if (shot_mode < SHOT_MODE_SINGLE || SHOT_MODE_SELF < shot_mode) { - LOGE("ERR(%s):Invalid shot_mode (%d)", __func__, shot_mode); + ALOGE("ERR(%s):Invalid shot_mode (%d)", __func__, shot_mode); return -1; } m_shot_mode = shot_mode; @@ -2998,10 +2998,10 @@ int SecCamera::setShotMode(int shot_mode) int SecCamera::setDataLineCheck(int chk_dataline) { - LOGV("%s(chk_dataline (%d))", __func__, chk_dataline); + ALOGV("%s(chk_dataline (%d))", __func__, chk_dataline); if (chk_dataline < CHK_DATALINE_OFF || CHK_DATALINE_MAX <= chk_dataline) { - LOGE("ERR(%s):Invalid chk_dataline (%d)", __func__, chk_dataline); + ALOGE("ERR(%s):Invalid chk_dataline (%d)", __func__, chk_dataline); return -1; } @@ -3017,11 +3017,11 @@ int SecCamera::getDataLineCheck(void) int SecCamera::setDataLineCheckStop(void) { - LOGV("%s", __func__); + ALOGV("%s", __func__); if (m_flag_camera_start) { if (v4l2_gsc_cap_s_ctrl(m_gsc_vd_fd, V4L2_CID_CAMERA_CHECK_DATALINE_STOP, 1) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CHECK_DATALINE_STOP", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_CHECK_DATALINE_STOP", __func__); return -1; } } @@ -3030,7 +3030,7 @@ int SecCamera::setDataLineCheckStop(void) const __u8* SecCamera::getCameraSensorName(void) { - LOGV("%s", __func__); + ALOGV("%s", __func__); return v4l2_gsc_cap_enuminput(m_gsc_vd_fd, getCameraId()); } @@ -3038,7 +3038,7 @@ const __u8* SecCamera::getCameraSensorName(void) #ifdef ENABLE_ESD_PREVIEW_CHECK int SecCamera::getCameraSensorESDStatus(void) { - LOGV("%s", __func__); + ALOGV("%s", __func__); // 0 : normal operation, 1 : abnormal operation int status = v4l2_gsc_cap_g_ctrl(m_gsc_vd_fd, V4L2_CID_ESD_INT); @@ -3049,7 +3049,7 @@ int SecCamera::getCameraSensorESDStatus(void) int SecCamera::setJpegThumbnailSize(int width, int height) { - LOGV("%s(width(%d), height(%d))", __func__, width, height); + ALOGV("%s(width(%d), height(%d))", __func__, width, height); m_jpeg_thumbnail_width = width; m_jpeg_thumbnail_height = height; @@ -3069,10 +3069,10 @@ int SecCamera::getJpegThumbnailSize(int *width, int *height) int SecCamera::setJpegThumbnailQuality(int jpeg_thumbnail_quality) { - LOGV("%s(jpeg_thumbnail_quality (%d))", __func__, jpeg_thumbnail_quality); + ALOGV("%s(jpeg_thumbnail_quality (%d))", __func__, jpeg_thumbnail_quality); if (jpeg_thumbnail_quality < JPEG_QUALITY_ECONOMY || JPEG_QUALITY_MAX <= jpeg_thumbnail_quality) { - LOGE("ERR(%s):Invalid jpeg_thumbnail_quality (%d)", __func__, jpeg_thumbnail_quality); + ALOGE("ERR(%s):Invalid jpeg_thumbnail_quality (%d)", __func__, jpeg_thumbnail_quality); return -1; } @@ -3193,7 +3193,7 @@ void SecCamera::setExifChangedAttribute() it current returns a negative err value, so avoid putting odd value into exif for now */ if (shutterSpeed < 0) { - LOGE("%s: error %d getting shutterSpeed, camera_id = %d, using 100", + ALOGE("%s: error %d getting shutterSpeed, camera_id = %d, using 100", __func__, shutterSpeed, m_camera_id); shutterSpeed = 100; } @@ -3208,7 +3208,7 @@ void SecCamera::setExifChangedAttribute() it current returns a negative err value, so avoid putting odd value into exif for now */ if (iso < 0) { - LOGE("%s: error %d getting iso, camera_id = %d, using 100", + ALOGE("%s: error %d getting iso, camera_id = %d, using 100", __func__, iso, m_camera_id); iso = ISO_100; } @@ -3242,8 +3242,8 @@ void SecCamera::setExifChangedAttribute() sv = APEX_ISO_TO_FILMSENSITIVITY(mExifInfo.iso_speed_rating); bv = av + tv - sv; ev = av + tv; - LOGD("Shutter speed=%d us, iso=%d", shutterSpeed, mExifInfo.iso_speed_rating); - LOGD("AV=%d, TV=%d, SV=%d", av, tv, sv); + ALOGD("Shutter speed=%d us, iso=%d", shutterSpeed, mExifInfo.iso_speed_rating); + ALOGD("AV=%d, TV=%d, SV=%d", av, tv, sv); //3 Shutter Speed mExifInfo.shutter_speed.num = tv*EXIF_DEF_APEX_DEN; @@ -3595,7 +3595,7 @@ int SecCamera::makeExif (unsigned char *exifOut, unsigned char size_mm[2] = {(tmp >> 8) & 0xFF, tmp & 0xFF}; memcpy(pApp1Start, size_mm, 2); - LOGD("makeExif X"); + ALOGD("makeExif X"); return 0; } diff --git a/exynos5/hal/libcamera/SecCamera.h b/exynos5/hal/libcamera/SecCamera.h index 1af19ee..300a214 100644 --- a/exynos5/hal/libcamera/SecCamera.h +++ b/exynos5/hal/libcamera/SecCamera.h @@ -59,9 +59,9 @@ namespace android { //#define ENABLE_ESD_PREVIEW_CHECK -#if defined(LOG_NDEBUG) && (LOG_NDEBUG == 0) -#define LOG_CAMERA LOGD -#define LOG_CAMERA_PREVIEW LOGD +#if defined(ALOG_NDEBUG) && (ALOG_NDEBUG == 0) +#define LOG_CAMERA ALOGD +#define LOG_CAMERA_PREVIEW ALOGD #define LOG_TIME_DEFINE(n) \ struct timeval time_start_##n, time_stop_##n; unsigned long log_time_##n = 0; diff --git a/exynos5/hal/libcamera/SecCameraHWInterface.cpp b/exynos5/hal/libcamera/SecCameraHWInterface.cpp index 8cfbccc..3609902 100644 --- a/exynos5/hal/libcamera/SecCameraHWInterface.cpp +++ b/exynos5/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 @@ -94,7 +94,7 @@ CameraHardwareSec::CameraHardwareSec(int cameraId, camera_device_t *dev) mPostViewSize(0), mHalDevice(dev) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); int ret = 0; mPreviewWindow = NULL; @@ -108,12 +108,12 @@ CameraHardwareSec::CameraHardwareSec(int cameraId, camera_device_t *dev) 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(); } @@ -139,7 +139,7 @@ int CameraHardwareSec::getCameraId() const 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; } @@ -149,10 +149,10 @@ void CameraHardwareSec::initDefaultParameters(int cameraId) #ifndef GAIA_FW_BETA 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 Internal_is = !strncmp((const char*)mCameraSensorName, "ISP Camera", 10); #else int Internal_is = 0; @@ -187,11 +187,11 @@ void CameraHardwareSec::initDefaultParameters(int cameraId) // 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); p.setPreviewFormat(CameraParameters::PIXEL_FORMAT_YUV420P); mFrameSizeDelta = 16; @@ -383,7 +383,7 @@ void CameraHardwareSec::initDefaultParameters(int cameraId) CameraHardwareSec::~CameraHardwareSec() { - LOGV("%s", __func__); + ALOGV("%s", __func__); mSecCamera->DestroyCamera(); } @@ -392,33 +392,33 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) 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; } @@ -429,7 +429,7 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) int hal_pixel_format; const char *str_preview_format = mParameters.getPreviewFormat(); - LOGV("%s: str preview format %s width : %d height : %d ", __func__, str_preview_format, preview_width, preview_height); + ALOGV("%s: str preview format %s width : %d height : %d ", __func__, str_preview_format, preview_width, preview_height); mFrameSizeDelta = 16; hal_pixel_format = HAL_PIXEL_FORMAT_YV12; @@ -451,13 +451,13 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) #ifdef USE_EGL if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN | GRALLOC_USAGE_HW_ION)) { - LOGE("%s: could not set usage on gralloc buffer", __func__); + ALOGE("%s: could not set usage on gralloc buffer", __func__); return INVALID_OPERATION; } #else if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN | GRALLOC_USAGE_HWC_HWOVERLAY | GRALLOC_USAGE_HW_ION)) { - LOGE("%s: could not set usage on gralloc buffer", __func__); + ALOGE("%s: could not set usage on gralloc buffer", __func__); return INVALID_OPERATION; } #endif @@ -465,19 +465,19 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) 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; } 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; } if (mPreviewRunning && mPreviewStartDeferred) { - LOGV("start/resume preview"); + ALOGV("start/resume preview"); status_t ret = startPreviewInternal(); if (ret == OK) { mPreviewStartDeferred = false; @@ -504,14 +504,14 @@ void CameraHardwareSec::setCallbacks(camera_notify_callback notify_cb, 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(); @@ -519,15 +519,15 @@ void CameraHardwareSec::enableMsgType(int32_t msgType) } 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) @@ -546,21 +546,21 @@ void CameraHardwareSec::setSkipFrame(int frame) 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; } @@ -580,7 +580,7 @@ int CameraHardwareSec::previewThread() index = mSecCamera->getPreview(); if (index < 0) { - LOGE("ERR(%s):Fail on SecCamera->getPreview()", __func__); + ALOGE("ERR(%s):Fail on SecCamera->getPreview()", __func__); if (mSecCamera->getPreviewState()) { stopPreview(); startPreview(); @@ -593,9 +593,9 @@ int CameraHardwareSec::previewThread() 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; @@ -624,14 +624,14 @@ int CameraHardwareSec::previewThread() 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; } numArray = index; 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; } @@ -654,10 +654,10 @@ int CameraHardwareSec::previewThread() mSecCamera->setUserBufferAddr(virAddr, index, PREVIEW_MODE); } 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; @@ -674,7 +674,7 @@ callbacks: 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; } @@ -695,18 +695,18 @@ status_t CameraHardwareSec::startPreview() { 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; } @@ -717,7 +717,7 @@ status_t CameraHardwareSec::startPreview() 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; @@ -733,11 +733,11 @@ status_t CameraHardwareSec::startPreview() 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(), frame_size + mFrameSizeDelta, width, height); void *vaddr[3]; @@ -758,10 +758,10 @@ status_t CameraHardwareSec::startPreviewInternal() } 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; } @@ -773,7 +773,7 @@ status_t CameraHardwareSec::startPreviewInternal() } 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; @@ -781,7 +781,7 @@ status_t CameraHardwareSec::startPreviewInternal() void CameraHardwareSec::stopPreviewInternal() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); /* request that the preview thread stop. */ if (mPreviewRunning) { @@ -793,18 +793,18 @@ void CameraHardwareSec::stopPreviewInternal() for (int i = 0; i < MAX_BUFFERS; i++) { if (0 != mPreviewWindow->enqueue_buffer(mPreviewWindow, mBufferHandle[i])) - LOGE("%s: Fail to enqueue buffer[%d]", __func__, i); + ALOGE("%s: Fail to enqueue buffer[%d]", __func__, i); } } 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(); @@ -815,13 +815,13 @@ void CameraHardwareSec::stopPreview() 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); @@ -838,16 +838,16 @@ status_t CameraHardwareSec::startRecording() + ALIGN((ALIGN(width, 16) * ALIGN(height >> 1, 8)), 2048)), 1, NULL); mSecCamera->setUserBufferAddr((void *)(mRecordHeap[i]->data), i, RECORD_MODE); 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() < 0) { - LOGE("ERR(%s):Fail on mSecCamera->startRecord()", __func__); + ALOGE("ERR(%s):Fail on mSecCamera->startRecord()", __func__); return UNKNOWN_ERROR; } mRecordRunning = true; @@ -857,13 +857,13 @@ status_t CameraHardwareSec::startRecording() 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; @@ -872,8 +872,8 @@ void CameraHardwareSec::stopRecording() bool CameraHardwareSec::recordingEnabled() { - LOGV("%s :", __func__); - LOGV("%s : %d", __func__, mPreviewRunning); + ALOGV("%s :", __func__); + ALOGV("%s : %d", __func__, mPreviewRunning); return mRecordRunning; } @@ -893,7 +893,7 @@ int CameraHardwareSec::autoFocusThread() 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 @@ -906,14 +906,14 @@ int CameraHardwareSec::autoFocusThread() /* 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(); @@ -922,14 +922,14 @@ int CameraHardwareSec::autoFocusThread() 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; #else #ifdef AF_SUPPORT - LOGV("%s : calling setAutoFocus", __func__); + ALOGV("%s : calling setAutoFocus", __func__); if (mSecCamera->setAutofocus() < 0) { - LOGE("ERR(%s):Fail on mSecCamera->setAutofocus()", __func__); + ALOGE("ERR(%s):Fail on mSecCamera->setAutofocus()", __func__); return UNKNOWN_ERROR; } @@ -940,11 +940,11 @@ int CameraHardwareSec::autoFocusThread() #endif if (af_status == 0x01) { - LOGV("%s : AF Success!!", __func__); + ALOGV("%s : AF Success!!", __func__); if (mMsgEnabled & CAMERA_MSG_FOCUS) mNotifyCb(CAMERA_MSG_FOCUS, true, 0, mCallbackCookie); } else if (af_status == 0x02) { - LOGV("%s : AF Cancelled !!", __func__); + ALOGV("%s : AF Cancelled !!", __func__); if (mMsgEnabled & CAMERA_MSG_FOCUS) { /* CAMERA_MSG_FOCUS only takes a bool. true for * finished and false for failure. cancel is still @@ -953,20 +953,20 @@ int CameraHardwareSec::autoFocusThread() 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; #endif } status_t CameraHardwareSec::autoFocus() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); /* signal autoFocusThread to run once */ mFocusCondition.signal(); return NO_ERROR; @@ -974,11 +974,11 @@ status_t CameraHardwareSec::autoFocus() status_t CameraHardwareSec::cancelAutoFocus() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); #ifndef GAIA_FW_BETA if (mSecCamera->cancelAutofocus() < 0) { - LOGE("ERR(%s):Fail on mSecCamera->cancelAutofocus()", __func__); + ALOGE("ERR(%s):Fail on mSecCamera->cancelAutofocus()", __func__); return UNKNOWN_ERROR; } #endif @@ -993,14 +993,14 @@ int CameraHardwareSec::save_jpeg( unsigned char *real_jpeg, int jpeg_size) /* 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); @@ -1029,24 +1029,24 @@ void CameraHardwareSec::save_postview(const char *fname, uint8_t *buf, uint32_t 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); } @@ -1058,7 +1058,7 @@ bool CameraHardwareSec::scaleDownYuv422(char *srcBuf, uint32_t srcWidth, uint32_ 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; } @@ -1115,7 +1115,7 @@ bool CameraHardwareSec::YUY2toNV21(void *srcBuf, void *dstBuf, uint32_t srcWidth int CameraHardwareSec::pictureThread() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); int jpeg_size = 0; int ret = NO_ERROR; @@ -1144,7 +1144,7 @@ int CameraHardwareSec::pictureThread() //sp<MemoryBase> buffer = new MemoryBase(mRawHeap, 0, mPostViewSize + 8); - 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); #ifndef GAIA_FW_BETA @@ -1171,7 +1171,7 @@ int CameraHardwareSec::pictureThread() if (mSecCamera->getCameraId() == SecCamera::CAMERA_ID_BACK){ jpeg_data = mSecCamera->getJpeg(&jpeg_size, &phyAddr); if (jpeg_data == NULL) { - LOGE("ERR(%s):Fail on SecCamera->getSnapshot()", __func__); + ALOGE("ERR(%s):Fail on SecCamera->getSnapshot()", __func__); ret = UNKNOWN_ERROR; } } else { @@ -1186,7 +1186,7 @@ int CameraHardwareSec::pictureThread() JpegHeap->release(JpegHeap); return UNKNOWN_ERROR; } - LOGI("snapshotandjpeg done"); + ALOGI("snapshotandjpeg done"); #ifdef JPEG_FROM_SENSOR } #endif @@ -1197,10 +1197,10 @@ int CameraHardwareSec::pictureThread() #ifdef JPEG_FROM_SENSOR if (mSecCamera->getCameraId() == SecCamera::CAMERA_ID_BACK) { - LOGV("%s, %s", __func__, (const char*)mCameraSensorName); //to check sensor name + ALOGV("%s, %s", __func__, (const char*)mCameraSensorName); //to check sensor name isLSISensor = !strncmp((const char*)mCameraSensorName, "S5K4ECGX", 8); if (isLSISensor) { - LOGI("== Camera Sensor Detect %s - Samsung LSI SOC 5M ==", mCameraSensorName); + ALOGI("== Camera Sensor Detect %s - Samsung LSI SOC 5M ==", mCameraSensorName); // LSI 5M SOC if (!SplitFrame(jpeg_data, SecCamera::getInterleaveDataSize(), SecCamera::getJpegLineLength(), @@ -1211,7 +1211,7 @@ int CameraHardwareSec::pictureThread() return UNKNOWN_ERROR; } } else { - LOGI("== Camera Sensor Detect %s Sony SOC 5M ==", mCameraSensorName); + ALOGI("== Camera Sensor Detect %s Sony SOC 5M ==", mCameraSensorName); decodeInterleaveData(jpeg_data, SecCamera::getInterleaveDataSize(), mPostViewWidth, mPostViewHeight, @@ -1226,10 +1226,10 @@ int CameraHardwareSec::pictureThread() #ifdef GAIA_FW_BETA int rawHeapSize = mPostViewSize; - LOGV("mRawHeap : MemoryHeapBase(previewHeapSize(%d))", rawHeapSize); + ALOGV("mRawHeap : MemoryHeapBase(previewHeapSize(%d))", rawHeapSize); mRawHeap = mGetMemoryCb((int)mSecCamera->getCameraFd(), rawHeapSize, 1, 0); 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); @@ -1245,7 +1245,7 @@ int CameraHardwareSec::pictureThread() JpegExifSize = mSecCamera->getExif((unsigned char *)ExifHeap->data, (unsigned char *)ThumbnailHeap->base()); - LOGV("JpegExifSize=%d", JpegExifSize); + ALOGV("JpegExifSize=%d", JpegExifSize); if (JpegExifSize < 0) { ret = UNKNOWN_ERROR; @@ -1275,7 +1275,7 @@ int CameraHardwareSec::pictureThread() } } - LOGV("%s : pictureThread end", __func__); + ALOGV("%s : pictureThread end", __func__); out: if (JpegHeap) { @@ -1293,18 +1293,18 @@ out: status_t CameraHardwareSec::takePicture() { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); stopPreview(); 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; @@ -1314,12 +1314,12 @@ status_t CameraHardwareSec::takePicture() 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; @@ -1328,7 +1328,7 @@ status_t CameraHardwareSec::cancelPicture() bool CameraHardwareSec::CheckVideoStartMarker(unsigned char *pBuf) { if (!pBuf) { - LOGE("CheckVideoStartMarker() => pBuf is NULL"); + ALOGE("CheckVideoStartMarker() => pBuf is NULL"); return false; } @@ -1342,7 +1342,7 @@ bool CameraHardwareSec::CheckVideoStartMarker(unsigned char *pBuf) bool CameraHardwareSec::CheckEOIMarker(unsigned char *pBuf) { if (!pBuf) { - LOGE("CheckEOIMarker() => pBuf is NULL"); + ALOGE("CheckEOIMarker() => pBuf is NULL"); return false; } @@ -1356,7 +1356,7 @@ bool CameraHardwareSec::CheckEOIMarker(unsigned char *pBuf) 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; } @@ -1377,15 +1377,15 @@ bool CameraHardwareSec::SplitFrame(unsigned char *pFrame, int dwSize, 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; } @@ -1454,14 +1454,14 @@ bool CameraHardwareSec::SplitFrame(unsigned char *pFrame, int dwSize, 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; } @@ -1487,7 +1487,7 @@ int CameraHardwareSec::decodeInterleaveData(unsigned char *pInterleaveData, int i = 0; - LOGV("decodeInterleaveData Start~~~"); + ALOGV("decodeInterleaveData Start~~~"); while (i < interleaveDataSize) { if ((*interleave_ptr == 0xFFFFFFFF) || (*interleave_ptr == 0x02FFFFFF) || (*interleave_ptr == 0xFF02FFFF)) { @@ -1547,7 +1547,7 @@ int CameraHardwareSec::decodeInterleaveData(unsigned char *pInterleaveData, } } } - LOGV("decodeInterleaveData End~~~"); + ALOGV("decodeInterleaveData End~~~"); return ret; } @@ -1586,7 +1586,7 @@ bool CameraHardwareSec::isSupportedPreviewSize(const int width, status_t CameraHardwareSec::setParameters(const CameraParameters& params) { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); #ifndef GAIA_FW_BETA int Internal_is = !strncmp((const char*)mSecCamera->getCameraSensorName(), "ISP Camera", 10); #else @@ -1601,7 +1601,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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(); @@ -1616,7 +1616,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) params.getPreviewSize(&new_preview_width, &new_preview_height); #endif 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 && @@ -1662,32 +1662,32 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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!", + 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, 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 LOGV("%s: preview size and format has not changed", __func__); + else ALOGV("%s: preview size and format has not changed", __func__); } 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; @@ -1698,11 +1698,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); if (0 < new_picture_width && 0 < new_picture_height) { - LOGV("%s: setSnapshotSize", __func__); + ALOGV("%s: setSnapshotSize", __func__); 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 @@ -1711,7 +1711,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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; @@ -1739,7 +1739,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); @@ -1747,11 +1747,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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); @@ -1762,7 +1762,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); @@ -1772,11 +1772,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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 @@ -1790,7 +1790,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) */ if (new_frame_rate != mParameters.getPreviewFrameRate()) { if (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); @@ -1799,11 +1799,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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); @@ -1813,11 +1813,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); @@ -1828,11 +1828,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); @@ -1843,11 +1843,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); @@ -1858,11 +1858,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); @@ -1873,11 +1873,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); @@ -1886,7 +1886,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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; @@ -1926,13 +1926,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) else 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); @@ -1942,7 +1942,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // whitebalance const char *new_white_str = params.get(CameraParameters::KEY_WHITE_BALANCE); - LOGV("%s : new_white_str %s", __func__, new_white_str); + ALOGV("%s : new_white_str %s", __func__, new_white_str); if (new_white_str != NULL) { int new_white = -1; @@ -1976,13 +1976,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) else 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); @@ -1992,7 +1992,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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; @@ -2012,13 +2012,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) else 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); @@ -2028,7 +2028,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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; @@ -2053,13 +2053,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); @@ -2084,9 +2084,9 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); - LOGE("%s : current_min_fps = %d, current_max_fps = %d", + ALOGE("%s : current_min_fps = %d, current_max_fps = %d", __func__, current_min_fps, current_max_fps); ret = UNKNOWN_ERROR; } @@ -2154,7 +2154,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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; } @@ -2180,13 +2180,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) mParameters.set(CameraParameters::KEY_FOCUS_DISTANCES, BACK_CAMERA_INFINITY_FOCUS_DISTANCES_STR); } else { - 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); @@ -2207,12 +2207,12 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); @@ -2223,7 +2223,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // scene.. 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); @@ -2258,16 +2258,16 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) if (Internal_is) new_image_effect = IS_IMAGE_EFFECT_NEGATIVE_MONO; else - LOGW("WARN(%s):Invalid effect value (%s)", __func__, new_image_effect_str); + ALOGW("WARN(%s):Invalid effect value (%s)", __func__, new_image_effect_str); } 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); @@ -2285,7 +2285,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) //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; @@ -2293,7 +2293,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) if (Internal_is) 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 (Internal_is) new_contrast = IS_CONTRAST_MINUS_2; @@ -2320,13 +2320,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); @@ -2336,11 +2336,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) //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; } } @@ -2350,7 +2350,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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; } } @@ -2358,7 +2358,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // 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) { @@ -2372,7 +2372,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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) { @@ -2386,7 +2386,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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) { @@ -2400,7 +2400,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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) { @@ -2414,7 +2414,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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) { @@ -2428,19 +2428,19 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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; mSecCamera->getRecordingSize(¤t_recording_width, ¤t_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 (0 < new_recording_width && 0 < new_recording_height) { if (current_recording_width != new_recording_width || current_recording_height != 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; } else { @@ -2455,7 +2455,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) mParameters.setVideoSize(new_recording_width, new_recording_height); } else { if (mSecCamera->setRecordingSize(new_preview_width, new_preview_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_preview_width, new_preview_height); ret = UNKNOWN_ERROR; } @@ -2471,13 +2471,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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; } } @@ -2494,13 +2494,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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; } } @@ -2511,7 +2511,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 { @@ -2523,7 +2523,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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 { @@ -2535,11 +2535,11 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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); #endif return ret; @@ -2547,7 +2547,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) CameraParameters CameraHardwareSec::getParameters() const { - LOGV("%s :", __func__); + ALOGV("%s :", __func__); return mParameters; } @@ -2558,7 +2558,7 @@ status_t CameraHardwareSec::sendCommand(int32_t command, int32_t arg1, int32_t a 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 @@ -2630,7 +2630,7 @@ static CameraInfo sCameraInfo[] = { status_t CameraHardwareSec::storeMetaDataInBuffers(bool enable) { if (!enable) { - LOGE("Non-metadata buffer mode is not supported!"); + ALOGE("Non-metadata buffer mode is not supported!"); return INVALID_OPERATION; } return OK; @@ -2642,7 +2642,7 @@ static camera_device_t *g_cam_device; 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); @@ -2661,7 +2661,7 @@ static inline CameraHardwareSec *obj(struct camera_device *dev) 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); } @@ -2673,7 +2673,7 @@ static void HAL_camera_device_set_callbacks(struct camera_device *dev, 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); @@ -2689,7 +2689,7 @@ static void HAL_camera_device_set_callbacks(struct camera_device *dev, */ 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); } @@ -2705,7 +2705,7 @@ static void HAL_camera_device_enable_msg_type(struct camera_device *dev, int32_t */ 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); } @@ -2716,7 +2716,7 @@ static void HAL_camera_device_disable_msg_type(struct camera_device *dev, int32_ */ 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); } @@ -2725,7 +2725,7 @@ static int HAL_camera_device_msg_type_enabled(struct camera_device *dev, int32_t */ static int HAL_camera_device_start_preview(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); return obj(dev)->startPreview(); } @@ -2734,7 +2734,7 @@ static int HAL_camera_device_start_preview(struct camera_device *dev) */ static void HAL_camera_device_stop_preview(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); obj(dev)->stopPreview(); } @@ -2743,7 +2743,7 @@ static void HAL_camera_device_stop_preview(struct camera_device *dev) */ static int HAL_camera_device_preview_enabled(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); return obj(dev)->previewEnabled(); } @@ -2779,7 +2779,7 @@ static int HAL_camera_device_preview_enabled(struct camera_device *dev) */ 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); } @@ -2795,7 +2795,7 @@ static int HAL_camera_device_store_meta_data_in_buffers(struct camera_device *de */ static int HAL_camera_device_start_recording(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); return obj(dev)->startRecording(); } @@ -2804,7 +2804,7 @@ static int HAL_camera_device_start_recording(struct camera_device *dev) */ static void HAL_camera_device_stop_recording(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); obj(dev)->stopRecording(); } @@ -2813,7 +2813,7 @@ static void HAL_camera_device_stop_recording(struct camera_device *dev) */ static int HAL_camera_device_recording_enabled(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); return obj(dev)->recordingEnabled(); } @@ -2829,7 +2829,7 @@ static int HAL_camera_device_recording_enabled(struct camera_device *dev) 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); } @@ -2840,7 +2840,7 @@ static void HAL_camera_device_release_recording_frame(struct camera_device *dev, */ static int HAL_camera_device_auto_focus(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); return obj(dev)->autoFocus(); } @@ -2852,7 +2852,7 @@ static int HAL_camera_device_auto_focus(struct camera_device *dev) */ static int HAL_camera_device_cancel_auto_focus(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); return obj(dev)->cancelAutoFocus(); } @@ -2861,7 +2861,7 @@ static int HAL_camera_device_cancel_auto_focus(struct camera_device *dev) */ static int HAL_camera_device_take_picture(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); return obj(dev)->takePicture(); } @@ -2871,7 +2871,7 @@ static int HAL_camera_device_take_picture(struct camera_device *dev) */ static int HAL_camera_device_cancel_picture(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); return obj(dev)->cancelPicture(); } @@ -2882,7 +2882,7 @@ static int HAL_camera_device_cancel_picture(struct camera_device *dev) 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); @@ -2891,7 +2891,7 @@ static int HAL_camera_device_set_parameters(struct camera_device *dev, /** 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(); @@ -2900,7 +2900,7 @@ char *HAL_camera_device_get_parameters(struct camera_device *dev) static void HAL_camera_device_put_parameters(struct camera_device *dev, char *parms) { - LOGV("%s", __func__); + ALOGV("%s", __func__); free(parms); } @@ -2910,7 +2910,7 @@ static void HAL_camera_device_put_parameters(struct camera_device *dev, char *pa 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); } @@ -2920,7 +2920,7 @@ static int HAL_camera_device_send_command(struct camera_device *dev, */ static void HAL_camera_device_release(struct camera_device *dev) { - LOGV("%s", __func__); + ALOGV("%s", __func__); obj(dev)->release(); } @@ -2929,19 +2929,19 @@ static void HAL_camera_device_release(struct camera_device *dev) */ 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__); return sizeof(sCameraInfo) / sizeof(sCameraInfo[0]); } static int HAL_getCameraInfo(int cameraId, struct camera_info *cameraInfo) { - LOGV("%s", __func__); + ALOGV("%s", __func__); memcpy(cameraInfo, &sCameraInfo[cameraId], sizeof(CameraInfo)); return 0; } @@ -2980,20 +2980,20 @@ static int HAL_camera_device_open(const struct hw_module_t* module, 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; } @@ -3010,13 +3010,13 @@ static int HAL_camera_device_open(const struct hw_module_t* module, 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; } diff --git a/exynos5/hal/libcamera/mediactl.cpp b/exynos5/hal/libcamera/mediactl.cpp index 468acc4..951acc0 100644 --- a/exynos5/hal/libcamera/mediactl.cpp +++ b/exynos5/hal/libcamera/mediactl.cpp @@ -20,8 +20,8 @@ */ //#include "config.h" -#define LOG_NDEBUG 0 -#define LOG_TAG "Mediactl" +#define ALOG_NDEBUG 0 +#define ALOG_TAG "Mediactl" #include <utils/Log.h> #include <sys/ioctl.h> @@ -129,7 +129,7 @@ int media_setup_link(struct media_device *media, } if (i == source->entity->num_links) { - LOGE("%s: Link not found", __func__); + ALOGE("%s: Link not found", __func__); return -ENOENT; } @@ -147,7 +147,7 @@ int media_setup_link(struct media_device *media, ret = ioctl(media->fd, MEDIA_IOC_SETUP_LINK, &ulink); if (ret == -1) { - LOGE("%s: Unable to setup link (%s)", + ALOGE("%s: Unable to setup link (%s)", __func__, strerror(errno)); return -errno; } @@ -205,7 +205,7 @@ static struct media_link *media_entity_add_link(struct media_entity *entity) static int media_enum_links(struct media_device *media) { - LOGV("%s: start", __func__); + ALOGV("%s: start", __func__); __u32 id; int ret = 0; @@ -219,7 +219,7 @@ static int media_enum_links(struct media_device *media) links.links = (struct media_link_desc*)malloc(entity->info.links * sizeof(struct media_link_desc)); if (ioctl(media->fd, MEDIA_IOC_ENUM_LINKS, &links) < 0) { - LOGE( + ALOGE( "%s: Unable to enumerate pads and links (%s).", __func__, strerror(errno)); free(links.pads); @@ -243,7 +243,7 @@ static int media_enum_links(struct media_device *media) source = media_get_entity_by_id(media, link->source.entity); sink = media_get_entity_by_id(media, link->sink.entity); if (source == NULL || sink == NULL) { - LOGE( + ALOGE( "WARNING entity %u link %u from %u/%u to %u/%u is invalid!", id, i, link->source.entity, link->source.index, @@ -302,7 +302,7 @@ static int media_get_devname_udev(struct udev *udev, return -EINVAL; devnum = makedev(entity->info.v4l.major, entity->info.v4l.minor); - LOGE("looking up device: %u:%u", + ALOGE("looking up device: %u:%u", major(devnum), minor(devnum)); device = udev_device_new_from_devnum(udev, 'c', devnum); if (device) { @@ -371,14 +371,14 @@ int get_media_fd(struct media_device *media) char *ptr; char media_buf[6]; - LOGV("%s(%s)", __func__, MEDIA_DEV); + ALOGV("%s(%s)", __func__, MEDIA_DEV); media->fd = open(MEDIA_DEV, O_RDWR, 0); if( media->fd < 0) { - LOGE("Open sysfs media device failed, media->fd : 0x%p", media->fd); + ALOGE("Open sysfs media device failed, media->fd : 0x%p", media->fd); return -1; } - LOGV("media->fd : %p", media->fd); + ALOGV("media->fd : %p", media->fd); return media->fd; @@ -431,7 +431,7 @@ static int media_enum_entities(struct media_device *media) /* Fall back to get the device name via sysfs */ media_get_devname_sysfs(entity); if (ret < 0) - LOGE("media_get_devname failed"); + ALOGE("media_get_devname failed"); } return ret; @@ -467,40 +467,40 @@ struct media_device *media_open_debug( media = (struct media_device*)calloc(1, sizeof(struct media_device)); if (media == NULL) { - LOGE("%s: media : %p", __func__, media); + ALOGE("%s: media : %p", __func__, media); return NULL; } media_debug_set_handler(media, debug_handler, debug_priv); - LOGV("Opening media device %s", name); - LOGV("%s: media : %p", __func__, media); + ALOGV("Opening media device %s", name); + ALOGV("%s: media : %p", __func__, media); media->fd = get_media_fd(media); if (media->fd < 0) { media_close(media); - LOGE("%s: failed get_media_fd %s", + ALOGE("%s: failed get_media_fd %s", __func__, name); return NULL; } - LOGV("%s: media->fd : %p", __func__, media->fd); + ALOGV("%s: media->fd : %p", __func__, media->fd); ret = media_enum_entities(media); if (ret < 0) { - LOGE( + ALOGE( "%s: Unable to enumerate entities for device %s (%s)", __func__, name, strerror(-ret)); media_close(media); return NULL; } - LOGV("Found %u entities", media->entities_count); - LOGV("Enumerating pads and links"); + ALOGV("Found %u entities", media->entities_count); + ALOGV("Enumerating pads and links"); ret = media_enum_links(media); if (ret < 0) { - LOGE( + ALOGE( "%s: Unable to enumerate pads and linksfor device %s", __func__, name); media_close(media); @@ -621,28 +621,28 @@ int media_parse_setup_link(struct media_device *media, link = media_parse_link(media, p, &end); if (link == NULL) { - LOGE( + ALOGE( "%s: Unable to parse link", __func__); return -EINVAL; } p = end; if (*p++ != '[') { - LOGE("Unable to parse link flags"); + ALOGE("Unable to parse link flags"); return -EINVAL; } flags = strtoul(p, &end, 10); for (p = end; isspace(*p); p++); if (*p++ != ']') { - LOGE("Unable to parse link flags"); + ALOGE("Unable to parse link flags"); return -EINVAL; } for (; isspace(*p); p++); *endp = (char *)p; - LOGV( + ALOGV( "Setting up link %u:%u -> %u:%u [%u]", link->source->entity->info.id, link->source->index, link->sink->entity->info.id, link->sink->index, diff --git a/exynos5/hal/libfimg4x/FimgApi.cpp b/exynos5/hal/libfimg4x/FimgApi.cpp index ff11b8d..57d0f27 100644 --- a/exynos5/hal/libfimg4x/FimgApi.cpp +++ b/exynos5/hal/libfimg4x/FimgApi.cpp @@ -17,8 +17,8 @@ ** */ -#define LOG_NDEBUG 0 -#define LOG_TAG "SKIA" +#define ALOG_NDEBUG 0 +#define ALOG_TAG "SKIA" #include <utils/Log.h> #include "FimgApi.h" @@ -270,14 +270,14 @@ extern "C" int SyncFimgApi(void) void printDataBlit(char *title, struct fimg2d_blit *cmd) { - LOGI("%s\n", title); + ALOGI("%s\n", title); - LOGI(" sequence_no. = %u\n", cmd->seq_no); - LOGI(" blit_op = %d(%s)\n", cmd->op, optbl[cmd->op].str); - LOGI(" fill_color = %X\n", cmd->solid_color); - LOGI(" global_alpha = %u\n", (unsigned int)cmd->g_alpha); - LOGI(" PREMULT = %s\n", cmd->premult == PREMULTIPLIED ? "PREMULTIPLIED" : "NON-PREMULTIPLIED"); - LOGI(" do_dither = %s\n", cmd->dither == true ? "dither" : "no-dither"); + ALOGI(" sequence_no. = %u\n", cmd->seq_no); + ALOGI(" blit_op = %d(%s)\n", cmd->op, optbl[cmd->op].str); + ALOGI(" fill_color = %X\n", cmd->solid_color); + ALOGI(" global_alpha = %u\n", (unsigned int)cmd->g_alpha); + ALOGI(" PREMULT = %s\n", cmd->premult == PREMULTIPLIED ? "PREMULTIPLIED" : "NON-PREMULTIPLIED"); + ALOGI(" do_dither = %s\n", cmd->dither == true ? "dither" : "no-dither"); printDataBlitRotate(cmd->rotate); @@ -297,80 +297,80 @@ void printDataBlit(char *title, struct fimg2d_blit *cmd) void printDataBlitImage(char *title, struct fimg2d_image *image) { if (NULL != image) { - LOGI(" Image_%s\n", title); - LOGI(" addr = %X\n", image->addr.start); - LOGI(" size = %u\n", image->addr.size); - LOGI(" (width, height) = (%d, %d)\n", image->width, image->height); - LOGI(" format = %d\n", image->fmt); + ALOGI(" Image_%s\n", title); + ALOGI(" addr = %X\n", image->addr.start); + ALOGI(" size = %u\n", image->addr.size); + ALOGI(" (width, height) = (%d, %d)\n", image->width, image->height); + ALOGI(" format = %d\n", image->fmt); } else - LOGI(" Image_%s : NULL\n", title); + ALOGI(" Image_%s : NULL\n", title); } void printDataBlitRect(char *title, struct fimg2d_rect *rect) { if (NULL != rect) { - LOGI(" RECT_%s\n", title); - LOGI(" (x1, y1) = (%d, %d)\n", rect->x1, rect->y1); - LOGI(" (x2, y2) = (%d, %d)\n", rect->x2, rect->y2); - LOGI(" (width, height) = (%d, %d)\n", rect->x2 - rect->x1, rect->y2 - rect->y1); + ALOGI(" RECT_%s\n", title); + ALOGI(" (x1, y1) = (%d, %d)\n", rect->x1, rect->y1); + ALOGI(" (x2, y2) = (%d, %d)\n", rect->x2, rect->y2); + ALOGI(" (width, height) = (%d, %d)\n", rect->x2 - rect->x1, rect->y2 - rect->y1); } else - LOGI(" RECT_%s : NULL\n", title); + ALOGI(" RECT_%s : NULL\n", title); } void printDataBlitRotate(enum rotation rotate) { - LOGI(" ROTATE : %d\n", rotate); + ALOGI(" ROTATE : %d\n", rotate); } void printDataBlitClip(struct fimg2d_clip *clip) { if (NULL != clip) { - LOGI(" CLIP\n"); - LOGI(" clip %s\n", clip->enable == true ? "enabled" : "disabled"); - LOGI(" (x1, y1) = (%d, %d)\n", clip->x1, clip->y1); - LOGI(" (x2, y2) = (%d, %d)\n", clip->x2, clip->y2); - LOGI(" (width, hight) = (%d, %d)\n", clip->x2 - clip->x1, clip->y2 - clip->y1); + ALOGI(" CLIP\n"); + ALOGI(" clip %s\n", clip->enable == true ? "enabled" : "disabled"); + ALOGI(" (x1, y1) = (%d, %d)\n", clip->x1, clip->y1); + ALOGI(" (x2, y2) = (%d, %d)\n", clip->x2, clip->y2); + ALOGI(" (width, hight) = (%d, %d)\n", clip->x2 - clip->x1, clip->y2 - clip->y1); } else - LOGI(" CLIP : NULL\n"); + ALOGI(" CLIP : NULL\n"); } void printDataBlitScale(struct fimg2d_scale *scaling) { if (NULL != scaling) { - LOGI(" SCALING\n"); - LOGI(" scale_mode : %s\n", scaling->mode == 0 ? + ALOGI(" SCALING\n"); + ALOGI(" scale_mode : %s\n", scaling->mode == 0 ? "NO_SCALING" : (scaling->mode == 1 ? "SCALING_NEAREST" : "SCALING_BILINEAR")); - LOGI(" scaling_factor_unit : %s\n", scaling->factor == 0 ? "PERCENT" : "PIXEL"); + ALOGI(" scaling_factor_unit : %s\n", scaling->factor == 0 ? "PERCENT" : "PIXEL"); if (scaling->factor == 0) - LOGI(" scaling_factor : (scale_w, scale_y) = (%d, %d)\n", scaling->scale_w, scaling->scale_h); + ALOGI(" scaling_factor : (scale_w, scale_y) = (%d, %d)\n", scaling->scale_w, scaling->scale_h); else { - LOGI(" src : (src_w, src_h) = (%d, %d)\n", scaling->src_w, scaling->src_h); - LOGI(" dst : (dst_w, dst_h) = (%d, %d)\n", scaling->dst_w, scaling->dst_h); - LOGI(" scaling_factor : (scale_w, scale_y) = (%3.2f, %3.2f)\n", (double)scaling->dst_w / scaling->src_w, (double)scaling->dst_h / scaling->src_h); + ALOGI(" src : (src_w, src_h) = (%d, %d)\n", scaling->src_w, scaling->src_h); + ALOGI(" dst : (dst_w, dst_h) = (%d, %d)\n", scaling->dst_w, scaling->dst_h); + ALOGI(" scaling_factor : (scale_w, scale_y) = (%3.2f, %3.2f)\n", (double)scaling->dst_w / scaling->src_w, (double)scaling->dst_h / scaling->src_h); } } else - LOGI(" SCALING : NULL(NO SCALE MODE)\n"); + ALOGI(" SCALING : NULL(NO SCALE MODE)\n"); } void printDataMatrix(int matrixType) { - LOGI(" MATRIX\n"); + ALOGI(" MATRIX\n"); if (matrixType & SkMatrix::kIdentity_Mask) - LOGI(" Matrix_type : Identity_Mask\n"); + ALOGI(" Matrix_type : Identity_Mask\n"); if (matrixType & SkMatrix::kTranslate_Mask) - LOGI(" Matrix_type : Translate_Mask(the matrix has translation)\n"); + ALOGI(" Matrix_type : Translate_Mask(the matrix has translation)\n"); if (matrixType & SkMatrix::kScale_Mask) - LOGI(" Matrix_type : Scale_Mask(the matrix has X or Y scale)\n"); + ALOGI(" Matrix_type : Scale_Mask(the matrix has X or Y scale)\n"); if (matrixType & SkMatrix::kAffine_Mask) - LOGI(" Matrix_type : Affine_Mask(the matrix skews or rotates)\n"); + ALOGI(" Matrix_type : Affine_Mask(the matrix skews or rotates)\n"); if (matrixType & SkMatrix::kPerspective_Mask) - LOGI(" Matrix_type : Perspective_Mask(the matrix is in perspective)\n"); + ALOGI(" Matrix_type : Perspective_Mask(the matrix is in perspective)\n"); } diff --git a/exynos5/hal/libfimg4x/FimgApi.h b/exynos5/hal/libfimg4x/FimgApi.h index a2c9eac..378fd1b 100644 --- a/exynos5/hal/libfimg4x/FimgApi.h +++ b/exynos5/hal/libfimg4x/FimgApi.h @@ -30,8 +30,8 @@ #if defined(REAL_DEBUG) #ifdef ANDROID_LOG -#define PRINT LOGE -#define PRINTD LOGD +#define PRINT ALOGE +#define PRINTD ALOGD #else #define PRINT printf #define PRINTD printf diff --git a/exynos5/hal/libfimg4x/FimgExynos5.cpp b/exynos5/hal/libfimg4x/FimgExynos5.cpp index 87c8527..59d8394 100644 --- a/exynos5/hal/libfimg4x/FimgExynos5.cpp +++ b/exynos5/hal/libfimg4x/FimgExynos5.cpp @@ -17,8 +17,8 @@ ** */ -#define LOG_NDEBUG 0 -#define LOG_TAG "FimgExynos5" +#define ALOG_NDEBUG 0 +#define ALOG_TAG "FimgExynos5" #include <utils/Log.h> #include "FimgExynos5.h" diff --git a/exynos5/hal/libgralloc_ump/Android.mk b/exynos5/hal/libgralloc_ump/Android.mk index a4354d4..84cac10 100644 --- a/exynos5/hal/libgralloc_ump/Android.mk +++ b/exynos5/hal/libgralloc_ump/Android.mk @@ -40,14 +40,14 @@ LOCAL_SRC_FILES := \ ifeq ($(TARGET_PRODUCT), armboard_v7a) # Support for ARM platforms -LOCAL_CFLAGS:= -DLOG_TAG=\"gralloc\" -DGRALLOC_16_BITS -DSTANDARD_LINUX_SCREEN \ +LOCAL_CFLAGS:= -DALOG_TAG=\"gralloc\" -DGRALLOC_16_BITS -DSTANDARD_LINUX_SCREEN \ -march=armv7-a \ -mfloat-abi=softfp LOCAL_MODULE := gralloc.default else #Default to goldfish -LOCAL_CFLAGS:= -DLOG_TAG=\"gralloc\" -DSTANDARD_LINUX_SCREEN \ +LOCAL_CFLAGS:= -DALOG_TAG=\"gralloc\" -DSTANDARD_LINUX_SCREEN \ -march=armv7-a \ -mfloat-abi=softfp \ -DVITHAR_HACK diff --git a/exynos5/hal/libgralloc_ump/alloc_device.cpp b/exynos5/hal/libgralloc_ump/alloc_device.cpp index 64be027..52c8724 100644 --- a/exynos5/hal/libgralloc_ump/alloc_device.cpp +++ b/exynos5/hal/libgralloc_ump/alloc_device.cpp @@ -68,13 +68,13 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage, private_module_t* m = reinterpret_cast<private_module_t*>(dev->common.module); ion_fd = ion_alloc(m->ion_client, size, 0, ION_HEAP_EXYNOS_MASK); if (ion_fd < 0) { - LOGE("Failed to ion_alloc"); + ALOGE("Failed to ion_alloc"); return -1; } cpu_ptr = ion_map(ion_fd, size, 0); if (NULL == cpu_ptr) { - LOGE("Failed to ion_map"); + ALOGE("Failed to ion_map"); ion_free(ion_fd); return -1; } @@ -83,7 +83,7 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage, if (UMP_INVALID_MEMORY_HANDLE != ump_mem_handle) { priv_alloc_flag = private_handle_t::PRIV_FLAGS_USES_ION; } else { - LOGE("gralloc_alloc_buffer() failed to import ION memory"); + ALOGE("gralloc_alloc_buffer() failed to import ION memory"); ion_unmap(cpu_ptr, size); ion_free(ion_fd); return -1; @@ -120,7 +120,7 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage, if (UMP_INVALID_MEMORY_HANDLE != ump_mem_handle) cpu_ptr = ump_map(ump_mem_handle, 0, size); else - LOGE("gralloc_alloc_buffer() failed to allcoate UMP memory"); + ALOGE("gralloc_alloc_buffer() failed to allcoate UMP memory"); } if (NULL != cpu_ptr) { @@ -144,15 +144,15 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage, hnd->voffset = ((EXYNOS_ALIGN((hnd->width >> 1), 8) * EXYNOS_ALIGN((hnd->height >> 1), 8))); return 0; } else { - LOGE("gralloc_alloc_buffer() failed to allocate handle"); + ALOGE("gralloc_alloc_buffer() failed to allocate handle"); } } else { - LOGE("gralloc_alloc_buffer() failed to retrieve valid secure id"); + ALOGE("gralloc_alloc_buffer() failed to retrieve valid secure id"); } ump_unmap(ump_mem_handle, cpu_ptr, size); } else { - LOGE("gralloc_alloc_buffer() failed to map UMP memory"); + ALOGE("gralloc_alloc_buffer() failed to map UMP memory"); } ump_release(ump_mem_handle); @@ -187,13 +187,13 @@ static int gralloc_alloc_framebuffer_locked(alloc_device_t* dev, size_t size, in */ int newUsage = (usage & ~GRALLOC_USAGE_HW_FB) | GRALLOC_USAGE_HW_2D; - LOGD("fallback to single buffering"); + ALOGD("fallback to single buffering"); return gralloc_alloc_buffer(dev, bufferSize, newUsage, pHandle, w, h, format, bpp, 0, 0); } if (bufferMask >= ((1LU<<numBuffers)-1)) { - LOGE("Ran out of buffers"); + ALOGE("Ran out of buffers"); return -ENOMEM; } @@ -236,7 +236,7 @@ static int alloc_device_alloc(alloc_device_t* dev, int w, int h, int format, int usage, buffer_handle_t* pHandle, int* pStride) { if (!pHandle || !pStride) { - LOGE("Invalid Handle, Stride value"); + ALOGE("Invalid Handle, Stride value"); return -EINVAL; } @@ -269,7 +269,7 @@ static int alloc_device_alloc(alloc_device_t* dev, int w, int h, int format, bpp = 4; break; default: - LOGE("Not Support Pixel Format"); + ALOGE("Not Support Pixel Format"); return -EINVAL; } @@ -289,7 +289,7 @@ static int alloc_device_alloc(alloc_device_t* dev, int w, int h, int format, format, 0, (int)stride_raw, (int)stride); if (err < 0) { - LOGE("Fail to alloc Gralloc memory"); + ALOGE("Fail to alloc Gralloc memory"); return err; } @@ -300,7 +300,7 @@ static int alloc_device_alloc(alloc_device_t* dev, int w, int h, int format, static int alloc_device_free(alloc_device_t* dev, buffer_handle_t handle) { if (private_handle_t::validate(handle) < 0) { - LOGE("Invalid Value : private_handle"); + ALOGE("Invalid Value : private_handle"); return -EINVAL; } @@ -346,19 +346,19 @@ int alloc_device_open(hw_module_t const* module, const char* name, hw_device_t** dev = new alloc_device_t; if (NULL == dev) { - LOGE("Fail to create alloc_device"); + ALOGE("Fail to create alloc_device"); return -1; } dev->common.module = const_cast<hw_module_t*>(module); private_module_t* m = reinterpret_cast<private_module_t*>(dev->common.module); m->ion_client=ion_client_create(); - LOGI("gralloc create ion_client %d", m->ion_client); + ALOGI("gralloc create ion_client %d", m->ion_client); ump_result ump_res = ump_open(); if ((UMP_OK != ump_res) || (0 > m->ion_client)) { - LOGE("UMP open failed, ump_res %d, ion_client %d", ump_res, m->ion_client); + ALOGE("UMP open failed, ump_res %d, ion_client %d", ump_res, m->ion_client); delete dev; return -1; } diff --git a/exynos5/hal/libgralloc_ump/framebuffer_device.cpp b/exynos5/hal/libgralloc_ump/framebuffer_device.cpp index 0015e54..1e64d72 100644 --- a/exynos5/hal/libgralloc_ump/framebuffer_device.cpp +++ b/exynos5/hal/libgralloc_ump/framebuffer_device.cpp @@ -73,7 +73,7 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer) #ifdef STANDARD_LINUX_SCREEN if (ioctl(m->framebuffer->fd, FBIOPAN_DISPLAY, &m->info) == -1) { - LOGE("FBIOPAN_DISPLAY failed"); + ALOGE("FBIOPAN_DISPLAY failed"); m->base.unlock(&m->base, buffer); return 0; } @@ -81,13 +81,13 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer) /* wait for VSYNC */ int crtc = 0; if (ioctl(m->framebuffer->fd, FBIO_WAITFORVSYNC, &crtc) < 0) { - LOGE("FBIO_WAITFORVSYNC failed"); + ALOGE("FBIO_WAITFORVSYNC failed"); return 0; } #else /* Standard Android way */ if (ioctl(m->framebuffer->fd, FBIOPUT_VSCREENINFO, &m->info) == -1) { - LOGE("FBIOPUT_VSCREENINFO failed"); + ALOGE("FBIOPUT_VSCREENINFO failed"); m->base.unlock(&m->base, buffer); return -errno; } @@ -135,19 +135,19 @@ int init_frame_buffer_locked(struct private_module_t* module) } if (fd < 0) { - LOGE("/dev/graphics/fb, /dev/fb Open fail"); + ALOGE("/dev/graphics/fb, /dev/fb Open fail"); return -errno; } struct fb_fix_screeninfo finfo; if (ioctl(fd, FBIOGET_FSCREENINFO, &finfo) == -1) { - LOGE("Fail to get FB Screen Info"); + ALOGE("Fail to get FB Screen Info"); return -errno; } struct fb_var_screeninfo info; if (ioctl(fd, FBIOGET_VSCREENINFO, &info) == -1) { - LOGE("First, Fail to get FB VScreen Info"); + ALOGE("First, Fail to get FB VScreen Info"); return -errno; } @@ -195,19 +195,19 @@ int init_frame_buffer_locked(struct private_module_t* module) if (ioctl(fd, FBIOPUT_VSCREENINFO, &info) == -1) { info.yres_virtual = info.yres; flags &= ~PAGE_FLIP; - LOGW("FBIOPUT_VSCREENINFO failed, page flipping not supported"); + ALOGW("FBIOPUT_VSCREENINFO failed, page flipping not supported"); } if (info.yres_virtual < info.yres * 2) { /* we need at least 2 for page-flipping */ info.yres_virtual = info.yres; flags &= ~PAGE_FLIP; - LOGW("page flipping not supported (yres_virtual=%d, requested=%d)", + ALOGW("page flipping not supported (yres_virtual=%d, requested=%d)", info.yres_virtual, info.yres*2); } if (ioctl(fd, FBIOGET_VSCREENINFO, &info) == -1) { - LOGE("Second, Fail to get FB VScreen Info"); + ALOGE("Second, Fail to get FB VScreen Info"); return -errno; } @@ -231,7 +231,7 @@ int init_frame_buffer_locked(struct private_module_t* module) float ydpi = (info.yres * 25.4f) / info.height; float fps = refreshRate / 1000.0f; - LOGI("using (fd=%d)\n" + ALOGI("using (fd=%d)\n" "id = %s\n" "xres = %d px\n" "yres = %d px\n" @@ -252,7 +252,7 @@ int init_frame_buffer_locked(struct private_module_t* module) info.green.offset, info.green.length, info.blue.offset, info.blue.length); - LOGI("width = %d mm (%f dpi)\n" + ALOGI("width = %d mm (%f dpi)\n" "height = %d mm (%f dpi)\n" "refresh rate = %.2f Hz\n", info.width, xdpi, @@ -260,12 +260,12 @@ int init_frame_buffer_locked(struct private_module_t* module) fps); if (ioctl(fd, FBIOGET_FSCREENINFO, &finfo) == -1) { - LOGE("Fail to get FScreen Info"); + ALOGE("Fail to get FScreen Info"); return -errno; } if (finfo.smem_len <= 0) { - LOGE("Invalid Value : finfo.smem_len"); + ALOGE("Invalid Value : finfo.smem_len"); return -errno; } @@ -282,7 +282,7 @@ int init_frame_buffer_locked(struct private_module_t* module) size_t fbSize = round_up_to_page_size(finfo.line_length * info.yres_virtual); void* vaddr = mmap(0, fbSize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if (vaddr == MAP_FAILED) { - LOGE("Error mapping the framebuffer (%s)", strerror(errno)); + ALOGE("Error mapping the framebuffer (%s)", strerror(errno)); return -errno; } @@ -346,14 +346,14 @@ int framebuffer_device_open(hw_module_t const* module, const char* name, hw_devi alloc_device_t* gralloc_device; status = gralloc_open(module, &gralloc_device); if (status < 0) { - LOGE("Fail to Open gralloc device"); + ALOGE("Fail to Open gralloc device"); return status; } private_module_t* m = (private_module_t*)module; status = init_frame_buffer(m); if (status < 0) { - LOGE("Fail to init framebuffer"); + ALOGE("Fail to init framebuffer"); gralloc_close(gralloc_device); return status; } diff --git a/exynos5/hal/libgralloc_ump/gralloc_module.cpp b/exynos5/hal/libgralloc_ump/gralloc_module.cpp index 8ca500b..d33e5d1 100644 --- a/exynos5/hal/libgralloc_ump/gralloc_module.cpp +++ b/exynos5/hal/libgralloc_ump/gralloc_module.cpp @@ -47,15 +47,15 @@ static int gralloc_map(gralloc_module_t const* module, void *mappedAddress = ion_map(hnd->fd, size, 0); if (mappedAddress == MAP_FAILED) { - LOGE("Could not ion_map %s fd(%d)", strerror(errno), hnd->fd); + ALOGE("Could not ion_map %s fd(%d)", strerror(errno), hnd->fd); return -errno; } hnd->base = intptr_t(mappedAddress) + hnd->offset; - LOGD("gralloc_map() succeeded fd=%d, off=%d, size=%d, vaddr=%p", + ALOGD("gralloc_map() succeeded fd=%d, off=%d, size=%d, vaddr=%p", hnd->fd, hnd->offset, hnd->size, mappedAddress); } else { - LOGE("In case of ION, It could not reach here!"); + ALOGE("In case of ION, It could not reach here!"); } } *vaddr = (void*)hnd->base; @@ -72,10 +72,10 @@ static int gralloc_unmap(gralloc_module_t const* module, if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION) { void* base = (void*)hnd->base; size_t size = hnd->size; - LOGD("unmapping from %p, size=%d", base, size); + ALOGD("unmapping from %p, size=%d", base, size); if (ion_unmap(base, size) < 0) - LOGE("Could not ion_unmap %s", strerror(errno)); + ALOGE("Could not ion_unmap %s", strerror(errno)); ion_client_destroy(hnd->ion_client); } @@ -88,7 +88,7 @@ static int gralloc_device_open(const hw_module_t* module, const char* name, hw_d { int status = -EINVAL; - LOGI("Opening ARM Gralloc device"); + ALOGI("Opening ARM Gralloc device"); if (!strcmp(name, GRALLOC_HARDWARE_GPU0)) status = alloc_device_open(module, name, device); @@ -103,14 +103,14 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle int retval = -EINVAL; void *vaddr; if (private_handle_t::validate(handle) < 0) { - LOGE("Registering invalid buffer, returning error"); + ALOGE("Registering invalid buffer, returning error"); return -EINVAL; } // if this handle was created in this process, then we keep it as is. private_handle_t* hnd = (private_handle_t*)handle; if (hnd->pid == getpid()) { - LOGE("Invalid Process ID from Private_Handle"); + ALOGE("Invalid Process ID from Private_Handle"); return 0; } @@ -119,7 +119,7 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle ump_result res = ump_open(); if (res != UMP_OK) { pthread_mutex_unlock(&s_map_lock); - LOGE("Failed to open UMP library"); + ALOGE("Failed to open UMP library"); return retval; } s_ump_is_open = 1; @@ -137,18 +137,18 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle pthread_mutex_unlock(&s_map_lock); return 0; } else { - LOGE("Failed to map UMP handle"); + ALOGE("Failed to map UMP handle"); } ump_release(hnd->ump_mem_handle); } else { - LOGE("Failed to create UMP handle"); + ALOGE("Failed to create UMP handle"); } } else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION) { hnd->ump_mem_handle = ump_handle_create_from_secure_id(hnd->ump_id); retval = gralloc_map(module, handle, &vaddr); } else { - LOGE("registering non-UMP&ION buffer not supported"); + ALOGE("registering non-UMP&ION buffer not supported"); } pthread_mutex_unlock(&s_map_lock); @@ -159,13 +159,13 @@ static int gralloc_register_buffer(gralloc_module_t const* module, buffer_handle static int gralloc_unregister_buffer(gralloc_module_t const* module, buffer_handle_t handle) { if (private_handle_t::validate(handle) < 0) { - LOGE("unregistering invalid buffer, returning error"); + ALOGE("unregistering invalid buffer, returning error"); return -EINVAL; } private_handle_t* hnd = (private_handle_t*)handle; - LOGE_IF(hnd->lockState & private_handle_t::LOCK_STATE_READ_MASK, + ALOGE_IF(hnd->lockState & private_handle_t::LOCK_STATE_READ_MASK, "[unregister] handle %p still locked (state=%08x)", hnd, hnd->lockState); /* never unmap buffers that were created in this process */ @@ -189,7 +189,7 @@ static int gralloc_unregister_buffer(gralloc_module_t const* module, buffer_hand hnd->lockState = 0; hnd->writeOwner = 0; } else { - LOGE("unregistering non-UMP buffer not supported"); + ALOGE("unregistering non-UMP buffer not supported"); } hnd->base = 0; @@ -206,7 +206,7 @@ static int gralloc_lock(gralloc_module_t const* module, buffer_handle_t handle, int usage, int l, int t, int w, int h, void** vaddr) { if (private_handle_t::validate(handle) < 0) { - LOGE("Locking invalid buffer, returning error"); + ALOGE("Locking invalid buffer, returning error"); return -EINVAL; } @@ -233,7 +233,7 @@ static int gralloc_lock(gralloc_module_t const* module, buffer_handle_t handle, static int gralloc_unlock(gralloc_module_t const* module, buffer_handle_t handle) { if (private_handle_t::validate(handle) < 0) { - LOGE("Unlocking invalid buffer, returning error"); + ALOGE("Unlocking invalid buffer, returning error"); return -EINVAL; } diff --git a/exynos5/hal/libhdmi/SecHdmi/SecGscaler.cpp b/exynos5/hal/libhdmi/SecHdmi/SecGscaler.cpp index 0a84d11..6920042 100644 --- a/exynos5/hal/libhdmi/SecHdmi/SecGscaler.cpp +++ b/exynos5/hal/libhdmi/SecHdmi/SecGscaler.cpp @@ -16,7 +16,7 @@ */ //#define DEBUG_LIB_FIMC -#define LOG_TAG "libgscaler" +#define ALOG_TAG "libgscaler" //#define USE_GSC_USERPTR #include <cutils/log.h> #include "../libhdmi/SecHdmi/SecGscaler.h" @@ -49,34 +49,34 @@ struct yuv_fmt_list yuv_list[] = { void dump_pixfmt_mp(struct v4l2_pix_format_mplane *pix_mp) { - LOGI("w: %d", pix_mp->width); - LOGI("h: %d", pix_mp->height); - LOGI("color: %x", pix_mp->colorspace); + ALOGI("w: %d", pix_mp->width); + ALOGI("h: %d", pix_mp->height); + ALOGI("color: %x", pix_mp->colorspace); switch (pix_mp->pixelformat) { case V4L2_PIX_FMT_YUYV: - LOGI ("YUYV"); + ALOGI ("YUYV"); break; case V4L2_PIX_FMT_UYVY: - LOGI ("UYVY"); + ALOGI ("UYVY"); break; case V4L2_PIX_FMT_RGB565: - LOGI ("RGB565"); + ALOGI ("RGB565"); break; case V4L2_PIX_FMT_RGB565X: - LOGI ("RGB565X"); + ALOGI ("RGB565X"); break; default: - LOGI("not supported"); + ALOGI("not supported"); } } void dump_crop(struct v4l2_rect *rect) { - LOGI("crop l: %d", rect->left); - LOGI("crop t: %d", rect->top); - LOGI("crop w: %d", rect->width); - LOGI("crop h: %d", rect->height); + ALOGI("crop l: %d", rect->left); + ALOGI("crop t: %d", rect->top); + ALOGI("crop w: %d", rect->width); + ALOGI("crop h: %d", rect->height); } void gsc_v4l2_dump_state(int fd) @@ -89,14 +89,14 @@ void gsc_v4l2_dump_state(int fd) if (ioctl(fd, VIDIOC_G_FMT, &format) < 0) return; - LOGI("dumping driver state:"); + ALOGI("dumping driver state:"); dump_pixfmt_mp(&format.fmt.pix_mp); crop.type = format.type; if (ioctl(fd, VIDIOC_G_CROP, &crop) < 0) return; - LOGI("input image crop:"); + ALOGI("input image crop:"); dump_crop(&(crop.c)); sCrop.pad = GSC_SUBDEV_PAD_SOURCE; @@ -104,7 +104,7 @@ void gsc_v4l2_dump_state(int fd) if (ioctl(fd, VIDIOC_SUBDEV_G_CROP, &sCrop) < 0) return; - LOGI("output image crop:"); + ALOGI("output image crop:"); dump_crop(&(sCrop.rect)); } @@ -112,22 +112,22 @@ void gsc_v4l2_dump_state(int fd) int gsc_v4l2_querycap(int fd, char *node) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_capability v4l2cap; if (ioctl(fd, VIDIOC_QUERYCAP, &v4l2cap) < 0) { - LOGE("%s::VIDIOC_QUERYCAP failed", __func__); + ALOGE("%s::VIDIOC_QUERYCAP failed", __func__); return -1; } if (!(v4l2cap.capabilities & V4L2_CAP_STREAMING)) { - LOGE("%s::%s is not support streaming", __func__, node); + ALOGE("%s::%s is not support streaming", __func__, node); return -1; } if (!(v4l2cap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE)) { - LOGE("%s::%s is not support video output mplane", __func__, node); + ALOGE("%s::%s is not support video output mplane", __func__, node); return -1; } @@ -137,7 +137,7 @@ int gsc_v4l2_querycap(int fd, char *node) int gsc_v4l2_query_buf(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum v4l2_memory memory, unsigned int buf_index, int num_plane) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_buffer buf; struct v4l2_plane planes[MAX_PLANES_GSCALER]; @@ -148,7 +148,7 @@ int gsc_v4l2_query_buf(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum memset(&planes[i], 0, sizeof(struct v4l2_plane)); if (MAX_BUFFERS_GSCALER <= buf_index || MAX_PLANES_GSCALER < num_plane) { - LOGE("%s::exceed MAX! : buf_index=%d, num_plane=%d", __func__, buf_index, num_plane); + ALOGE("%s::exceed MAX! : buf_index=%d, num_plane=%d", __func__, buf_index, num_plane); return -1; } @@ -159,24 +159,24 @@ int gsc_v4l2_query_buf(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum buf.m.planes = planes; if (ioctl(fd, VIDIOC_QUERYBUF, &buf) < 0) { - LOGE("%s::VIDIOC_QUERYBUF failed, plane_cnt=%d", __func__, buf.length); + ALOGE("%s::VIDIOC_QUERYBUF failed, plane_cnt=%d", __func__, buf.length); return -1; } for (int i = 0; i < num_plane; i++) { if ((secBuf->virt.extP[i] = (char *)mmap(0, buf.m.planes[i].length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, buf.m.planes[i].m.mem_offset)) < 0) { - LOGE("%s::mmap failed", __func__); - LOGE("%s::Offset = 0x%x", __func__, buf.m.planes[i].m.mem_offset); - LOGE("%s::Legnth = %d" , __func__, buf.m.planes[i].length); - LOGE("%s::vaddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); + ALOGE("%s::mmap failed", __func__); + ALOGE("%s::Offset = 0x%x", __func__, buf.m.planes[i].m.mem_offset); + ALOGE("%s::Legnth = %d" , __func__, buf.m.planes[i].length); + ALOGE("%s::vaddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); return -1; } secBuf->size.extS[i] = buf.m.planes[i].length; #ifdef DEBUG_LIB_FIMC - LOGD("%s::vaddr[bufindex=%d][planeindex=%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); - LOGD("%s::Legnth = %d" , __func__, buf.m.planes[i].length); + ALOGD("%s::vaddr[bufindex=%d][planeindex=%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); + ALOGD("%s::Legnth = %d" , __func__, buf.m.planes[i].length); #endif } @@ -186,7 +186,7 @@ int gsc_v4l2_query_buf(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum int gsc_v4l2_req_buf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, unsigned int num_bufs) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_requestbuffers reqbuf; @@ -195,20 +195,20 @@ int gsc_v4l2_req_buf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, u reqbuf.count = num_bufs; #ifdef DEBUG_LIB_FIMC - LOGI("%d buffers needed", reqbuf.count); + ALOGI("%d buffers needed", reqbuf.count); #endif if (ioctl(fd, VIDIOC_REQBUFS, &reqbuf) < 0) { - LOGE("%s::VIDIOC_REQBUFS failed, reqbuf.count=%d", __func__, reqbuf.count); + ALOGE("%s::VIDIOC_REQBUFS failed, reqbuf.count=%d", __func__, reqbuf.count); return -1; } #ifdef DEBUG_LIB_FIMC - LOGI("%d buffers allocated", reqbuf.count); + ALOGI("%d buffers allocated", reqbuf.count); #endif if (reqbuf.count < num_bufs) { - LOGE("%s::VIDIOC_REQBUFS failed ((reqbuf.count(%d) < num_bufs(%d))", + ALOGE("%s::VIDIOC_REQBUFS failed ((reqbuf.count(%d) < num_bufs(%d))", __func__, reqbuf.count, num_bufs); return -1; } @@ -219,7 +219,7 @@ int gsc_v4l2_req_buf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, u int gsc_v4l2_s_ctrl(int fd, int id, int value) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_control vc; @@ -227,7 +227,7 @@ int gsc_v4l2_s_ctrl(int fd, int id, int value) vc.value = value; if (ioctl(fd, VIDIOC_S_CTRL, &vc) < 0) { - LOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, id, value); + ALOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, id, value); return -1; } @@ -237,17 +237,17 @@ int gsc_v4l2_s_ctrl(int fd, int id, int value) int gsc_v4l2_set_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, s5p_fimc_img_info *img_info) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_format fmt; struct v4l2_crop crop; fmt.type = type; #ifdef DEBUG_LIB_FIMC - LOGD("%s::fmt.type=%d", __func__, fmt.type); + ALOGD("%s::fmt.type=%d", __func__, fmt.type); #endif if (ioctl(fd, VIDIOC_G_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_G_FMT failed", __func__); + ALOGE("%s::VIDIOC_G_FMT failed", __func__); return -1; } @@ -268,14 +268,14 @@ int gsc_v4l2_set_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, s5p fmt.fmt.pix_mp.num_planes = img_info->planes; break; default: - LOGE("%s::invalid buffer type", __func__); + ALOGE("%s::invalid buffer type", __func__); return -1; break; } #ifdef DEBUG_LIB_FIMC for (int i = 0; i < 3; i++) { - LOGD("%s::fmt.fmt.pix_mp. w=%d, h=%d, pixelformat=0x%08x, filed=%d, num_planes=%d", + ALOGD("%s::fmt.fmt.pix_mp. w=%d, h=%d, pixelformat=0x%08x, filed=%d, num_planes=%d", __func__, fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height, fmt.fmt.pix_mp.pixelformat, fmt.fmt.pix_mp.field, @@ -284,14 +284,14 @@ for (int i = 0; i < 3; i++) { #endif if (ioctl(fd, VIDIOC_S_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_S_FMT failed", __func__); + ALOGE("%s::VIDIOC_S_FMT failed", __func__); return -1; } #ifdef DEBUG_LIB_FIMC for (int i = 0; i < 3; i++) { - LOGD("%s::pix_mp.pix_mp.plane_fmt[%d].sizeimage =0x%08x", __func__, i, fmt.fmt.pix_mp.plane_fmt[i].sizeimage); - LOGD("%s::pix_mp.pix_mp.plane_fmt[%d].bytesperline=0x%08x", __func__, i, fmt.fmt.pix_mp.plane_fmt[i].bytesperline); + ALOGD("%s::pix_mp.pix_mp.plane_fmt[%d].sizeimage =0x%08x", __func__, i, fmt.fmt.pix_mp.plane_fmt[i].sizeimage); + ALOGD("%s::pix_mp.pix_mp.plane_fmt[%d].bytesperline=0x%08x", __func__, i, fmt.fmt.pix_mp.plane_fmt[i].bytesperline); } #endif @@ -302,7 +302,7 @@ for (int i = 0; i < 3; i++) { crop.c.height = img_info->height; if (ioctl(fd, VIDIOC_S_CROP, &crop) < 0) { - LOGE("%s::VIDIOC_S_CROP (x=%d, y=%d, w=%d, h=%d) failed", + ALOGE("%s::VIDIOC_S_CROP (x=%d, y=%d, w=%d, h=%d) failed", __func__, img_info->start_x, img_info->start_y, @@ -312,9 +312,9 @@ for (int i = 0; i < 3; i++) { } #ifdef DEBUG_LIB_FIMC - LOGD("%s::pix_mp pixelformat=0x%08x", __func__, fmt.fmt.pix_mp.pixelformat); - LOGD("%s::pix_mp w=%d, h=%d, planes=%d", __func__, fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height, fmt.fmt.pix_mp.num_planes); - LOGD("%s::crop x=%d, y=%d, w=%d, h=%d", __func__, crop.c.left, crop.c.top, crop.c.width, crop.c.height); + ALOGD("%s::pix_mp pixelformat=0x%08x", __func__, fmt.fmt.pix_mp.pixelformat); + ALOGD("%s::pix_mp w=%d, h=%d, planes=%d", __func__, fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height, fmt.fmt.pix_mp.num_planes); + ALOGD("%s::crop x=%d, y=%d, w=%d, h=%d", __func__, crop.c.left, crop.c.top, crop.c.width, crop.c.height); #endif return 0; @@ -323,10 +323,10 @@ for (int i = 0; i < 3; i++) { int gsc_v4l2_stream_on(int fd, enum v4l2_buf_type type) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (ioctl(fd, VIDIOC_STREAMON, &type) < 0) { - LOGE("%s::VIDIOC_STREAMON failed", __func__); + ALOGE("%s::VIDIOC_STREAMON failed", __func__); return -1; } @@ -336,8 +336,8 @@ int gsc_v4l2_stream_on(int fd, enum v4l2_buf_type type) int gsc_v4l2_queue(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum v4l2_memory memory, unsigned int index, int num_plane) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); - LOGD("%s::num_plane=%d", __func__, num_plane); + ALOGD("%s", __func__); + ALOGD("%s::num_plane=%d", __func__, num_plane); #endif struct v4l2_buffer buf; struct v4l2_plane planes[MAX_PLANES_GSCALER]; @@ -358,15 +358,15 @@ int gsc_v4l2_queue(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum v4l2 buf.m.planes[i].length = secBuf->size.extS[i]; buf.m.planes[i].bytesused = buf.m.planes[i].length; #ifdef DEBUG_LIB_FIMC - LOGD("%s::buf.index=%d", __func__, buf.index); - LOGD("%s::buf.m.planes[%d].m.userptr=0x%08x", __func__, i, (unsigned int)buf.m.planes[i].m.userptr); - LOGD("%s::buf.m.planes[%d].length =0x%08x", __func__, i, buf.m.planes[i].length); - LOGD("%s::buf.m.planes[%d].bytesused=0x%08x", __func__, i, buf.m.planes[i].bytesused); + ALOGD("%s::buf.index=%d", __func__, buf.index); + ALOGD("%s::buf.m.planes[%d].m.userptr=0x%08x", __func__, i, (unsigned int)buf.m.planes[i].m.userptr); + ALOGD("%s::buf.m.planes[%d].length =0x%08x", __func__, i, buf.m.planes[i].length); + ALOGD("%s::buf.m.planes[%d].bytesused=0x%08x", __func__, i, buf.m.planes[i].bytesused); #endif } if (ioctl(fd, VIDIOC_QBUF, &buf) < 0) { - LOGE("%s::VIDIOC_QBUF failed", __func__); + ALOGE("%s::VIDIOC_QBUF failed", __func__); return -1; } @@ -376,7 +376,7 @@ int gsc_v4l2_queue(int fd, SecBuffer *secBuf, enum v4l2_buf_type type, enum v4l2 int gsc_v4l2_dequeue(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, unsigned int *index, int num_plane) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_buffer buf; struct v4l2_plane planes[MAX_PLANES_GSCALER]; @@ -393,14 +393,14 @@ int gsc_v4l2_dequeue(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, u buf.m.planes = planes; if (ioctl(fd, VIDIOC_DQBUF, &buf) < 0) { - LOGE("%s::VIDIOC_DQBUF failed", __func__); + ALOGE("%s::VIDIOC_DQBUF failed", __func__); return -1; } *index = buf.index; #ifdef DEBUG_LIB_FIMC - LOGD("%s::buf.index=%d", __func__, buf.index); + ALOGD("%s::buf.index=%d", __func__, buf.index); #endif return 0; @@ -409,10 +409,10 @@ int gsc_v4l2_dequeue(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, u int gsc_v4l2_stream_off(int fd, enum v4l2_buf_type type) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (ioctl(fd, VIDIOC_STREAMOFF, &type) < 0) { - LOGE("%s::VIDIOC_STREAMOFF failed", __func__); + ALOGE("%s::VIDIOC_STREAMOFF failed", __func__); return -1; } @@ -422,7 +422,7 @@ int gsc_v4l2_stream_off(int fd, enum v4l2_buf_type type) int gsc_v4l2_clr_buf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_requestbuffers req; @@ -431,7 +431,7 @@ int gsc_v4l2_clr_buf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory) req.memory = memory; if (ioctl(fd, VIDIOC_REQBUFS, &req) < 0) { - LOGE("%s::VIDIOC_REQBUFS failed", __func__); + ALOGE("%s::VIDIOC_REQBUFS failed", __func__); return -1; } @@ -441,7 +441,7 @@ int gsc_v4l2_clr_buf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory) int gsc_subdev_set_fmt(int fd, unsigned int pad, enum v4l2_mbus_pixelcode code, s5p_fimc_img_info *img_info) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_subdev_format fmt; struct v4l2_subdev_crop crop; @@ -453,7 +453,7 @@ int gsc_subdev_set_fmt(int fd, unsigned int pad, enum v4l2_mbus_pixelcode code, fmt.format.code = code; if (ioctl(fd, VIDIOC_SUBDEV_S_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_SUBDEV_S_FMT failed", __func__); + ALOGE("%s::VIDIOC_SUBDEV_S_FMT failed", __func__); return -1; } @@ -465,12 +465,12 @@ int gsc_subdev_set_fmt(int fd, unsigned int pad, enum v4l2_mbus_pixelcode code, crop.rect.height = img_info->height; #ifdef DEBUG_LIB_FIMC - LOGD("%s::pix_mp w=%d, h=%d", __func__, fmt.format.width, fmt.format.height); - LOGD("%s::crop x=%d, y=%d, w=%d, h=%d", __func__, crop.rect.left, crop.rect.top, crop.rect.width, crop.rect.height); + ALOGD("%s::pix_mp w=%d, h=%d", __func__, fmt.format.width, fmt.format.height); + ALOGD("%s::crop x=%d, y=%d, w=%d, h=%d", __func__, crop.rect.left, crop.rect.top, crop.rect.width, crop.rect.height); #endif if (ioctl(fd, VIDIOC_SUBDEV_S_CROP, &crop) < 0) { - LOGE("%s::VIDIOC_SUBDEV_S_CROP failed", __func__); + ALOGE("%s::VIDIOC_SUBDEV_S_CROP failed", __func__); return -1; } @@ -507,10 +507,10 @@ SecGscaler::SecGscaler() SecGscaler::~SecGscaler() { if (mFlagCreate == true) { - LOGE("%s::this is not Destroyed fail", __func__); + ALOGE("%s::this is not Destroyed fail", __func__); if (destroy() == false) - LOGE("%s::destroy failed", __func__); + ALOGE("%s::destroy failed", __func__); } } @@ -523,10 +523,10 @@ bool SecGscaler::create(enum DEV dev, enum MODE mode, unsigned int numOfBuf) bool SecGscaler::create(enum DEV dev, unsigned int numOfBuf) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == true) { - LOGE("%s::Already Created", __func__); + ALOGE("%s::Already Created", __func__); return true; } @@ -576,7 +576,7 @@ bool SecGscaler::create(enum DEV dev, unsigned int numOfBuf) mSubdevNodeNum = 3; // need to modify //carrotsm break; default: - LOGE("%s::invalid mDev(%d)", __func__, mDev); + ALOGE("%s::invalid mDev(%d)", __func__, mDev); goto err; break; } @@ -585,7 +585,7 @@ bool SecGscaler::create(enum DEV dev, unsigned int numOfBuf) mMediadevFd = open(node, O_RDONLY); if (mMediadevFd < 0) { - LOGE("%s::open(%s) failed : O_RDONLY", __func__, node); + ALOGE("%s::open(%s) failed : O_RDONLY", __func__, node); goto err; } @@ -597,15 +597,15 @@ bool SecGscaler::create(enum DEV dev, unsigned int numOfBuf) if (ioctl(mMediadevFd, MEDIA_IOC_ENUM_ENTITIES, &entity_desc) < 0) { if (errno == EINVAL) { - LOGD("%s::MEDIA_IOC_ENUM_ENTITIES ended", __func__); + ALOGD("%s::MEDIA_IOC_ENUM_ENTITIES ended", __func__); break; } - LOGE("%s::MEDIA_IOC_ENUM_ENTITIES failed", __func__); + ALOGE("%s::MEDIA_IOC_ENUM_ENTITIES failed", __func__); goto err; } #ifdef DEBUG_LIB_FIMC - LOGD("%s::entity_desc.id=%d, .minor=%d .name=%s", __func__, entity_desc.id, entity_desc.v4l.minor, entity_desc.name); + ALOGD("%s::entity_desc.id=%d, .minor=%d .name=%s", __func__, entity_desc.id, entity_desc.v4l.minor, entity_desc.name); #endif if (strncmp(entity_desc.name, subdevname, strlen(subdevname)) == 0) @@ -622,20 +622,20 @@ bool SecGscaler::create(enum DEV dev, unsigned int numOfBuf) sprintf(node, "%s%d", PFX_NODE_SUBDEV, mSubdevNodeNum); mSubdevFd = open(node, O_RDWR); if (mSubdevFd < 0) { - LOGE("%s::open(%s) failed", __func__, node); + ALOGE("%s::open(%s) failed", __func__, node); goto err; } sprintf(node, "%s%d", PFX_NODE_VIDEODEV, mVideoNodeNum); mVideodevFd = open(node, O_RDWR); if (mVideodevFd < 0) { - LOGE("%s::open(%s) failed", __func__, node); + ALOGE("%s::open(%s) failed", __func__, node); goto err; } /* check capability */ if (gsc_v4l2_querycap(mVideodevFd, node) < 0 ) { - LOGE("%s::tvout_std_v4l2_querycap failed", __func__); + ALOGE("%s::tvout_std_v4l2_querycap failed", __func__); goto err; } @@ -665,18 +665,18 @@ bool SecGscaler::destroy() s5p_fimc_params_t *params = &(mS5pFimc.params); if (mFlagCreate == false) { - LOGE("%s::Already Destroyed", __func__); + ALOGE("%s::Already Destroyed", __func__); return true; } if (mFlagStreamOn == true) { if (streamOff() == false) { - LOGE("%s::streamOff() failed", __func__); + ALOGE("%s::streamOff() failed", __func__); return false; } if (closeVideodevFd() == false) { - LOGE("%s::closeVideodevFd() failed", __func__); + ALOGE("%s::closeVideodevFd() failed", __func__); return false; } @@ -720,7 +720,7 @@ bool SecGscaler::openVideodevFd(void) sprintf(node, "%s%d", PFX_NODE_VIDEODEV, mVideoNodeNum); mVideodevFd = open(node, O_RDWR); if (mVideodevFd < 0) { - LOGE("%s::open(%s) failed", __func__, node); + ALOGE("%s::open(%s) failed", __func__, node); return false; } @@ -731,14 +731,14 @@ bool SecGscaler::closeVideodevFd(void) { if (mFlagSetSrcParam == true) { if (gsc_v4l2_clr_buf(mVideodevFd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_TYPE) < 0) { - LOGE("%s::gsc_v4l2_clr_buf() failed", __func__); + ALOGE("%s::gsc_v4l2_clr_buf() failed", __func__); return false; } } if (0 < mVideodevFd) { if (close(mVideodevFd) < 0) { - LOGE("%s::close Videodev failed", __func__); + ALOGE("%s::close Videodev failed", __func__); return false; } } @@ -770,7 +770,7 @@ bool SecGscaler::getFlagSteamOn(void) SecBuffer * SecGscaler::getSrcBufferAddr(int index) { if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } @@ -784,17 +784,17 @@ bool SecGscaler::setSrcParams(unsigned int width, unsigned int height, bool forceChange) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } int v4l2ColorFormat = HAL_PIXEL_FORMAT_2_V4L2_PIX(colorFormat); if (v4l2ColorFormat < 0) { - LOGE("%s::not supported color format", __func__); + ALOGE("%s::not supported color format", __func__); return false; } @@ -809,18 +809,18 @@ bool SecGscaler::setSrcParams(unsigned int width, unsigned int height, if (m_checkSrcSize(width, height, cropX, cropY, &fimcWidth, &fimcHeight, v4l2ColorFormat, false) == false) { - LOGE("%s::::size align error!", __func__); + ALOGE("%s::::size align error!", __func__); return false; } if (fimcWidth != *cropWidth || fimcHeight != *cropHeight) { if (forceChange == true) { #ifdef DEBUG_LIB_FIMC - LOGD("size is changed from [w=%d, h=%d] to [w=%d, h=%d]", + ALOGD("size is changed from [w=%d, h=%d] to [w=%d, h=%d]", *cropWidth, *cropHeight, fimcWidth, fimcHeight); #endif } else { - LOGE("%s::invalid source params", __func__); + ALOGE("%s::invalid source params", __func__); return false; } } @@ -874,7 +874,7 @@ bool SecGscaler::setSrcParams(unsigned int width, unsigned int height, mSrcBuffer[buf_index].size.extS[0] = (frame_size * 3) >> 1; break; default: - LOGE("%s::invalid color type", __func__); + ALOGE("%s::invalid color type", __func__); return false; break; } @@ -888,7 +888,7 @@ bool SecGscaler::setSrcParams(unsigned int width, unsigned int height, mSrcBuffer[buf_index].size.extS[2] = frame_size / frame_ratio; break; default: - LOGE("%s::invalid color foarmt", __func__); + ALOGE("%s::invalid color foarmt", __func__); return false; break; } @@ -900,25 +900,25 @@ bool SecGscaler::setSrcParams(unsigned int width, unsigned int height, if (mFlagSetSrcParam == true) { if (gsc_v4l2_clr_buf(mVideodevFd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_TYPE) < 0) { - LOGE("%s::gsc_v4l2_clr_buf() failed", __func__); + ALOGE("%s::gsc_v4l2_clr_buf() failed", __func__); return false; } } if (gsc_v4l2_set_fmt(mVideodevFd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_NONE, &(params->src)) < 0) { - LOGE("%s::fimc_v4l2_set_fmt()[src] failed", __func__); + ALOGE("%s::fimc_v4l2_set_fmt()[src] failed", __func__); return false; } if (gsc_v4l2_req_buf(mVideodevFd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_TYPE, mNumOfBuf) < 0) { - LOGE("%s::fimc_v4l2_req_buf()[src] failed", __func__); + ALOGE("%s::fimc_v4l2_req_buf()[src] failed", __func__); return false; } #ifdef USE_GSC_USERPTR #else for (unsigned int buf_index = 0; buf_index < MAX_BUFFERS_GSCALER; buf_index++) { if (gsc_v4l2_query_buf(mVideodevFd, &mSrcBuffer[buf_index], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_MMAP, buf_index, params->src.planes) < 0) { - LOGE("%s::gsc_v4l2_query_buf() failed", __func__); + ALOGE("%s::gsc_v4l2_query_buf() failed", __func__); return false; } } @@ -943,7 +943,7 @@ bool SecGscaler::getSrcParams(unsigned int *width, unsigned int *height, fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; if (ioctl(mVideodevFd, VIDIOC_G_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_G_FMT(fmt.type : %d) failed", __func__, fmt.type); + ALOGE("%s::VIDIOC_G_FMT(fmt.type : %d) failed", __func__, fmt.type); return false; } @@ -962,14 +962,14 @@ bool SecGscaler::getSrcParams(unsigned int *width, unsigned int *height, *v4l2colorFormat = fmt.fmt.pix_mp.pixelformat; break; default: - LOGE("%s::Invalid buffer type", __func__); + ALOGE("%s::Invalid buffer type", __func__); return false; break; } crop.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; if (ioctl(mVideodevFd, VIDIOC_G_CROP, &crop) < 0) { - LOGE("%s::VIDIOC_G_CROP failed", __func__); + ALOGE("%s::VIDIOC_G_CROP failed", __func__); return false; } @@ -987,16 +987,16 @@ bool SecGscaler::setSrcAddr(unsigned int YAddr, int colorFormat) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagSetSrcParam == false) { - LOGE("%s::mFlagSetSrcParam == false", __func__); + ALOGE("%s::mFlagSetSrcParam == false", __func__); return false; } @@ -1026,11 +1026,11 @@ bool SecGscaler::setDstParams(unsigned int width, unsigned int height, bool forceChange) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } @@ -1044,7 +1044,7 @@ bool SecGscaler::setDstParams(unsigned int width, unsigned int height, if( m_checkDstSize(width, height, cropX, cropY, &fimcWidth, &fimcHeight, V4L2_PIX_FMT_YUV444, mRotVal, true) == false) { - LOGE("%s::size align error!", __func__); + ALOGE("%s::size align error!", __func__); return false; } @@ -1052,11 +1052,11 @@ bool SecGscaler::setDstParams(unsigned int width, unsigned int height, if (fimcWidth != *cropWidth || fimcHeight != *cropHeight) { if (forceChange == true) { #ifdef DEBUG_LIB_FIMC - LOGD("size is changed from [w = %d, h= %d] to [w = %d, h = %d]", + ALOGD("size is changed from [w = %d, h= %d] to [w = %d, h = %d]", *cropWidth, *cropHeight, fimcWidth, fimcHeight); #endif } else { - LOGE("%s::Invalid destination params", __func__); + ALOGE("%s::Invalid destination params", __func__); return false; } } @@ -1095,7 +1095,7 @@ bool SecGscaler::setDstParams(unsigned int width, unsigned int height, } if (gsc_subdev_set_fmt(mSubdevFd, GSC_SUBDEV_PAD_SOURCE, V4L2_MBUS_FMT_YUV8_1X24, &(params->dst)) < 0) { - LOGE("%s::gsc_subdev_set_fmt()[dst] failed", __func__); + ALOGE("%s::gsc_subdev_set_fmt()[dst] failed", __func__); return false; } @@ -1116,7 +1116,7 @@ bool SecGscaler::getDstParams(unsigned int *width, unsigned int *height, fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; if (ioctl(mSubdevFd, VIDIOC_SUBDEV_G_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_SUBDEV_S_FMT", __func__); + ALOGE("%s::VIDIOC_SUBDEV_S_FMT", __func__); return -1; } @@ -1128,7 +1128,7 @@ bool SecGscaler::getDstParams(unsigned int *width, unsigned int *height, crop.which = V4L2_SUBDEV_FORMAT_ACTIVE; if (ioctl(mSubdevFd, VIDIOC_SUBDEV_G_CROP, &crop) < 0) { - LOGE("%s::VIDIOC_SUBDEV_S_CROP", __func__); + ALOGE("%s::VIDIOC_SUBDEV_S_CROP", __func__); return -1; } @@ -1143,11 +1143,11 @@ bool SecGscaler::getDstParams(unsigned int *width, unsigned int *height, bool SecGscaler::setDstAddr(unsigned int YAddr, unsigned int CbAddr, unsigned int CrAddr, int buf_index) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } @@ -1159,12 +1159,12 @@ bool SecGscaler::setRotVal(unsigned int rotVal) struct v4l2_control vc; if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (gsc_v4l2_s_ctrl(mVideodevFd, V4L2_CID_ROTATE, rotVal) < 0) { - LOGE("%s::fimc_v4l2_s_ctrl(V4L2_CID_ROTATE) failed", __func__); + ALOGE("%s::fimc_v4l2_s_ctrl(V4L2_CID_ROTATE) failed", __func__); return false; } @@ -1175,12 +1175,12 @@ bool SecGscaler::setRotVal(unsigned int rotVal) bool SecGscaler::setGlobalAlpha(bool enable, int alpha) { if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagStreamOn == true) { - LOGE("%s::mFlagStreamOn == true", __func__); + ALOGE("%s::mFlagStreamOn == true", __func__); return false; } @@ -1194,12 +1194,12 @@ bool SecGscaler::setGlobalAlpha(bool enable, int alpha) bool SecGscaler::setLocalAlpha(bool enable) { if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagStreamOn == true) { - LOGE("%s::mFlagStreamOn == true", __func__); + ALOGE("%s::mFlagStreamOn == true", __func__); return false; } @@ -1212,12 +1212,12 @@ bool SecGscaler::setLocalAlpha(bool enable) bool SecGscaler::setColorKey(bool enable, int colorKey) { if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagStreamOn == true) { - LOGE("%s::mFlagStreamOn == true", __func__); + ALOGE("%s::mFlagStreamOn == true", __func__); return false; } @@ -1230,21 +1230,21 @@ bool SecGscaler::setColorKey(bool enable, int colorKey) bool SecGscaler::run() { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagSetSrcParam == false) { - LOGE("%s::faild : Need to set source parameters of Gscaler", __func__); + ALOGE("%s::faild : Need to set source parameters of Gscaler", __func__); return false; } if (mFlagSetDstParam == false) { - LOGE("%s::faild : Need to set destination parameters of Gscaler", __func__); + ALOGE("%s::faild : Need to set destination parameters of Gscaler", __func__); return false; } @@ -1254,7 +1254,7 @@ bool SecGscaler::run() src_planes = (src_planes == -1) ? 1 : src_planes; if (gsc_v4l2_queue(mVideodevFd, &(mSrcBuffer[mSrcIndex]), V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_TYPE, mSrcIndex, src_planes) < 0) { - LOGE("%s::fimc_v4l2_queue[src](mNumOfBuf : %d,mSrcIndex=%d) failed", __func__, mNumOfBuf, mSrcIndex); + ALOGE("%s::fimc_v4l2_queue[src](mNumOfBuf : %d,mSrcIndex=%d) failed", __func__, mNumOfBuf, mSrcIndex); return false; } @@ -1264,7 +1264,7 @@ bool SecGscaler::run() } if (gsc_v4l2_dequeue(mVideodevFd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_TYPE, &dqIndex, src_planes) < 0) { - LOGE("%s::fimc_v4l2_dequeue[src](mNumOfBuf : %d, dqIndex=%d) failed", __func__, mNumOfBuf, dqIndex); + ALOGE("%s::fimc_v4l2_dequeue[src](mNumOfBuf : %d, dqIndex=%d) failed", __func__, mNumOfBuf, dqIndex); return false; } @@ -1274,16 +1274,16 @@ bool SecGscaler::run() bool SecGscaler::streamOn(void) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagStreamOn == true) { - LOGE("%s::already streamon", __func__); + ALOGE("%s::already streamon", __func__); return true; } @@ -1292,14 +1292,14 @@ bool SecGscaler::streamOn(void) src_planes = (src_planes == -1) ? 1 : src_planes; if (gsc_v4l2_queue(mVideodevFd, &(mSrcBuffer[mSrcIndex]), V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_TYPE, mSrcIndex, src_planes) < 0) { - LOGE("%s::fimc_v4l2_queue[src](mNumOfBuf : %d,mSrcIndex=%d) failed", __func__, mNumOfBuf, mSrcIndex); + ALOGE("%s::fimc_v4l2_queue[src](mNumOfBuf : %d,mSrcIndex=%d) failed", __func__, mNumOfBuf, mSrcIndex); return false; } mSrcIndex++; if (mSrcIndex == MAX_BUFFERS_GSCALER - 1) { if (gsc_v4l2_stream_on(mVideodevFd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) < 0) { - LOGE("%s::fimc_v4l2_stream_on() failed", __func__); + ALOGE("%s::fimc_v4l2_stream_on() failed", __func__); return false; } mFlagStreamOn = true; @@ -1315,21 +1315,21 @@ bool SecGscaler::streamOn(void) bool SecGscaler::streamOff(void) { #ifdef DEBUG_LIB_FIMC - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagStreamOn == false) { - LOGE("%s::already streamoff", __func__); + ALOGE("%s::already streamoff", __func__); return true; } if (gsc_v4l2_stream_off(mVideodevFd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) < 0) { - LOGE("%s::fimc_v4l2_stream_off() failed", __func__); + ALOGE("%s::fimc_v4l2_stream_off() failed", __func__); return false; } diff --git a/exynos5/hal/libhdmi/SecHdmi/SecHdmi.cpp b/exynos5/hal/libhdmi/SecHdmi/SecHdmi.cpp index 8f0f80b..8c0970b 100644 --- a/exynos5/hal/libhdmi/SecHdmi/SecHdmi.cpp +++ b/exynos5/hal/libhdmi/SecHdmi/SecHdmi.cpp @@ -15,8 +15,8 @@ */ //#define DEBUG_MSG_ENABLE -//#define LOG_NDEBUG 0 -//#define LOG_TAG "libhdmi" +//#define ALOG_NDEBUG 0 +//#define ALOG_TAG "libhdmi" #include <cutils/log.h> #include "ion.h" #include "SecHdmi.h" @@ -42,7 +42,7 @@ extern unsigned int cur_g2d_address; SecHdmi::CECThread::~CECThread() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif mFlagRunning = false; } @@ -74,18 +74,18 @@ bool SecHdmi::CECThread::threadLoop() opcode = buffer[1]; if (CECIgnoreMessage(opcode, lsrc)) { - LOGE("### ignore message coming from address 15 (unregistered)\n"); + ALOGE("### ignore message coming from address 15 (unregistered)\n"); return true; } if (!CECCheckMessageSize(opcode, size)) { - LOGE("### invalid message size: %d(opcode: 0x%x) ###\n", size, opcode); + ALOGE("### invalid message size: %d(opcode: 0x%x) ###\n", size, opcode); return true; } /* check if message broadcasted/directly addressed */ if (!CECCheckMessageMode(opcode, (buffer[0] & 0x0F) == CEC_MSG_BROADCAST ? 1 : 0)) { - LOGE("### invalid message mode (directly addressed/broadcast) ###\n"); + ALOGE("### invalid message mode (directly addressed/broadcast) ###\n"); return true; } @@ -106,14 +106,14 @@ bool SecHdmi::CECThread::threadLoop() break; case CEC_OPCODE_REQUEST_ACTIVE_SOURCE: - LOGD("[CEC_OPCODE_REQUEST_ACTIVE_SOURCE]\n"); + ALOGD("[CEC_OPCODE_REQUEST_ACTIVE_SOURCE]\n"); /* responce with "Active Source" */ buffer[0] = (mLaddr << 4) | CEC_MSG_BROADCAST; buffer[1] = CEC_OPCODE_ACTIVE_SOURCE; buffer[2] = (mPaddr >> 8) & 0xFF; buffer[3] = mPaddr & 0xFF; size = 4; - LOGD("Tx : [CEC_OPCODE_ACTIVE_SOURCE]\n"); + ALOGD("Tx : [CEC_OPCODE_ACTIVE_SOURCE]\n"); break; case CEC_OPCODE_ABORT: @@ -129,7 +129,7 @@ bool SecHdmi::CECThread::threadLoop() } if (CECSendMessage(buffer, size) != size) - LOGE("CECSendMessage() failed!!!\n"); + ALOGE("CECSendMessage() failed!!!\n"); } return true; @@ -138,33 +138,33 @@ bool SecHdmi::CECThread::threadLoop() bool SecHdmi::CECThread::start() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mThreadControlLock); if (exitPending()) { if (requestExitAndWait() == WOULD_BLOCK) { - LOGE("mCECThread.requestExitAndWait() == WOULD_BLOCK"); + ALOGE("mCECThread.requestExitAndWait() == WOULD_BLOCK"); return false; } } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("EDIDGetCECPhysicalAddress"); + ALOGD("EDIDGetCECPhysicalAddress"); #endif /* set to not valid physical address */ mPaddr = CEC_NOT_VALID_PHYSICAL_ADDRESS; if (!EDIDGetCECPhysicalAddress(&mPaddr)) { - LOGE("Error: EDIDGetCECPhysicalAddress() failed.\n"); + ALOGE("Error: EDIDGetCECPhysicalAddress() failed.\n"); return false; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("CECOpen"); + ALOGD("CECOpen"); #endif if (!CECOpen()) { - LOGE("CECOpen() failed!!!\n"); + ALOGE("CECOpen() failed!!!\n"); return false; } @@ -178,24 +178,24 @@ bool SecHdmi::CECThread::start() */ #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("CECAllocLogicalAddress"); + ALOGD("CECAllocLogicalAddress"); #endif mLaddr = CECAllocLogicalAddress(mPaddr, mDevtype); if (!mLaddr) { - LOGE("CECAllocLogicalAddress() failed!!!\n"); + ALOGE("CECAllocLogicalAddress() failed!!!\n"); if (!CECClose()) - LOGE("CECClose() failed!\n"); + ALOGE("CECClose() failed!\n"); return false; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("request to run CECThread"); + ALOGD("request to run CECThread"); #endif status_t ret = run("SecHdmi::CECThread", PRIORITY_DISPLAY); if (ret != NO_ERROR) { - LOGE("%s fail to run thread", __func__); + ALOGE("%s fail to run thread", __func__); return false; } return true; @@ -204,16 +204,16 @@ bool SecHdmi::CECThread::start() bool SecHdmi::CECThread::stop() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s request Exit", __func__); + ALOGD("%s request Exit", __func__); #endif Mutex::Autolock lock(mThreadControlLock); if (requestExitAndWait() == WOULD_BLOCK) { - LOGE("mCECThread.requestExitAndWait() == WOULD_BLOCK"); + ALOGE("mCECThread.requestExitAndWait() == WOULD_BLOCK"); return false; } if (!CECClose()) - LOGE("CECClose() failed!\n"); + ALOGE("CECClose() failed!\n"); mFlagRunning = false; return true; @@ -264,7 +264,7 @@ SecHdmi::SecHdmi(): mDisplayHeight(DEFALULT_DISPLAY_HEIGHT) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif for (int i = 0; i < HDMI_LAYER_MAX; i++) { mFlagLayerEnable[i] = false; @@ -311,10 +311,10 @@ SecHdmi::SecHdmi(): SecHdmi::~SecHdmi() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == true) - LOGE("%s::this is not Destroyed fail", __func__); + ALOGE("%s::this is not Destroyed fail", __func__); else disconnect(); } @@ -352,36 +352,36 @@ bool SecHdmi::create(int width, int height) #endif #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (mFlagCreate == true) { - LOGE("%s::Already Created", __func__); + ALOGE("%s::Already Created", __func__); return true; } if (mDefaultFBFd <= 0) { if ((mDefaultFBFd = fb_open(DEFAULT_FB)) < 0) { - LOGE("%s:Failed to open default FB", __func__); + ALOGE("%s:Failed to open default FB", __func__); return false; } } if (mSecGscaler.create(SecGscaler::DEV_3, MAX_BUFFERS_GSCALER) == false) { - LOGE("%s::SecGscaler create() failed", __func__); + ALOGE("%s::SecGscaler create() failed", __func__); goto CREATE_FAIL; } mIonClient = ion_client_create(); if (mIonClient < 0) { mIonClient = -1; - LOGE("%s::ion_client_create() failed", __func__); + ALOGE("%s::ion_client_create() failed", __func__); goto CREATE_FAIL; } // get framebuffer virtual address for LCD if (ioctl(mDefaultFBFd, S3CFB_GET_ION_USER_HANDLE, &ion_handle) == -1) { - LOGE("%s:ioctl(S3CFB_GET_ION_USER_HANDLE) failed", __func__); + ALOGE("%s:ioctl(S3CFB_GET_ION_USER_HANDLE) failed", __func__); return false; } @@ -393,11 +393,11 @@ bool SecHdmi::create(int width, int height) ionfd_G2D = ion_alloc(mIonClient, ALIGN(g2d_reserved_memory_size * 2, PAGE_SIZE), 0, ION_HEAP_EXYNOS_MASK); if (ionfd_G2D < 0) { - LOGE("%s::ION memory allocation failed", __func__); + ALOGE("%s::ION memory allocation failed", __func__); } else { ion_base_addr = ion_map(ionfd_G2D, ALIGN(g2d_reserved_memory_size * 2, PAGE_SIZE), 0); if (ion_base_addr == MAP_FAILED) - LOGE("%s::ION mmap failed", __func__); + ALOGE("%s::ION mmap failed", __func__); } g2d_reserved_memory0 = (unsigned int)ion_base_addr; @@ -408,49 +408,49 @@ bool SecHdmi::create(int width, int height) __u32 preset_id; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::mHdmiOutputMode(%d) \n", __func__, mHdmiOutputMode); + ALOGD("%s::mHdmiOutputMode(%d) \n", __func__, mHdmiOutputMode); #endif if (mHdmiOutputMode == COMPOSITE_OUTPUT_MODE) { std_id = composite_std_2_v4l2_std_id(mCompositeStd); if ((int)std_id < 0) { - LOGE("%s::composite_std_2_v4l2_std_id(%d) fail\n", __func__, mCompositeStd); + ALOGE("%s::composite_std_2_v4l2_std_id(%d) fail\n", __func__, mCompositeStd); goto CREATE_FAIL; } if (m_setCompositeResolution(mCompositeStd) == false) { - LOGE("%s::m_setCompositeResolution(%d) fail\n", __func__, mCompositeStd); + ALOGE("%s::m_setCompositeResolution(%d) fail\n", __func__, mCompositeStd); goto CREATE_FAIL; } } else if (mHdmiOutputMode >= HDMI_OUTPUT_MODE_YCBCR && mHdmiOutputMode <= HDMI_OUTPUT_MODE_DVI) { if (hdmi_resolution_2_std_id(mHdmiResolutionValue, &mHdmiDstWidth, &mHdmiDstHeight, &std_id, &preset_id) < 0) { - LOGE("%s::hdmi_resolution_2_std_id(%d) fail\n", __func__, mHdmiResolutionValue); + ALOGE("%s::hdmi_resolution_2_std_id(%d) fail\n", __func__, mHdmiResolutionValue); goto CREATE_FAIL; } } if (m_setupLink() == false) { - LOGE("%s:Enable the link failed", __func__); + ALOGE("%s:Enable the link failed", __func__); return false; } for (int layer = HDMI_LAYER_BASE + 1; layer < HDMI_LAYER_MAX; layer++) { if (m_openLayer(layer) == false) - LOGE("%s::hdmi_init_layer(%d) failed", __func__, layer); + ALOGE("%s::hdmi_init_layer(%d) failed", __func__, layer); } for (int layer = HDMI_LAYER_BASE + 2; layer < HDMI_LAYER_MAX; layer++) { if (tvout_std_v4l2_s_ctrl(mVideodevFd[layer], V4L2_CID_TV_LAYER_BLEND_ENABLE, 1) < 0) { - LOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ENABLE) failed", __func__, layer); + ALOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ENABLE) failed", __func__, layer); return false; } if (tvout_std_v4l2_s_ctrl(mVideodevFd[layer], V4L2_CID_TV_PIXEL_BLEND_ENABLE, 1) < 0) { - LOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ENABLE) failed", __func__, layer); + ALOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ENABLE) failed", __func__, layer); return false; } if (tvout_std_v4l2_s_ctrl(mVideodevFd[layer], V4L2_CID_TV_LAYER_BLEND_ALPHA, 255) < 0) { - LOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ALPHA) failed", __func__, layer); + ALOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ALPHA) failed", __func__, layer); return false; } } @@ -463,7 +463,7 @@ CREATE_FAIL : if (mSecGscaler.flagCreate() == true && mSecGscaler.destroy() == false) - LOGE("%s::Gscaler destory failed", __func__); + ALOGE("%s::Gscaler destory failed", __func__); return false; } @@ -471,31 +471,31 @@ CREATE_FAIL : bool SecHdmi::destroy(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif char node[32]; Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Already Destroyed fail \n", __func__); + ALOGE("%s::Already Destroyed fail \n", __func__); goto DESTROY_FAIL; } for (int layer = HDMI_LAYER_BASE + 1; layer < HDMI_LAYER_MAX; layer++) { if (mFlagHdmiStart[layer] == true && m_stopHdmi(layer) == false) { - LOGE("%s::m_stopHdmi: layer[%d] fail \n", __func__, layer); + ALOGE("%s::m_stopHdmi: layer[%d] fail \n", __func__, layer); goto DESTROY_FAIL; } } for (int layer = HDMI_LAYER_BASE + 1; layer < HDMI_LAYER_MAX; layer++) { if (m_closeLayer(layer) == false) - LOGE("%s::hdmi_deinit_layer(%d) failed", __func__, layer); + ALOGE("%s::hdmi_deinit_layer(%d) failed", __func__, layer); } if (mSecGscaler.flagCreate() == true && mSecGscaler.destroy() == false) { - LOGE("%s::fimc destory fail \n", __func__); + ALOGE("%s::fimc destory fail \n", __func__); goto DESTROY_FAIL; } @@ -522,19 +522,19 @@ bool SecHdmi::destroy(void) mMediadevFd = open(node, O_RDONLY); if (mMediadevFd < 0) { - LOGE("%s::open(%s) failed", __func__, node); + ALOGE("%s::open(%s) failed", __func__, node); goto DESTROY_FAIL; } mlink_desc.flags = 0; if (ioctl(mMediadevFd, MEDIA_IOC_SETUP_LINK, &mlink_desc) < 0) { - LOGE("%s::MEDIA_IOC_SETUP_UNLINK failed", __func__); + ALOGE("%s::MEDIA_IOC_SETUP_UNLINK failed", __func__); goto DESTROY_FAIL; } for (int layer = HDMI_LAYER_BASE + 1; layer < HDMI_LAYER_MAX; layer++) { if (m_closeLayer(layer) == false) - LOGE("%s::hdmi_deinit_layer(%d) failed", __func__, layer); + ALOGE("%s::hdmi_deinit_layer(%d) failed", __func__, layer); } if (0 < mMediadevFd) @@ -558,37 +558,37 @@ DESTROY_FAIL : bool SecHdmi::connect(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif { Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (mFlagConnected == true) { - LOGD("%s::Already Connected.. \n", __func__); + ALOGD("%s::Already Connected.. \n", __func__); return true; } if (mHdmiOutputMode >= HDMI_OUTPUT_MODE_YCBCR && mHdmiOutputMode <= HDMI_OUTPUT_MODE_DVI) { if (m_flagHWConnected() == false) { - LOGD("%s::m_flagHWConnected() fail \n", __func__); + ALOGD("%s::m_flagHWConnected() fail \n", __func__); return false; } #if defined(BOARD_USES_EDID) if (!EDIDOpen()) - LOGE("EDIDInit() failed!\n"); + ALOGE("EDIDInit() failed!\n"); if (!EDIDRead()) { - LOGE("EDIDRead() failed!\n"); + ALOGE("EDIDRead() failed!\n"); if (!EDIDClose()) - LOGE("EDIDClose() failed!\n"); + ALOGE("EDIDClose() failed!\n"); } #endif @@ -600,18 +600,18 @@ bool SecHdmi::connect(void) } if (this->setHdmiOutputMode(mHdmiOutputMode, true) == false) - LOGE("%s::setHdmiOutputMode(%d) fail \n", __func__, mHdmiOutputMode); + ALOGE("%s::setHdmiOutputMode(%d) fail \n", __func__, mHdmiOutputMode); if (mHdmiOutputMode >= HDMI_OUTPUT_MODE_YCBCR && mHdmiOutputMode <= HDMI_OUTPUT_MODE_DVI) { if (this->setHdmiResolution(mHdmiResolutionValue, true) == false) - LOGE("%s::setHdmiResolution(%d) fail \n", __func__, mHdmiResolutionValue); + ALOGE("%s::setHdmiResolution(%d) fail \n", __func__, mHdmiResolutionValue); if (this->setHdcpMode(mHdcpMode, false) == false) - LOGE("%s::setHdcpMode(%d) fail \n", __func__, mHdcpMode); + ALOGE("%s::setHdcpMode(%d) fail \n", __func__, mHdcpMode); /* if (this->m_setAudioMode(mAudioMode) == false) - LOGE("%s::m_setAudioMode(%d) fail \n", __func__, mAudioMode); + ALOGE("%s::m_setAudioMode(%d) fail \n", __func__, mAudioMode); */ mHdmiInfoChange = true; mFlagConnected = true; @@ -627,18 +627,18 @@ bool SecHdmi::connect(void) bool SecHdmi::disconnect(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (mFlagConnected == false) { - LOGE("%s::Already Disconnected.. \n", __func__); + ALOGE("%s::Already Disconnected.. \n", __func__); return true; } @@ -651,7 +651,7 @@ bool SecHdmi::disconnect(void) #if defined(BOARD_USES_EDID) if (!EDIDClose()) { - LOGE("EDIDClose() failed!\n"); + ALOGE("EDIDClose() failed!\n"); return false; } #endif @@ -659,7 +659,7 @@ bool SecHdmi::disconnect(void) for (int layer = HDMI_LAYER_BASE + 1; layer < HDMI_LAYER_MAX; layer++) { if (mFlagHdmiStart[layer] == true && m_stopHdmi(layer) == false) { - LOGE("%s::hdmiLayer(%d) layer fail \n", __func__, layer); + ALOGE("%s::hdmiLayer(%d) layer fail \n", __func__, layer); return false; } } @@ -682,13 +682,13 @@ bool SecHdmi::disconnect(void) bool SecHdmi::startHdmi(int hdmiLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagHdmiStart[hdmiLayer] == false && m_startHdmi(hdmiLayer) == false) { - LOGE("%s::hdmiLayer(%d) fail \n", __func__, hdmiLayer); + ALOGE("%s::hdmiLayer(%d) fail \n", __func__, hdmiLayer); return false; } return true; @@ -697,13 +697,13 @@ bool SecHdmi::startHdmi(int hdmiLayer) bool SecHdmi::stopHdmi(int hdmiLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagHdmiStart[hdmiLayer] == true && m_stopHdmi(hdmiLayer) == false) { - LOGE("%s::hdmiLayer(%d) layer fail \n", __func__, hdmiLayer); + ALOGE("%s::hdmiLayer(%d) layer fail \n", __func__, hdmiLayer); return false; } tvout_deinit(); @@ -713,13 +713,13 @@ bool SecHdmi::stopHdmi(int hdmiLayer) bool SecHdmi::flagConnected(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } @@ -733,22 +733,22 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, int num_of_hwc_layer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::hdmiLayer=%d", __func__, hdmiLayer); + ALOGD("%s::hdmiLayer=%d", __func__, hdmiLayer); #endif Mutex::Autolock lock(mLock); #ifdef DEBUG_MSG_ENABLE - LOGD("%s [srcW = %d, srcH = %d, srcColorFormat = 0x%x, srcYAddr= 0x%x, srcCbAddr = 0x%x, srcCrAddr = 0x%x, dstX = %d, dstY = %d, hdmiLayer = %d, num_of_hwc_layer=%d", + ALOGD("%s [srcW = %d, srcH = %d, srcColorFormat = 0x%x, srcYAddr= 0x%x, srcCbAddr = 0x%x, srcCrAddr = 0x%x, dstX = %d, dstY = %d, hdmiLayer = %d, num_of_hwc_layer=%d", __func__, srcW, srcH, srcColorFormat, srcYAddr, srcCbAddr, srcCrAddr, dstX, dstY, hdmiLayer, num_of_hwc_layer); - LOGD("saved param(%d, %d, %d)", + ALOGD("saved param(%d, %d, %d)", mSrcWidth[hdmiLayer], mSrcHeight[hdmiLayer], mSrcColorFormat[hdmiLayer]); #endif if (mFlagCreate == false) { - LOGE("%s::Not Yet Created", __func__); + ALOGE("%s::Not Yet Created", __func__); return false; } @@ -760,14 +760,14 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, num_of_hwc_layer != mPreviousNumofHwLayer[hdmiLayer] || mHdmiInfoChange == true) { #ifdef DEBUG_MSG_ENABLE - LOGD("m_reset param(%d, %d, %d, %d, %d, %d, %d)", + ALOGD("m_reset param(%d, %d, %d, %d, %d, %d, %d)", srcW, mSrcWidth[hdmiLayer], srcH, mSrcHeight[hdmiLayer], srcColorFormat, mSrcColorFormat[hdmiLayer], hdmiLayer); #endif if (m_reset(srcW, srcH, dstX, dstY, srcColorFormat, hdmiLayer, num_of_hwc_layer) == false) { - LOGE("%s::m_reset(%d, %d, %d, %d) failed", __func__, srcW, srcH, srcColorFormat, hdmiLayer); + ALOGE("%s::m_reset(%d, %d, %d, %d) failed", __func__, srcW, srcH, srcColorFormat, hdmiLayer); return false; } } @@ -783,13 +783,13 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, mFBoffset = 0; #ifdef DEBUG_MSG_ENABLE - LOGD("%s::mFBaddr=0x%08x, srcYAddr=0x%08x, mFBoffset=0x%08x", __func__, mFBaddr, srcYAddr, mFBoffset); + ALOGD("%s::mFBaddr=0x%08x, srcYAddr=0x%08x, mFBoffset=0x%08x", __func__, mFBaddr, srcYAddr, mFBoffset); #endif } if (hdmiLayer == HDMI_LAYER_VIDEO) { if (mSecGscaler.setSrcAddr(srcYAddr, srcCbAddr, srcCrAddr, srcColorFormat) == false) { - LOGE("%s::setSrcAddr(0x%08x, 0x%08x, 0x%08x)", __func__, srcYAddr, srcCbAddr, srcCrAddr); + ALOGE("%s::setSrcAddr(0x%08x, 0x%08x, 0x%08x)", __func__, srcYAddr, srcCbAddr, srcCrAddr); return false; } } else { @@ -831,20 +831,20 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, #if CHECK_GRAPHIC_LAYER_TIME end = systemTime(); - LOGD("[UI] hdmi_gl_set_param[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); + ALOGD("[UI] hdmi_gl_set_param[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); #endif } if (mFlagConnected) { if (mFlagHdmiStart[hdmiLayer] == true) { if (m_run(hdmiLayer) == false) { - LOGE("%s::m_run(%d) failed", __func__, hdmiLayer); + ALOGE("%s::m_run(%d) failed", __func__, hdmiLayer); return false; } } if (mFlagHdmiStart[hdmiLayer] == false && m_startHdmi(hdmiLayer) == false) { - LOGE("%s::start hdmiLayer(%d) failed", __func__, hdmiLayer); + ALOGE("%s::start hdmiLayer(%d) failed", __func__, hdmiLayer); return false; } } @@ -854,17 +854,17 @@ bool SecHdmi::flush(int srcW, int srcH, int srcColorFormat, bool SecHdmi::clear(int hdmiLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::hdmiLayer = %d", __func__, hdmiLayer); + ALOGD("%s::hdmiLayer = %d", __func__, hdmiLayer); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (mFlagHdmiStart[hdmiLayer] == true && m_stopHdmi(hdmiLayer) == false) { - LOGE("%s::m_stopHdmi: layer[%d] fail \n", __func__, hdmiLayer); + ALOGE("%s::m_stopHdmi: layer[%d] fail \n", __func__, hdmiLayer); return false; } return true; @@ -881,7 +881,7 @@ bool SecHdmi::enableGraphicLayer(int hdmiLayer) { Mutex::Autolock lock(mLock); #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::hdmiLayer(%d)",__func__, hdmiLayer); + ALOGD("%s::hdmiLayer(%d)",__func__, hdmiLayer); #endif switch (hdmiLayer) { case HDMI_LAYER_VIDEO: @@ -901,7 +901,7 @@ bool SecHdmi::disableGraphicLayer(int hdmiLayer) { Mutex::Autolock lock(mLock); #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::hdmiLayer(%d)",__func__, hdmiLayer); + ALOGD("%s::hdmiLayer(%d)",__func__, hdmiLayer); #endif switch (hdmiLayer) { case HDMI_LAYER_VIDEO: @@ -909,7 +909,7 @@ bool SecHdmi::disableGraphicLayer(int hdmiLayer) case HDMI_LAYER_GRAPHIC_1: if (mFlagConnected == true && mFlagLayerEnable[hdmiLayer]) if (m_stopHdmi(hdmiLayer) == false ) - LOGE("%s::m_stopHdmi: layer[%d] fail \n", __func__, hdmiLayer); + ALOGE("%s::m_stopHdmi: layer[%d] fail \n", __func__, hdmiLayer); mFlagLayerEnable[hdmiLayer] = false; break; @@ -922,19 +922,19 @@ bool SecHdmi::disableGraphicLayer(int hdmiLayer) bool SecHdmi::setHdmiOutputMode(int hdmiOutputMode, bool forceRun) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::hdmiOutputMode = %d, forceRun = %d", __func__, hdmiOutputMode, forceRun); + ALOGD("%s::hdmiOutputMode = %d, forceRun = %d", __func__, hdmiOutputMode, forceRun); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (forceRun == false && mHdmiOutputMode == hdmiOutputMode) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdmiOutputMode(%d) \n", __func__, hdmiOutputMode); + ALOGD("%s::same hdmiOutputMode(%d) \n", __func__, hdmiOutputMode); #endif return true; } @@ -943,7 +943,7 @@ bool SecHdmi::setHdmiOutputMode(int hdmiOutputMode, bool forceRun) int v4l2OutputType = hdmi_outputmode_2_v4l2_output_type(hdmiOutputMode); if (v4l2OutputType < 0) { - LOGD("%s::hdmi_outputmode_2_v4l2_output_type(%d) fail\n", __func__, hdmiOutputMode); + ALOGD("%s::hdmi_outputmode_2_v4l2_output_type(%d) fail\n", __func__, hdmiOutputMode); return false; } @@ -952,11 +952,11 @@ bool SecHdmi::setHdmiOutputMode(int hdmiOutputMode, bool forceRun) if (newV4l2OutputType != v4l2OutputType) { newHdmiOutputMode = hdmi_v4l2_output_type_2_outputmode(newV4l2OutputType); if (newHdmiOutputMode < 0) { - LOGD("%s::hdmi_v4l2_output_type_2_outputmode(%d) fail\n", __func__, newV4l2OutputType); + ALOGD("%s::hdmi_v4l2_output_type_2_outputmode(%d) fail\n", __func__, newV4l2OutputType); return false; } - LOGD("%s::calibration mode(%d -> %d)... \n", __func__, hdmiOutputMode, newHdmiOutputMode); + ALOGD("%s::calibration mode(%d -> %d)... \n", __func__, hdmiOutputMode, newHdmiOutputMode); mHdmiInfoChange = true; } #endif @@ -972,19 +972,19 @@ bool SecHdmi::setHdmiOutputMode(int hdmiOutputMode, bool forceRun) bool SecHdmi::setHdmiResolution(unsigned int hdmiResolutionValue, bool forceRun) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::hdmiResolutionValue = %d, forceRun = %d", __func__, hdmiResolutionValue, forceRun); + ALOGD("%s::hdmiResolutionValue = %d, forceRun = %d", __func__, hdmiResolutionValue, forceRun); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (forceRun == false && mHdmiResolutionValue == hdmiResolutionValue) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdmiResolutionValue(%d) \n", __func__, hdmiResolutionValue); + ALOGD("%s::same hdmiResolutionValue(%d) \n", __func__, hdmiResolutionValue); #endif return true; } @@ -1012,15 +1012,15 @@ bool SecHdmi::setHdmiResolution(unsigned int hdmiResolutionValue, bool forceRun) } if (flagFoundIndex == false) { - LOGE("%s::hdmi cannot control this resolution(%d) fail \n", __func__, hdmiResolutionValue); + ALOGE("%s::hdmi cannot control this resolution(%d) fail \n", __func__, hdmiResolutionValue); // Set resolution to 480P newHdmiResolutionValue = mHdmiResolutionValueList[mHdmiSizeOfResolutionValueList-2]; } else { - LOGD("%s::HDMI resolutions size is calibrated(%d -> %d)..\n", __func__, hdmiResolutionValue, newHdmiResolutionValue); + ALOGD("%s::HDMI resolutions size is calibrated(%d -> %d)..\n", __func__, hdmiResolutionValue, newHdmiResolutionValue); } } else { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::find resolutions(%d) at once\n", __func__, hdmiResolutionValue); + ALOGD("%s::find resolutions(%d) at once\n", __func__, hdmiResolutionValue); #endif } #endif @@ -1036,19 +1036,19 @@ bool SecHdmi::setHdmiResolution(unsigned int hdmiResolutionValue, bool forceRun) bool SecHdmi::setHdcpMode(bool hdcpMode, bool forceRun) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (forceRun == false && mHdcpMode == hdcpMode) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdcpMode(%d) \n", __func__, hdcpMode); + ALOGD("%s::same hdcpMode(%d) \n", __func__, hdcpMode); #endif return true; } @@ -1062,18 +1062,18 @@ bool SecHdmi::setHdcpMode(bool hdcpMode, bool forceRun) bool SecHdmi::setUIRotation(unsigned int rotVal, unsigned int hwcLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif Mutex::Autolock lock(mLock); if (mFlagCreate == false) { - LOGE("%s::Not Yet Created \n", __func__); + ALOGE("%s::Not Yet Created \n", __func__); return false; } if (rotVal % 90 != 0) { - LOGE("%s::Invalid rotation value(%d)", __func__, rotVal); + ALOGE("%s::Invalid rotation value(%d)", __func__, rotVal); return false; } @@ -1117,7 +1117,7 @@ void SecHdmi::setDisplayInfo(int srcW, int srcH, int srcColorFormat, int num_of_hwc_layer) { #ifdef DEBUG_MSG_ENABLE -LOGD("%s [srcW = %d, srcH = %d, srcColorFormat = 0x%x, srcYAddr= 0x%x, srcCbAddr = 0x%x, dstX = %d, dstY = %d, hdmiLayer = %d", +ALOGD("%s [srcW = %d, srcH = %d, srcColorFormat = 0x%x, srcYAddr= 0x%x, srcCbAddr = 0x%x, dstX = %d, dstY = %d, hdmiLayer = %d", __func__, srcW, srcH, srcColorFormat, srcYAddr, srcCbAddr, dstX, dstY, hdmiLayer); #endif @@ -1137,7 +1137,7 @@ LOGD("%s [srcW = %d, srcH = %d, srcColorFormat = 0x%x, srcYAddr= 0x%x, srcCbAddr bool SecHdmi::m_setupLink(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret; char node[32]; @@ -1150,7 +1150,7 @@ bool SecHdmi::m_setupLink(void) sprintf(node, "%s%d", PFX_NODE_MEDIADEV, 0); mMediadevFd = open(node, O_RDWR); if (mMediadevFd < 0) { - LOGE("%s::open(%s) failed", __func__, node); + ALOGE("%s::open(%s) failed", __func__, node); goto err; } @@ -1161,13 +1161,13 @@ bool SecHdmi::m_setupLink(void) if (ioctl(mMediadevFd, MEDIA_IOC_ENUM_ENTITIES, &entity_desc) < 0) { if (errno == EINVAL) { - LOGD("%s::MEDIA_IOC_ENUM_ENTITIES ended", __func__); + ALOGD("%s::MEDIA_IOC_ENUM_ENTITIES ended", __func__); break; } - LOGE("%s::MEDIA_IOC_ENUM_ENTITIES failed", __func__); + ALOGE("%s::MEDIA_IOC_ENUM_ENTITIES failed", __func__); goto err; } - LOGD("%s::entity_desc.id=%d, .minor=%d .name=%s", __func__, entity_desc.id, entity_desc.v4l.minor, entity_desc.name); + ALOGD("%s::entity_desc.id=%d, .minor=%d .name=%s", __func__, entity_desc.id, entity_desc.v4l.minor, entity_desc.name); if (strncmp(entity_desc.name, subdevname, strlen(subdevname)) == 0) mMixerSubdevEntity = entity_desc.id; @@ -1183,19 +1183,19 @@ bool SecHdmi::m_setupLink(void) mlink_desc.flags = MEDIA_LNK_FL_ENABLED; #ifdef DEBUG_MSG_ENABLE - LOGD("%s::mlink_desc.source.entity=%02d, .pad=%d", __func__, mlink_desc.source.entity, mlink_desc.source.index); - LOGD("%s::mlink_desc.sink.entity =%02d, .pad=%d", __func__, mlink_desc.sink.entity, mlink_desc.sink.index); + ALOGD("%s::mlink_desc.source.entity=%02d, .pad=%d", __func__, mlink_desc.source.entity, mlink_desc.source.index); + ALOGD("%s::mlink_desc.sink.entity =%02d, .pad=%d", __func__, mlink_desc.sink.entity, mlink_desc.sink.index); #endif if (ioctl(mMediadevFd, MEDIA_IOC_SETUP_LINK, &mlink_desc) < 0) { - LOGE("%s::MEDIA_IOC_SETUP_LINK [src.entity=%d->sink.entity=%d] failed", __func__, mlink_desc.source.entity, mlink_desc.sink.entity); + ALOGE("%s::MEDIA_IOC_SETUP_LINK [src.entity=%d->sink.entity=%d] failed", __func__, mlink_desc.source.entity, mlink_desc.sink.entity); goto err; } sprintf(node, "%s%d", PFX_NODE_SUBDEV, 4); // Mixer0 minor=132 /dev/v4l-subdev4 // need to modify //carrotsm mSubdevMixerFd = open(node, O_RDWR, 0); if (mSubdevMixerFd < 0) { - LOGE("%s::open(%s) failed", __func__, node); + ALOGE("%s::open(%s) failed", __func__, node); goto err; } @@ -1222,7 +1222,7 @@ err : bool SecHdmi::m_openLayer(int layer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::layer=%d", __func__, layer); + ALOGD("%s::layer=%d", __func__, layer); #endif char node[32]; @@ -1231,12 +1231,12 @@ bool SecHdmi::m_openLayer(int layer) mVideodevFd[layer] = mSecGscaler.getVideodevFd(); if (0 < mVideodevFd[layer]) { - LOGD("%s::Layer[%d] device already opened", __func__, layer); + ALOGD("%s::Layer[%d] device already opened", __func__, layer); return true; } if (mSecGscaler.openVideodevFd() == false) - LOGE("%s::open(%s) failed", __func__, node); + ALOGE("%s::open(%s) failed", __func__, node); else mVideodevFd[layer] = mSecGscaler.getVideodevFd(); @@ -1249,25 +1249,25 @@ bool SecHdmi::m_openLayer(int layer) sprintf(node, "%s", TVOUT0_DEV_G1); break; default: - LOGE("%s::unmatched layer[%d]", __func__, layer); + ALOGE("%s::unmatched layer[%d]", __func__, layer); return false; break; } mVideodevFd[layer] = open(node, O_RDWR); if (mVideodevFd[layer] < 0) { - LOGE("%s::open(%s) failed", __func__, node); + ALOGE("%s::open(%s) failed", __func__, node); goto err; } open_success : #ifdef DEBUG_MSG_ENABLE - LOGD("layer=%d, mVideodevFd=%d", layer, mVideodevFd[layer]); + ALOGD("layer=%d, mVideodevFd=%d", layer, mVideodevFd[layer]); #endif if (tvout_std_v4l2_querycap(mVideodevFd[layer], node) < 0 ) { - LOGE("%s::tvout_std_v4l2_querycap failed", __func__); + ALOGE("%s::tvout_std_v4l2_querycap failed", __func__); goto err; } @@ -1287,14 +1287,14 @@ err : bool SecHdmi::m_closeLayer(int layer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::layer=%d", __func__, layer); + ALOGD("%s::layer=%d", __func__, layer); #endif switch (layer) { case HDMI_LAYER_VIDEO: mVideodevFd[layer] = mSecGscaler.getVideodevFd(); if (mVideodevFd[layer] < 0) { - LOGD("%s::Layer[%d] device already closed", __func__, layer); + ALOGD("%s::Layer[%d] device already closed", __func__, layer); return true; } else { mSecGscaler.closeVideodevFd(); @@ -1307,20 +1307,20 @@ bool SecHdmi::m_closeLayer(int layer) /* clear buffer */ if (0 < mVideodevFd[layer]) { if (tvout_std_v4l2_reqbuf(mVideodevFd[layer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, 0) < 0) { - LOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d)[graphic layer] failed", __func__, 0); + ALOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d)[graphic layer] failed", __func__, 0); return -1; } } break; default: - LOGE("%s::unmatched layer[%d]", __func__, layer); + ALOGE("%s::unmatched layer[%d]", __func__, layer); return false; break; } if (0 < mVideodevFd[layer]) { if (close(mVideodevFd[layer]) < 0) { - LOGE("%s::close %d layer failed", __func__, layer); + ALOGE("%s::close %d layer failed", __func__, layer); return false; } } @@ -1335,7 +1335,7 @@ close_success : bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdmiLayer, int num_of_hwc_layer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::w=%d, h=%d, dstX=%d, dstY=%d, colorFormat=%d, hdmiLayer=%d, num_of_hwc_layer=%d", + ALOGD("%s::w=%d, h=%d, dstX=%d, dstY=%d, colorFormat=%d, hdmiLayer=%d, num_of_hwc_layer=%d", __func__, w, h, dstX, dstY, colorFormat, hdmiLayer, num_of_hwc_layer); #endif @@ -1347,17 +1347,17 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm int dstH = 0; if (mFlagHdmiStart[hdmiLayer] == true && m_stopHdmi(hdmiLayer) == false) { - LOGE("%s::m_stopHdmi: layer[%d] failed", __func__, hdmiLayer); + ALOGE("%s::m_stopHdmi: layer[%d] failed", __func__, hdmiLayer); return false; } if (m_closeLayer(hdmiLayer) == false) { - LOGE("%s::m_closeLayer: layer[%d] failed", __func__, hdmiLayer); + ALOGE("%s::m_closeLayer: layer[%d] failed", __func__, hdmiLayer); return false; } if (m_openLayer(hdmiLayer) == false) { - LOGE("%s::m_closeLayer: layer[%d] failed", __func__, hdmiLayer); + ALOGE("%s::m_closeLayer: layer[%d] failed", __func__, hdmiLayer); return false; } @@ -1376,7 +1376,7 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm preVideoSrcColorFormat != HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP && preVideoSrcColorFormat != HAL_PIXEL_FORMAT_CUSTOM_YCrCb_420_SP && preVideoSrcColorFormat != HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED) { - LOGI("%s: Unsupported preVideoSrcColorFormat = 0x%x", __func__, preVideoSrcColorFormat); + ALOGI("%s: Unsupported preVideoSrcColorFormat = 0x%x", __func__, preVideoSrcColorFormat); preVideoSrcColorFormat = HAL_PIXEL_FORMAT_CUSTOM_YCbCr_420_SP_TILED; } @@ -1386,7 +1386,7 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm if (mSecGscaler.setSrcParams(full_wdith, full_height, 0, 0, (unsigned int*)&w, (unsigned int*)&h, colorFormat, true) == false) { - LOGE("%s::mSecGscaler.setSrcParams(w=%d, h=%d, color=%d) failed", + ALOGE("%s::mSecGscaler.setSrcParams(w=%d, h=%d, color=%d) failed", __func__, w, h, colorFormat); return false; } @@ -1405,7 +1405,7 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm if (mSecGscaler.setDstParams((unsigned int)rect.width, (unsigned int)rect.height, 0, 0, (unsigned int*)&rect.width, (unsigned int*)&rect.height, mGscalerDstColorFormat, true) == false) { - LOGE("%s::mSecGscaler.setDstParams(w=%d, h=%d, V4L2_MBUS_FMT_YUV8_1X24) failed", + ALOGE("%s::mSecGscaler.setDstParams(w=%d, h=%d, V4L2_MBUS_FMT_YUV8_1X24) failed", __func__, rect.width, rect.height); return false; } @@ -1413,17 +1413,17 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm hdmi_set_videolayer(mSubdevMixerFd, mHdmiDstWidth, mHdmiDstHeight, &rect); } else { if (tvout_std_v4l2_s_ctrl(mVideodevFd[hdmiLayer], V4L2_CID_TV_LAYER_BLEND_ENABLE, 1) < 0) { - LOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ENABLE) failed", __func__, hdmiLayer); + ALOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ENABLE) failed", __func__, hdmiLayer); return false; } if (tvout_std_v4l2_s_ctrl(mVideodevFd[hdmiLayer], V4L2_CID_TV_PIXEL_BLEND_ENABLE, 1) < 0) { - LOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ENABLE) failed", __func__, hdmiLayer); + ALOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ENABLE) failed", __func__, hdmiLayer); return false; } if (tvout_std_v4l2_s_ctrl(mVideodevFd[hdmiLayer], V4L2_CID_TV_LAYER_BLEND_ALPHA, 255) < 0) { - LOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ALPHA) failed", __func__, hdmiLayer); + ALOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] (V4L2_CID_TV_LAYER_BLEND_ALPHA) failed", __func__, hdmiLayer); return false; } @@ -1472,7 +1472,7 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm mSrcBuffer[hdmiLayer][buf_index].size.s = gr_frame_size << 1; break; default: - LOGE("%s::invalid color type", __func__); + ALOGE("%s::invalid color type", __func__); return false; break; } @@ -1492,7 +1492,7 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm mPreviousNumofHwLayer[hdmiLayer] = num_of_hwc_layer; #ifdef DEBUG_MSG_ENABLE - LOGD("m_reset saved param(%d, %d, %d, %d, %d, %d, %d)", + ALOGD("m_reset saved param(%d, %d, %d, %d, %d, %d, %d)", srcW, mSrcWidth[hdmiLayer], \ srcH, mSrcHeight[hdmiLayer], \ colorFormat,mSrcColorFormat[hdmiLayer], \ @@ -1502,7 +1502,7 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm if (mHdmiInfoChange == true) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("mHdmiInfoChange: %d", mHdmiInfoChange); + ALOGD("mHdmiInfoChange: %d", mHdmiInfoChange); #endif #if defined(BOARD_USES_CEC) @@ -1514,28 +1514,28 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm #endif if (m_setHdmiOutputMode(mHdmiOutputMode) == false) { - LOGE("%s::m_setHdmiOutputMode() failed", __func__); + ALOGE("%s::m_setHdmiOutputMode() failed", __func__); return false; } if (mHdmiOutputMode == COMPOSITE_OUTPUT_MODE) { std_id = composite_std_2_v4l2_std_id(mCompositeStd); if ((int)std_id < 0) { - LOGE("%s::composite_std_2_v4l2_std_id(%d) failed", __func__, mCompositeStd); + ALOGE("%s::composite_std_2_v4l2_std_id(%d) failed", __func__, mCompositeStd); return false; } if (m_setCompositeResolution(mCompositeStd) == false) { - LOGE("%s::m_setCompositeRsolution() failed", __func__); + ALOGE("%s::m_setCompositeRsolution() failed", __func__); return false; } } else if (mHdmiOutputMode >= HDMI_OUTPUT_MODE_YCBCR && mHdmiOutputMode <= HDMI_OUTPUT_MODE_DVI) { if (m_setHdmiResolution(mHdmiResolutionValue) == false) { - LOGE("%s::m_setHdmiResolution() failed", __func__); + ALOGE("%s::m_setHdmiResolution() failed", __func__); return false; } if (m_setHdcpMode(mHdcpMode) == false) { - LOGE("%s::m_setHdcpMode() failed", __func__); + ALOGE("%s::m_setHdcpMode() failed", __func__); return false; } std_id = mHdmiStdId; @@ -1544,13 +1544,13 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm if (mPreviousHdmiPresetId != mHdmiPresetId) { for (int layer = HDMI_LAYER_BASE + 1; layer < HDMI_LAYER_MAX; layer++) { if (m_stopHdmi(layer) == false) { - LOGE("%s::m_stopHdmi(%d) failed", __func__, layer); + ALOGE("%s::m_stopHdmi(%d) failed", __func__, layer); return false; } } if (tvout_init(mVideodevFd[HDMI_LAYER_GRAPHIC_0], mHdmiPresetId) < 0) { - LOGE("%s::tvout_init(mHdmiPresetId=%d) failed", __func__, mHdmiPresetId); + ALOGE("%s::tvout_init(mHdmiPresetId=%d) failed", __func__, mHdmiPresetId); return false; } mPreviousHdmiPresetId = mHdmiPresetId; @@ -1564,7 +1564,7 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm #endif /* if (m_setAudioMode(mAudioMode) == false) - LOGE("%s::m_setAudioMode() failed", __func__); + ALOGE("%s::m_setAudioMode() failed", __func__); */ } @@ -1578,16 +1578,16 @@ bool SecHdmi::m_reset(int w, int h, int dstX, int dstY, int colorFormat, int hdm bool SecHdmi::m_streamOn(int hdmiLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::hdmiLayer = %d", __func__, hdmiLayer); + ALOGD("%s::hdmiLayer = %d", __func__, hdmiLayer); #endif if (mFlagCreate == false) { - LOGE("%s::Not yet created", __func__); + ALOGE("%s::Not yet created", __func__); return false; } if (mFlagHdmiStart[hdmiLayer] == true) { - LOGE("%s::[layer=%d] already streamon", __func__, hdmiLayer); + ALOGE("%s::[layer=%d] already streamon", __func__, hdmiLayer); return true; } @@ -1597,21 +1597,21 @@ bool SecHdmi::m_streamOn(int hdmiLayer) case HDMI_LAYER_GRAPHIC_1: break; default : - LOGE("%s::unmathced layer(%d) failed", __func__, hdmiLayer); + ALOGE("%s::unmathced layer(%d) failed", __func__, hdmiLayer); return false; break; } if (tvout_std_v4l2_qbuf(mVideodevFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, mSrcIndex[hdmiLayer], 1, &mSrcBuffer[hdmiLayer][0]) < 0) { - LOGE("%s::gsc_v4l2_queue(index : %d) (mSrcBufNum : %d) failed", __func__, mSrcIndex[hdmiLayer], 1); + ALOGE("%s::gsc_v4l2_queue(index : %d) (mSrcBufNum : %d) failed", __func__, mSrcIndex[hdmiLayer], 1); return false; } mSrcIndex[hdmiLayer]++; if (mSrcIndex[hdmiLayer] == MAX_BUFFERS_MIXER) { if (tvout_std_v4l2_streamon(mVideodevFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) < 0) { - LOGE("%s::gsc_v4l2_stream_on() failed", __func__); + ALOGE("%s::gsc_v4l2_stream_on() failed", __func__); return false; } mFlagHdmiStart[hdmiLayer] = true; @@ -1627,33 +1627,33 @@ bool SecHdmi::m_streamOn(int hdmiLayer) bool SecHdmi::m_run(int hdmiLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::hdmiLayer = %d", __func__, hdmiLayer); + ALOGD("%s::hdmiLayer = %d", __func__, hdmiLayer); #endif int buf_index = 0; if (mFlagHdmiStart[hdmiLayer] == false || mFlagLayerEnable[hdmiLayer] == false) { - LOGD("%s::HDMI(%d layer) started not yet", __func__, hdmiLayer); + ALOGD("%s::HDMI(%d layer) started not yet", __func__, hdmiLayer); return true; } switch (hdmiLayer) { case HDMI_LAYER_VIDEO: if (mSecGscaler.run() == false) { - LOGE("%s::mSecGscaler.draw() failed", __func__); + ALOGE("%s::mSecGscaler.draw() failed", __func__); return false; } break; case HDMI_LAYER_GRAPHIC_0 : case HDMI_LAYER_GRAPHIC_1 : if (tvout_std_v4l2_dqbuf(mVideodevFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, &buf_index, 1) < 0) { - LOGE("%s::tvout_std_v4l2_dqbuf(mNumOfBuf : %d, dqIndex=%d) failed", __func__, 1, buf_index); + ALOGE("%s::tvout_std_v4l2_dqbuf(mNumOfBuf : %d, dqIndex=%d) failed", __func__, 1, buf_index); return false; } if (tvout_std_v4l2_qbuf(mVideodevFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, mSrcIndex[hdmiLayer], 1, &mSrcBuffer[hdmiLayer][mSrcIndex[hdmiLayer]]) < 0) { - LOGE("%s::tvout_std_v4l2_qbuf(mNumOfBuf : %d,mSrcIndex=%d) failed", __func__, 1, mSrcIndex[hdmiLayer]); + ALOGE("%s::tvout_std_v4l2_qbuf(mNumOfBuf : %d,mSrcIndex=%d) failed", __func__, 1, mSrcIndex[hdmiLayer]); return false; } @@ -1664,7 +1664,7 @@ bool SecHdmi::m_run(int hdmiLayer) break; default : - LOGE("%s::unmathced layer(%d) failed", __func__, hdmiLayer); + ALOGE("%s::unmathced layer(%d) failed", __func__, hdmiLayer); return false; break; } @@ -1675,23 +1675,23 @@ bool SecHdmi::m_run(int hdmiLayer) bool SecHdmi::m_startHdmi(int hdmiLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::hdmiLayer = %d", __func__, hdmiLayer); + ALOGD("%s::hdmiLayer = %d", __func__, hdmiLayer); #endif int buf_index = 0; if (mFlagHdmiStart[hdmiLayer] == true) { - LOGD("%s::already HDMI(%d layer) started..", __func__, hdmiLayer); + ALOGD("%s::already HDMI(%d layer) started..", __func__, hdmiLayer); return true; } #ifdef DEBUG_MSG_ENABLE - LOGD("### %s: hdmiLayer(%d) called", __func__, hdmiLayer); + ALOGD("### %s: hdmiLayer(%d) called", __func__, hdmiLayer); #endif switch (hdmiLayer) { case HDMI_LAYER_VIDEO: if (mSecGscaler.streamOn() == false) { - LOGE("%s::mSecGscaler.streamOn() failed", __func__); + ALOGE("%s::mSecGscaler.streamOn() failed", __func__); return false; } if (mSecGscaler.getFlagSteamOn() == true) @@ -1700,12 +1700,12 @@ bool SecHdmi::m_startHdmi(int hdmiLayer) case HDMI_LAYER_GRAPHIC_0 : case HDMI_LAYER_GRAPHIC_1 : if (m_streamOn(hdmiLayer) == false) { - LOGE("%s::m_streamOn layer(%d) failed", __func__, hdmiLayer); + ALOGE("%s::m_streamOn layer(%d) failed", __func__, hdmiLayer); return false; } break; default : - LOGE("%s::unmathced layer(%d) failed", __func__, hdmiLayer); + ALOGE("%s::unmathced layer(%d) failed", __func__, hdmiLayer); return false; break; } @@ -1715,22 +1715,22 @@ bool SecHdmi::m_startHdmi(int hdmiLayer) bool SecHdmi::m_stopHdmi(int hdmiLayer) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::hdmiLayer = %d", __func__, hdmiLayer); + ALOGD("%s::hdmiLayer = %d", __func__, hdmiLayer); #endif if (mFlagHdmiStart[hdmiLayer] == false) { - LOGD("%s::already HDMI(%d layer) stopped..", __func__, hdmiLayer); + ALOGD("%s::already HDMI(%d layer) stopped..", __func__, hdmiLayer); return true; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s : layer[%d] called", __func__, hdmiLayer); + ALOGD("### %s : layer[%d] called", __func__, hdmiLayer); #endif switch (hdmiLayer) { case HDMI_LAYER_VIDEO: if (mSecGscaler.streamOff() == false) { - LOGE("%s::mSecGscaler.streamOff() failed", __func__); + ALOGE("%s::mSecGscaler.streamOff() failed", __func__); return false; } mFlagHdmiStart[hdmiLayer] = false; @@ -1741,7 +1741,7 @@ bool SecHdmi::m_stopHdmi(int hdmiLayer) cur_g2d_address = 0; #endif if (tvout_std_v4l2_streamoff(mVideodevFd[hdmiLayer], V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) < 0) { - LOGE("%s::tvout_std_v4l2_streamon layer(%d) failed", __func__, hdmiLayer); + ALOGE("%s::tvout_std_v4l2_streamon layer(%d) failed", __func__, hdmiLayer); return false; } @@ -1749,7 +1749,7 @@ bool SecHdmi::m_stopHdmi(int hdmiLayer) mFlagHdmiStart[hdmiLayer] = false; break; default : - LOGE("%s::unmathced layer(%d) failed", __func__, hdmiLayer); + ALOGE("%s::unmathced layer(%d) failed", __func__, hdmiLayer); return false; break; } @@ -1760,23 +1760,23 @@ bool SecHdmi::m_stopHdmi(int hdmiLayer) bool SecHdmi::m_setHdmiOutputMode(int hdmiOutputMode) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (hdmiOutputMode == mCurrentHdmiOutputMode) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdmiOutputMode(%d) \n", __func__, hdmiOutputMode); + ALOGD("%s::same hdmiOutputMode(%d) \n", __func__, hdmiOutputMode); #endif return true; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif int v4l2OutputType = hdmi_outputmode_2_v4l2_output_type(hdmiOutputMode); if (v4l2OutputType < 0) { - LOGE("%s::hdmi_outputmode_2_v4l2_output_type(%d) fail\n", __func__, hdmiOutputMode); + ALOGE("%s::hdmi_outputmode_2_v4l2_output_type(%d) fail\n", __func__, hdmiOutputMode); return false; } @@ -1790,18 +1790,18 @@ bool SecHdmi::m_setHdmiOutputMode(int hdmiOutputMode) bool SecHdmi::m_setCompositeResolution(unsigned int compositeStdId) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif int w = 0; int h = 0; if (mHdmiOutputMode != COMPOSITE_OUTPUT_MODE) { - LOGE("%s::not supported output type \n", __func__); + ALOGE("%s::not supported output type \n", __func__); return false; } @@ -1820,7 +1820,7 @@ bool SecHdmi::m_setCompositeResolution(unsigned int compositeStdId) h = 576; break; default: - LOGE("%s::unmathced composite_std(%d)", __func__, compositeStdId); + ALOGE("%s::unmathced composite_std(%d)", __func__, compositeStdId); return false; } @@ -1836,18 +1836,18 @@ bool SecHdmi::m_setCompositeResolution(unsigned int compositeStdId) bool SecHdmi::m_setHdmiResolution(unsigned int hdmiResolutionValue) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (hdmiResolutionValue == mCurrentHdmiResolutionValue) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdmiResolutionValue(%d) \n", __func__, hdmiResolutionValue); + ALOGD("%s::same hdmiResolutionValue(%d) \n", __func__, hdmiResolutionValue); #endif return true; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif int w = 0; @@ -1857,12 +1857,12 @@ bool SecHdmi::m_setHdmiResolution(unsigned int hdmiResolutionValue) if (mHdmiOutputMode >= HDMI_OUTPUT_MODE_YCBCR && mHdmiOutputMode <= HDMI_OUTPUT_MODE_DVI) { if (hdmi_resolution_2_std_id(hdmiResolutionValue, &w, &h, &std_id, &mHdmiPresetId) < 0) { - LOGE("%s::hdmi_resolution_2_std_id(%d) fail\n", __func__, hdmiResolutionValue); + ALOGE("%s::hdmi_resolution_2_std_id(%d) fail\n", __func__, hdmiResolutionValue); return false; } mHdmiStdId = std_id; } else { - LOGE("%s::not supported output type \n", __func__); + ALOGE("%s::not supported output type \n", __func__); return false; } @@ -1874,7 +1874,7 @@ bool SecHdmi::m_setHdmiResolution(unsigned int hdmiResolutionValue) mCurrentHdmiResolutionValue = hdmiResolutionValue; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::mHdmiDstWidth = %d, mHdmiDstHeight = %d, mHdmiStdId = 0x%x, hdmiResolutionValue = 0x%x\n", + ALOGD("%s::mHdmiDstWidth = %d, mHdmiDstHeight = %d, mHdmiStdId = 0x%x, hdmiResolutionValue = 0x%x\n", __func__, mHdmiDstWidth, mHdmiDstHeight, @@ -1888,19 +1888,19 @@ bool SecHdmi::m_setHdmiResolution(unsigned int hdmiResolutionValue) bool SecHdmi::m_setHdcpMode(bool hdcpMode) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (hdcpMode == mCurrentHdcpMode) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same hdcpMode(%d) \n", __func__, hdcpMode); + ALOGD("%s::same hdcpMode(%d) \n", __func__, hdcpMode); #endif return true; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif if (hdcpMode == true) @@ -1916,22 +1916,22 @@ bool SecHdmi::m_setHdcpMode(bool hdcpMode) bool SecHdmi::m_setAudioMode(int audioMode) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (audioMode == mCurrentAudioMode) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::same audioMode(%d) \n", __func__, audioMode); + ALOGD("%s::same audioMode(%d) \n", __func__, audioMode); #endif return true; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif if (hdmi_check_audio(mVideodevFd[HDMI_LAYER_GRAPHIC_0]) < 0) { - LOGE("%s::hdmi_check_audio() fail \n", __func__); + ALOGE("%s::hdmi_check_audio() fail \n", __func__); return false; } @@ -1943,7 +1943,7 @@ bool SecHdmi::m_setAudioMode(int audioMode) int SecHdmi::m_resolutionValueIndex(unsigned int ResolutionValue) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int index = -1; @@ -1960,11 +1960,11 @@ int SecHdmi::m_resolutionValueIndex(unsigned int ResolutionValue) bool SecHdmi::m_flagHWConnected(void) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("### %s called\n", __func__); + ALOGD("### %s called\n", __func__); #endif bool ret = true; @@ -1972,7 +1972,7 @@ bool SecHdmi::m_flagHWConnected(void) if (hdmiStatus <= 0) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::hdmi_cable_status() fail \n", __func__); + ALOGD("%s::hdmi_cable_status() fail \n", __func__); #endif ret = false; } else { diff --git a/exynos5/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp b/exynos5/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp index ac4717b..e3f0f30 100644 --- a/exynos5/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp +++ b/exynos5/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -//#define LOG_NDEBUG 0 -//#define LOG_TAG "libhdmi" +//#define ALOG_NDEBUG 0 +//#define ALOG_TAG "libhdmi" //#define DEBUG_HDMI_HW_LEVEL #include <cutils/log.h> @@ -69,7 +69,7 @@ void display_menu(void) struct HDMIAudioParameter audio; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif audio.formatCode = LPCM_FORMAT; @@ -77,135 +77,135 @@ void display_menu(void) audio.channelNum = CH_2; audio.sampleFreq = SF_44KHZ; - LOGI("=============== HDMI Audio =============\n"); + ALOGI("=============== HDMI Audio =============\n"); if (EDIDAudioModeSupport(&audio)) - LOGI("= 2CH_PCM 44100Hz audio supported =\n"); + ALOGI("= 2CH_PCM 44100Hz audio supported =\n"); - LOGI("========= HDMI Mode & Color Space =======\n"); + ALOGI("========= HDMI Mode & Color Space =======\n"); video.mode = HDMI; if (EDIDHDMIModeSupport(&video)) { video.colorSpace = HDMI_CS_YCBCR444; if (EDIDColorSpaceSupport(&video)) - LOGI("= 1. HDMI(YCbCr) =\n"); + ALOGI("= 1. HDMI(YCbCr) =\n"); video.colorSpace = HDMI_CS_RGB; if (EDIDColorSpaceSupport(&video)) - LOGI("= 2. HDMI(RGB) =\n"); + ALOGI("= 2. HDMI(RGB) =\n"); } else { video.mode = DVI; if (EDIDHDMIModeSupport(&video)) - LOGI("= 3. DVI =\n"); + ALOGI("= 3. DVI =\n"); } - LOGI("=========== HDMI Rseolution ========\n"); + ALOGI("=========== HDMI Rseolution ========\n"); /* 480P */ video.resolution = v720x480p_60Hz; video.pixelAspectRatio = HDMI_PIXEL_RATIO_16_9; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 4. 480P_60_16_9 (0x04000000) =\n"); + ALOGI("= 4. 480P_60_16_9 (0x04000000) =\n"); video.resolution = v640x480p_60Hz; video.pixelAspectRatio = HDMI_PIXEL_RATIO_4_3; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 5. 480P_60_4_3 (0x05000000) =\n"); + ALOGI("= 5. 480P_60_4_3 (0x05000000) =\n"); /* 576P */ video.resolution = v720x576p_50Hz; video.pixelAspectRatio = HDMI_PIXEL_RATIO_16_9; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 6. 576P_50_16_9 (0x06000000) =\n"); + ALOGI("= 6. 576P_50_16_9 (0x06000000) =\n"); video.pixelAspectRatio = HDMI_PIXEL_RATIO_4_3; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 7. 576P_50_4_3 (0x07000000) =\n"); + ALOGI("= 7. 576P_50_4_3 (0x07000000) =\n"); /* 720P 60 */ video.resolution = v1280x720p_60Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 8. 720P_60 (0x08000000) =\n"); + ALOGI("= 8. 720P_60 (0x08000000) =\n"); /* 720P_50 */ video.resolution = v1280x720p_50Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 9. 720P_50 (0x09000000) =\n"); + ALOGI("= 9. 720P_50 (0x09000000) =\n"); /* 1080P_60 */ video.resolution = v1920x1080p_60Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= a. 1080P_60 (0x0a000000) =\n"); + ALOGI("= a. 1080P_60 (0x0a000000) =\n"); /* 1080P_50 */ video.resolution = v1920x1080p_50Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= b. 1080P_50 (0x0b000000) =\n"); + ALOGI("= b. 1080P_50 (0x0b000000) =\n"); /* 1080I_60 */ video.resolution = v1920x1080i_60Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= c. 1080I_60 (0x0c000000) =\n"); + ALOGI("= c. 1080I_60 (0x0c000000) =\n"); /* 1080I_50 */ video.resolution = v1920x1080i_50Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= d. 1080I_50 (0x0d000000) =\n"); + ALOGI("= d. 1080I_50 (0x0d000000) =\n"); /* 1080P_30 */ video.resolution = v1920x1080p_30Hz; video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= e. 1080P_30 (0x12000000) =\n"); + ALOGI("= e. 1080P_30 (0x12000000) =\n"); - LOGI("=========== HDMI 3D Format ========\n"); + ALOGI("=========== HDMI 3D Format ========\n"); /* 720P_60_SBS_HALF */ video.resolution = v1280x720p_60Hz; video.hdmi_3d_format = HDMI_3D_SSH_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= f. 720P_60_SBS_HALF (0x13000000) =\n"); + ALOGI("= f. 720P_60_SBS_HALF (0x13000000) =\n"); /* 720P_59_SBS_HALF */ video.resolution = v1280x720p_60Hz; video.hdmi_3d_format = HDMI_3D_SSH_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 10. 720P_59_SBS_HALF (0x14000000) =\n"); + ALOGI("= 10. 720P_59_SBS_HALF (0x14000000) =\n"); /* 720P_50_TB */ video.resolution = v1280x720p_50Hz; video.hdmi_3d_format = HDMI_3D_TB_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 11. 720P_50_TB (0x15000000) =\n"); + ALOGI("= 11. 720P_50_TB (0x15000000) =\n"); /* 1080P_24_TB */ video.resolution = v1920x1080p_24Hz; video.hdmi_3d_format = HDMI_3D_TB_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 12. 1080P_24_TB (0x16000000) =\n"); + ALOGI("= 12. 1080P_24_TB (0x16000000) =\n"); /* 1080P_23_TB */ video.resolution = v1920x1080p_24Hz; video.hdmi_3d_format = HDMI_3D_TB_FORMAT; if (EDIDVideoResolutionSupport(&video)) - LOGI("= 13. 1080P_24_TB (0x17000000) =\n"); - LOGI("=========================================\n"); + ALOGI("= 13. 1080P_24_TB (0x17000000) =\n"); + ALOGI("=========================================\n"); } int tvout_init(int fd_tvout, __u32 preset_id) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::preset_id = 0x%x", __func__, preset_id); + ALOGD("%s::preset_id = 0x%x", __func__, preset_id); #endif int ret; @@ -218,7 +218,7 @@ int tvout_init(int fd_tvout, __u32 preset_id) if (fd_tvout <= 0) { fd_tvout = open(TVOUT0_DEV_G0, O_RDWR); if (fd_tvout < 0) { - LOGE("%s::fd_tvout open failed", __func__); + ALOGE("%s::fd_tvout open failed", __func__); return -1; } } @@ -226,14 +226,14 @@ int tvout_init(int fd_tvout, __u32 preset_id) if (output_type >= V4L2_OUTPUT_TYPE_DIGITAL && output_type <= V4L2_OUTPUT_TYPE_DVI) if (ioctl(fd_tvout, VIDIOC_HDCP_ENABLE, g_hdcp_en) < 0) - LOGE("%s::VIDIOC_HDCP_ENABLE failed %d", __func__, errno); + ALOGE("%s::VIDIOC_HDCP_ENABLE failed %d", __func__, errno); */ i = 0; do { output.index = i; ret = tvout_v4l2_enum_output(fd_tvout, &output); - LOGV("%s::output_type=%d output.index=%d .name=%s", __func__, output_type, output.index, output.name); + ALOGV("%s::output_type=%d output.index=%d .name=%s", __func__, output_type, output.index, output.name); if (output.type == output_type) { matched = 1; break; @@ -242,7 +242,7 @@ int tvout_init(int fd_tvout, __u32 preset_id) } while (ret >=0); /* if (!matched) { - LOGE("%s::no matched output type [type=0x%08x]", __func__, output_type); + ALOGE("%s::no matched output type [type=0x%08x]", __func__, output_type); return -1; } @@ -252,14 +252,14 @@ int tvout_init(int fd_tvout, __u32 preset_id) */ #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::input preset_id=0x%08x", __func__, preset_id); + ALOGD("%s::input preset_id=0x%08x", __func__, preset_id); #endif if (output.capabilities & V4L2_OUT_CAP_PRESETS) { tvout_std_v4l2_enum_dv_presets(fd_tvout); preset.preset = preset_id; if (tvout_std_v4l2_s_dv_preset(fd_tvout, &preset) < 0 ) { - LOGE("%s::tvout_std_v4l2_s_dv_preset failed", __func__); + ALOGE("%s::tvout_std_v4l2_s_dv_preset failed", __func__); return -1; } } @@ -270,7 +270,7 @@ int tvout_init(int fd_tvout, __u32 preset_id) int tvout_deinit() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif return 0; @@ -279,22 +279,22 @@ int tvout_deinit() int tvout_std_v4l2_querycap(int fd, char *node) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_capability v4l2cap; if (ioctl(fd, VIDIOC_QUERYCAP, &v4l2cap) < 0) { - LOGE("%s::VIDIOC_QUERYCAP failed", __func__); + ALOGE("%s::VIDIOC_QUERYCAP failed", __func__); return -1; } if (!(v4l2cap.capabilities & V4L2_CAP_STREAMING)) { - LOGE("%s::%s is not support streaming", __func__, node); + ALOGE("%s::%s is not support streaming", __func__, node); return -1; } if (!(v4l2cap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE)) { - LOGE("%s::%s is not support video output mplane", __func__, node); + ALOGE("%s::%s is not support video output mplane", __func__, node); return -1; } @@ -304,14 +304,14 @@ int tvout_std_v4l2_querycap(int fd, char *node) int tvout_std_v4l2_s_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, int w, int h, int colorformat, int num_planes) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_format fmt; fmt.type = type; if (ioctl(fd, VIDIOC_G_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_G_FMT failed", __func__); + ALOGE("%s::VIDIOC_G_FMT failed", __func__); return -1; } @@ -332,13 +332,13 @@ int tvout_std_v4l2_s_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, fmt.fmt.pix_mp.num_planes = num_planes; break; default: - LOGE("%s::invalid buffer type", __func__); + ALOGE("%s::invalid buffer type", __func__); return -1; break; } if (ioctl(fd, VIDIOC_S_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_S_FMT failed", __func__); + ALOGE("%s::VIDIOC_S_FMT failed", __func__); return -1; } @@ -348,7 +348,7 @@ int tvout_std_v4l2_s_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, int tvout_std_v4l2_s_crop(int fd, enum v4l2_buf_type type, enum v4l2_field, int x, int y, int w, int h) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_crop crop; @@ -359,7 +359,7 @@ int tvout_std_v4l2_s_crop(int fd, enum v4l2_buf_type type, enum v4l2_field, int crop.c.height = h; if (ioctl(fd, VIDIOC_S_CROP, &crop) < 0) { - LOGE("%s::VIDIOC_S_CROP (x=%d, y=%d, w=%d, h=%d) failed", + ALOGE("%s::VIDIOC_S_CROP (x=%d, y=%d, w=%d, h=%d) failed", __func__, x, y, w, h); return -1; } @@ -370,7 +370,7 @@ int tvout_std_v4l2_s_crop(int fd, enum v4l2_buf_type type, enum v4l2_field, int int tvout_std_v4l2_s_ctrl(int fd, int id, int value) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_control vc; @@ -378,7 +378,7 @@ int tvout_std_v4l2_s_ctrl(int fd, int id, int value) vc.value = value; if (ioctl(fd, VIDIOC_S_CTRL, &vc) < 0) { - LOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, id, value); + ALOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, id, value); return -1; } @@ -388,7 +388,7 @@ int tvout_std_v4l2_s_ctrl(int fd, int id, int value) int tvout_std_v4l2_reqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, unsigned int num_bufs) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_requestbuffers reqbuf; @@ -397,12 +397,12 @@ int tvout_std_v4l2_reqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memo reqbuf.count = num_bufs; if (ioctl(fd, VIDIOC_REQBUFS, &reqbuf) < 0) { - LOGE("%s::VIDIOC_REQBUFS failed", __func__); + ALOGE("%s::VIDIOC_REQBUFS failed", __func__); return -1; } if (reqbuf.count < num_bufs) { - LOGE("%s::VIDIOC_REQBUFS failed ((reqbuf.count(%d) < num_bufs(%d))", + ALOGE("%s::VIDIOC_REQBUFS failed ((reqbuf.count(%d) < num_bufs(%d))", __func__, reqbuf.count, num_bufs); return -1; } @@ -413,7 +413,7 @@ int tvout_std_v4l2_reqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memo int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, unsigned int buf_index, unsigned int num_planes, SecBuffer *secBuf) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_buffer buf; struct v4l2_plane planes[MAX_PLANES_MIXER]; @@ -424,7 +424,7 @@ int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory me memset(&planes[i], 0, sizeof(struct v4l2_plane)); if (MAX_BUFFERS_MIXER <= buf_index || MAX_PLANES_MIXER <= num_planes) { - LOGE("%s::exceed MAX! : buf_index=%d, num_plane=%d", __func__, buf_index, num_planes); + ALOGE("%s::exceed MAX! : buf_index=%d, num_plane=%d", __func__, buf_index, num_planes); return -1; } @@ -435,24 +435,24 @@ int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory me buf.m.planes = planes; if (ioctl(fd, VIDIOC_QUERYBUF, &buf) < 0) { - LOGE("%s::VIDIOC_QUERYBUF failed, plane_cnt=%d", __func__, buf.length); + ALOGE("%s::VIDIOC_QUERYBUF failed, plane_cnt=%d", __func__, buf.length); return -1; } for (unsigned int i = 0; i < num_planes; i++) { if ((secBuf->virt.extP[i] = (char *)mmap(0, buf.m.planes[i].length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, buf.m.planes[i].m.mem_offset)) < 0) { - LOGE("%s::mmap failed", __func__); - LOGE("%s::Offset = 0x%x", __func__, buf.m.planes[i].m.mem_offset); - LOGE("%s::Legnth = %d" , __func__, buf.m.planes[i].length); - LOGE("%s::vaddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); + ALOGE("%s::mmap failed", __func__); + ALOGE("%s::Offset = 0x%x", __func__, buf.m.planes[i].m.mem_offset); + ALOGE("%s::Legnth = %d" , __func__, buf.m.planes[i].length); + ALOGE("%s::vaddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); return -1; } secBuf->size.extS[i] = buf.m.planes[i].length; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::vaddr[bufindex=%d][planeidx=%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); - LOGD("%s::Legnth = %d" , __func__, buf.m.planes[i].length); + ALOGD("%s::vaddr[bufindex=%d][planeidx=%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]); + ALOGD("%s::Legnth = %d" , __func__, buf.m.planes[i].length); #endif } @@ -462,7 +462,7 @@ int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory me int tvout_std_v4l2_qbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, int buf_index, int num_planes, SecBuffer *secBuf) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_buffer buf; struct v4l2_plane planes[MAX_PLANES_MIXER]; @@ -484,15 +484,15 @@ int tvout_std_v4l2_qbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory buf.m.planes[i].bytesused = buf.m.planes[i].length; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::buf.index=%d", __func__, buf.index); - LOGD("%s::buf.m.planes[%d].m.userptr=0x%08x", __func__, i, (unsigned int)buf.m.planes[i].m.userptr); - LOGD("%s::buf.m.planes[%d].length =0x%08x", __func__, i, buf.m.planes[i].length); - LOGD("%s::buf.m.planes[%d].bytesused=0x%08x", __func__, i, buf.m.planes[i].bytesused); + ALOGD("%s::buf.index=%d", __func__, buf.index); + ALOGD("%s::buf.m.planes[%d].m.userptr=0x%08x", __func__, i, (unsigned int)buf.m.planes[i].m.userptr); + ALOGD("%s::buf.m.planes[%d].length =0x%08x", __func__, i, buf.m.planes[i].length); + ALOGD("%s::buf.m.planes[%d].bytesused=0x%08x", __func__, i, buf.m.planes[i].bytesused); #endif } if (ioctl(fd, VIDIOC_QBUF, &buf) < 0) { - LOGE("%s::VIDIOC_QBUF failed", __func__); + ALOGE("%s::VIDIOC_QBUF failed", __func__); return -1; } @@ -502,7 +502,7 @@ int tvout_std_v4l2_qbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory int tvout_std_v4l2_dqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, int *buf_index, int num_planes) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_buffer buf; struct v4l2_plane planes[MAX_PLANES_MIXER]; @@ -519,13 +519,13 @@ int tvout_std_v4l2_dqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memor buf.m.planes = planes; if (ioctl(fd, VIDIOC_DQBUF, &buf) < 0) { - LOGE("%s::VIDIOC_DQBUF failed", __func__); + ALOGE("%s::VIDIOC_DQBUF failed", __func__); return -1; } *buf_index = buf.index; #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::buf.index=%d", __func__, buf.index); + ALOGD("%s::buf.index=%d", __func__, buf.index); #endif return 0; @@ -534,10 +534,10 @@ int tvout_std_v4l2_dqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memor int tvout_std_v4l2_streamon(int fd, enum v4l2_buf_type type) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (ioctl(fd, VIDIOC_STREAMON, &type) < 0) { - LOGE("%s::VIDIOC_STREAMON failed", __func__); + ALOGE("%s::VIDIOC_STREAMON failed", __func__); return -1; } @@ -547,10 +547,10 @@ int tvout_std_v4l2_streamon(int fd, enum v4l2_buf_type type) int tvout_std_v4l2_streamoff(int fd, enum v4l2_buf_type type) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (ioctl(fd, VIDIOC_STREAMOFF, &type) < 0) { - LOGE("%s::VIDIOC_STREAMOFF failed", __func__); + ALOGE("%s::VIDIOC_STREAMOFF failed", __func__); return -1; } @@ -560,7 +560,7 @@ int tvout_std_v4l2_streamoff(int fd, enum v4l2_buf_type type) int tvout_v4l2_enum_output(int fd, struct v4l2_output *output) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int ret = -1 ; ret = ioctl(fd, VIDIOC_ENUMOUTPUT, output); @@ -568,10 +568,10 @@ int tvout_v4l2_enum_output(int fd, struct v4l2_output *output) if (ret < 0) { if (errno == EINVAL) return -1; - LOGE("%s::VIDIOC_ENUMOUTPUT", __func__); + ALOGE("%s::VIDIOC_ENUMOUTPUT", __func__); return -1; } - LOGD("%s::index=%d, type=0x%08x, name=%s", + ALOGD("%s::index=%d, type=0x%08x, name=%s", __func__, output->index, output->type, output->name); return ret; @@ -580,10 +580,10 @@ int tvout_v4l2_enum_output(int fd, struct v4l2_output *output) int tvout_v4l2_s_output(int fd, int index) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (ioctl(fd, VIDIOC_S_OUTPUT, &index) < 0) { - LOGE("%s::VIDIOC_S_OUTPUT failed", __func__); + ALOGE("%s::VIDIOC_S_OUTPUT failed", __func__); return -1; } @@ -593,10 +593,10 @@ int tvout_v4l2_s_output(int fd, int index) int tvout_v4l2_g_output(int fd, int *index) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (ioctl(fd, VIDIOC_G_OUTPUT, index) < 0) { - LOGE("%s::VIDIOC_G_OUTPUT failed", __func__); + ALOGE("%s::VIDIOC_G_OUTPUT failed", __func__); return -1; } @@ -606,7 +606,7 @@ int tvout_v4l2_g_output(int fd, int *index) int tvout_std_v4l2_enum_dv_presets(int fd) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_dv_enum_preset enum_preset; int ret = -1; @@ -618,10 +618,10 @@ int tvout_std_v4l2_enum_dv_presets(int fd) if (ret < 0) { if (errno == EINVAL) break; - LOGE("%s::VIDIOC_ENUM_DV_PRESETS", __func__); + ALOGE("%s::VIDIOC_ENUM_DV_PRESETS", __func__); return -1; } - LOGD("%s::index=%d, preset=0x%08x, name=%s, w=%d, h=%d", + ALOGD("%s::index=%d, preset=0x%08x, name=%s, w=%d, h=%d", __func__, enum_preset.index, enum_preset.preset, enum_preset.name, enum_preset.width, enum_preset.height); } @@ -631,14 +631,14 @@ int tvout_std_v4l2_enum_dv_presets(int fd) int tvout_std_v4l2_s_dv_preset(int fd, struct v4l2_dv_preset *preset) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (ioctl(fd, VIDIOC_S_DV_PRESET, preset) < 0) { - LOGE("%s::VIDIOC_S_DV_PRESET failed preset_id=%d", __func__, preset->preset); + ALOGE("%s::VIDIOC_S_DV_PRESET failed preset_id=%d", __func__, preset->preset); return -1; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::preset_id=%d", __func__, preset->preset); + ALOGD("%s::preset_id=%d", __func__, preset->preset); #endif return 0; } @@ -646,7 +646,7 @@ int tvout_std_v4l2_s_dv_preset(int fd, struct v4l2_dv_preset *preset) int tvout_std_subdev_s_fmt(int fd, unsigned int pad, int w, int h, enum v4l2_mbus_pixelcode code) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_subdev_format fmt; @@ -657,19 +657,19 @@ int tvout_std_subdev_s_fmt(int fd, unsigned int pad, int w, int h, enum v4l2_mbu fmt.format.code = code; if (ioctl(fd, VIDIOC_SUBDEV_S_FMT, &fmt) < 0) { - LOGE("%s::VIDIOC_SUBDEV_S_FMT", __func__); + ALOGE("%s::VIDIOC_SUBDEV_S_FMT", __func__); return -1; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::format w=%d, h=%d", __func__, fmt.format.width, fmt.format.height); + ALOGD("%s::format w=%d, h=%d", __func__, fmt.format.width, fmt.format.height); #endif return 0; } int tvout_std_subdev_s_crop(int fd, unsigned int pad, int x, int y, int w, int h) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::pad=%d, crop x=%d, y=%d, w=%d, h=%d", __func__, pad, x, y, w, h); + ALOGD("%s::pad=%d, crop x=%d, y=%d, w=%d, h=%d", __func__, pad, x, y, w, h); #endif struct v4l2_subdev_crop crop; @@ -682,12 +682,12 @@ int tvout_std_subdev_s_crop(int fd, unsigned int pad, int x, int y, int w, int h crop.rect.height = h; if (ioctl(fd, VIDIOC_SUBDEV_S_CROP, &crop) < 0) { - LOGE("%s::VIDIOC_SUBDEV_S_CROP", __func__); + ALOGE("%s::VIDIOC_SUBDEV_S_CROP", __func__); return -1; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s::pad=%d, crop x=%d, y=%d, w=%d, h=%d", __func__, pad, crop.rect.left, crop.rect.top, crop.rect.width, crop.rect.height); + ALOGD("%s::pad=%d, crop x=%d, y=%d, w=%d, h=%d", __func__, pad, crop.rect.left, crop.rect.top, crop.rect.width, crop.rect.height); #endif return 0; @@ -715,20 +715,20 @@ void hdmi_cal_rect(int src_w, int src_h, int dst_w, int dst_h, struct v4l2_rect int hdmi_set_videolayer(int fd, int hdmiW, int hdmiH, struct v4l2_rect * rect) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif if (tvout_std_subdev_s_fmt(fd, MIXER_V_SUBDEV_PAD_SINK, hdmiW, hdmiH, V4L2_MBUS_FMT_YUV8_1X24) < 0) { - LOGE("%s::tvout_std_subdev_s_fmt(PAD=%d)[videolayer] failed", __func__, MIXER_V_SUBDEV_PAD_SINK); + ALOGE("%s::tvout_std_subdev_s_fmt(PAD=%d)[videolayer] failed", __func__, MIXER_V_SUBDEV_PAD_SINK); return -1; } if (tvout_std_subdev_s_crop(fd, MIXER_V_SUBDEV_PAD_SINK, 0, 0, rect->width, rect->height) < 0) { - LOGE("%s::tvout_std_subdev_s_crop(PAD=%d)[videolayer] failed", __func__, MIXER_V_SUBDEV_PAD_SINK); + ALOGE("%s::tvout_std_subdev_s_crop(PAD=%d)[videolayer] failed", __func__, MIXER_V_SUBDEV_PAD_SINK); return -1; } if (tvout_std_subdev_s_crop(fd, MIXER_V_SUBDEV_PAD_SOURCE, rect->left, rect->top, rect->width, rect->height) < 0) { - LOGE("%s::tvout_std_subdev_s_crop(PAD=%d)[videolayer] failed", __func__, MIXER_V_SUBDEV_PAD_SOURCE); + ALOGE("%s::tvout_std_subdev_s_crop(PAD=%d)[videolayer] failed", __func__, MIXER_V_SUBDEV_PAD_SOURCE); return -1; } return 0; @@ -742,7 +742,7 @@ int hdmi_set_graphiclayer(int fd_subdev, int fd_videodev,int layer, int rotVal) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif #if defined(BOARD_USES_HDMI_FIMGAPI) int dst_color_format; @@ -822,7 +822,7 @@ int hdmi_set_graphiclayer(int fd_subdev, int fd_videodev,int layer, g2d_rotation = ROT_270; break; default: - LOGE("%s::invalid rotVal(%d) : failed", __func__, rotVal); + ALOGE("%s::invalid rotVal(%d) : failed", __func__, rotVal); return -1; break; } @@ -830,7 +830,7 @@ int hdmi_set_graphiclayer(int fd_subdev, int fd_videodev,int layer, BlitParam = {BLIT_OP_SRC, NON_PREMULTIPLIED, 0xff, 0, g2d_rotation, &Scaling, 0, 0, &dstClip, 0, &srcImage, &dstImage, NULL, &srcRect, &dstRect, NULL, 0}; if (stretchFimgApi(&BlitParam) < 0) { - LOGE("%s::stretchFimgApi() failed", __func__); + ALOGE("%s::stretchFimgApi() failed", __func__); return -1; } @@ -849,7 +849,7 @@ int hdmi_set_g_Params(int fd_subdev, int fd_videodev, int layer, int dst_x, int dst_y, int dst_w, int dst_h) { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif struct v4l2_rect rect; int src_pad = 0; @@ -866,7 +866,7 @@ int hdmi_set_g_Params(int fd_subdev, int fd_videodev, int layer, src_pad = MIXER_G1_SUBDEV_PAD_SOURCE; break; default: - LOGE("%s::invalid layer(%d)", __func__, layer); + ALOGE("%s::invalid layer(%d)", __func__, layer); break; }; @@ -883,34 +883,34 @@ int hdmi_set_g_Params(int fd_subdev, int fd_videodev, int layer, /* set sub device for mixer graphic layer input */ if (tvout_std_subdev_s_fmt(fd_subdev, sink_pad, rect.width, rect.height, V4L2_MBUS_FMT_XRGB8888_4X8_LE) < 0) { - LOGE("%s::tvout_std_subdev_s_fmt(PAD=%d)[graphic layer] failed", __func__, sink_pad); + ALOGE("%s::tvout_std_subdev_s_fmt(PAD=%d)[graphic layer] failed", __func__, sink_pad); return -1; } if (tvout_std_subdev_s_crop(fd_subdev, sink_pad, 0, 0, rect.width, rect.height) < 0) { - LOGE("%s::tvout_std_subdev_s_crop(PAD=%d)[graphic layer] failed", __func__, sink_pad); + ALOGE("%s::tvout_std_subdev_s_crop(PAD=%d)[graphic layer] failed", __func__, sink_pad); return -1; } if (tvout_std_subdev_s_crop(fd_subdev, src_pad, rect.left, rect.top, rect.width, rect.height) < 0) { - LOGE("%s::tvout_std_subdev_s_crop(PAD=%d)[graphic layer] failed", __func__, src_pad); + ALOGE("%s::tvout_std_subdev_s_crop(PAD=%d)[graphic layer] failed", __func__, src_pad); return -1; } /* set format for mixer graphic layer input device*/ if (tvout_std_v4l2_s_fmt(fd_videodev, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_ANY, rect.width, rect.height, v4l2ColorFormat, 1) < 0) { - LOGE("%s::tvout_std_v4l2_s_fmt()[graphic layer] failed", __func__); + ALOGE("%s::tvout_std_v4l2_s_fmt()[graphic layer] failed", __func__); return -1; } if (tvout_std_v4l2_s_crop(fd_videodev, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_ANY, rect.left, rect.top, rect.width, rect.height) < 0) { - LOGE("%s::tvout_std_v4l2_s_crop()[graphic layer] failed", __func__); + ALOGE("%s::tvout_std_v4l2_s_crop()[graphic layer] failed", __func__); return -1; } /* request buffer for mixer graphic layer input device */ if (tvout_std_v4l2_reqbuf(fd_videodev, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, 2) < 0) { - LOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d)[graphic layer] failed", __func__, 2); + ALOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d)[graphic layer] failed", __func__, 2); return -1; } @@ -920,7 +920,7 @@ int hdmi_set_g_Params(int fd_subdev, int fd_videodev, int layer, int hdmi_cable_status() { #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("%s", __func__); + ALOGD("%s", __func__); #endif int cable_status = 0; @@ -929,21 +929,21 @@ int hdmi_cable_status() fd = open(TVOUT0_DEV_G0, O_RDWR); if (fd <= 0) { - LOGE("%s: graphic layer 0 drv open failed", __func__); + ALOGE("%s: graphic layer 0 drv open failed", __func__); return -1; } ctrl.id = V4L2_CID_TV_HPD_STATUS; if (ioctl(fd, VIDIOC_S_CTRL, &ctrl) < 0) { - LOGE("Get HPD_STATUS fail"); + ALOGE("Get HPD_STATUS fail"); cable_status = -1; } else { cable_status = ctrl.value; } #ifdef DEBUG_HDMI_HW_LEVEL - LOGD("HPD_STATUS = %d", cable_status); + ALOGD("HPD_STATUS = %d", cable_status); #endif close(fd); @@ -969,7 +969,7 @@ int hdmi_outputmode_2_v4l2_output_type(int output_mode) v4l2_output_type = V4L2_OUTPUT_TYPE_COMPOSITE; break; default: - LOGE("%s::unmathced HDMI_mode(%d)", __func__, output_mode); + ALOGE("%s::unmathced HDMI_mode(%d)", __func__, output_mode); v4l2_output_type = -1; break; } @@ -995,7 +995,7 @@ int hdmi_v4l2_output_type_2_outputmode(int v4l2_output_type) outputMode = COMPOSITE_OUTPUT_MODE; break; default: - LOGE("%s::unmathced v4l2_output_type(%d)", __func__, v4l2_output_type); + ALOGE("%s::unmathced v4l2_output_type(%d)", __func__, v4l2_output_type); outputMode = -1; break; } @@ -1030,7 +1030,7 @@ int composite_std_2_v4l2_std_id(int std) std_id = V4L2_STD_PAL_60; break; default: - LOGE("%s::unmathced composite_std(%d)", __func__, std); + ALOGE("%s::unmathced composite_std(%d)", __func__, std); break; } @@ -1053,14 +1053,14 @@ int hdmi_check_output_mode(int v4l2_output_type) video.mode = HDMI; if (!EDIDHDMIModeSupport(&video)) { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DVI; - LOGI("Change mode into DVI\n"); + ALOGI("Change mode into DVI\n"); break; } video.colorSpace = HDMI_CS_YCBCR444; if (!EDIDColorSpaceSupport(&video)) { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_HDMI_RGB; - LOGI("Change mode into HDMI_RGB\n"); + ALOGI("Change mode into HDMI_RGB\n"); } break; @@ -1068,14 +1068,14 @@ int hdmi_check_output_mode(int v4l2_output_type) video.mode = HDMI; if (!EDIDHDMIModeSupport(&video)) { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DVI; - LOGI("Change mode into DVI\n"); + ALOGI("Change mode into DVI\n"); break; } video.colorSpace = HDMI_CS_RGB; if (!EDIDColorSpaceSupport(&video)) { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DIGITAL; - LOGI("Change mode into HDMI_YCBCR\n"); + ALOGI("Change mode into HDMI_YCBCR\n"); } break; @@ -1085,10 +1085,10 @@ int hdmi_check_output_mode(int v4l2_output_type) video.colorSpace = HDMI_CS_YCBCR444; if (!EDIDColorSpaceSupport(&video)) { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_HDMI_RGB; - LOGI("Change mode into HDMI_RGB\n"); + ALOGI("Change mode into HDMI_RGB\n"); } else { calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DIGITAL; - LOGI("Change mode into HDMI_YCBCR\n"); + ALOGI("Change mode into HDMI_YCBCR\n"); } break; } @@ -1192,14 +1192,14 @@ int hdmi_check_resolution(v4l2_std_id std_id) video.hdmi_3d_format = HDMI_3D_TB_FORMAT; break; default: - LOGE("%s::unmathced std_id(%lld)", __func__, std_id); + ALOGE("%s::unmathced std_id(%lld)", __func__, std_id); return -1; break; } if (!EDIDVideoResolutionSupport(&video)) { #ifdef DEBUG_MSG_ENABLE - LOGD("%s::EDIDVideoResolutionSupport(%llx) fail (not suppoted std_id) \n", __func__, std_id); + ALOGD("%s::EDIDVideoResolutionSupport(%llx) fail (not suppoted std_id) \n", __func__, std_id); #endif return -1; } @@ -1297,7 +1297,7 @@ int hdmi_resolution_2_std_id(unsigned int resolution, int * w, int * h, v4l2_std *preset_id = V4L2_DV_480P60; break; default: - LOGE("%s::unmathced resolution(%d)", __func__, resolution); + ALOGE("%s::unmathced resolution(%d)", __func__, resolution); ret = -1; break; } @@ -1308,7 +1308,7 @@ int hdmi_resolution_2_std_id(unsigned int resolution, int * w, int * h, v4l2_std int hdmi_enable_hdcp(int fd, unsigned int hdcp_en) { if (ioctl(fd, VIDIOC_HDCP_ENABLE, hdcp_en) < 0) { - LOGD("%s::VIDIOC_HDCP_ENABLE(%d) fail \n", __func__, hdcp_en); + ALOGD("%s::VIDIOC_HDCP_ENABLE(%d) fail \n", __func__, hdcp_en); return -1; } @@ -1334,12 +1334,12 @@ int hdmi_check_audio(int fd) #endif if (audio_state == ON) { if (ioctl(fd, VIDIOC_INIT_AUDIO, 1) < 0) { - LOGE("%s::VIDIOC_INIT_AUDIO(1) failed", __func__); + ALOGE("%s::VIDIOC_INIT_AUDIO(1) failed", __func__); ret = -1; } } else { if (ioctl(fd, VIDIOC_INIT_AUDIO, 0) < 0) { - LOGE("%s::VIDIOC_INIT_AUDIO(0) failed", __func__); + ALOGE("%s::VIDIOC_INIT_AUDIO(0) failed", __func__); ret = -1; } } diff --git a/exynos5/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.h b/exynos5/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.h index 67c0729..c772bf1 100644 --- a/exynos5/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.h +++ b/exynos5/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.h @@ -17,8 +17,8 @@ #ifndef __HDMI_HAL_V4L2_UTILS_H__ #define __HDMI_HAL_V4L2_UTILS_H__ -//#define LOG_NDEBUG 0 -//#define LOG_TAG "libhdmi" +//#define ALOG_NDEBUG 0 +//#define ALOG_TAG "libhdmi" #include "fimd_api.h" #include "SecBuffer.h" diff --git a/exynos5/hal/libhdmi/SecHdmi/fimd_api.c b/exynos5/hal/libhdmi/SecHdmi/fimd_api.c index 0e07ef3..0f14f5d 100644 --- a/exynos5/hal/libhdmi/SecHdmi/fimd_api.c +++ b/exynos5/hal/libhdmi/SecHdmi/fimd_api.c @@ -41,7 +41,7 @@ int fb_open(int win) fp = open(node, O_RDWR); if (fp < 0) - LOGE("%s: fb[%d] open failed", __func__, win); + ALOGE("%s: fb[%d] open failed", __func__, win); return fp; } @@ -51,7 +51,7 @@ int fb_close(int fp) if (fp) close(fp); else - LOGE("%s: fb is not allocated %d", __func__, fp); + ALOGE("%s: fb is not allocated %d", __func__, fp); return 0; } @@ -62,7 +62,7 @@ int get_fscreeninfo(int fp, struct fb_fix_screeninfo *fix) ret = ioctl(fp, FBIOGET_FSCREENINFO, fix); if (ret) - LOGE("%s: FBIOGET_FSCREENINFO failed", __func__); + ALOGE("%s: FBIOGET_FSCREENINFO failed", __func__); return ret; } @@ -73,7 +73,7 @@ int get_vscreeninfo(int fp, struct fb_var_screeninfo *var) ret = ioctl(fp, FBIOGET_VSCREENINFO, var); if (ret) - LOGE("%s:: FBIOGET_VSCREENINFO failed", __func__); + ALOGE("%s:: FBIOGET_VSCREENINFO failed", __func__); return ret; } @@ -84,7 +84,7 @@ int put_vscreeninfo(int fp, struct fb_var_screeninfo *var) ret = ioctl(fp, FBIOPUT_VSCREENINFO, var); if (ret) - LOGE("%s:: FBIOPUT_VSCREENINFO failed", __func__); + ALOGE("%s:: FBIOPUT_VSCREENINFO failed", __func__); return ret; } @@ -102,7 +102,7 @@ char *fb_mmap(__u32 size, int fp) buffer = (char *)mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fp, 0); if (!buffer) { - LOGE("%s:: mmap failed", __func__); + ALOGE("%s:: mmap failed", __func__); return NULL; } @@ -115,7 +115,7 @@ int fb_ioctl(int fp, __u32 cmd, void *arg) ret = ioctl(fp, cmd, arg); if (ret < 0) - LOGE("%s:: ioctl (%d) failed", __func__, cmd); + ALOGE("%s:: ioctl (%d) failed", __func__, cmd); return ret; } @@ -126,7 +126,7 @@ int fb_on(int fp) ret = ioctl(fp, FBIOBLANK, FB_BLANK_UNBLANK); if (ret) - LOGE("%s:: FBIOBLANK failed", __func__); + ALOGE("%s:: FBIOBLANK failed", __func__); return ret; } @@ -137,7 +137,7 @@ int fb_off(int fp) ret = ioctl(fp, FBIOBLANK, FB_BLANK_POWERDOWN); if (ret) - LOGE("%s:: FBIOBLANK failed", __func__); + ALOGE("%s:: FBIOBLANK failed", __func__); return ret; } @@ -152,7 +152,7 @@ int fb_off_all() return -1; if (ioctl(fp, FBIOBLANK, FB_BLANK_POWERDOWN) < 0) - LOGE("%s:: FBIOBLANK failed", __func__); + ALOGE("%s:: FBIOBLANK failed", __func__); fb_off(fp); fb_close(fp); diff --git a/exynos5/hal/libhdmi/libhdmiservice/MessageQueue.cpp b/exynos5/hal/libhdmi/libhdmiservice/MessageQueue.cpp index fb58ef9..91f3336 100644 --- a/exynos5/hal/libhdmi/libhdmiservice/MessageQueue.cpp +++ b/exynos5/hal/libhdmi/libhdmiservice/MessageQueue.cpp @@ -107,7 +107,7 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout) } if (nextEventTime >= 0) { - //LOGD("nextEventTime = %lld ms", nextEventTime); + //ALOGD("nextEventTime = %lld ms", nextEventTime); if (nextEventTime > 0) { // we're about to wait, flush the binder command buffer IPCThreadState::self()->flushCommands(); @@ -117,7 +117,7 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout) } } } else { - //LOGD("going to wait"); + //ALOGD("going to wait"); // we're about to wait, flush the binder command buffer IPCThreadState::self()->flushCommands(); mCondition.wait(mLock); @@ -160,7 +160,7 @@ status_t MessageQueue::queueMessage( message->when = systemTime() + relTime; mMessages.insert(message); - //LOGD("MessageQueue::queueMessage time = %lld ms", message->when); + //ALOGD("MessageQueue::queueMessage time = %lld ms", message->when); //dumpLocked(message); mCondition.signal(); @@ -180,7 +180,7 @@ void MessageQueue::dumpLocked(const sp<MessageBase>& message) int c = 0; while (cur != end) { const char tick = (*cur == message) ? '>' : ' '; - LOGD("%c %d: msg{.what=%08x, when=%lld}", + ALOGD("%c %d: msg{.what=%08x, when=%lld}", tick, c, (*cur)->what, (*cur)->when); ++cur; c++; diff --git a/exynos5/hal/libhdmi/libhdmiservice/SecHdmiClient.cpp b/exynos5/hal/libhdmi/libhdmiservice/SecHdmiClient.cpp index 150aadf..430ea4e 100644 --- a/exynos5/hal/libhdmi/libhdmiservice/SecHdmiClient.cpp +++ b/exynos5/hal/libhdmi/libhdmiservice/SecHdmiClient.cpp @@ -22,7 +22,7 @@ ** @date 2011-07-06 */ -#define LOG_TAG "libhdmiclient" +#define ALOG_TAG "libhdmiclient" #include "SecHdmiClient.h" @@ -47,7 +47,7 @@ SecHdmiClient * SecHdmiClient::getInstance(void) void SecHdmiClient::setHdmiCableStatus(int status) { - LOGD("%s HDMI status: %d\n", __func__, status); + ALOGD("%s HDMI status: %d\n", __func__, status); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiCableStatus(status); @@ -55,7 +55,7 @@ void SecHdmiClient::setHdmiCableStatus(int status) void SecHdmiClient::setHdmiMode(int mode) { - //LOGD("%s HDMI Mode: %d\n", __func__, mode); + //ALOGD("%s HDMI Mode: %d\n", __func__, mode); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiMode(mode); @@ -63,7 +63,7 @@ void SecHdmiClient::setHdmiMode(int mode) void SecHdmiClient::setHdmiResolution(int resolution) { - //LOGD("%s HDMI Resolution: %d\n", __func__, resolution); + //ALOGD("%s HDMI Resolution: %d\n", __func__, resolution); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiResolution(resolution); @@ -71,7 +71,7 @@ void SecHdmiClient::setHdmiResolution(int resolution) void SecHdmiClient::setHdmiHdcp(int enHdcp) { - //LOGD("%s HDMI HDCP: %d\n", __func__, enHdcp); + //ALOGD("%s HDMI HDCP: %d\n", __func__, enHdcp); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiHdcp(enHdcp); @@ -79,7 +79,7 @@ void SecHdmiClient::setHdmiHdcp(int enHdcp) void SecHdmiClient::setHdmiRotate(int rotVal, uint32_t hwcLayer) { - //LOGD("%s HDMI ROTATE: %d\n", __func__, rotVal); + //ALOGD("%s HDMI ROTATE: %d\n", __func__, rotVal); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiRotate(rotVal, hwcLayer); @@ -87,7 +87,7 @@ void SecHdmiClient::setHdmiRotate(int rotVal, uint32_t hwcLayer) void SecHdmiClient::setHdmiHwcLayer(uint32_t hwcLayer) { - //LOGD("%s HDMI HWCLAYER: %d\n", __func__, hwcLayer); + //ALOGD("%s HDMI HWCLAYER: %d\n", __func__, hwcLayer); if (g_SecTVOutService != 0) g_SecTVOutService->setHdmiHwcLayer(hwcLayer); @@ -119,7 +119,7 @@ sp<ISecTVOut> SecHdmiClient::m_getSecTVOutService(void) for(getSvcTimes = 0; getSvcTimes < GETSERVICETIMEOUT; getSvcTimes++) { binder = sm->getService(String16("SecTVOutService")); if (binder == 0) { - LOGW("SecTVOutService not published, waiting..."); + ALOGW("SecTVOutService not published, waiting..."); usleep(500000); // 0.5 s } else { break; @@ -130,7 +130,7 @@ sp<ISecTVOut> SecHdmiClient::m_getSecTVOutService(void) sc = interface_cast<ISecTVOut>(binder); g_SecTVOutService = sc; } else { - LOGW("Failed to get SecTVOutService... SecHdmiClient will get it later.."); + ALOGW("Failed to get SecTVOutService... SecHdmiClient will get it later.."); } } return g_SecTVOutService; diff --git a/exynos5/hal/libhdmi/libhdmiservice/SecTVOutService.cpp b/exynos5/hal/libhdmi/libhdmiservice/SecTVOutService.cpp index 39ef742..3666106 100644 --- a/exynos5/hal/libhdmi/libhdmiservice/SecTVOutService.cpp +++ b/exynos5/hal/libhdmi/libhdmiservice/SecTVOutService.cpp @@ -22,7 +22,7 @@ ** @date 2011-07-06 */ -#define LOG_TAG "SecTVOutService" +#define ALOG_TAG "SecTVOutService" #include <binder/IServiceManager.h> #include <utils/RefBase.h> @@ -61,15 +61,15 @@ namespace android { int SecTVOutService::instantiate() { - LOGD("SecTVOutService instantiate"); + ALOGD("SecTVOutService instantiate"); int r = defaultServiceManager()->addService(String16( "SecTVOutService"), new SecTVOutService ()); - LOGD("SecTVOutService r=%d", r); + ALOGD("SecTVOutService r=%d", r); return r; } SecTVOutService::SecTVOutService () { - LOGV("SecTVOutService created"); + ALOGV("SecTVOutService created"); mHdmiCableInserted = false; #ifdef SUPPORT_G2D_UI_MODE mUILayerMode = SecHdmi::HDMI_LAYER_GRAPHIC_1; @@ -81,7 +81,7 @@ namespace android { setLCDsize(); if (mSecHdmi.create(mLCD_width, mLCD_height) == false) - LOGE("%s::mSecHdmi.create() fail", __func__); + ALOGE("%s::mSecHdmi.create() fail", __func__); else setHdmiStatus(1); @@ -118,7 +118,7 @@ namespace android { } SecTVOutService::~SecTVOutService () { - LOGV ("SecTVOutService destroyed"); + ALOGV ("SecTVOutService destroyed"); if (mHdmiFlushThread != NULL) { mHdmiFlushThread->requestExit(); @@ -178,7 +178,7 @@ namespace android { } break; default : - LOGE ( "onTransact::default"); + ALOGE ( "onTransact::default"); return BBinder::onTransact (code, data, reply, flags); } @@ -187,7 +187,7 @@ namespace android { void SecTVOutService::setHdmiStatus(uint32_t status) { - LOGD("%s HDMI cable status = %d", __func__, status); + ALOGD("%s HDMI cable status = %d", __func__, status); { Mutex::Autolock _l(mLock); @@ -198,12 +198,12 @@ namespace android { if (hdmiCableInserted == true) { if (mSecHdmi.connect() == false) { - LOGE("%s::mSecHdmi.connect() fail", __func__); + ALOGE("%s::mSecHdmi.connect() fail", __func__); hdmiCableInserted = false; } } else { if (mSecHdmi.disconnect() == false) - LOGE("%s::mSecHdmi.disconnect() fail", __func__); + ALOGE("%s::mSecHdmi.disconnect() fail", __func__); } mHdmiCableInserted = hdmiCableInserted; @@ -215,51 +215,51 @@ namespace android { void SecTVOutService::setHdmiMode(uint32_t mode) { - LOGD("%s TV mode = %d", __func__, mode); + ALOGD("%s TV mode = %d", __func__, mode); Mutex::Autolock _l(mLock); if ((hdmiCableInserted() == true) && (mSecHdmi.setHdmiOutputMode(mode)) == false) { - LOGE("%s::mSecHdmi.setHdmiOutputMode() fail", __func__); + ALOGE("%s::mSecHdmi.setHdmiOutputMode() fail", __func__); return; } } void SecTVOutService::setHdmiResolution(uint32_t resolution) { - LOGD("%s TV resolution = %d", __func__, resolution); + ALOGD("%s TV resolution = %d", __func__, resolution); Mutex::Autolock _l(mLock); if ((hdmiCableInserted() == true) && (mSecHdmi.setHdmiResolution(resolution)) == false) { - LOGE("%s::mSecHdmi.setHdmiResolution() fail", __func__); + ALOGE("%s::mSecHdmi.setHdmiResolution() fail", __func__); return; } } void SecTVOutService::setHdmiHdcp(uint32_t hdcp_en) { - LOGD("%s TV HDCP = %d", __func__, hdcp_en); + ALOGD("%s TV HDCP = %d", __func__, hdcp_en); Mutex::Autolock _l(mLock); if ((hdmiCableInserted() == true) && (mSecHdmi.setHdcpMode(hdcp_en)) == false) { - LOGE("%s::mSecHdmi.setHdcpMode() fail", __func__); + ALOGE("%s::mSecHdmi.setHdcpMode() fail", __func__); return; } } void SecTVOutService::setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer) { - //LOGD("%s TV ROTATE = %d", __func__, rotVal); + //ALOGD("%s TV ROTATE = %d", __func__, rotVal); Mutex::Autolock _l(mLock); if ((hdmiCableInserted() == true) && (mSecHdmi.setUIRotation(rotVal, hwcLayer)) == false) { - LOGE("%s::mSecHdmi.setUIRotation() fail", __func__); + ALOGE("%s::mSecHdmi.setUIRotation() fail", __func__); return; } } void SecTVOutService::setHdmiHwcLayer(uint32_t hwcLayer) { - //LOGD("%s TV HWCLAYER = %d", __func__, hwcLayer); + //ALOGD("%s TV HWCLAYER = %d", __func__, hwcLayer); Mutex::Autolock _l(mLock); mHwcLayer = hwcLayer; @@ -301,14 +301,14 @@ namespace android { for (int layer = SecHdmi::HDMI_LAYER_BASE + 1; layer < SecHdmi::HDMI_LAYER_MAX; layer++) { if (layer != mUILayerMode) { if (mSecHdmi.clear(layer) == false) - LOGE("%s::mSecHdmi.clear(%d) fail", __func__, layer); + ALOGE("%s::mSecHdmi.clear(%d) fail", __func__, layer); } } } if (mUILayerMode != hdmiLayer) { if (mSecHdmi.clear(mUILayerMode) == false) - LOGE("%s::mSecHdmi.clear(%d) fail", __func__, mUILayerMode); + ALOGE("%s::mSecHdmi.clear(%d) fail", __func__, mUILayerMode); } mUILayerMode = hdmiLayer; @@ -323,10 +323,10 @@ namespace android { #endif if (mSecHdmi.flush(w, h, colorFormat, pPhyYAddr, pPhyCbAddr, pPhyCrAddr, dstX, dstY, mUILayerMode, mHwcLayer) == false) - LOGE("%s::mSecHdmi.flush() on HDMI_MODE_UI fail", __func__); + ALOGE("%s::mSecHdmi.flush() on HDMI_MODE_UI fail", __func__); #ifdef CHECK_UI_TIME end = systemTime(); - LOGD("[UI] mSecHdmi.flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); + ALOGD("[UI] mSecHdmi.flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); #endif } #else @@ -347,10 +347,10 @@ namespace android { #endif if (mSecHdmi.flush(w, h, colorFormat, pPhyYAddr, pPhyCbAddr, pPhyCrAddr, dstX, dstY, SecHdmi::HDMI_LAYER_VIDEO, mHwcLayer) == false) - LOGE("%s::mSecHdmi.flush() on HDMI_MODE_VIDEO fail", __func__); + ALOGE("%s::mSecHdmi.flush() on HDMI_MODE_VIDEO fail", __func__); #ifdef CHECK_VIDEO_TIME end = systemTime(); - LOGD("[Video] mSecHdmi.flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); + ALOGD("[Video] mSecHdmi.flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); #endif #else msg = new SecHdmiEventMsg(&mSecHdmi, w, h, colorFormat, pPhyYAddr, pPhyCbAddr, pPhyCrAddr, @@ -362,7 +362,7 @@ namespace android { break; default: - LOGE("unmatched HDMI_MODE : %d", hdmiMode); + ALOGE("unmatched HDMI_MODE : %d", hdmiMode); break; } diff --git a/exynos5/hal/libhdmi/libhdmiservice/SecTVOutService.h b/exynos5/hal/libhdmi/libhdmiservice/SecTVOutService.h index caece73..e6616a2 100644 --- a/exynos5/hal/libhdmi/libhdmiservice/SecTVOutService.h +++ b/exynos5/hal/libhdmi/libhdmiservice/SecTVOutService.h @@ -139,13 +139,13 @@ namespace android { #endif if (pSecHdmi->flush(mSrcWidth, mSrcHeight, mSrcColorFormat, mSrcYAddr, mSrcCbAddr, mSrcCrAddr, mDstX, mDstY, mHdmiLayer, mHwcLayer) == false) { - LOGE("%s::pSecHdmi->flush() fail on HDMI_MODE_UI", __func__); + ALOGE("%s::pSecHdmi->flush() fail on HDMI_MODE_UI", __func__); ret = false; } #ifdef CHECK_UI_TIME end = systemTime(); - LOGD("[UI] pSecHdmi->flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); + ALOGD("[UI] pSecHdmi->flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); #endif break; case HDMI_MODE_VIDEO: @@ -154,16 +154,16 @@ namespace android { #endif if (pSecHdmi->flush(mSrcWidth, mSrcHeight, mSrcColorFormat, mSrcYAddr, mSrcCbAddr, mSrcCrAddr, mDstX, mDstY, mHdmiLayer, mHwcLayer) == false) { - LOGE("%s::pSecHdmi->flush() fail on HDMI_MODE_VIDEO", __func__); + ALOGE("%s::pSecHdmi->flush() fail on HDMI_MODE_VIDEO", __func__); ret = false; } #ifdef CHECK_VIDEO_TIME end = systemTime(); - LOGD("[VIDEO] pSecHdmi->flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); + ALOGD("[VIDEO] pSecHdmi->flush[end-start] = %ld ms", long(ns2ms(end)) - long(ns2ms(start))); #endif break; default: - LOGE("Undefined HDMI_MODE"); + ALOGE("Undefined HDMI_MODE"); ret = false; break; } diff --git a/exynos5/hal/libhdmi/libsForhdmi/libcec/libcec.c b/exynos5/hal/libhdmi/libsForhdmi/libcec/libcec.c index e688051..e088346 100644 --- a/exynos5/hal/libhdmi/libsForhdmi/libcec/libcec.c +++ b/exynos5/hal/libhdmi/libsForhdmi/libcec/libcec.c @@ -74,7 +74,7 @@ int CECOpen() CECClose(); if ((fd = open(CEC_DEVICE_NAME, O_RDWR)) < 0) { - LOGE("Can't open %s!\n", CEC_DEVICE_NAME); + ALOGE("Can't open %s!\n", CEC_DEVICE_NAME); res = 0; } @@ -92,7 +92,7 @@ int CECClose() if (fd != -1) { if (close(fd) != 0) { - LOGE("close() failed!\n"); + ALOGE("close() failed!\n"); res = 0; } fd = -1; @@ -115,12 +115,12 @@ int CECAllocLogicalAddress(int paddr, enum CECDeviceType devtype) int i = 0; if (fd == -1) { - LOGE("open device first!\n"); + ALOGE("open device first!\n"); return 0; } if (CECSetLogicalAddr(laddr) < 0) { - LOGE("CECSetLogicalAddr() failed!\n"); + ALOGE("CECSetLogicalAddr() failed!\n"); return 0; } @@ -141,12 +141,12 @@ int CECAllocLogicalAddress(int paddr, enum CECDeviceType devtype) } if (laddr == CEC_LADDR_UNREGISTERED) { - LOGE("All LA addresses in use!!!\n"); + ALOGE("All LA addresses in use!!!\n"); return CEC_LADDR_UNREGISTERED; } if (CECSetLogicalAddr(laddr) < 0) { - LOGE("CECSetLogicalAddr() failed!\n"); + ALOGE("CECSetLogicalAddr() failed!\n"); return 0; } @@ -159,7 +159,7 @@ int CECAllocLogicalAddress(int paddr, enum CECDeviceType devtype) buffer[4] = devtype; if (CECSendMessage(buffer, 5) != 5) { - LOGE("CECSendMessage() failed!\n"); + ALOGE("CECSendMessage() failed!\n"); return 0; } @@ -177,17 +177,17 @@ int CECAllocLogicalAddress(int paddr, enum CECDeviceType devtype) int CECSendMessage(unsigned char *buffer, int size) { if (fd == -1) { - LOGE("open device first!\n"); + ALOGE("open device first!\n"); return 0; } if (size > CEC_MAX_FRAME_SIZE) { - LOGE("size should not exceed %d\n", CEC_MAX_FRAME_SIZE); + ALOGE("size should not exceed %d\n", CEC_MAX_FRAME_SIZE); return 0; } #if CEC_DEBUG - LOGI("CECSendMessage() : "); + ALOGI("CECSendMessage() : "); CECPrintFrame(buffer, size); #endif @@ -211,7 +211,7 @@ int CECReceiveMessage(unsigned char *buffer, int size, long timeout) int retval; if (fd == -1) { - LOGE("open device first!\n"); + ALOGE("open device first!\n"); return 0; } @@ -228,7 +228,7 @@ int CECReceiveMessage(unsigned char *buffer, int size, long timeout) } else if (retval) { bytes = read(fd, buffer, size); #if CEC_DEBUG - LOGI("CECReceiveMessage() : size(%d)", bytes); + ALOGI("CECReceiveMessage() : size(%d)", bytes); if(bytes > 0) CECPrintFrame(buffer, bytes); #endif @@ -245,7 +245,7 @@ int CECReceiveMessage(unsigned char *buffer, int size, long timeout) int CECSetLogicalAddr(unsigned int laddr) { if (ioctl(fd, CEC_IOC_SETLADDR, &laddr)) { - LOGE("ioctl(CEC_IOC_SETLA) failed!\n"); + ALOGE("ioctl(CEC_IOC_SETLA) failed!\n"); return 0; } @@ -260,12 +260,12 @@ void CECPrintFrame(unsigned char *buffer, unsigned int size) { if (size > 0) { int i; - LOGI("fsize: %d ", size); - LOGI("frame: "); + ALOGI("fsize: %d ", size); + ALOGI("frame: "); for (i = 0; i < size; i++) - LOGI("0x%02x ", buffer[i]); + ALOGI("0x%02x ", buffer[i]); - LOGI("\n"); + ALOGI("\n"); } } #endif diff --git a/exynos5/hal/libhdmi/libsForhdmi/libddc/libddc.c b/exynos5/hal/libhdmi/libsForhdmi/libddc/libddc.c index 4e6e374..c9e64a5 100644 --- a/exynos5/hal/libhdmi/libsForhdmi/libddc/libddc.c +++ b/exynos5/hal/libhdmi/libsForhdmi/libddc/libddc.c @@ -87,7 +87,7 @@ int DDCOpen() // open if ((ddc_fd = open(DEV_NAME,O_RDWR)) < 0) { - LOGE("%s: Cannot open I2C_DDC : %s",__func__, DEV_NAME); + ALOGE("%s: Cannot open I2C_DDC : %s",__func__, DEV_NAME); ret = 0; } @@ -106,7 +106,7 @@ int DDCClose() // check if fd is available if (ref_cnt == 0) { #if DDC_DEBUG - LOGE("%s: I2C_DDC is not available!!!!", __func__); + ALOGE("%s: I2C_DDC is not available!!!!", __func__); #endif return 1; } @@ -119,7 +119,7 @@ int DDCClose() if (close(ddc_fd) < 0) { #if DDC_DEBUG - LOGE("%s: Cannot close I2C_DDC : %s",__func__,DEV_NAME); + ALOGE("%s: Cannot close I2C_DDC : %s",__func__,DEV_NAME); #endif ret = 0; } @@ -147,7 +147,7 @@ int DDCRead(unsigned char addr, unsigned char offset, if (!DDCFileAvailable()) { #if DDC_DEBUG - LOGE("%s: I2C_DDC is not available!!!!", __func__); + ALOGE("%s: I2C_DDC is not available!!!!", __func__); #endif return 0; } @@ -197,7 +197,7 @@ int EDDCRead(unsigned char segpointer, unsigned char segment, unsigned char addr if (!DDCFileAvailable()) { #if DDC_DEBUG - LOGE("%s: I2C_DDC is not available!!!!", __func__); + ALOGE("%s: I2C_DDC is not available!!!!", __func__); #endif return 0; } @@ -231,7 +231,7 @@ int EDDCRead(unsigned char segpointer, unsigned char segment, unsigned char addr // eddc read if (ioctl(ddc_fd, I2C_RDWR, &msgset) < 0) { #if DDC_DEBUG - LOGE("%s: ioctl(I2C_RDWR) failed!!!", __func__); + ALOGE("%s: ioctl(I2C_RDWR) failed!!!", __func__); #endif ret = 0; } @@ -255,7 +255,7 @@ int DDCWrite(unsigned char addr, unsigned char offset, unsigned int size, unsign // allocate temporary buffer temp = (unsigned char*) malloc((size+1)*sizeof(unsigned char)); if (!temp) { - LOGE("%s: not enough resources at %s", __FUNCTION__); + ALOGE("%s: not enough resources at %s", __FUNCTION__); goto exit; } @@ -263,18 +263,18 @@ int DDCWrite(unsigned char addr, unsigned char offset, unsigned int size, unsign memcpy(temp+1,buffer,size); if (!DDCFileAvailable()) { - LOGE("%s: I2C_DDC is not available!!!!", __func__); + ALOGE("%s: I2C_DDC is not available!!!!", __func__); goto exit; } if (ioctl(ddc_fd, I2C_SLAVE, addr>>1) < 0) { - LOGE("%s: cannot set slave address 0x%02x", __func__,addr); + ALOGE("%s: cannot set slave address 0x%02x", __func__,addr); goto exit; } // write temp buffer if ((bytes = write(ddc_fd,temp,size+1)) != (size+1)) { - LOGE("%s: fail to write %d bytes, only write %d bytes",__func__, size, bytes); + ALOGE("%s: fail to write %d bytes, only write %d bytes",__func__, size, bytes); goto exit; } diff --git a/exynos5/hal/libhdmi/libsForhdmi/libedid/libedid.c b/exynos5/hal/libhdmi/libsForhdmi/libedid/libedid.c index c6bed50..60c61ce 100644 --- a/exynos5/hal/libhdmi/libsForhdmi/libedid/libedid.c +++ b/exynos5/hal/libhdmi/libsForhdmi/libedid/libedid.c @@ -27,7 +27,7 @@ //#define EDID_DEBUG 1 #ifdef EDID_DEBUG -#define DPRINTF(args...) LOGI(args) +#define DPRINTF(args...) ALOGI(args) #else #define DPRINTF(args...) #endif @@ -219,11 +219,11 @@ static int ReadEDIDBlock(const unsigned int blockNum, unsigned char* const outBu #ifdef EDID_DEBUG offset = 0; do { - LOGI("0x%02X", outBuffer[offset++]); + ALOGI("0x%02X", outBuffer[offset++]); if (offset % 16) - LOGI(" "); + ALOGI(" "); else - LOGI("\n"); + ALOGI("\n"); } while (SIZEOFEDIDBLOCK > offset); #endif // EDID_DEBUG return 1; diff --git a/exynos5/hal/libhwcomposer/SecHWC.cpp b/exynos5/hal/libhwcomposer/SecHWC.cpp index 31ea1b5..aa07972 100644 --- a/exynos5/hal/libhwcomposer/SecHWC.cpp +++ b/exynos5/hal/libhwcomposer/SecHWC.cpp @@ -73,7 +73,7 @@ hwc_module_t HAL_MODULE_INFO_SYM = { /*****************************************************************************/ static void dump_layer(hwc_layer_t const* l) { - LOGD("\ttype=%d, flags=%08x, handle=%p, tr=%02x, blend=%04x, " + ALOGD("\ttype=%d, flags=%08x, handle=%p, tr=%02x, blend=%04x, " "{%d,%d,%d,%d}, {%d,%d,%d,%d}", l->compositionType, l->flags, l->handle, l->transform, l->blending, l->sourceCrop.left, @@ -243,7 +243,7 @@ static int set_src_dst_img_rect(hwc_layer_t *cur, } } - SEC_HWC_Log(HWC_LOG_DEBUG, + SEC_HWC_Log(HWC_ALOG_DEBUG, "crop information()::" "sourceCrop left(%d),top(%d),right(%d),bottom(%d)," "src_rect x(%d),y(%d),w(%d),h(%d)," @@ -271,7 +271,7 @@ static int set_src_dst_img_rect(hwc_layer_t *cur, dst_rect->h = win->rect_info.h; /* Summery */ - SEC_HWC_Log(HWC_LOG_DEBUG, + SEC_HWC_Log(HWC_ALOG_DEBUG, "set_src_dst_img_rect()::" "SRC w(%d),h(%d),f_w(%d),f_h(%d),fmt(0x%x)," "base(0x%x),offset(%d),paddr(0x%X)=>\r\n" @@ -294,7 +294,7 @@ static int set_src_dst_img_rect(hwc_layer_t *cur, static int get_hwc_compos_decision(hwc_layer_t* cur, int iter, int win_cnt) { if(cur->flags & HWC_SKIP_LAYER || !cur->handle) { - SEC_HWC_Log(HWC_LOG_DEBUG, "%s::is_skip_layer %d cur->handle %x ", + SEC_HWC_Log(HWC_ALOG_DEBUG, "%s::is_skip_layer %d cur->handle %x ", __func__, cur->flags & HWC_SKIP_LAYER, cur->handle); return HWC_FRAMEBUFFER; @@ -358,7 +358,7 @@ static int get_hwc_compos_decision(hwc_layer_t* cur, int iter, int win_cnt) break; } - SEC_HWC_Log(HWC_LOG_DEBUG, "2nd iter###%s:: compositionType %d bpp %d" + SEC_HWC_Log(HWC_ALOG_DEBUG, "2nd iter###%s:: compositionType %d bpp %d" " format %x src[%d %d %d %d] dst[%d %d %d %d] srcImg[%d %d]", __func__, compositionType, prev_handle->bpp, prev_handle->format, @@ -370,7 +370,7 @@ static int get_hwc_compos_decision(hwc_layer_t* cur, int iter, int win_cnt) } #endif - SEC_HWC_Log(HWC_LOG_DEBUG, + SEC_HWC_Log(HWC_ALOG_DEBUG, "%s::compositionType(%d)=>0:FB,1:OVERLAY \r\n" " format(0x%x),magic(0x%x),flags(%d),size(%d),offset(%d)" "b_addr(0x%x),usage(%d),w(%d),h(%d),bpp(%d)", @@ -405,7 +405,7 @@ static int assign_overlay_window(struct hwc_context_t *ctx, hwc_layer_t *cur, win = &ctx->win[win_idx]; - SEC_HWC_Log(HWC_LOG_DEBUG, + SEC_HWC_Log(HWC_ALOG_DEBUG, "%s:: left(%d),top(%d),right(%d),bottom(%d),transform(%d)" "lcd_info.xres(%d),lcd_info.yres(%d)", "++assign_overlay_window()", @@ -423,7 +423,7 @@ static int assign_overlay_window(struct hwc_context_t *ctx, hwc_layer_t *cur, win->rect_info.h = rect.h; //turnoff the window and set the window position with new conf... if (window_set_pos(win) < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, "%s::window_set_pos is failed : %s", + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::window_set_pos is failed : %s", __func__, strerror(errno)); ret = -1; } @@ -433,7 +433,7 @@ static int assign_overlay_window(struct hwc_context_t *ctx, hwc_layer_t *cur, win->layer_index = layer_idx; win->status = HWC_WIN_RESERVED; - SEC_HWC_Log(HWC_LOG_DEBUG, + SEC_HWC_Log(HWC_ALOG_DEBUG, "%s:: win_x %d win_y %d win_w %d win_h %d lay_idx %d win_idx %d\n", "--assign_overlay_window()", win->rect_info.x, win->rect_info.y, win->rect_info.w, @@ -475,7 +475,7 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) } else { ret = assign_overlay_window(ctx, cur, overlay_win_cnt, i); if (ret != 0) { - LOGE("assign_overlay_window fail, change to frambuffer"); + ALOGE("assign_overlay_window fail, change to frambuffer"); cur->compositionType = HWC_FRAMEBUFFER; ctx->num_of_fb_layer++; continue; @@ -519,7 +519,7 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) #endif if (list->numHwLayers != (ctx->num_of_fb_layer + ctx->num_of_hwc_layer)) - SEC_HWC_Log(HWC_LOG_DEBUG, + SEC_HWC_Log(HWC_ALOG_DEBUG, "%s:: numHwLayers %d num_of_fb_layer %d num_of_hwc_layer %d ", __func__, list->numHwLayers, ctx->num_of_fb_layer, ctx->num_of_hwc_layer); @@ -580,7 +580,7 @@ static int hwc_set(hwc_composer_device_t *dev, * double buffered (2 or more) this buffer is already rendered. * It is the redundant src buffer for FIMC rendering. */ - LOGD("SKIP FIMC rendering for Layer%d", win->layer_index); + ALOGD("SKIP FIMC rendering for Layer%d", win->layer_index); #if defined(BOARD_USES_HDMI) skip_hdmi_rendering = 1; #endif @@ -597,7 +597,7 @@ static int hwc_set(hwc_composer_device_t *dev, cur->transform); if (ret < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, "%s::runFimc fail : ret=%d\n", + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::runFimc fail : ret=%d\n", __func__, ret); skipped_window_mask |= (1 << i); continue; @@ -609,14 +609,14 @@ static int hwc_set(hwc_composer_device_t *dev, if (win->power_state == 0) window_show(win); } else { - SEC_HWC_Log(HWC_LOG_ERROR, + SEC_HWC_Log(HWC_ALOG_ERROR, "%s:: error : layer %d compositionType should have been" " HWC_OVERLAY ", __func__, win->layer_index); skipped_window_mask |= (1 << i); continue; } } else { - SEC_HWC_Log(HWC_LOG_ERROR, "%s:: error : window status should have " + SEC_HWC_Log(HWC_ALOG_ERROR, "%s:: error : window status should have " "been HWC_WIN_RESERVED by now... ", __func__); skipped_window_mask |= (1 << i); continue; @@ -634,7 +634,7 @@ static int hwc_set(hwc_composer_device_t *dev, ret = runG2d(ctx, &srcRect, &dstRect, cur->transform); if (ret < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, "%s::runG2d fail : ret=%d\n", + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::runG2d fail : ret=%d\n", __func__, ret); skipped_window_mask |= (1 << (ctx->num_of_hwc_layer - 1)); goto g2d_error; @@ -738,7 +738,7 @@ g2d_error: android::SecHdmiClient::HDMI_MODE_VIDEO, ctx->num_of_hwc_layer); } else { - LOGE("%s: Unsupported format = %d", __func__, src_img.format); + ALOGE("%s: Unsupported format = %d", __func__, src_img.format); } } #endif @@ -752,18 +752,18 @@ static int hwc_device_close(struct hw_device_t *dev) int i; if (ctx) { if (destroyVideoDev(&ctx->fimc) < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, "%s::destroyVideoDev fail", __func__); + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::destroyVideoDev fail", __func__); ret = -1; } #ifdef SUB_TITLES_HWC if (destroyG2d(&ctx->g2d) < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, "%s::destroyG2d() fail", __func__); + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::destroyG2d() fail", __func__); ret = -1; } #endif for (i = 0; i < NUM_OF_WIN; i++) { if (window_close(&ctx->win[i]) < 0) - SEC_HWC_Log(HWC_LOG_DEBUG, "%s::window_close() fail", __func__); + SEC_HWC_Log(HWC_ALOG_DEBUG, "%s::window_close() fail", __func__); } free(ctx); @@ -806,7 +806,7 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, /* open WIN0 & WIN1 here */ for (int i = 0; i < NUM_OF_WIN; i++) { if (window_open(&(dev->win[i]), i) < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, + SEC_HWC_Log(HWC_ALOG_ERROR, "%s:: Failed to open window %d device ", __func__, i); status = -EINVAL; goto err; @@ -814,7 +814,7 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, } if (window_get_global_lcd_info(dev->win[0].fd, &dev->lcd_info) < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::window_get_global_lcd_info is failed : %s", __func__, strerror(errno)); status = -EINVAL; @@ -838,14 +838,14 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, win->rect_info.h = win->var_info.yres; if (window_set_pos(win) < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, "%s::window_set_pos is failed : %s", + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::window_set_pos is failed : %s", __func__, strerror(errno)); status = -EINVAL; goto err; } if (window_get_info(win, i) < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, "%s::window_get_info is failed : %s", + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::window_get_info is failed : %s", __func__, strerror(errno)); status = -EINVAL; goto err; @@ -855,46 +855,46 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, #ifdef USE_HW_PMEM if (createPmem(&dev->sec_pmem, PMEM_SIZE) < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, "%s::initPmem(%d) fail", __func__, PMEM_SIZE); + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::initPmem(%d) fail", __func__, PMEM_SIZE); } #endif //create PP if (createVideoDev(&dev->fimc) < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, "%s::creatFimc() fail", __func__); + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::creatFimc() fail", __func__); status = -EINVAL; goto err; } #ifdef SUB_TITLES_HWC if (createG2d(&dev->g2d) < 0) { - SEC_HWC_Log(HWC_LOG_ERROR, "%s::createG2d() fail", __func__); + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::createG2d() fail", __func__); status = -EINVAL; goto err; } #endif - SEC_HWC_Log(HWC_LOG_DEBUG, "%s:: hwc_device_open: SUCCESS", __func__); + SEC_HWC_Log(HWC_ALOG_DEBUG, "%s:: hwc_device_open: SUCCESS", __func__); return 0; err: if (destroyVideoDev(&dev->fimc) < 0) - SEC_HWC_Log(HWC_LOG_ERROR, "%s::destroyVideoDev() fail", __func__); + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::destroyVideoDev() fail", __func__); #ifdef SUB_TITLES_HWC if (destroyG2d(&dev->g2d) < 0) - SEC_HWC_Log(HWC_LOG_ERROR, "%s::destroyG2d() fail", __func__); + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::destroyG2d() fail", __func__); #endif if (destroyMem(&dev->s3c_mem) < 0) - SEC_HWC_Log(HWC_LOG_ERROR, "%s::destroyMem() fail", __func__); + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::destroyMem() fail", __func__); #ifdef USE_HW_PMEM if (destroyPmem(&dev->sec_pmem) < 0) - SEC_HWC_Log(HWC_LOG_ERROR, "%s::destroyPmem() fail", __func__); + SEC_HWC_Log(HWC_ALOG_ERROR, "%s::destroyPmem() fail", __func__); #endif for (int i = 0; i < NUM_OF_WIN; i++) { if (window_close(&dev->win[i]) < 0) - SEC_HWC_Log(HWC_LOG_DEBUG, "%s::window_close() fail", __func__); + SEC_HWC_Log(HWC_ALOG_DEBUG, "%s::window_close() fail", __func__); } return status; diff --git a/exynos5/hal/libhwcomposer/SecHWCUtils.cpp b/exynos5/hal/libhwcomposer/SecHWCUtils.cpp index 9a03ed2..f165a2d 100644 --- a/exynos5/hal/libhwcomposer/SecHWCUtils.cpp +++ b/exynos5/hal/libhwcomposer/SecHWCUtils.cpp @@ -52,7 +52,7 @@ void check_fps() memcpy(&tick_old, &tick, sizeof(timeval)); if (cnt == (10 + CHK_FRAME_CNT)) { FPS = 1000*CHK_FRAME_CNT/total; - LOGE("[FPS]:%d\n", FPS); + ALOGE("[FPS]:%d\n", FPS); total = 0; cnt = 10; } diff --git a/exynos5/hal/libhwjpeg/SecJpegDecoderHal.cpp b/exynos5/hal/libhwjpeg/SecJpegDecoderHal.cpp index 563b15a..12b9dfc 100644 --- a/exynos5/hal/libhwjpeg/SecJpegDecoderHal.cpp +++ b/exynos5/hal/libhwjpeg/SecJpegDecoderHal.cpp @@ -36,7 +36,7 @@ #include "SecJpegCodecHal.h" -#define JPEG_ERROR_LOG(fmt,...) +#define JPEG_ERROR_ALOG(fmt,...) #define NUM_PLANES (1) #define NUM_BUFFERS (1) @@ -66,19 +66,19 @@ int SecJpegDecoderHal::create(void) if (t_iJpegFd < 0) { t_iJpegFd = -1; - JPEG_ERROR_LOG("[%s]: JPEG_DEC_NODE open failed", __func__); + JPEG_ERROR_ALOG("[%s]: JPEG_DEC_NODE open failed", __func__); return ERROR_CANNOT_OPEN_JPEG_DEVICE; } if (t_iJpegFd <= 0) { t_iJpegFd = -1; - JPEG_ERROR_LOG("ERR(%s):JPEG device was closed\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):JPEG device was closed\n", __func__); return ERROR_JPEG_DEVICE_ALREADY_CLOSED; } iRet = t_v4l2Querycap(t_iJpegFd); if (iRet < 0) { - JPEG_ERROR_LOG("[%s]: QUERYCAP failed", __func__); + JPEG_ERROR_ALOG("[%s]: QUERYCAP failed", __func__); close(t_iJpegFd); return ERROR_CANNOT_OPEN_JPEG_DEVICE; } @@ -127,7 +127,7 @@ int SecJpegDecoderHal::destroy(void) iRet = close(t_iJpegFd); if (iRet < 0) { - JPEG_ERROR_LOG("[%s:%d]: JPEG_DEC_NODE close failed", __func__, iRet); + JPEG_ERROR_ALOG("[%s:%d]: JPEG_DEC_NODE close failed", __func__, iRet); } } @@ -278,7 +278,7 @@ int SecJpegDecoderHal::setCache(int iValue) } if (t_v4l2SetCtrl(t_iJpegFd, V4L2_CID_CACHEABLE, iValue)<0) { - JPEG_ERROR_LOG("%s::cache setting failed\n", __func__); + JPEG_ERROR_ALOG("%s::cache setting failed\n", __func__); return ERROR_CANNOT_CHANGE_CACHE_SETTING; } @@ -293,7 +293,7 @@ int SecJpegDecoderHal::getSize(int *piW, int *piH) int iRet = t_v4l2GetFmt(t_iJpegFd, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, &t_stJpegConfig); if (iRet < 0) { - JPEG_ERROR_LOG("[%s,%d]: get image size failed", __func__,iRet); + JPEG_ERROR_ALOG("[%s,%d]: get image size failed", __func__,iRet); return ERROR_GET_SIZE_FAIL; } @@ -366,7 +366,7 @@ int SecJpegDecoderHal::updateConfig(void) iRet = t_v4l2SetFmt(t_iJpegFd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, &t_stJpegConfig); if (iRet < 0) { - JPEG_ERROR_LOG("[%s,%d]: jpeg input S_FMT failed", __func__,iRet); + JPEG_ERROR_ALOG("[%s,%d]: jpeg input S_FMT failed", __func__,iRet); return ERROR_INVALID_JPEG_CONFIG; } @@ -378,14 +378,14 @@ int SecJpegDecoderHal::updateConfig(void) iRet = t_v4l2Reqbufs(t_iJpegFd, NUM_BUFFERS, &stBufInfo); if (iRet < 0) { - JPEG_ERROR_LOG("[%s:%d]: Input REQBUFS failed", __func__, iRet); + JPEG_ERROR_ALOG("[%s:%d]: Input REQBUFS failed", __func__, iRet); return ERROR_EXCUTE_FAIL; } t_stJpegConfig.numOfPlanes = t_iPlaneNum; iRet = t_v4l2SetFmt(t_iJpegFd, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, &t_stJpegConfig); if (iRet < 0) { - JPEG_ERROR_LOG("[%s,%d]: jpeg output S_FMT failed", __func__,iRet); + JPEG_ERROR_ALOG("[%s,%d]: jpeg output S_FMT failed", __func__,iRet); return ERROR_INVALID_JPEG_CONFIG; } @@ -394,7 +394,7 @@ int SecJpegDecoderHal::updateConfig(void) iRet = t_v4l2Reqbufs(t_iJpegFd, NUM_BUFFERS, &stBufInfo); if (iRet < 0) { - JPEG_ERROR_LOG("[%s:%d]: Output REQBUFS failed", __func__, iRet); + JPEG_ERROR_ALOG("[%s:%d]: Output REQBUFS failed", __func__, iRet); return ERROR_REQBUF_FAIL; } @@ -454,7 +454,7 @@ int SecJpegDecoderHal::decode(void) iRet = t_v4l2Qbuf(t_iJpegFd, &stBufInfo, &t_stJpegInbuf); if (iRet < 0) { - JPEG_ERROR_LOG("[%s:%d]: Input QBUF failed", __func__, iRet); + JPEG_ERROR_ALOG("[%s:%d]: Input QBUF failed", __func__, iRet); return ERROR_EXCUTE_FAIL; } @@ -463,33 +463,33 @@ int SecJpegDecoderHal::decode(void) iRet = t_v4l2Qbuf(t_iJpegFd, &stBufInfo, &t_stJpegOutbuf); if (iRet < 0) { - JPEG_ERROR_LOG("[%s:%d]: Output QBUF failed", __func__, iRet); + JPEG_ERROR_ALOG("[%s:%d]: Output QBUF failed", __func__, iRet); return ERROR_EXCUTE_FAIL; } stBufInfo.numOfPlanes = NUM_PLANES; iRet = t_v4l2StreamOn(t_iJpegFd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE); if (iRet < 0) { - JPEG_ERROR_LOG("[%s:%d]: input stream on failed", __func__, iRet); + JPEG_ERROR_ALOG("[%s:%d]: input stream on failed", __func__, iRet); return ERROR_EXCUTE_FAIL; } stBufInfo.numOfPlanes = t_iPlaneNum; iRet = t_v4l2StreamOn(t_iJpegFd, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); if (iRet < 0) { - JPEG_ERROR_LOG("[%s:%d]: output stream on failed", __func__, iRet); + JPEG_ERROR_ALOG("[%s:%d]: output stream on failed", __func__, iRet); return ERROR_EXCUTE_FAIL; } stBufInfo.numOfPlanes = NUM_PLANES; iRet = t_v4l2Dqbuf(t_iJpegFd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_MMAP); if (iRet < 0) { - JPEG_ERROR_LOG("[%s:%d]: Intput DQBUF failed", __func__, iRet); + JPEG_ERROR_ALOG("[%s:%d]: Intput DQBUF failed", __func__, iRet); return ERROR_EXCUTE_FAIL; } stBufInfo.numOfPlanes = t_iPlaneNum; iRet = t_v4l2Dqbuf(t_iJpegFd, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, V4L2_MEMORY_MMAP); if (iRet < 0) { - JPEG_ERROR_LOG("[%s:%d]: Output DQBUF failed", __func__, iRet); + JPEG_ERROR_ALOG("[%s:%d]: Output DQBUF failed", __func__, iRet); return ERROR_EXCUTE_FAIL; } diff --git a/exynos5/hal/libhwjpeg/SecJpegEncoder.cpp b/exynos5/hal/libhwjpeg/SecJpegEncoder.cpp index 6c118e1..0ceac31 100644 --- a/exynos5/hal/libhwjpeg/SecJpegEncoder.cpp +++ b/exynos5/hal/libhwjpeg/SecJpegEncoder.cpp @@ -21,7 +21,7 @@ static const char ExifAsciiPrefix[] = { 0x41, 0x53, 0x43, 0x49, 0x49, 0x0, 0x0, 0x0 }; -#define JPEG_ERROR_LOG(fmt,...) +#define JPEG_ERROR_ALOG(fmt,...) #define JPEG_MAIN_DUMP (0) #define JPEG_THUMB_DUMP (0) @@ -71,7 +71,7 @@ int SecJpegEncoder::create(void) m_jpegMain = new SecJpegEncoderHal; if (m_jpegMain == NULL) { - JPEG_ERROR_LOG("ERR(%s):Cannot create SecJpegEncoderHal class\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Cannot create SecJpegEncoderHal class\n", __func__); return ERROR_CANNOT_CREATE_SEC_JPEG_ENC_HAL; } @@ -189,7 +189,7 @@ char *SecJpegEncoder::getInBuf(int *input_size) char *inBuf = *(m_jpegMain->getInBuf(&inSize)); if (inBuf == NULL) { - JPEG_ERROR_LOG("%s::Fail to JPEG input buffer!!\n", __func__); + JPEG_ERROR_ALOG("%s::Fail to JPEG input buffer!!\n", __func__); return NULL; } @@ -208,7 +208,7 @@ char *SecJpegEncoder::getOutBuf(int *output_size) char *outBuf = m_jpegMain->getOutBuf(&outSize); if (outBuf == NULL) { - JPEG_ERROR_LOG("%s::Fail to JPEG input buffer!!\n", __func__); + JPEG_ERROR_ALOG("%s::Fail to JPEG input buffer!!\n", __func__); return NULL; } @@ -241,7 +241,7 @@ int SecJpegEncoder::setInBuf(char *buf, int size) if (m_ionJpegClient == 0) { m_ionJpegClient = ion_client_create(); if (m_ionJpegClient < 0) { - JPEG_ERROR_LOG("[%s]src ion client create failed, value = %d\n", __func__, size); + JPEG_ERROR_ALOG("[%s]src ion client create failed, value = %d\n", __func__, size); m_ionJpegClient = 0; return ret; } @@ -254,7 +254,7 @@ int SecJpegEncoder::setInBuf(char *buf, int size) ret = m_jpegMain->setInBuf(&m_pJpegInputBuffer, &size); if (ret) { - JPEG_ERROR_LOG("%s::Fail to JPEG input buffer!!\n", __func__); + JPEG_ERROR_ALOG("%s::Fail to JPEG input buffer!!\n", __func__); return ret; } m_iInBufSize = size; @@ -264,7 +264,7 @@ int SecJpegEncoder::setInBuf(char *buf, int size) #else // NO JPEG_WA_FOR_PAGEFAULT ret = m_jpegMain->setInBuf(&buf, &size); if (ret) { - JPEG_ERROR_LOG("%s::Fail to JPEG input buffer!!\n", __func__); + JPEG_ERROR_ALOG("%s::Fail to JPEG input buffer!!\n", __func__); return ret; } #endif // JPEG_WA_FOR_PAGEFAULT @@ -289,7 +289,7 @@ int SecJpegEncoder::setOutBuf(char *buf, int size) int ret = ERROR_NONE; ret = m_jpegMain->setOutBuf(buf, size); if (ret) { - JPEG_ERROR_LOG("%s::Fail to JPEG output buffer!!\n", __func__); + JPEG_ERROR_ALOG("%s::Fail to JPEG output buffer!!\n", __func__); return ret; } @@ -311,14 +311,14 @@ int SecJpegEncoder::encode(int *size, exif_attribute_t *exifInfo) ret = m_jpegMain->encode(); if (ret) { - JPEG_ERROR_LOG("encode failed\n"); + JPEG_ERROR_ALOG("encode failed\n"); return ret; } int iJpegSize = m_jpegMain->getJpegSize(); if (iJpegSize<=0) { - JPEG_ERROR_LOG("%s:: output_size is too small(%d)!!\n", __func__, iJpegSize); + JPEG_ERROR_ALOG("%s:: output_size is too small(%d)!!\n", __func__, iJpegSize); return ERROR_OUT_BUFFER_SIZE_TOO_SMALL; } @@ -326,7 +326,7 @@ int SecJpegEncoder::encode(int *size, exif_attribute_t *exifInfo) char *pcJpegBuffer = m_jpegMain->getOutBuf(&iOutputSize); if (pcJpegBuffer == NULL) { - JPEG_ERROR_LOG("%s::buffer is null!!\n", __func__); + JPEG_ERROR_ALOG("%s::buffer is null!!\n", __func__); return ERROR_OUT_BUFFER_CREATE_FAIL; } @@ -354,14 +354,14 @@ int SecJpegEncoder::encode(int *size, exif_attribute_t *exifInfo) exifOut = new unsigned char[bufSize]; if (exifOut == NULL) { - JPEG_ERROR_LOG("%s::Failed to allocate for exifOut", __func__); + JPEG_ERROR_ALOG("%s::Failed to allocate for exifOut", __func__); delete[] exifOut; return ERROR_EXIFOUT_ALLOC_FAIL; } memset(exifOut, 0, bufSize); if (makeExif (exifOut, exifInfo, &exifLen)) { - JPEG_ERROR_LOG("%s::Failed to make EXIF", __func__); + JPEG_ERROR_ALOG("%s::Failed to make EXIF", __func__); delete[] exifOut; return ERROR_MAKE_EXIF_FAIL; } @@ -773,44 +773,44 @@ int SecJpegEncoder::encodeThumbnail(unsigned int *size, bool useMain) m_jpegThumb = new SecJpegEncoderHal; if (m_jpegThumb == NULL) { - JPEG_ERROR_LOG("ERR(%s):Cannot open a jpeg device file\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Cannot open a jpeg device file\n", __func__); return ERROR_CANNOT_CREATE_SEC_THUMB; } } ret = m_jpegThumb->create(); if (ret) { - JPEG_ERROR_LOG("ERR(%s):Fail create\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Fail create\n", __func__); return ret; } ret = m_jpegThumb->setCache(JPEG_CACHE_ON); if (ret) { - JPEG_ERROR_LOG("ERR(%s):Fail cache set\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Fail cache set\n", __func__); return ret; } void *pConfig = m_jpegMain->getJpegConfig(); if (pConfig == NULL) { - JPEG_ERROR_LOG("ERR(%s):Fail getJpegConfig\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Fail getJpegConfig\n", __func__); return ERROR_BUFFR_IS_NULL; } ret = m_jpegThumb->setJpegConfig(pConfig); if (ret) { - JPEG_ERROR_LOG("ERR(%s):Fail setJpegConfig\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Fail setJpegConfig\n", __func__); return ret; } ret = m_jpegThumb->setQuality(JPEG_THUMBNAIL_QUALITY); if (ret) { - JPEG_ERROR_LOG("ERR(%s):Fail setQuality\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Fail setQuality\n", __func__); return ret; } ret = m_jpegThumb->setSize(m_thumbnailW, m_thumbnailH); if (ret) { - JPEG_ERROR_LOG("ERR(%s):Fail setSize\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Fail setSize\n", __func__); return ret; } @@ -825,7 +825,7 @@ int SecJpegEncoder::encodeThumbnail(unsigned int *size, bool useMain) if (m_ionJpegClient == 0) { m_ionJpegClient = ion_client_create(); if (m_ionJpegClient < 0) { - JPEG_ERROR_LOG("[%s]src ion client create failed, value = %d\n", __func__, m_ionJpegClient); + JPEG_ERROR_ALOG("[%s]src ion client create failed, value = %d\n", __func__, m_ionJpegClient); m_ionJpegClient = 0; return ret; } @@ -838,7 +838,7 @@ int SecJpegEncoder::encodeThumbnail(unsigned int *size, bool useMain) ret = m_jpegThumb->setInBuf(&m_pThumbInputBuffer, &iThumbSize); if (ret) { - JPEG_ERROR_LOG("ERR(%s):Fail setInBuf\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Fail setInBuf\n", __func__); return ret; } @@ -849,13 +849,13 @@ int SecJpegEncoder::encodeThumbnail(unsigned int *size, bool useMain) ret = m_jpegThumb->setOutBuf((char *)m_pThumbOutputBuffer, iThumbSize); if (ret) { - JPEG_ERROR_LOG("ERR(%s):Fail setOutBuf\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Fail setOutBuf\n", __func__); return ret; } ret = m_jpegThumb->updateConfig(); if (ret) { - JPEG_ERROR_LOG("update config failed\n"); + JPEG_ERROR_ALOG("update config failed\n"); return ret; } @@ -866,7 +866,7 @@ int SecJpegEncoder::encodeThumbnail(unsigned int *size, bool useMain) ret = m_jpegMain->getSize(&iW, &iH); if (ret) { - JPEG_ERROR_LOG("ERR(%s):Fail setJpegConfig\n", __func__); + JPEG_ERROR_ALOG("ERR(%s):Fail setJpegConfig\n", __func__); return ret; } @@ -877,7 +877,7 @@ int SecJpegEncoder::encodeThumbnail(unsigned int *size, bool useMain) m_thumbnailW, m_thumbnailH); if (ret) { - JPEG_ERROR_LOG("%s::m_scaleDownYuv422(%d, %d, %d, %d) fail", __func__, iW, iH, m_thumbnailW, m_thumbnailH); + JPEG_ERROR_ALOG("%s::m_scaleDownYuv422(%d, %d, %d, %d) fail", __func__, iW, iH, m_thumbnailW, m_thumbnailH); return ret; } } @@ -889,13 +889,13 @@ int SecJpegEncoder::encodeThumbnail(unsigned int *size, bool useMain) ret = m_jpegThumb->encode(); if (ret) { - JPEG_ERROR_LOG("encode failed\n"); + JPEG_ERROR_ALOG("encode failed\n"); return ret; } outSizeThumb = m_jpegThumb->getJpegSize(); if (outSizeThumb<=0) { - JPEG_ERROR_LOG("jpeg size is too small\n"); + JPEG_ERROR_ALOG("jpeg size is too small\n"); return ERROR_THUMB_JPEG_SIZE_TOO_SMALL; } @@ -910,20 +910,20 @@ int SecJpegEncoder::allocJpegIonMemory(ion_client ionClient, ion_buffer *ionBuff int ret = ERROR_NONE; if (ionClient == 0) { - JPEG_ERROR_LOG("[%s]ionClient is zero (%d)\n", __func__, ionClient); + JPEG_ERROR_ALOG("[%s]ionClient is zero (%d)\n", __func__, ionClient); return ERROR_BUFFR_IS_NULL; } *ionBuffer = ion_alloc(ionClient, size, 0, ION_HEAP_SYSTEM_MASK); if (*ionBuffer == -1) { - JPEG_ERROR_LOG("[%s]ion_alloc(%d) failed\n", __func__, size); + JPEG_ERROR_ALOG("[%s]ion_alloc(%d) failed\n", __func__, size); *ionBuffer = 0; return ret; } *buffer = (char *)ion_map(*ionBuffer, size, 0); if (*buffer == MAP_FAILED) { - JPEG_ERROR_LOG("[%s]src ion map failed(%d)\n", __func__, size); + JPEG_ERROR_ALOG("[%s]src ion map failed(%d)\n", __func__, size); ion_free(*ionBuffer); *ionBuffer = 0; *buffer = NULL; |