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 /exynos4/hal | |
parent | 29deaa07a920f242d8b2766fba3c8ffa374b1eaf (diff) | |
download | android_hardware_samsung-0fdadcaf08c588469ad9905b0136c894bb062fdf.tar.gz android_hardware_samsung-0fdadcaf08c588469ad9905b0136c894bb062fdf.tar.bz2 android_hardware_samsung-0fdadcaf08c588469ad9905b0136c894bb062fdf.zip |
exynos hal: jellybean compat
Diffstat (limited to 'exynos4/hal')
34 files changed, 1370 insertions, 1371 deletions
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 := |