diff options
-rw-r--r-- | include/sec_utils.h | 4 | ||||
-rw-r--r-- | libaudio/AudioHardware.cpp | 36 | ||||
-rwxr-xr-x | libcamera/SecCamera.cpp | 258 | ||||
-rwxr-xr-x | libcamera/SecCameraHWInterface.cpp | 174 | ||||
-rw-r--r-- | libhwcomposer/SecHWC.cpp | 30 | ||||
-rw-r--r-- | libhwcomposer/SecHWCUtils.cpp | 84 | ||||
-rwxr-xr-x | liblight/lights.c | 2 | ||||
-rw-r--r-- | libs3cjpeg/JpegEncoder.cpp | 42 | ||||
-rw-r--r-- | libsensors/AkmSensor.cpp | 6 | ||||
-rw-r--r-- | libsensors/GyroSensor.cpp | 2 | ||||
-rw-r--r-- | libsensors/LightSensor.cpp | 2 | ||||
-rw-r--r-- | libsensors/ProximitySensor.cpp | 2 | ||||
-rw-r--r-- | libsensors/SensorBase.cpp | 4 | ||||
-rw-r--r-- | libsensors/sensors.cpp | 10 | ||||
-rw-r--r-- | sec_mm/sec_omx/sec_codecs/video/mfc_c110/dec/src/SsbSipMfcDecAPI.c | 50 | ||||
-rw-r--r-- | sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/src/SsbSipMfcEncAPI.c | 74 |
16 files changed, 390 insertions, 390 deletions
diff --git a/include/sec_utils.h b/include/sec_utils.h index 61980f0..3e41afe 100644 --- a/include/sec_utils.h +++ b/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; } @@ -219,7 +219,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; } diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp index d644f12..5af8dfa 100644 --- a/libaudio/AudioHardware.cpp +++ b/libaudio/AudioHardware.cpp @@ -124,10 +124,10 @@ AudioHardware::~AudioHardware() if (mSecRilLibHandle) { if (disconnectRILD(mRilClient) != RIL_CLIENT_ERR_SUCCESS) - LOGE("Disconnect_RILD() error"); + ALOGE("Disconnect_RILD() error"); if (closeClientRILD(mRilClient) != RIL_CLIENT_ERR_SUCCESS) - LOGE("CloseClient_RILD() error"); + ALOGE("CloseClient_RILD() error"); mRilClient = 0; @@ -170,28 +170,28 @@ void AudioHardware::loadRILD(void) if (!openClientRILD || !disconnectRILD || !closeClientRILD || !isConnectedRILD || !connectRILD || !setCallVolume || !setCallAudioPath || !setCallClockSync) { - LOGE("Can't load all functions from libsecril-client.so"); + ALOGE("Can't load all functions from libsecril-client.so"); dlclose(mSecRilLibHandle); mSecRilLibHandle = NULL; } else { mRilClient = openClientRILD(); if (!mRilClient) { - LOGE("OpenClient_RILD() error"); + ALOGE("OpenClient_RILD() error"); dlclose(mSecRilLibHandle); mSecRilLibHandle = NULL; } } } else { - LOGE("Can't load libsecril-client.so"); + ALOGE("Can't load libsecril-client.so"); } } status_t AudioHardware::connectRILDIfRequired(void) { if (!mSecRilLibHandle) { - LOGE("connectIfRequired() lib is not loaded"); + ALOGE("connectIfRequired() lib is not loaded"); return INVALID_OPERATION; } @@ -200,7 +200,7 @@ status_t AudioHardware::connectRILDIfRequired(void) } if (connectRILD(mRilClient) != RIL_CLIENT_ERR_SUCCESS) { - LOGE("Connect_RILD() error"); + ALOGE("Connect_RILD() error"); return INVALID_OPERATION; } @@ -755,7 +755,7 @@ status_t AudioHardware::setIncallPath_l(uint32_t device) TRACE_DRIVER_IN(DRV_MIXER_GET) struct mixer_ctl *ctl= mixer_get_ctl_by_name(mMixer, "Voice Call Path"); TRACE_DRIVER_OUT - LOGE_IF(ctl == NULL, "setIncallPath_l() could not get mixer ctl"); + ALOGE_IF(ctl == NULL, "setIncallPath_l() could not get mixer ctl"); if (ctl != NULL) { ALOGV("setIncallPath_l() Voice Call Path, (%x)", device); TRACE_DRIVER_IN(DRV_MIXER_SEL) @@ -773,7 +773,7 @@ struct pcm *AudioHardware::openPcmOut_l() ALOGD("openPcmOut_l() mPcmOpenCnt: %d", mPcmOpenCnt); if (mPcmOpenCnt++ == 0) { if (mPcm != NULL) { - LOGE("openPcmOut_l() mPcmOpenCnt == 0 and mPcm == %p\n", mPcm); + ALOGE("openPcmOut_l() mPcmOpenCnt == 0 and mPcm == %p\n", mPcm); mPcmOpenCnt--; return NULL; } @@ -794,7 +794,7 @@ struct pcm *AudioHardware::openPcmOut_l() mPcm = pcm_open(0, 0, flags, &config); TRACE_DRIVER_OUT if (!pcm_is_ready(mPcm)) { - LOGE("openPcmOut_l() cannot open pcm_out driver: %s\n", pcm_get_error(mPcm)); + ALOGE("openPcmOut_l() cannot open pcm_out driver: %s\n", pcm_get_error(mPcm)); TRACE_DRIVER_IN(DRV_PCM_CLOSE) pcm_close(mPcm); TRACE_DRIVER_OUT @@ -809,7 +809,7 @@ void AudioHardware::closePcmOut_l() { ALOGD("closePcmOut_l() mPcmOpenCnt: %d", mPcmOpenCnt); if (mPcmOpenCnt == 0) { - LOGE("closePcmOut_l() mPcmOpenCnt == 0"); + ALOGE("closePcmOut_l() mPcmOpenCnt == 0"); return; } @@ -826,7 +826,7 @@ struct mixer *AudioHardware::openMixer_l() ALOGV("openMixer_l() mMixerOpenCnt: %d", mMixerOpenCnt); if (mMixerOpenCnt++ == 0) { if (mMixer != NULL) { - LOGE("openMixer_l() mMixerOpenCnt == 0 and mMixer == %p\n", mMixer); + ALOGE("openMixer_l() mMixerOpenCnt == 0 and mMixer == %p\n", mMixer); mMixerOpenCnt--; return NULL; } @@ -834,7 +834,7 @@ struct mixer *AudioHardware::openMixer_l() mMixer = mixer_open(0); TRACE_DRIVER_OUT if (mMixer == NULL) { - LOGE("openMixer_l() cannot open mixer"); + ALOGE("openMixer_l() cannot open mixer"); mMixerOpenCnt--; return NULL; } @@ -846,7 +846,7 @@ void AudioHardware::closeMixer_l() { ALOGV("closeMixer_l() mMixerOpenCnt: %d", mMixerOpenCnt); if (mMixerOpenCnt == 0) { - LOGE("closeMixer_l() mMixerOpenCnt == 0"); + ALOGE("closeMixer_l() mMixerOpenCnt == 0"); return; } @@ -1217,7 +1217,7 @@ Error: // Simulate audio output timing in case of error usleep((((bytes * 1000) / frameSize()) * 1000) / sampleRate()); - LOGE("AudioStreamOutALSA::write END WITH ERROR !!!!!!!!!(%p, %u)", buffer, bytes); + ALOGE("AudioStreamOutALSA::write END WITH ERROR !!!!!!!!!(%p, %u)", buffer, bytes); return status; } @@ -1846,7 +1846,7 @@ Error: // Simulate audio output timing in case of error usleep((((bytes * 1000) / frameSize()) * 1000) / sampleRate()); - LOGE("-----AudioStreamInALSA::read(%p, %d) END ERROR", buffer, (int)bytes); + ALOGE("-----AudioStreamInALSA::read(%p, %d) END ERROR", buffer, (int)bytes); return status; } @@ -1940,7 +1940,7 @@ status_t AudioHardware::AudioStreamInALSA::open_l() mPcm = pcm_open(0, 0, flags, &config); TRACE_DRIVER_OUT if (!pcm_is_ready(mPcm)) { - LOGE("cannot open pcm_in driver: %s\n", pcm_get_error(mPcm)); + ALOGE("cannot open pcm_in driver: %s\n", pcm_get_error(mPcm)); TRACE_DRIVER_IN(DRV_PCM_CLOSE) pcm_close(mPcm); TRACE_DRIVER_OUT @@ -2198,7 +2198,7 @@ size_t AudioHardware::AudioStreamInALSA::getBufferSize(uint32_t sampleRate, int } // this should never happen as getBufferSize() is always called after getInputSampleRate() // that checks for valid sampling rates. - LOGE("AudioStreamInALSA::getBufferSize() invalid sampling rate %d", sampleRate); + ALOGE("AudioStreamInALSA::getBufferSize() invalid sampling rate %d", sampleRate); return 0; } diff --git a/libcamera/SecCamera.cpp b/libcamera/SecCamera.cpp index fd1b9ac..eebeaa2 100755 --- a/libcamera/SecCamera.cpp +++ b/libcamera/SecCamera.cpp @@ -39,7 +39,7 @@ using namespace android; #define CHECK(return_value) \ if (return_value < 0) { \ - LOGE("%s::%d fail. errno: %s, m_camera_id = %d\n", \ + ALOGE("%s::%d fail. errno: %s, m_camera_id = %d\n", \ __func__, __LINE__, strerror(errno), m_camera_id); \ return -1; \ } @@ -47,7 +47,7 @@ using namespace android; #define CHECK_PTR(return_value) \ if (return_value < 0) { \ - LOGE("%s::%d fail, errno: %s, m_camera_id = %d\n", \ + ALOGE("%s::%d fail, errno: %s, m_camera_id = %d\n", \ __func__,__LINE__, strerror(errno), m_camera_id); \ return NULL; \ } @@ -132,12 +132,12 @@ static int fimc_poll(struct pollfd *events) */ ret = poll(events, 1, 10000); if (ret < 0) { - LOGE("ERR(%s):poll error\n", __func__); + ALOGE("ERR(%s):poll error\n", __func__); return ret; } if (ret == 0) { - LOGE("ERR(%s):No data in 10 secs..\n", __func__); + ALOGE("ERR(%s):No data in 10 secs..\n", __func__); return ret; } @@ -156,7 +156,7 @@ int SecCamera::previewPoll(bool preview) status = getCameraSensorESDStatus(); m_esd_check_count = 0; if (status) { - LOGE("ERR(%s) ESD status(%d)", __func__, status); + ALOGE("ERR(%s) ESD status(%d)", __func__, status); return status; } } @@ -168,12 +168,12 @@ int SecCamera::previewPoll(bool preview) } if (ret < 0) { - LOGE("ERR(%s):poll error\n", __func__); + ALOGE("ERR(%s):poll error\n", __func__); return ret; } if (ret == 0) { - LOGE("ERR(%s):No data in 1 secs.. Camera Device Reset \n", __func__); + ALOGE("ERR(%s):No data in 1 secs.. Camera Device Reset \n", __func__); return ret; } @@ -188,12 +188,12 @@ static int fimc_v4l2_querycap(int fp) ret = ioctl(fp, VIDIOC_QUERYCAP, &cap); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_QUERYCAP failed\n", __func__); + ALOGE("ERR(%s):VIDIOC_QUERYCAP failed\n", __func__); return -1; } if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { - LOGE("ERR(%s):no capture devices\n", __func__); + ALOGE("ERR(%s):no capture devices\n", __func__); return -1; } @@ -206,7 +206,7 @@ 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\n", __func__); + ALOGE("ERR(%s):No matching index found\n", __func__); return NULL; } ALOGI("Name of input channel[%d] is %s\n", input.index, input.name); @@ -224,7 +224,7 @@ static int fimc_v4l2_s_input(int fp, int index) ret = ioctl(fp, VIDIOC_S_INPUT, &input); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_S_INPUT failed\n", __func__); + ALOGE("ERR(%s):VIDIOC_S_INPUT failed\n", __func__); return ret; } @@ -254,7 +254,7 @@ static int fimc_v4l2_s_fmt(int fp, int width, int height, unsigned int fmt, int /* Set up for capture */ ret = ioctl(fp, VIDIOC_S_FMT, &v4l2_fmt); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_S_FMT failed\n", __func__); + ALOGE("ERR(%s):VIDIOC_S_FMT failed\n", __func__); return -1; } @@ -282,12 +282,12 @@ static int fimc_v4l2_s_fmt_cap(int fp, int width, int height, unsigned int fmt) v4l2_fmt.fmt.pix = pixfmt; - //LOGE("ori_w %d, ori_h %d, w %d, h %d\n", width, height, v4l2_fmt.fmt.pix.width, v4l2_fmt.fmt.pix.height); + //ALOGE("ori_w %d, ori_h %d, w %d, h %d\n", width, height, v4l2_fmt.fmt.pix.width, v4l2_fmt.fmt.pix.height); /* Set up for capture */ ret = ioctl(fp, VIDIOC_S_FMT, &v4l2_fmt); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_S_FMT failed\n", __func__); + ALOGE("ERR(%s):VIDIOC_S_FMT failed\n", __func__); return ret; } @@ -313,7 +313,7 @@ static int fimc_v4l2_enum_fmt(int fp, unsigned int fmt) } if (!found) { - LOGE("unsupported pixel format\n"); + ALOGE("unsupported pixel format\n"); return -1; } @@ -331,7 +331,7 @@ static int fimc_v4l2_reqbufs(int fp, enum v4l2_buf_type type, int nr_bufs) ret = ioctl(fp, VIDIOC_REQBUFS, &req); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_REQBUFS failed\n", __func__); + ALOGE("ERR(%s):VIDIOC_REQBUFS failed\n", __func__); return -1; } @@ -351,7 +351,7 @@ static int fimc_v4l2_querybuf(int fp, struct fimc_buffer *buffer, enum v4l2_buf_ ret = ioctl(fp , VIDIOC_QUERYBUF, &v4l2_buf); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_QUERYBUF failed\n", __func__); + ALOGE("ERR(%s):VIDIOC_QUERYBUF failed\n", __func__); return -1; } @@ -359,7 +359,7 @@ static int fimc_v4l2_querybuf(int fp, struct fimc_buffer *buffer, enum v4l2_buf_ if ((buffer->start = (char *)mmap(0, v4l2_buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, fp, v4l2_buf.m.offset)) < 0) { - LOGE("%s %d] mmap() failed\n",__func__, __LINE__); + ALOGE("%s %d] mmap() failed\n",__func__, __LINE__); return -1; } @@ -376,7 +376,7 @@ static int fimc_v4l2_streamon(int fp) ret = ioctl(fp, VIDIOC_STREAMON, &type); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_STREAMON failed\n", __func__); + ALOGE("ERR(%s):VIDIOC_STREAMON failed\n", __func__); return ret; } @@ -391,7 +391,7 @@ static int fimc_v4l2_streamoff(int fp) ALOGV("%s :", __func__); ret = ioctl(fp, VIDIOC_STREAMOFF, &type); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_STREAMOFF failed\n", __func__); + ALOGE("ERR(%s):VIDIOC_STREAMOFF failed\n", __func__); return ret; } @@ -409,7 +409,7 @@ static int fimc_v4l2_qbuf(int fp, int index) ret = ioctl(fp, VIDIOC_QBUF, &v4l2_buf); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_QBUF failed\n", __func__); + ALOGE("ERR(%s):VIDIOC_QBUF failed\n", __func__); return ret; } @@ -426,7 +426,7 @@ static int fimc_v4l2_dqbuf(int fp) ret = ioctl(fp, VIDIOC_DQBUF, &v4l2_buf); if (ret < 0) { - LOGE("ERR(%s):VIDIOC_DQBUF failed, dropped frame\n", __func__); + ALOGE("ERR(%s):VIDIOC_DQBUF failed, dropped frame\n", __func__); return ret; } @@ -442,7 +442,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\n", + ALOGE("ERR(%s): VIDIOC_G_CTRL(id = 0x%x (%d)) failed, ret = %d\n", __func__, id, id-V4L2_CID_PRIVATE_BASE, ret); return ret; } @@ -460,7 +460,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\n", + ALOGE("ERR(%s):VIDIOC_S_CTRL(id = %#x (%d), value = %d) failed ret = %d\n", __func__, id, id-V4L2_CID_PRIVATE_BASE, value, ret); return ret; @@ -484,7 +484,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\n", __func__); + ALOGE("ERR(%s):VIDIOC_S_EXT_CTRLS failed\n", __func__); return ret; } @@ -497,7 +497,7 @@ 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\n", __func__); + ALOGE("ERR(%s):VIDIOC_G_PARM failed\n", __func__); return -1; } @@ -516,7 +516,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\n", __func__); + ALOGE("ERR(%s):VIDIOC_S_PARM failed\n", __func__); return ret; } @@ -614,12 +614,12 @@ int SecCamera::initCamera(int index) m_cam_fd = open(CAMERA_DEV_NAME, O_RDWR); if (m_cam_fd < 0) { - LOGE("ERR(%s):Cannot open %s (error : %s)\n", __func__, CAMERA_DEV_NAME, strerror(errno)); + ALOGE("ERR(%s):Cannot open %s (error : %s)\n", __func__, CAMERA_DEV_NAME, strerror(errno)); return -1; } ALOGV("%s: open(%s) --> m_cam_fd %d", __FUNCTION__, CAMERA_DEV_NAME, m_cam_fd); - LOGE("initCamera: m_cam_fd(%d), m_jpeg_fd(%d)", m_cam_fd, m_jpeg_fd); + ALOGE("initCamera: m_cam_fd(%d), m_jpeg_fd(%d)", m_cam_fd, m_jpeg_fd); ret = fimc_v4l2_querycap(m_cam_fd); CHECK(ret); @@ -631,11 +631,11 @@ int SecCamera::initCamera(int index) m_cam_fd2 = open(CAMERA_DEV_NAME2, O_RDWR); ALOGV("%s: open(%s) --> m_cam_fd2 = %d", __FUNCTION__, CAMERA_DEV_NAME2, m_cam_fd2); if (m_cam_fd2 < 0) { - LOGE("ERR(%s):Cannot open %s (error : %s)\n", __func__, CAMERA_DEV_NAME2, strerror(errno)); + ALOGE("ERR(%s):Cannot open %s (error : %s)\n", __func__, CAMERA_DEV_NAME2, strerror(errno)); return -1; } - LOGE("initCamera: m_cam_fd2(%d)", m_cam_fd2); + ALOGE("initCamera: m_cam_fd2(%d)", m_cam_fd2); ret = fimc_v4l2_querycap(m_cam_fd2); CHECK(ret); @@ -723,12 +723,12 @@ int SecCamera::startPreview(void) // aleady started if (m_flag_camera_start > 0) { - LOGE("ERR(%s):Preview was already started\n", __func__); + ALOGE("ERR(%s):Preview was already started\n", __func__); return 0; } if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed\n", __func__); + ALOGE("ERR(%s):Camera was closed\n", __func__); return -1; } @@ -806,7 +806,7 @@ int SecCamera::stopPreview(void) setFlashMode(FLASH_MODE_OFF); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed\n", __func__); + ALOGE("ERR(%s):Camera was closed\n", __func__); return -1; } @@ -827,12 +827,12 @@ int SecCamera::startRecord(void) // aleady started if (m_flag_record_start > 0) { - LOGE("ERR(%s):Preview was already started\n", __func__); + ALOGE("ERR(%s):Preview was already started\n", __func__); return 0; } if (m_cam_fd2 <= 0) { - LOGE("ERR(%s):Camera was closed\n", __func__); + ALOGE("ERR(%s):Camera was closed\n", __func__); return -1; } @@ -887,7 +887,7 @@ int SecCamera::stopRecord(void) } if (m_cam_fd2 <= 0) { - LOGE("ERR(%s):Camera was closed\n", __func__); + ALOGE("ERR(%s):Camera was closed\n", __func__); return -1; } @@ -950,7 +950,7 @@ int SecCamera::getPreview() int ret; if (m_flag_camera_start == 0 || previewPoll(true) == 0) { - LOGE("ERR(%s):Start Camera Device Reset \n", __func__); + ALOGE("ERR(%s):Start Camera Device Reset \n", __func__); /* GAUDI Project([arun.c@samsung.com]) 2010.05.20. [Implemented ESD code] */ /* * When there is no data for more than 1 second from the camera we inform @@ -968,14 +968,14 @@ int SecCamera::getPreview() CHECK(ret); ret = startPreview(); if (ret < 0) { - LOGE("ERR(%s): startPreview() return %d\n", __func__, ret); + ALOGE("ERR(%s): startPreview() return %d\n", __func__, ret); return 0; } } index = fimc_v4l2_dqbuf(m_cam_fd); if (!(0 <= index && index < MAX_BUFFERS)) { - LOGE("ERR(%s):wrong index = %d\n", __func__, index); + ALOGE("ERR(%s):wrong index = %d\n", __func__, index); return -1; } @@ -988,7 +988,7 @@ int SecCamera::getPreview() 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; } @@ -1082,7 +1082,7 @@ int SecCamera::setSnapshotCmd(void) LOG_TIME_DEFINE(1) if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed\n", __func__); + ALOGE("ERR(%s):Camera was closed\n", __func__); return 0; } @@ -1151,7 +1151,7 @@ unsigned char* SecCamera::getJpeg(int *jpeg_size, unsigned int *phyaddr) CHECK_PTR(ret); index = fimc_v4l2_dqbuf(m_cam_fd); if (index != 0) { - LOGE("ERR(%s):wrong index = %d\n", __func__, index); + ALOGE("ERR(%s):wrong index = %d\n", __func__, index); return NULL; } @@ -1302,7 +1302,7 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu //fimc_v4l2_streamoff(m_cam_fd); [zzangdol] remove - it is separate in HWInterface with camera_id if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed\n", __func__); + ALOGE("ERR(%s):Camera was closed\n", __func__); return -1; } @@ -1396,10 +1396,10 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu } if (jpgEnc.setConfig(JPEG_SET_ENCODE_IN_FORMAT, inFormat) != JPG_SUCCESS) - LOGE("[JPEG_SET_ENCODE_IN_FORMAT] Error\n"); + ALOGE("[JPEG_SET_ENCODE_IN_FORMAT] Error\n"); if (jpgEnc.setConfig(JPEG_SET_SAMPING_MODE, outFormat) != JPG_SUCCESS) - LOGE("[JPEG_SET_SAMPING_MODE] Error\n"); + ALOGE("[JPEG_SET_SAMPING_MODE] Error\n"); image_quality_type_t jpegQuality; if (m_jpeg_quality >= 90) @@ -1412,18 +1412,18 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu jpegQuality = JPG_QUALITY_LEVEL_4; if (jpgEnc.setConfig(JPEG_SET_ENCODE_QUALITY, jpegQuality) != JPG_SUCCESS) - LOGE("[JPEG_SET_ENCODE_QUALITY] Error\n"); + ALOGE("[JPEG_SET_ENCODE_QUALITY] Error\n"); if (jpgEnc.setConfig(JPEG_SET_ENCODE_WIDTH, m_snapshot_width) != JPG_SUCCESS) - LOGE("[JPEG_SET_ENCODE_WIDTH] Error\n"); + ALOGE("[JPEG_SET_ENCODE_WIDTH] Error\n"); if (jpgEnc.setConfig(JPEG_SET_ENCODE_HEIGHT, m_snapshot_height) != JPG_SUCCESS) - LOGE("[JPEG_SET_ENCODE_HEIGHT] Error\n"); + ALOGE("[JPEG_SET_ENCODE_HEIGHT] Error\n"); unsigned int snapshot_size = m_snapshot_width * m_snapshot_height * 2; unsigned char *pInBuf = (unsigned char *)jpgEnc.getInBuf(snapshot_size); if (pInBuf == NULL) { - LOGE("JPEG input buffer is NULL!!\n"); + ALOGE("JPEG input buffer is NULL!!\n"); return -1; } memcpy(pInBuf, yuv_buf, snapshot_size); @@ -1435,7 +1435,7 @@ int SecCamera::getSnapshotAndJpeg(unsigned char *yuv_buf, unsigned char *jpeg_bu unsigned char *pOutBuf = (unsigned char *)jpgEnc.getOutBuf(&outbuf_size); if (pOutBuf == NULL) { - LOGE("JPEG output buffer is NULL!!\n"); + ALOGE("JPEG output buffer is NULL!!\n"); return -1; } @@ -1504,7 +1504,7 @@ int SecCamera::setSnapshotPixelFormat(int pixel_format) #if defined(LOG_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) ALOGD("%s : SnapshotFormat:V4L2_PIX_FMT_NV12", __func__); else if (m_snapshot_v4lformat == V4L2_PIX_FMT_NV12T) @@ -1545,12 +1545,12 @@ int SecCamera::setAutofocus(void) ALOGV("%s :", __func__); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed\n", __func__); + ALOGE("ERR(%s):Camera was closed\n", __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; } @@ -1591,7 +1591,7 @@ int SecCamera::getAutoFocusResult(void) finish_auto_focus: if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FINISH_AUTO_FOCUS, 0) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_PRE_FLASH", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_SET_PRE_FLASH", __func__); return -1; } return af_result; @@ -1602,12 +1602,12 @@ int SecCamera::cancelAutofocus(void) ALOGV("%s :", __func__); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed\n", __func__); + ALOGE("ERR(%s):Camera was closed\n", __func__); return -1; } 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; } @@ -1632,7 +1632,7 @@ int SecCamera::zoomOut(void) int SecCamera::SetRotate(int angle) { - LOGE("%s(angle(%d))", __func__, angle); + ALOGE("%s(angle(%d))", __func__, angle); if (m_angle != angle) { switch (angle) { @@ -1658,13 +1658,13 @@ int SecCamera::SetRotate(int angle) break; default: - LOGE("ERR(%s):Invalid angle(%d)", __func__, angle); + ALOGE("ERR(%s):Invalid angle(%d)", __func__, angle); return -1; } if (m_flag_camera_start) { if (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; } } @@ -1684,13 +1684,13 @@ int SecCamera::setFrameRate(int 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); if (m_params->capture.timeperframe.denominator != (unsigned)frame_rate) { m_params->capture.timeperframe.denominator = frame_rate; if (m_flag_camera_start) { 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; } } @@ -1706,12 +1706,12 @@ int SecCamera::setVerticalMirror(void) ALOGV("%s :", __func__); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed\n", __func__); + ALOGE("ERR(%s):Camera was closed\n", __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; } @@ -1723,12 +1723,12 @@ int SecCamera::setHorizontalMirror(void) ALOGV("%s :", __func__); if (m_cam_fd <= 0) { - LOGE("ERR(%s):Camera was closed\n", __func__); + ALOGE("ERR(%s):Camera was closed\n", __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; } @@ -1742,7 +1742,7 @@ int SecCamera::setWhiteBalance(int 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; } @@ -1750,7 +1750,7 @@ int SecCamera::setWhiteBalance(int white_balance) m_params->white_balance = white_balance; if (m_flag_camera_start) { 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; } } @@ -1774,7 +1774,7 @@ int SecCamera::setBrightness(int brightness) brightness += EV_DEFAULT; if (brightness < EV_MINUS_4 || EV_PLUS_4 < brightness) { - LOGE("ERR(%s):Invalid brightness(%d)", __func__, brightness); + ALOGE("ERR(%s):Invalid brightness(%d)", __func__, brightness); return -1; } @@ -1782,7 +1782,7 @@ int SecCamera::setBrightness(int brightness) m_params->brightness = brightness; if (m_flag_camera_start) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_BRIGHTNESS, brightness) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BRIGHTNESS", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_BRIGHTNESS", __func__); return -1; } } @@ -1804,7 +1804,7 @@ int SecCamera::setImageEffect(int 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; } @@ -1812,7 +1812,7 @@ int SecCamera::setImageEffect(int image_effect) m_params->effects = image_effect; if (m_flag_camera_start) { 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; } } @@ -1833,7 +1833,7 @@ int SecCamera::setAntiBanding(int 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; } @@ -1841,7 +1841,7 @@ int SecCamera::setAntiBanding(int anti_banding) m_anti_banding = anti_banding; if (m_flag_camera_start) { 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; } } @@ -1856,7 +1856,7 @@ int SecCamera::setSceneMode(int 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; } @@ -1864,7 +1864,7 @@ int SecCamera::setSceneMode(int scene_mode) m_params->scene_mode = scene_mode; if (m_flag_camera_start) { 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; } } @@ -1885,7 +1885,7 @@ int SecCamera::setFlashMode(int 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; } @@ -1893,7 +1893,7 @@ int SecCamera::setFlashMode(int flash_mode) m_params->flash_mode = flash_mode; if (m_flag_camera_start) { 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; } } @@ -1913,7 +1913,7 @@ int SecCamera::setISO(int 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; } @@ -1921,7 +1921,7 @@ int SecCamera::setISO(int iso_value) m_params->iso = iso_value; if (m_flag_camera_start) { 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; } } @@ -1942,7 +1942,7 @@ int SecCamera::setContrast(int contrast_value) ALOGV("%s(contrast_value(%d))", __func__, contrast_value); 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; } @@ -1950,7 +1950,7 @@ int SecCamera::setContrast(int contrast_value) m_params->contrast = contrast_value; if (m_flag_camera_start) { 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; } } @@ -1971,7 +1971,7 @@ int SecCamera::setSaturation(int saturation_value) ALOGV("%s(saturation_value(%d))", __func__, saturation_value); 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; } @@ -1979,7 +1979,7 @@ int SecCamera::setSaturation(int saturation_value) m_params->saturation = saturation_value; if (m_flag_camera_start) { 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; } } @@ -2000,7 +2000,7 @@ int SecCamera::setSharpness(int sharpness_value) ALOGV("%s(sharpness_value(%d))", __func__, sharpness_value); 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; } @@ -2008,7 +2008,7 @@ int SecCamera::setSharpness(int sharpness_value) m_params->sharpness = sharpness_value; if (m_flag_camera_start) { 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; } } @@ -2029,7 +2029,7 @@ int SecCamera::setWDR(int wdr_value) ALOGV("%s(wdr_value(%d))", __func__, wdr_value); 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; } @@ -2037,7 +2037,7 @@ int SecCamera::setWDR(int wdr_value) m_wdr = wdr_value; if (m_flag_camera_start) { 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; } } @@ -2058,7 +2058,7 @@ int SecCamera::setAntiShake(int 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; } @@ -2066,7 +2066,7 @@ int SecCamera::setAntiShake(int anti_shake) m_anti_shake = anti_shake; if (m_flag_camera_start) { 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; } } @@ -2088,7 +2088,7 @@ int SecCamera::setMetering(int 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; } @@ -2096,7 +2096,7 @@ int SecCamera::setMetering(int metering_value) m_params->metering = metering_value; if (m_flag_camera_start) { 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; } } @@ -2117,7 +2117,7 @@ int SecCamera::setJpegQuality(int 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; } @@ -2125,7 +2125,7 @@ int SecCamera::setJpegQuality(int jpeg_quality) m_jpeg_quality = jpeg_quality; if (m_flag_camera_start && (m_camera_id == CAMERA_ID_BACK)) { 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; } } @@ -2146,7 +2146,7 @@ int SecCamera::setZoom(int 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; } @@ -2154,7 +2154,7 @@ int SecCamera::setZoom(int zoom_level) m_zoom_level = zoom_level; if (m_flag_camera_start) { 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; } } @@ -2175,7 +2175,7 @@ int SecCamera::setObjectTracking(int 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; } @@ -2205,7 +2205,7 @@ int SecCamera::setObjectTrackingStartStop(int 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; } } @@ -2220,7 +2220,7 @@ int SecCamera::setTouchAFStartStop(int 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; } } @@ -2235,7 +2235,7 @@ int SecCamera::setSmartAuto(int 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; } @@ -2243,7 +2243,7 @@ int SecCamera::setSmartAuto(int smart_auto) m_smart_auto = smart_auto; if (m_flag_camera_start) { 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; } } @@ -2265,7 +2265,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; } } @@ -2279,7 +2279,7 @@ int SecCamera::setBeautyShot(int 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; } @@ -2287,7 +2287,7 @@ int SecCamera::setBeautyShot(int beauty_shot) m_beauty_shot = beauty_shot; if (m_flag_camera_start) { 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; } } @@ -2310,7 +2310,7 @@ int SecCamera::setVintageMode(int 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; } @@ -2318,7 +2318,7 @@ int SecCamera::setVintageMode(int vintage_mode) m_vintage_mode = vintage_mode; if (m_flag_camera_start) { 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; } } @@ -2339,7 +2339,7 @@ int SecCamera::setFocusMode(int 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; } @@ -2348,7 +2348,7 @@ int SecCamera::setFocusMode(int focus_mode) if (m_flag_camera_start) { 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; } } @@ -2373,12 +2373,12 @@ int SecCamera::setFaceDetect(int face_detect) if (m_flag_camera_start) { if (m_face_detect != FACE_DETECTION_OFF) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_FOCUS_MODE, FOCUS_MODE_AUTO) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODin face detecion", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_FOCUS_MODin face detecion", __func__); return -1; } } if (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; } } @@ -2466,7 +2466,7 @@ int SecCamera::setFaceDetectLockUnlock(int 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; } @@ -2481,12 +2481,12 @@ int SecCamera::setObjectPosition(int x, int y) x = x - 80; 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; } @@ -2500,7 +2500,7 @@ int SecCamera::setGamma(int 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; } @@ -2508,7 +2508,7 @@ int SecCamera::setGamma(int gamma) m_video_gamma = gamma; if (m_flag_camera_start) { 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; } } @@ -2524,7 +2524,7 @@ int SecCamera::setSlowAE(int 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; } @@ -2532,7 +2532,7 @@ int SecCamera::setSlowAE(int slow_ae) m_slow_ae = slow_ae; if (m_flag_camera_start) { 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; } } @@ -2559,7 +2559,7 @@ int SecCamera::setExifOrientationInfo(int 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; @@ -2572,7 +2572,7 @@ int SecCamera::setBatchReflection() { if (m_flag_camera_start) { 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; } } @@ -2586,7 +2586,7 @@ int SecCamera::setVTmode(int vtmode) ALOGV("%s(vtmode (%d))", __func__, vtmode); if (vtmode < VT_MODE_OFF || VT_MODE_MAX <= vtmode) { - LOGE("ERR(%s):Invalid vtmode (%d)", __func__, vtmode); + ALOGE("ERR(%s):Invalid vtmode (%d)", __func__, vtmode); return -1; } @@ -2603,7 +2603,7 @@ int SecCamera::setSensorMode(int 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; } @@ -2625,7 +2625,7 @@ int SecCamera::setShotMode(int 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; @@ -2643,7 +2643,7 @@ int SecCamera::setBlur(int blur_level) ALOGV("%s(level (%d))", __func__, blur_level); if (blur_level < BLUR_LEVEL_0 || BLUR_LEVEL_MAX <= blur_level) { - LOGE("ERR(%s):Invalid level (%d)", __func__, blur_level); + ALOGE("ERR(%s):Invalid level (%d)", __func__, blur_level); return -1; } @@ -2651,7 +2651,7 @@ int SecCamera::setBlur(int blur_level) m_blur_level = blur_level; if (m_flag_camera_start) { if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_VGA_BLUR, blur_level) < 0) { - LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_VGA_BLUR", __func__); + ALOGE("ERR(%s):Fail on V4L2_CID_CAMERA_VGA_BLUR", __func__); return -1; } } @@ -2669,7 +2669,7 @@ int SecCamera::setDataLineCheck(int 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; } @@ -2689,7 +2689,7 @@ int SecCamera::setDataLineCheckStop(void) if (m_flag_camera_start) { 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; } } @@ -2844,7 +2844,7 @@ void SecCamera::setExifChangedAttribute() it current returns a negative err value, so avoid putting odd value into exif for now */ if (shutterSpeed < 0) { - LOGE("%s: error %d getting shutterSpeed, camera_id = %d, using 100", + ALOGE("%s: error %d getting shutterSpeed, camera_id = %d, using 100", __func__, shutterSpeed, m_camera_id); shutterSpeed = 100; } @@ -2858,7 +2858,7 @@ void SecCamera::setExifChangedAttribute() it current returns a negative err value, so avoid putting odd value into exif for now */ if (iso < 0) { - LOGE("%s: error %d getting iso, camera_id = %d, using 100", + ALOGE("%s: error %d getting iso, camera_id = %d, using 100", __func__, iso, m_camera_id); iso = ISO_100; } @@ -3034,7 +3034,7 @@ inline int SecCamera::m_frameSize(int format, int width, int height) break; default : - LOGE("ERR(%s):Invalid V4L2 pixel format(%d)\n", __func__, format); + ALOGE("ERR(%s):Invalid V4L2 pixel format(%d)\n", __func__, format); case V4L2_PIX_FMT_RGB565: size = (width * height * BPP); break; diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp index 0efd85d..40ba50d 100755 --- a/libcamera/SecCameraHWInterface.cpp +++ b/libcamera/SecCameraHWInterface.cpp @@ -103,12 +103,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->initCamera(cameraId); if (ret < 0) { - LOGE("ERR(%s):Fail on mSecCamera init", __func__); + ALOGE("ERR(%s):Fail on mSecCamera init", __func__); } mSecCamera->getPostViewConfig(&mPostViewWidth, &mPostViewHeight, &mPostViewSize); @@ -137,7 +137,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; } @@ -170,11 +170,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) \n", + ALOGE("getPreviewMaxSize fail (%d / %d) \n", preview_max_width, preview_max_height); if (mSecCamera->getSnapshotMaxSize(&snapshot_max_width, &snapshot_max_height) < 0) - LOGE("getSnapshotMaxSize fail (%d / %d) \n", + ALOGE("getSnapshotMaxSize fail (%d / %d) \n", snapshot_max_width, snapshot_max_height); String8 previewColorString; previewColorString = CameraParameters::PIXEL_FORMAT_YUV420SP; @@ -369,7 +369,7 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) ALOGV("%s: mPreviewWindow %p", __func__, mPreviewWindow); if (!w) { - LOGE("preview window is NULL!"); + ALOGE("preview window is NULL!"); return OK; } @@ -381,18 +381,18 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) } 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 >= kBufferCount) { - 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, kBufferCount - 1); } ALOGV("%s: setting buffer count to %d", __func__, kBufferCount); if (w->set_buffer_count(w, kBufferCount)) { - LOGE("%s: could not set buffer count", __func__); + ALOGE("%s: could not set buffer count", __func__); return INVALID_OPERATION; } @@ -405,14 +405,14 @@ status_t CameraHardwareSec::setPreviewWindow(preview_stream_ops *w) ALOGV("%s: preview format %s", __func__, str_preview_format); if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN)) { - LOGE("%s: could not set usage on gralloc buffer", __func__); + ALOGE("%s: could not set usage on gralloc buffer", __func__); return INVALID_OPERATION; } 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; } @@ -509,7 +509,7 @@ int CameraHardwareSec::previewThread() index = mSecCamera->getPreview(); if (index < 0) { - LOGE("ERR(%s):Fail on SecCamera->getPreview()", __func__); + ALOGE("ERR(%s):Fail on SecCamera->getPreview()", __func__); return UNKNOWN_ERROR; } @@ -530,7 +530,7 @@ int CameraHardwareSec::previewThread() phyCAddr = mSecCamera->getPhyAddrC(index); if (phyYAddr == 0xffffffff || phyCAddr == 0xffffffff) { - LOGE("ERR(%s):Fail on SecCamera getPhyAddr Y addr = %0x C addr = %0x", + ALOGE("ERR(%s):Fail on SecCamera getPhyAddr Y addr = %0x C addr = %0x", __func__, phyYAddr, phyCAddr); return UNKNOWN_ERROR; } @@ -545,7 +545,7 @@ int CameraHardwareSec::previewThread() buffer_handle_t *buf_handle; int stride; if (0 != mPreviewWindow->dequeue_buffer(mPreviewWindow, &buf_handle, &stride)) { - LOGE("Could not dequeue gralloc buffer!\n"); + ALOGE("Could not dequeue gralloc buffer!\n"); goto callbacks; } @@ -591,10 +591,10 @@ int CameraHardwareSec::previewThread() mGrallocHal->unlock(mGrallocHal, *buf_handle); } else - LOGE("%s: could not obtain gralloc buffer", __func__); + ALOGE("%s: could not obtain gralloc buffer", __func__); if (0 != mPreviewWindow->enqueue_buffer(mPreviewWindow, buf_handle)) { - LOGE("Could not enqueue gralloc buffer!\n"); + ALOGE("Could not enqueue gralloc buffer!\n"); goto callbacks; } } @@ -626,7 +626,7 @@ callbacks: if (mRecordRunning == true) { index = mSecCamera->getRecordFrame(); if (index < 0) { - LOGE("ERR(%s):Fail on SecCamera->getRecord()", __func__); + ALOGE("ERR(%s):Fail on SecCamera->getRecord()", __func__); return UNKNOWN_ERROR; } @@ -634,7 +634,7 @@ callbacks: phyCAddr = mSecCamera->getRecPhyAddrC(index); if (phyYAddr == 0xffffffff || phyCAddr == 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__, phyYAddr, phyCAddr); return UNKNOWN_ERROR; } @@ -671,7 +671,7 @@ status_t CameraHardwareSec::startPreview() 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; } @@ -702,7 +702,7 @@ status_t CameraHardwareSec::startPreviewInternal() 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; } @@ -780,13 +780,13 @@ status_t CameraHardwareSec::startRecording() } mRecordHeap = mGetMemoryCb(-1, sizeof(struct addrs), kBufferCount, NULL); if (!mRecordHeap) { - LOGE("ERR(%s): Record heap creation fail", __func__); + ALOGE("ERR(%s): Record heap creation fail", __func__); return UNKNOWN_ERROR; } if (mRecordRunning == false) { if (mSecCamera->startRecord() < 0) { - LOGE("ERR(%s):Fail on mSecCamera->startRecord()", __func__); + ALOGE("ERR(%s):Fail on mSecCamera->startRecord()", __func__); return UNKNOWN_ERROR; } mRecordRunning = true; @@ -802,7 +802,7 @@ void CameraHardwareSec::stopRecording() 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; @@ -855,7 +855,7 @@ int CameraHardwareSec::autoFocusThread() ALOGV("%s : calling setAutoFocus", __func__); if (mSecCamera->setAutofocus() < 0) { - LOGE("ERR(%s):Fail on mSecCamera->setAutofocus()", __func__); + ALOGE("ERR(%s):Fail on mSecCamera->setAutofocus()", __func__); return UNKNOWN_ERROR; } @@ -904,7 +904,7 @@ status_t CameraHardwareSec::cancelAutoFocus() if (mPreviewRunning && mPreviewStartDeferred) return NO_ERROR; if (mSecCamera->cancelAutofocus() < 0) { - LOGE("ERR(%s):Fail on mSecCamera->cancelAutofocus()", __func__); + ALOGE("ERR(%s):Fail on mSecCamera->cancelAutofocus()", __func__); return UNKNOWN_ERROR; } @@ -919,14 +919,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; } ALOGV("[BestIQ] real_jpeg size ========> %d\n", 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); @@ -958,7 +958,7 @@ void CameraHardwareSec::save_postview(const char *fname, uint8_t *buf, uint32_t ALOGD("opening file [%s]\n", 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; } @@ -966,7 +966,7 @@ void CameraHardwareSec::save_postview(const char *fname, uint8_t *buf, uint32_t 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; @@ -984,7 +984,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; } @@ -1101,7 +1101,7 @@ int CameraHardwareSec::pictureThread() if (mSecCamera->getCameraId() == SecCamera::CAMERA_ID_BACK){ jpeg_data = mSecCamera->getJpeg(&jpeg_size, &phyAddr); if (jpeg_data == NULL) { - LOGE("ERR(%s):Fail on SecCamera->getSnapshot()", __func__); + ALOGE("ERR(%s):Fail on SecCamera->getSnapshot()", __func__); ret = UNKNOWN_ERROR; goto out; } @@ -1198,7 +1198,7 @@ status_t CameraHardwareSec::waitCaptureCompletion() { while (mCaptureInProgress) { nsecs_t remainingTime = endTime - systemTime(SYSTEM_TIME_MONOTONIC); if (remainingTime <= 0) { - LOGE("Timed out waiting picture thread."); + ALOGE("Timed out waiting picture thread."); return TIMED_OUT; } ALOGD("Waiting for picture thread to complete."); @@ -1218,7 +1218,7 @@ status_t CameraHardwareSec::takePicture() ALOGV("mRawHeap : MemoryHeapBase(previewHeapSize(%d))", rawHeapSize); mRawHeap = mGetMemoryCb(-1, rawHeapSize, 1, 0); if (!mRawHeap) { - LOGE("ERR(%s): Raw heap creation fail", __func__); + ALOGE("ERR(%s): Raw heap creation fail", __func__); } } @@ -1227,7 +1227,7 @@ status_t CameraHardwareSec::takePicture() } 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; } mCaptureLock.lock(); @@ -1253,7 +1253,7 @@ status_t CameraHardwareSec::cancelPicture() bool CameraHardwareSec::CheckVideoStartMarker(unsigned char *pBuf) { if (!pBuf) { - LOGE("CheckVideoStartMarker() => pBuf is NULL\n"); + ALOGE("CheckVideoStartMarker() => pBuf is NULL\n"); return false; } @@ -1267,7 +1267,7 @@ bool CameraHardwareSec::CheckVideoStartMarker(unsigned char *pBuf) bool CameraHardwareSec::CheckEOIMarker(unsigned char *pBuf) { if (!pBuf) { - LOGE("CheckEOIMarker() => pBuf is NULL\n"); + ALOGE("CheckEOIMarker() => pBuf is NULL\n"); return false; } @@ -1281,7 +1281,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; } @@ -1305,12 +1305,12 @@ bool CameraHardwareSec::SplitFrame(unsigned char *pFrame, int dwSize, 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; } @@ -1379,7 +1379,7 @@ 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; @@ -1417,13 +1417,13 @@ int CameraHardwareSec::decodeInterleaveData(unsigned char *pInterleaveData, if ((*interleave_ptr == 0xFFFFFFFF) || (*interleave_ptr == 0x02FFFFFF) || (*interleave_ptr == 0xFF02FFFF)) { // Padding Data -// LOGE("%d(%x) padding data\n", i, *interleave_ptr); +// ALOGE("%d(%x) padding data\n", i, *interleave_ptr); interleave_ptr++; i += 4; } else if ((*interleave_ptr & 0xFFFF) == 0x05FF) { // Start-code of YUV Data -// LOGE("%d(%x) yuv data\n", i, *interleave_ptr); +// ALOGE("%d(%x) yuv data\n", i, *interleave_ptr); p = (unsigned char *)interleave_ptr; p += 2; i += 2; @@ -1447,7 +1447,7 @@ int CameraHardwareSec::decodeInterleaveData(unsigned char *pInterleaveData, } } else { // Extract JPEG Data -// LOGE("%d(%x) jpg data, jpeg_size = %d bytes\n", i, *interleave_ptr, jpeg_size); +// ALOGE("%d(%x) jpg data, jpeg_size = %d bytes\n", i, *interleave_ptr, jpeg_size); if (pJpegData != NULL) { memcpy(jpeg_ptr, interleave_ptr, 4); jpeg_ptr += 4; @@ -1564,7 +1564,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) if (strcmp(new_str_preview_format, CameraParameters::PIXEL_FORMAT_YUV420SP) && strcmp(new_str_preview_format, CameraParameters::PIXEL_FORMAT_YUV420P)) { - LOGE("Unsupported preview color format: %s", new_str_preview_format); + ALOGE("Unsupported preview color format: %s", new_str_preview_format); return BAD_VALUE; } @@ -1584,13 +1584,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) current_pixel_format != new_preview_format) { if (mSecCamera->setPreviewSize(new_preview_width, new_preview_height, new_preview_format) < 0) { - LOGE("ERR(%s):Fail on mSecCamera->setPreviewSize(width(%d), height(%d), format(%d))", + ALOGE("ERR(%s):Fail on mSecCamera->setPreviewSize(width(%d), height(%d), format(%d))", __func__, new_preview_width, new_preview_height, new_preview_format); ret = UNKNOWN_ERROR; } else { if (mPreviewWindow) { if (mPreviewRunning && !mPreviewStartDeferred) { - LOGE("ERR(%s): preview is running, cannot change size and format!", + ALOGE("ERR(%s): preview is running, cannot change size and format!", __func__); ret = INVALID_OPERATION; } @@ -1610,7 +1610,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) } else ALOGV("%s: preview size and format has not changed", __func__); } else { - LOGE("%s: Invalid preview size(%dx%d)", + ALOGE("%s: Invalid preview size(%dx%d)", __func__, new_preview_width, new_preview_height); ret = INVALID_OPERATION; @@ -1624,7 +1624,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) if (0 < new_picture_width && 0 < new_picture_height) { ALOGV("%s: setSnapshotSize", __func__); if (mSecCamera->setSnapshotSize(new_picture_width, new_picture_height) < 0) { - LOGE("ERR(%s):Fail on mSecCamera->setSnapshotSize(width(%d), height(%d))", + ALOGE("ERR(%s):Fail on mSecCamera->setSnapshotSize(width(%d), height(%d))", __func__, new_picture_width, new_picture_height); ret = UNKNOWN_ERROR; } else { @@ -1662,7 +1662,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); @@ -1675,7 +1675,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) /* 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); @@ -1687,7 +1687,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); @@ -1711,7 +1711,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) if (0 <= new_rotation) { ALOGV("%s : set orientation:%d\n", __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); @@ -1726,7 +1726,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) if ((min_exposure_compensation <= new_exposure_compensation) && (max_exposure_compensation >= new_exposure_compensation)) { if (mSecCamera->setBrightness(new_exposure_compensation) < 0) { - LOGE("ERR(%s):Fail on mSecCamera->setBrightness(brightness(%d))", __func__, new_exposure_compensation); + ALOGE("ERR(%s):Fail on mSecCamera->setBrightness(brightness(%d))", __func__, new_exposure_compensation); ret = UNKNOWN_ERROR; } else { mParameters.set(CameraParameters::KEY_EXPOSURE_COMPENSATION, new_exposure_compensation); @@ -1754,13 +1754,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); @@ -1787,7 +1787,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) if ((new_min_fps != current_min_fps) || (new_max_fps != current_max_fps)) { ALOGW("%s : requested new_min_fps = %d, new_max_fps = %d not allowed", __func__, new_min_fps, new_max_fps); - LOGE("%s : current_min_fps = %d, current_max_fps = %d", + ALOGE("%s : current_min_fps = %d, current_max_fps = %d", __func__, current_min_fps, current_max_fps); ret = UNKNOWN_ERROR; } @@ -1872,7 +1872,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) new_flash_mode_str = CameraParameters::FLASH_MODE_OFF; mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "off"); } 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; } @@ -1901,13 +1901,13 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) BACK_CAMERA_INFINITY_FOCUS_DISTANCES_STR); } else { - LOGE("%s::unmatched focus_mode(%s)", __func__, new_focus_mode_str); + ALOGE("%s::unmatched focus_mode(%s)", __func__, new_focus_mode_str); ret = UNKNOWN_ERROR; } if (0 <= new_focus_mode) { if (mSecCamera->setFocusMode(new_focus_mode) < 0) { - LOGE("%s::mSecCamera->setFocusMode(%d) fail", __func__, new_focus_mode); + ALOGE("%s::mSecCamera->setFocusMode(%d) fail", __func__, new_focus_mode); ret = UNKNOWN_ERROR; } else { mParameters.set(CameraParameters::KEY_FOCUS_MODE, new_focus_mode_str); @@ -1928,12 +1928,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); @@ -1944,7 +1944,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) // scene.. if (0 <= new_scene_mode) { if (mSecCamera->setSceneMode(new_scene_mode) < 0) { - LOGE("%s::mSecCamera->setSceneMode(%d) fail", __func__, new_scene_mode); + ALOGE("%s::mSecCamera->setSceneMode(%d) fail", __func__, new_scene_mode); ret = UNKNOWN_ERROR; } else { mParameters.set(CameraParameters::KEY_SCENE_MODE, new_scene_mode_str); @@ -1953,7 +1953,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) } else { if (!isSupportedParameter(new_focus_mode_str, mParameters.get(CameraParameters::KEY_SUPPORTED_FOCUS_MODES))) { - LOGE("%s: Unsupported focus mode: %s", __func__, new_focus_mode_str); + ALOGE("%s: Unsupported focus mode: %s", __func__, new_focus_mode_str); ret = UNKNOWN_ERROR; } } @@ -1978,13 +1978,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); @@ -2004,7 +2004,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) int new_vtmode = mInternalParameters.getInt("vtmode"); if (0 <= new_vtmode) { if (mSecCamera->setVTmode(new_vtmode) < 0) { - LOGE("ERR(%s):Fail on mSecCamera->setVTMode(%d)", __func__, new_vtmode); + ALOGE("ERR(%s):Fail on mSecCamera->setVTMode(%d)", __func__, new_vtmode); ret = UNKNOWN_ERROR; } } @@ -2014,7 +2014,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) if (0 <= new_contrast) { if (mSecCamera->setContrast(new_contrast) < 0) { - LOGE("ERR(%s):Fail on mSecCamera->setContrast(%d)", __func__, new_contrast); + ALOGE("ERR(%s):Fail on mSecCamera->setContrast(%d)", __func__, new_contrast); ret = UNKNOWN_ERROR; } } @@ -2024,7 +2024,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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; } } @@ -2034,7 +2034,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; } } @@ -2042,7 +2042,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) { @@ -2056,7 +2056,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) { @@ -2070,7 +2070,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) { @@ -2084,7 +2084,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) { @@ -2098,7 +2098,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) { @@ -2114,12 +2114,12 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) 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))", __func__, new_recording_width, new_recording_height); + ALOGE("ERR(%s):Fail on mSecCamera->setRecordingSize(width(%d), height(%d))", __func__, new_recording_width, new_recording_height); ret = UNKNOWN_ERROR; } } else { if (mSecCamera->setRecordingSize(new_preview_width, new_preview_height) < 0) { - LOGE("ERR(%s):Fail on mSecCamera->setRecordingSize(width(%d), height(%d))", __func__, new_preview_width, new_preview_height); + ALOGE("ERR(%s):Fail on mSecCamera->setRecordingSize(width(%d), height(%d))", __func__, new_preview_width, new_preview_height); ret = UNKNOWN_ERROR; } } @@ -2134,13 +2134,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; } } @@ -2157,13 +2157,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; } } @@ -2174,7 +2174,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 { @@ -2186,7 +2186,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 { @@ -2198,7 +2198,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) if (0 <= new_blur_level) { if (mSecCamera->setBlur(new_blur_level) < 0) { - LOGE("ERR(%s):Fail on mSecCamera->setBlur(%d)", __func__, new_blur_level); + ALOGE("ERR(%s):Fail on mSecCamera->setBlur(%d)", __func__, new_blur_level); ret = UNKNOWN_ERROR; } } @@ -2209,7 +2209,7 @@ 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; } } @@ -2293,7 +2293,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; @@ -2658,7 +2658,7 @@ static int HAL_camera_device_open(const struct hw_module_t* module, int cameraId = atoi(id); if (cameraId < 0 || cameraId >= HAL_getNumberOfCameras()) { - LOGE("Invalid camera ID %s", id); + ALOGE("Invalid camera ID %s", id); return -EINVAL; } @@ -2667,7 +2667,7 @@ static int HAL_camera_device_open(const struct hw_module_t* module, 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; } diff --git a/libhwcomposer/SecHWC.cpp b/libhwcomposer/SecHWC.cpp index e9a710a..e63558b 100644 --- a/libhwcomposer/SecHWC.cpp +++ b/libhwcomposer/SecHWC.cpp @@ -358,7 +358,7 @@ static int hwc_set(hwc_composer_device_t *dev, ret = gpsGrallocModule->GetPhyAddrs(gpsGrallocModule, cur->handle, phyAddr); if (ret) { - LOGE("%s::GetPhyAddrs fail : ret=%d\n", __func__, ret); + ALOGE("%s::GetPhyAddrs fail : ret=%d\n", __func__, ret); skipped_window_mask |= (1 << i); continue; } @@ -370,7 +370,7 @@ static int hwc_set(hwc_composer_device_t *dev, ret = runFimc(ctx, &src_img, &src_rect, &dst_img, &dst_rect, phyAddr, cur->transform); if (ret < 0){ - LOGE("%s::runFimc fail : ret=%d\n", __func__, ret); + ALOGE("%s::runFimc fail : ret=%d\n", __func__, ret); skipped_window_mask |= (1 << i); continue; } @@ -378,7 +378,7 @@ static int hwc_set(hwc_composer_device_t *dev, if (win->set_win_flag == 1) { /* turnoff the window and set the window position with new conf... */ if (window_set_pos(win) < 0) { - LOGE("%s::window_set_pos is failed : %s", __func__, + ALOGE("%s::window_set_pos is failed : %s", __func__, strerror(errno)); skipped_window_mask |= (1 << i); continue; @@ -400,13 +400,13 @@ static int hwc_set(hwc_composer_device_t *dev, window_show(win); } else { - LOGE("%s:: error : layer %d compositionType should have been \ + ALOGE("%s:: error : layer %d compositionType should have been \ HWC_OVERLAY", __func__, win->layer_index); skipped_window_mask |= (1 << i); continue; } } else { - LOGE("%s:: error : window status should have been HWC_WIN_RESERVED \ + ALOGE("%s:: error : window status should have been HWC_WIN_RESERVED \ by now... ", __func__); skipped_window_mask |= (1 << i); continue; @@ -432,13 +432,13 @@ static int hwc_device_close(struct hw_device_t *dev) if (ctx) { if (destroyFimc(&ctx->fimc) < 0) { - LOGE("%s::destroyFimc fail", __func__); + ALOGE("%s::destroyFimc fail", __func__); ret = -1; } for (i = 0; i < NUM_OF_WIN; i++) { if (window_close(&ctx->win[i]) < 0) { - LOGE("%s::window_close() fail", __func__); + ALOGE("%s::window_close() fail", __func__); ret = -1; } } @@ -488,7 +488,7 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, /* open WIN0 & WIN1 here */ for (int i = 0; i < NUM_OF_WIN; i++) { if (window_open(&(dev->win[i]), i) < 0) { - LOGE("%s:: Failed to open window %d device ", __func__, i); + ALOGE("%s:: Failed to open window %d device ", __func__, i); status = -EINVAL; goto err; } @@ -496,7 +496,7 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, /* get default window config */ if (window_get_global_lcd_info(&dev->lcd_info) < 0) { - LOGE("%s::window_get_global_lcd_info is failed : %s", + ALOGE("%s::window_get_global_lcd_info is failed : %s", __func__, strerror(errno)); status = -EINVAL; goto err; @@ -516,14 +516,14 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, win->rect_info.h = win->var_info.yres; if (window_set_pos(win) < 0) { - LOGE("%s::window_set_pos is failed : %s", + ALOGE("%s::window_set_pos is failed : %s", __func__, strerror(errno)); status = -EINVAL; goto err; } if (window_get_info(win) < 0) { - LOGE("%s::window_get_info is failed : %s", + ALOGE("%s::window_get_info is failed : %s", __func__, strerror(errno)); status = -EINVAL; goto err; @@ -532,7 +532,7 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, win->size = win->fix_info.line_length * win->var_info.yres; if (!win->fix_info.smem_start){ - LOGE("%s:: win-%d failed to get the reserved memory", __func__, i); + ALOGE("%s:: win-%d failed to get the reserved memory", __func__, i); status = -EINVAL; goto err; } @@ -545,7 +545,7 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, /* open pp */ if (createFimc(&dev->fimc) < 0) { - LOGE("%s::creatFimc() fail", __func__); + ALOGE("%s::creatFimc() fail", __func__); status = -EINVAL; goto err; } @@ -556,11 +556,11 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, err: if (destroyFimc(&dev->fimc) < 0) - LOGE("%s::destroyFimc() fail", __func__); + ALOGE("%s::destroyFimc() fail", __func__); for (int i = 0; i < NUM_OF_WIN; i++) { if (window_close(&dev->win[i]) < 0) - LOGE("%s::window_close() fail", __func__); + ALOGE("%s::window_close() fail", __func__); } return status; diff --git a/libhwcomposer/SecHWCUtils.cpp b/libhwcomposer/SecHWCUtils.cpp index 4a5b7b4..e933985 100644 --- a/libhwcomposer/SecHWCUtils.cpp +++ b/libhwcomposer/SecHWCUtils.cpp @@ -44,7 +44,7 @@ int window_open(struct hwc_win_info_t *win, int id) case 2: break; default: - LOGE("%s::id(%d) is weird", __func__, id); + ALOGE("%s::id(%d) is weird", __func__, id); goto error; } @@ -52,7 +52,7 @@ int window_open(struct hwc_win_info_t *win, int id) win->fd = open(name, O_RDWR); if (win->fd < 0) { - LOGE("%s::Failed to open window device (%s) : %s", + ALOGE("%s::Failed to open window device (%s) : %s", __func__, strerror(errno), device_template); goto error; } @@ -93,7 +93,7 @@ int window_set_pos(struct hwc_win_info_t *win) win->var_info.activate |= FB_ACTIVATE_FORCE; if (ioctl(win->fd, FBIOPUT_VSCREENINFO, &(win->var_info)) < 0) { - LOGE("%s::FBIOPUT_VSCREENINFO(%d, %d) fail", + ALOGE("%s::FBIOPUT_VSCREENINFO(%d, %d) fail", __func__, win->rect_info.w, win->rect_info.h); return -1; } @@ -102,7 +102,7 @@ int window_set_pos(struct hwc_win_info_t *win) window.y = win->rect_info.y; if (ioctl(win->fd, SECFB_WIN_POSITION, &window) < 0) { - LOGE("%s::S3CFB_WIN_POSITION(%d, %d) fail", + ALOGE("%s::S3CFB_WIN_POSITION(%d, %d) fail", __func__, window.x, window.y); return -1; } @@ -113,7 +113,7 @@ int window_set_pos(struct hwc_win_info_t *win) int window_get_info(struct hwc_win_info_t *win) { if (ioctl(win->fd, FBIOGET_FSCREENINFO, &win->fix_info) < 0) { - LOGE("FBIOGET_FSCREENINFO failed : %s", strerror(errno)); + ALOGE("FBIOGET_FSCREENINFO failed : %s", strerror(errno)); goto error; } @@ -132,7 +132,7 @@ int window_pan_display(struct hwc_win_info_t *win) lcd_info->yoffset = lcd_info->yres * win->buf_index; if (ioctl(win->fd, FBIOPAN_DISPLAY, lcd_info) < 0) { - LOGE("%s::FBIOPAN_DISPLAY(%d / %d / %d) fail(%s)", + ALOGE("%s::FBIOPAN_DISPLAY(%d / %d / %d) fail(%s)", __func__, lcd_info->yres, win->buf_index, lcd_info->yres_virtual, strerror(errno)); return -1; @@ -144,7 +144,7 @@ int window_show(struct hwc_win_info_t *win) { if(win->power_state == 0) { if (ioctl(win->fd, FBIOBLANK, FB_BLANK_UNBLANK) < 0) { - LOGE("%s: FBIOBLANK failed : (%d:%s)", __func__, win->fd, + ALOGE("%s: FBIOBLANK failed : (%d:%s)", __func__, win->fd, strerror(errno)); return -1; } @@ -157,7 +157,7 @@ int window_hide(struct hwc_win_info_t *win) { if (win->power_state == 1) { if (ioctl(win->fd, FBIOBLANK, FB_BLANK_POWERDOWN) < 0) { - LOGE("%s::FBIOBLANK failed : (%d:%s)", + ALOGE("%s::FBIOBLANK failed : (%d:%s)", __func__, win->fd, strerror(errno)); return -1; } @@ -172,12 +172,12 @@ int window_get_global_lcd_info(struct fb_var_screeninfo *lcd_info) int ret = 0; if (window_open(&win, 2) < 0) { - LOGE("%s:: Failed to open window 2 device ", __func__); + ALOGE("%s:: Failed to open window 2 device ", __func__); return -1; } if (ioctl(win.fd, FBIOGET_VSCREENINFO, lcd_info) < 0) { - LOGE("FBIOGET_VSCREENINFO failed : %s", strerror(errno)); + ALOGE("FBIOGET_VSCREENINFO failed : %s", strerror(errno)); ret = -1; goto fun_err; } @@ -197,7 +197,7 @@ int window_get_global_lcd_info(struct fb_var_screeninfo *lcd_info) fun_err: if (window_close(&win) < 0) - LOGE("%s::window2 close fail", __func__); + ALOGE("%s::window2 close fail", __func__); return ret; } @@ -219,7 +219,7 @@ int fimc_v4l2_set_src(int fd, unsigned int hw_ver, s5p_fimc_img_info *src) fmt.fmt.pix.field = V4L2_FIELD_NONE; if (ioctl (fd, VIDIOC_S_FMT, &fmt) < 0) { - LOGE("VIDIOC_S_FMT failed : errno=%d (%s) : fd=%d", errno, + ALOGE("VIDIOC_S_FMT failed : errno=%d (%s) : fd=%d", errno, strerror(errno), fd); return -1; } @@ -238,7 +238,7 @@ int fimc_v4l2_set_src(int fd, unsigned int hw_ver, s5p_fimc_img_info *src) crop.c.width = src->width; crop.c.height = src->height; if (ioctl(fd, VIDIOC_S_CROP, &crop) < 0) { - LOGE("Error in video VIDIOC_S_CROP (%d, %d, %d, %d)", + ALOGE("Error in video VIDIOC_S_CROP (%d, %d, %d, %d)", crop.c.left, crop.c.top, crop.c.width, crop.c.height); return -1; } @@ -251,7 +251,7 @@ int fimc_v4l2_set_src(int fd, unsigned int hw_ver, s5p_fimc_img_info *src) req.memory = V4L2_MEMORY_USERPTR; if (ioctl (fd, VIDIOC_REQBUFS, &req) < 0) { - LOGE("Error in VIDIOC_REQBUFS"); + ALOGE("Error in VIDIOC_REQBUFS"); return -1; } @@ -275,21 +275,21 @@ int fimc_v4l2_set_dst(int fd, vc.id = V4L2_CID_HFLIP; vc.value = flag_h_flip; if (ioctl(fd, VIDIOC_S_CTRL, &vc) < 0) { - LOGE("Error in video VIDIOC_S_CTRL - flag_h_flip (%d)", flag_h_flip); + ALOGE("Error in video VIDIOC_S_CTRL - flag_h_flip (%d)", flag_h_flip); return -1; } vc.id = V4L2_CID_VFLIP; vc.value = flag_v_flip; if (ioctl(fd, VIDIOC_S_CTRL, &vc) < 0) { - LOGE("Error in video VIDIOC_S_CTRL - flag_v_flip (%d)", flag_v_flip); + ALOGE("Error in video VIDIOC_S_CTRL - flag_v_flip (%d)", flag_v_flip); return -1; } vc.id = V4L2_CID_ROTATION; vc.value = rotation; if (ioctl(fd, VIDIOC_S_CTRL, &vc) < 0) { - LOGE("Error in video VIDIOC_S_CTRL - rotation (%d)", rotation); + ALOGE("Error in video VIDIOC_S_CTRL - rotation (%d)", rotation); return -1; } @@ -297,7 +297,7 @@ int fimc_v4l2_set_dst(int fd, * set size, format & address for destination image (DMA-OUTPUT) */ if (ioctl (fd, VIDIOC_G_FBUF, &fbuf) < 0) { - LOGE("Error in video VIDIOC_G_FBUF"); + ALOGE("Error in video VIDIOC_G_FBUF"); return -1; } @@ -306,7 +306,7 @@ int fimc_v4l2_set_dst(int fd, fbuf.fmt.height = dst->full_height; fbuf.fmt.pixelformat = dst->color_space; if (ioctl (fd, VIDIOC_S_FBUF, &fbuf) < 0) { - LOGE("Error in video VIDIOC_S_FBUF 0x%x %d %d %d", + ALOGE("Error in video VIDIOC_S_FBUF 0x%x %d %d %d", (void *)addr, dst->full_width, dst->full_height, dst->color_space); return -1; @@ -321,7 +321,7 @@ int fimc_v4l2_set_dst(int fd, sFormat.fmt.win.w.width = dst->width; sFormat.fmt.win.w.height = dst->height; if (ioctl(fd, VIDIOC_S_FMT, &sFormat) < 0) { - LOGE("Error in video VIDIOC_S_FMT %d %d %d %d", + ALOGE("Error in video VIDIOC_S_FMT %d %d %d %d", dst->start_x, dst->start_y, dst->width, dst->height); return -1; } @@ -332,7 +332,7 @@ int fimc_v4l2_set_dst(int fd, int fimc_v4l2_stream_on(int fd, enum v4l2_buf_type type) { if (ioctl (fd, VIDIOC_STREAMON, &type) < 0) { - LOGE("Error in VIDIOC_STREAMON"); + ALOGE("Error in VIDIOC_STREAMON"); return -1; } @@ -350,7 +350,7 @@ int fimc_v4l2_queue(int fd, struct fimc_buf *fimc_buf) buf.index = 0; if (ioctl (fd, VIDIOC_QBUF, &buf) < 0) { - LOGE("Error in VIDIOC_QBUF"); + ALOGE("Error in VIDIOC_QBUF"); return -1; } @@ -365,7 +365,7 @@ int fimc_v4l2_dequeue(int fd) buf.memory = V4L2_MEMORY_USERPTR; if (ioctl (fd, VIDIOC_DQBUF, &buf) < 0) { - LOGE("Error in VIDIOC_DQBUF"); + ALOGE("Error in VIDIOC_DQBUF"); return -1; } @@ -378,7 +378,7 @@ int fimc_v4l2_stream_off(int fd) type = V4L2_BUF_TYPE_VIDEO_OUTPUT; if (ioctl (fd, VIDIOC_STREAMOFF, &type) < 0) { - LOGE("Error in VIDIOC_STREAMOFF"); + ALOGE("Error in VIDIOC_STREAMOFF"); return -1; } @@ -394,7 +394,7 @@ int fimc_v4l2_clr_buf(int fd) req.memory = V4L2_MEMORY_USERPTR; if (ioctl (fd, VIDIOC_REQBUFS, &req) < 0) { - LOGE("Error in VIDIOC_REQBUFS"); + ALOGE("Error in VIDIOC_REQBUFS"); } return 0; @@ -405,30 +405,30 @@ int fimc_handle_oneshot(int fd, struct fimc_buf *fimc_buf) int ret =0; if (fimc_v4l2_stream_on(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT) < 0) { - LOGE("Fail : v4l2_stream_on()"); + ALOGE("Fail : v4l2_stream_on()"); return -1; } if (fimc_v4l2_queue(fd, fimc_buf) < 0) { - LOGE("Fail : v4l2_queue()"); + ALOGE("Fail : v4l2_queue()"); ret = -1; goto stream_off; } if (fimc_v4l2_dequeue(fd) < 0) { - LOGE("Fail : v4l2_dequeue()"); + ALOGE("Fail : v4l2_dequeue()"); ret = -1; goto stream_off; } stream_off: if (fimc_v4l2_stream_off(fd) < 0) { - LOGE("Fail : v4l2_stream_off()"); + ALOGE("Fail : v4l2_stream_off()"); return -1; } if (fimc_v4l2_clr_buf(fd) < 0) { - LOGE("Fail : v4l2_clr_buf()"); + ALOGE("Fail : v4l2_clr_buf()"); return -1; } @@ -448,12 +448,12 @@ static int get_src_phys_addr(struct hwc_context_t *ctx, fimc->params.src.buf_addr_phy_cb = phyAddr[1]; break; default: - LOGE("%s format error (format=0x%x)", __func__, + ALOGE("%s format error (format=0x%x)", __func__, src_img->format); return -1; } } else { - LOGE("%s mem_type error (mem_type=%d)", __func__, src_img->mem_type); + ALOGE("%s mem_type error (mem_type=%d)", __func__, src_img->mem_type); return -1; } @@ -468,7 +468,7 @@ static int get_dst_phys_addr(struct hwc_context_t *ctx, if (HWC_PHYS_MEM_TYPE == dst_img->mem_type && 0 != dst_img->base) dst_phys_addr = dst_img->base; else { - LOGE("%s::get_dst_phys_addr fail ", __func__); + ALOGE("%s::get_dst_phys_addr fail ", __func__); dst_phys_addr = 0; } return dst_phys_addr; @@ -639,7 +639,7 @@ static int runcFimcCore(struct hwc_context_t *ctx, /* check minimum */ if (src_rect->w < 16 || src_rect->h < 8) { - LOGE("%s src size is not supported by fimc : f_w=%d f_h=%d x=%d y=%d \ + ALOGE("%s src size is not supported by fimc : f_w=%d f_h=%d x=%d y=%d \ w=%d h=%d (ow=%d oh=%d) format=0x%x", __func__, params->src.full_width, params->src.full_height, params->src.start_x, params->src.start_y, params->src.width, @@ -708,7 +708,7 @@ switch (rotate_value) { /* check minimum */ if (dst_rect->w < 8 || dst_rect->h < 4) { - LOGE("%s dst size is not supported by fimc : \ + ALOGE("%s dst size is not supported by fimc : \ f_w=%d f_h=%d x=%d y=%d w=%d h=%d (ow=%d oh=%d) format=0x%x", __func__, params->dst.full_width, params->dst.full_height, params->dst.start_x, params->dst.start_y, params->dst.width, @@ -724,7 +724,7 @@ switch (rotate_value) { ((src_rect->w / dst_rect->w) > MAX_RESIZING_RATIO_LIMIT)) || ((dst_rect->w > src_rect->w) && ((dst_rect->w / src_rect->w) > MAX_RESIZING_RATIO_LIMIT))) { - LOGE("%s over scaling limit : src.w=%d dst.w=%d (limit=%d)", + ALOGE("%s over scaling limit : src.w=%d dst.w=%d (limit=%d)", __func__, src_rect->w, dst_rect->w, MAX_RESIZING_RATIO_LIMIT); return -1; } @@ -789,24 +789,24 @@ int createFimc(s5p_fimc_t *fimc) fimc->dev_fd = open(PP_DEVICE_DEV_NAME, O_RDWR); if (fimc->dev_fd < 0) { - LOGE("%s::Post processor open error (%d)", __func__, errno); + ALOGE("%s::Post processor open error (%d)", __func__, errno); goto err; } } /* check capability */ if (ioctl(fimc->dev_fd, VIDIOC_QUERYCAP, &cap) < 0) { - LOGE("VIDIOC_QUERYCAP failed"); + ALOGE("VIDIOC_QUERYCAP failed"); goto err; } if (!(cap.capabilities & V4L2_CAP_STREAMING)) { - LOGE("%d has no streaming support", fimc->dev_fd); + ALOGE("%d has no streaming support", fimc->dev_fd); goto err; } if (!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT)) { - LOGE("%d is no video output", fimc->dev_fd); + ALOGE("%d is no video output", fimc->dev_fd); goto err; } @@ -815,7 +815,7 @@ int createFimc(s5p_fimc_t *fimc) */ fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; if (ioctl(fimc->dev_fd, VIDIOC_G_FMT, &fmt) < 0) { - LOGE("%s::Error in video VIDIOC_G_FMT", __func__); + ALOGE("%s::Error in video VIDIOC_G_FMT", __func__); goto err; } @@ -823,7 +823,7 @@ int createFimc(s5p_fimc_t *fimc) vc.value = 0; if (ioctl(fimc->dev_fd, VIDIOC_G_CTRL, &vc) < 0) { - LOGE("%s::Error in video VIDIOC_G_CTRL", __func__); + ALOGE("%s::Error in video VIDIOC_G_CTRL", __func__); goto err; } fimc->hw_ver = vc.value; diff --git a/liblight/lights.c b/liblight/lights.c index 02187a7..1b54896 100755 --- a/liblight/lights.c +++ b/liblight/lights.c @@ -48,7 +48,7 @@ static int write_int(char const *path, int value) return amt == -1 ? -errno : 0; } else { if (already_warned == 0) { - LOGE("write_int failed to open %s\n", path); + ALOGE("write_int failed to open %s\n", path); already_warned = 1; } return -errno; diff --git a/libs3cjpeg/JpegEncoder.cpp b/libs3cjpeg/JpegEncoder.cpp index fb70a07..d2b6a6f 100644 --- a/libs3cjpeg/JpegEncoder.cpp +++ b/libs3cjpeg/JpegEncoder.cpp @@ -40,7 +40,7 @@ JpegEncoder::JpegEncoder() : available(false) mDevFd = open(JPG_DRIVER_NAME, O_RDWR); if (mDevFd < 0) { - LOGE("Failed to open the device"); + ALOGE("Failed to open the device"); return; } @@ -52,20 +52,20 @@ JpegEncoder::JpegEncoder() : available(false) 0); if (mArgs.mmapped_addr == MAP_FAILED) { - LOGE("Failed to mmap"); + ALOGE("Failed to mmap"); return; } mArgs.enc_param = new jpg_enc_proc_param; if (mArgs.enc_param == NULL) { - LOGE("Failed to allocate the memory for enc_param"); + ALOGE("Failed to allocate the memory for enc_param"); return; } memset(mArgs.enc_param, 0, sizeof(jpg_enc_proc_param)); mArgs.thumb_enc_param = new jpg_enc_proc_param; if (mArgs.thumb_enc_param == NULL) { - LOGE("Failed to allocate the memory for thumb_enc_param"); + ALOGE("Failed to allocate the memory for thumb_enc_param"); delete mArgs.enc_param; return; } @@ -154,12 +154,12 @@ jpg_return_status JpegEncoder::setConfig(jpeg_conf type, int32_t value) break; default: - LOGE("Invalid Config type"); + ALOGE("Invalid Config type"); ret = ERR_UNKNOWN; } if (ret == JPG_FAIL) - LOGE("Invalid value(%d) for %d type", value, type); + ALOGE("Invalid value(%d) for %d type", value, type); return ret; } @@ -170,7 +170,7 @@ void* JpegEncoder::getInBuf(uint64_t size) return NULL; if (size > JPG_FRAME_BUF_SIZE) { - LOGE("The buffer size requested is too large"); + ALOGE("The buffer size requested is too large"); return NULL; } mArgs.in_buf = (char *)ioctl(mDevFd, IOCTL_JPG_GET_FRMBUF, mArgs.mmapped_addr); @@ -183,7 +183,7 @@ void* JpegEncoder::getOutBuf(uint64_t *size) return NULL; if (mArgs.enc_param->file_size <= 0) { - LOGE("The buffer requested doesn't have data"); + ALOGE("The buffer requested doesn't have data"); return NULL; } mArgs.out_buf = (char *)ioctl(mDevFd, IOCTL_JPG_GET_STRBUF, mArgs.mmapped_addr); @@ -197,7 +197,7 @@ void* JpegEncoder::getThumbInBuf(uint64_t size) return NULL; if (size > JPG_FRAME_THUMB_BUF_SIZE) { - LOGE("The buffer size requested is too large"); + ALOGE("The buffer size requested is too large"); return NULL; } mArgs.in_thumb_buf = (char *)ioctl(mDevFd, IOCTL_JPG_GET_THUMB_FRMBUF, mArgs.mmapped_addr); @@ -210,7 +210,7 @@ void* JpegEncoder::getThumbOutBuf(uint64_t *size) return NULL; if (mArgs.thumb_enc_param->file_size <= 0) { - LOGE("The buffer requested doesn't have data"); + ALOGE("The buffer requested doesn't have data"); return NULL; } mArgs.out_thumb_buf = (char *)ioctl(mDevFd, IOCTL_JPG_GET_THUMB_STRBUF, mArgs.mmapped_addr); @@ -236,7 +236,7 @@ jpg_return_status JpegEncoder::encode(unsigned int *size, exif_attribute_t *exif param->enc_type = JPG_MAIN; ret = (jpg_return_status)ioctl(mDevFd, IOCTL_JPG_ENCODE, &mArgs); if (ret != JPG_SUCCESS) { - LOGE("Failed to encode main image"); + ALOGE("Failed to encode main image"); return ret; } @@ -249,7 +249,7 @@ jpg_return_status JpegEncoder::encode(unsigned int *size, exif_attribute_t *exif if (exifInfo->enableThumb) { ret = encodeThumbImg(&thumbLen); if (ret != JPG_SUCCESS) { - LOGE("Failed to encode for thumbnail image"); + ALOGE("Failed to encode for thumbnail image"); bufSize = EXIF_FILE_SIZE; exifInfo->enableThumb = false; } else { @@ -264,14 +264,14 @@ jpg_return_status JpegEncoder::encode(unsigned int *size, exif_attribute_t *exif exifOut = new unsigned char[bufSize]; if (exifOut == NULL) { - LOGE("Failed to allocate for exifOut"); + ALOGE("Failed to allocate for exifOut"); return ret; } memset(exifOut, 0, bufSize); ret = makeExif (exifOut, exifInfo, &exifLen); if (ret != JPG_SUCCESS) { - LOGE("Failed to make EXIF"); + ALOGE("Failed to make EXIF"); delete[] exifOut; return ret; } @@ -313,7 +313,7 @@ jpg_return_status JpegEncoder::encodeThumbImg(unsigned int *size, bool useMain) if (useMain) { mArgs.in_thumb_buf = (char *)getThumbInBuf(param->width*param->height*2); if (mArgs.in_thumb_buf == NULL) { - LOGE("Failed to get the buffer for thumbnail"); + ALOGE("Failed to get the buffer for thumbnail"); return JPG_FAIL; } @@ -334,7 +334,7 @@ jpg_return_status JpegEncoder::encodeThumbImg(unsigned int *size, bool useMain) mArgs.enc_param->enc_type = JPG_THUMBNAIL; ret = (jpg_return_status)ioctl(mDevFd, IOCTL_JPG_ENCODE, &mArgs); if (ret != JPG_SUCCESS) { - LOGE("Failed to encode for thumbnail"); + ALOGE("Failed to encode for thumbnail"); return JPG_FAIL; } @@ -625,7 +625,7 @@ jpg_return_status JpegEncoder::checkMcu(sample_mode_t sampleMode, break; default: - LOGE("Invaild sample mode"); + ALOGE("Invaild sample mode"); return JPG_FAIL; } @@ -638,7 +638,7 @@ jpg_return_status JpegEncoder::checkMcu(sample_mode_t sampleMode, char *srcBuf, *dstBuf; if ((srcBuf = new char[size]) == NULL) { - LOGE("Failed to allocate for srcBuf"); + ALOGE("Failed to allocate for srcBuf"); return JPG_FAIL; } @@ -662,7 +662,7 @@ bool JpegEncoder::pad(char *srcBuf, uint32_t srcWidth, uint32_t srcHight, return false; if (srcBuf == NULL || dstBuf == NULL) { - LOGE("srcBuf or dstBuf is NULL"); + ALOGE("srcBuf or dstBuf is NULL"); return false; } @@ -671,7 +671,7 @@ bool JpegEncoder::pad(char *srcBuf, uint32_t srcWidth, uint32_t srcHight, if ((int)(dstWidth - srcWidth) < 0 || (int)(dstHight - srcHight) < 0) { - LOGE("dstSize is smaller than srcSize"); + ALOGE("dstSize is smaller than srcSize"); return false; } memset(dstBuf, 0, dstWidth*dstHight * 2); @@ -693,7 +693,7 @@ bool JpegEncoder::scaleDownYuv422(char *srcBuf, uint32_t srcWidth, uint32_t srcH int32_t x, y, src_y_start_pos, dst_pos, src_pos; if (dstWidth % 2 != 0 || dstHight % 2 != 0){ - LOGE("scale_down_yuv422: invalid width, height for scaling"); + ALOGE("scale_down_yuv422: invalid width, height for scaling"); return false; } diff --git a/libsensors/AkmSensor.cpp b/libsensors/AkmSensor.cpp index 34a24f2..ce28dbf 100644 --- a/libsensors/AkmSensor.cpp +++ b/libsensors/AkmSensor.cpp @@ -163,7 +163,7 @@ int AkmSensor::enable(int32_t handle, int en) else err = akm_disable_sensor(sensor_type); - LOGE_IF(err, "Could not change sensor state (%s)", strerror(-err)); + ALOGE_IF(err, "Could not change sensor state (%s)", strerror(-err)); if (!err) { mEnabled &= ~(1<<what); mEnabled |= (uint32_t(flags)<<what); @@ -200,7 +200,7 @@ int AkmSensor::loadAKMLibrary() akm_enable_sensor = stub_enable_disable_sensor; akm_disable_sensor = stub_enable_disable_sensor; akm_set_delay = stub_set_delay; - LOGE("AkmSensor: unable to load AKM Library, %s", dlerror()); + ALOGE("AkmSensor: unable to load AKM Library, %s", dlerror()); return -ENOENT; } @@ -246,7 +246,7 @@ int AkmSensor::readEvents(sensors_event_t* data, int count) mInputReader.next(); } } else { - LOGE("AkmSensor: unknown event (type=%d, code=%d)", + ALOGE("AkmSensor: unknown event (type=%d, code=%d)", type, event->code); mInputReader.next(); } diff --git a/libsensors/GyroSensor.cpp b/libsensors/GyroSensor.cpp index ecebb61..c54235d 100644 --- a/libsensors/GyroSensor.cpp +++ b/libsensors/GyroSensor.cpp @@ -164,7 +164,7 @@ again: count--; } } else { - LOGE("GyroSensor: unknown event (type=%d, code=%d)", + ALOGE("GyroSensor: unknown event (type=%d, code=%d)", type, event->code); } mInputReader.next(); diff --git a/libsensors/LightSensor.cpp b/libsensors/LightSensor.cpp index 5df7cd5..fe0b8b3 100644 --- a/libsensors/LightSensor.cpp +++ b/libsensors/LightSensor.cpp @@ -136,7 +136,7 @@ int LightSensor::readEvents(sensors_event_t* data, int count) numEventReceived++; } } else { - LOGE("LightSensor: unknown event (type=%d, code=%d)", + ALOGE("LightSensor: unknown event (type=%d, code=%d)", type, event->code); } mInputReader.next(); diff --git a/libsensors/ProximitySensor.cpp b/libsensors/ProximitySensor.cpp index 794a586..77a7f3c 100644 --- a/libsensors/ProximitySensor.cpp +++ b/libsensors/ProximitySensor.cpp @@ -129,7 +129,7 @@ int ProximitySensor::readEvents(sensors_event_t* data, int count) numEventReceived++; } } else { - LOGE("ProximitySensor: unknown event (type=%d, code=%d)", + ALOGE("ProximitySensor: unknown event (type=%d, code=%d)", type, event->code); } mInputReader.next(); diff --git a/libsensors/SensorBase.cpp b/libsensors/SensorBase.cpp index d448eb2..79b1ee2 100644 --- a/libsensors/SensorBase.cpp +++ b/libsensors/SensorBase.cpp @@ -53,7 +53,7 @@ SensorBase::~SensorBase() { int SensorBase::open_device() { if (dev_fd<0 && dev_name) { dev_fd = open(dev_name, O_RDONLY); - LOGE_IF(dev_fd<0, "Couldn't open %s (%s)", dev_name, strerror(errno)); + ALOGE_IF(dev_fd<0, "Couldn't open %s (%s)", dev_name, strerror(errno)); } return 0; } @@ -123,6 +123,6 @@ int SensorBase::openInput(const char* inputName) { } } closedir(dir); - LOGE_IF(fd<0, "couldn't find '%s' input device", inputName); + ALOGE_IF(fd<0, "couldn't find '%s' input device", inputName); return fd; } diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp index 847f3ca..850cbf9 100644 --- a/libsensors/sensors.cpp +++ b/libsensors/sensors.cpp @@ -190,7 +190,7 @@ sensors_poll_context_t::sensors_poll_context_t() int wakeFds[2]; int result = pipe(wakeFds); - LOGE_IF(result<0, "error creating wake pipe (%s)", strerror(errno)); + ALOGE_IF(result<0, "error creating wake pipe (%s)", strerror(errno)); fcntl(wakeFds[0], F_SETFL, O_NONBLOCK); fcntl(wakeFds[1], F_SETFL, O_NONBLOCK); mWritePipeFd = wakeFds[1]; @@ -215,7 +215,7 @@ int sensors_poll_context_t::activate(int handle, int enabled) { if (enabled && !err) { const char wakeMessage(WAKE_MESSAGE); int result = write(mWritePipeFd, &wakeMessage, 1); - LOGE_IF(result<0, "error sending wake message (%s)", strerror(errno)); + ALOGE_IF(result<0, "error sending wake message (%s)", strerror(errno)); } return err; } @@ -256,14 +256,14 @@ int sensors_poll_context_t::pollEvents(sensors_event_t* data, int count) n = poll(mPollFds, numFds, nbEvents ? 0 : -1); } while (n < 0 && errno == EINTR); if (n<0) { - LOGE("poll() failed (%s)", strerror(errno)); + ALOGE("poll() failed (%s)", strerror(errno)); return -errno; } if (mPollFds[wake].revents & POLLIN) { char msg; int result = read(mPollFds[wake].fd, &msg, 1); - LOGE_IF(result<0, "error reading from wake pipe (%s)", strerror(errno)); - LOGE_IF(msg != WAKE_MESSAGE, "unknown message on wake queue (0x%02x)", int(msg)); + ALOGE_IF(result<0, "error reading from wake pipe (%s)", strerror(errno)); + ALOGE_IF(msg != WAKE_MESSAGE, "unknown message on wake queue (0x%02x)", int(msg)); mPollFds[wake].revents = 0; } } diff --git a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/dec/src/SsbSipMfcDecAPI.c b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/dec/src/SsbSipMfcDecAPI.c index 592ebd6..6c64ef8 100644 --- a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/dec/src/SsbSipMfcDecAPI.c +++ b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/dec/src/SsbSipMfcDecAPI.c @@ -94,14 +94,14 @@ void *SsbSipMfcDecOpen(void *value) pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB)); if (pCTX == NULL) { - LOGE("SsbSipMfcDecOpen: malloc failed.\n"); + ALOGE("SsbSipMfcDecOpen: malloc failed.\n"); return NULL; } memset(pCTX, 0, sizeof(_MFCLIB)); hMFCOpen = open(S5PC110_MFC_DEV_NAME, O_RDWR | O_NDELAY); if (hMFCOpen < 0) { - LOGE("SsbSipMfcDecOpen: MFC Open failure\n"); + ALOGE("SsbSipMfcDecOpen: MFC Open failure\n"); return NULL; } @@ -110,15 +110,15 @@ void *SsbSipMfcDecOpen(void *value) DecArg.args.buf_type = *(unsigned int *)value; ret_code = ioctl(hMFCOpen, IOCTL_MFC_BUF_CACHE, &DecArg); if (DecArg.ret_code != MFC_RET_OK) { - LOGE("SsbSipMfcDecOpenExt: IOCTL_MFC_BUF_CACHE (%d) failed\n", DecArg.ret_code); + ALOGE("SsbSipMfcDecOpenExt: IOCTL_MFC_BUF_CACHE (%d) failed\n", DecArg.ret_code); } } else { - LOGE("SsbSipMfcDecOpenExt: value is invalid, value: %d\n", *(int *)value); + ALOGE("SsbSipMfcDecOpenExt: value is invalid, value: %d\n", *(int *)value); } mapped_addr = (unsigned int)mmap(0, MMAP_BUFFER_SIZE_MMAP, PROT_READ | PROT_WRITE, MAP_SHARED, hMFCOpen, 0); if (!mapped_addr) { - LOGE("SsbSipMfcDecOpen: FIMV5.0 driver address mapping failed\n"); + ALOGE("SsbSipMfcDecOpen: FIMV5.0 driver address mapping failed\n"); return NULL; } @@ -138,7 +138,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcDecSetConfig: openHandle is NULL\n"); + ALOGE("SsbSipMfcDecSetConfig: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -157,7 +157,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c (codec_type != XVID_DEC) && (codec_type != VC1RCV_DEC) && (codec_type != VC1_DEC)) { - LOGE("SsbSipMfcDecOpen: Undefined codec type.\n"); + ALOGE("SsbSipMfcDecOpen: Undefined codec type.\n"); return MFC_RET_INVALID_PARAM; } @@ -182,7 +182,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecInit(void *openHandle, SSBSIP_MFC_CODEC_TYPE c ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_DEC_INIT, &DecArg); if (DecArg.ret_code != MFC_RET_OK) { - LOGE("SsbSipMfcDecInit: IOCTL_MFC_DEC_INIT (%d) failed\n", DecArg.ret_code); + ALOGE("SsbSipMfcDecInit: IOCTL_MFC_DEC_INIT (%d) failed\n", DecArg.ret_code); return MFC_RET_DEC_INIT_FAIL; } @@ -218,12 +218,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) mfc_common_args DecArg; if (openHandle == NULL) { - LOGE("SsbSipMfcDecExe: openHandle is NULL\n"); + ALOGE("SsbSipMfcDecExe: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } if ((lengthBufFill < 0) || (lengthBufFill > MAX_DECODER_INPUT_BUFFER_SIZE)) { - LOGE("SsbSipMfcDecExe: lengthBufFill is invalid. (lengthBufFill=%d)\n", lengthBufFill); + ALOGE("SsbSipMfcDecExe: lengthBufFill is invalid. (lengthBufFill=%d)\n", lengthBufFill); return MFC_RET_INVALID_PARAM; } @@ -241,7 +241,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecExe(void *openHandle, int lengthBufFill) ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_DEC_EXE, &DecArg); if (DecArg.ret_code != MFC_RET_OK) { - LOGE("SsbSipMfcDecExe: IOCTL_MFC_DEC_EXE failed(ret : %d)\n", DecArg.ret_code); + ALOGE("SsbSipMfcDecExe: IOCTL_MFC_DEC_EXE failed(ret : %d)\n", DecArg.ret_code); return MFC_RET_DEC_EXE_ERR; } @@ -274,7 +274,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecClose(void *openHandle) mfc_common_args free_arg; if (openHandle == NULL) { - LOGE("SsbSipMfcDecClose: openHandle is NULL\n"); + ALOGE("SsbSipMfcDecClose: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -308,12 +308,12 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSiz mfc_common_args user_addr_arg, phys_addr_arg; if (inputBufferSize < 0) { - LOGE("SsbSipMfcDecGetInBuf: inputBufferSize = %d is invalid\n", inputBufferSize); + ALOGE("SsbSipMfcDecGetInBuf: inputBufferSize = %d is invalid\n", inputBufferSize); return NULL; } if (openHandle == NULL) { - LOGE("SsbSipMfcDecGetInBuf: openHandle is NULL\n"); + ALOGE("SsbSipMfcDecGetInBuf: openHandle is NULL\n"); return NULL; } @@ -324,7 +324,7 @@ void *SsbSipMfcDecGetInBuf(void *openHandle, void **phyInBuf, int inputBufferSiz user_addr_arg.args.mem_alloc.mapped_addr = pCTX->mapped_addr; ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_IN_BUF, &user_addr_arg); if (ret_code < 0) { - LOGE("SsbSipMfcDecGetInBuf: IOCTL_MFC_GET_IN_BUF failed\n"); + ALOGE("SsbSipMfcDecGetInBuf: IOCTL_MFC_GET_IN_BUF failed\n"); return NULL; } pCTX->virStrmBuf = user_addr_arg.args.mem_alloc.out_uaddr; @@ -342,7 +342,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetInBuf(void *openHandle, void *phyInBuf, voi _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcDecSetInBuf: openHandle is NULL\n"); + ALOGE("SsbSipMfcDecSetInBuf: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -359,7 +359,7 @@ SSBSIP_MFC_DEC_OUTBUF_STATUS SsbSipMfcDecGetOutBuf(void *openHandle, SSBSIP_MFC_ _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcDecGetOutBuf: openHandle is NULL\n"); + ALOGE("SsbSipMfcDecGetOutBuf: openHandle is NULL\n"); return MFC_GETOUTBUF_DISPLAY_END; } @@ -401,12 +401,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON SSBSIP_MFC_IMG_RESOLUTION *img_resolution; if (openHandle == NULL) { - LOGE("SsbSipMfcDecSetConfig: openHandle is NULL\n"); + ALOGE("SsbSipMfcDecSetConfig: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("SsbSipMfcDecSetConfig: value is NULL\n"); + ALOGE("SsbSipMfcDecSetConfig: value is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -437,13 +437,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecSetConfig(void *openHandle, SSBSIP_MFC_DEC_CON return MFC_RET_OK; default: - LOGE("SsbSipMfcDecSetConfig: No such conf_type is supported.\n"); + ALOGE("SsbSipMfcDecSetConfig: No such conf_type is supported.\n"); return MFC_RET_INVALID_PARAM; } ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_SET_CONFIG, &DecArg); if (DecArg.ret_code != MFC_RET_OK) { - LOGE("SsbSipMfcDecSetConfig: IOCTL_MFC_SET_CONFIG failed(ret : %d, conf_type: %d)\n", DecArg.ret_code, conf_type); + ALOGE("SsbSipMfcDecSetConfig: IOCTL_MFC_SET_CONFIG failed(ret : %d, conf_type: %d)\n", DecArg.ret_code, conf_type); return MFC_RET_DEC_SET_CONF_FAIL; } @@ -461,12 +461,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON MFC_CRC_DATA *crc_data; if (openHandle == NULL) { - LOGE("SsbSipMfcDecGetConfig: openHandle is NULL\n"); + ALOGE("SsbSipMfcDecGetConfig: openHandle is NULL\n"); return MFC_RET_FAIL; } if (value == NULL) { - LOGE("SsbSipMfcDecGetConfig: value is NULL\n"); + ALOGE("SsbSipMfcDecGetConfig: value is NULL\n"); return MFC_RET_FAIL; } @@ -498,7 +498,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_CONFIG, &DecArg); if (DecArg.ret_code != MFC_RET_OK) { - LOGE("SsbSipMfcDecGetConfig: IOCTL_MFC_GET_CONFIG failed(ret : %d, conf_type: %d)\n", DecArg.ret_code, conf_type); + ALOGE("SsbSipMfcDecGetConfig: IOCTL_MFC_GET_CONFIG failed(ret : %d, conf_type: %d)\n", DecArg.ret_code, conf_type); return MFC_RET_DEC_GET_CONF_FAIL; } crc_data->luma0 = DecArg.args.get_config.out_config_value[0]; @@ -510,7 +510,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcDecGetConfig(void *openHandle, SSBSIP_MFC_DEC_CON break; default: - LOGE("SsbSipMfcDecGetConfig: No such conf_type is supported.\n"); + ALOGE("SsbSipMfcDecGetConfig: No such conf_type is supported.\n"); return MFC_RET_INVALID_PARAM; } diff --git a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/src/SsbSipMfcEncAPI.c b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/src/SsbSipMfcEncAPI.c index 9534be7..a27fcc0 100644 --- a/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/src/SsbSipMfcEncAPI.c +++ b/sec_mm/sec_omx/sec_codecs/video/mfc_c110/enc/src/SsbSipMfcEncAPI.c @@ -40,13 +40,13 @@ void *SsbSipMfcEncOpen(void *value) hMFCOpen = open(S5PC110_MFC_DEV_NAME, O_RDWR | O_NDELAY); if (hMFCOpen < 0) { - LOGE("SsbSipMfcEncOpen: MFC Open failure\n"); + ALOGE("SsbSipMfcEncOpen: MFC Open failure\n"); return NULL; } pCTX = (_MFCLIB *)malloc(sizeof(_MFCLIB)); if (pCTX == NULL) { - LOGE("SsbSipMfcEncOpen: malloc failed.\n"); + ALOGE("SsbSipMfcEncOpen: malloc failed.\n"); close(hMFCOpen); return NULL; } @@ -56,15 +56,15 @@ void *SsbSipMfcEncOpen(void *value) EncArg.args.buf_type = *(unsigned int *)value; ret_code = ioctl(hMFCOpen, IOCTL_MFC_BUF_CACHE, &EncArg); if (EncArg.ret_code != MFC_RET_OK) { - LOGE("SsbSipMfcDecOpenExt: IOCTL_MFC_BUF_CACHE (%d) failed\n", EncArg.ret_code); + ALOGE("SsbSipMfcDecOpenExt: IOCTL_MFC_BUF_CACHE (%d) failed\n", EncArg.ret_code); } } else { - LOGE("SsbSipMfcDecOpenExt: value is invalid, value: %d\n", *(int *)value); + ALOGE("SsbSipMfcDecOpenExt: value is invalid, value: %d\n", *(int *)value); } mapped_addr = (unsigned int)mmap(0, MMAP_BUFFER_SIZE_MMAP, PROT_READ | PROT_WRITE, MAP_SHARED, hMFCOpen, 0); if (!mapped_addr) { - LOGE("SsbSipMfcEncOpen: FIMV5.0 driver address mapping failed\n"); + ALOGE("SsbSipMfcEncOpen: FIMV5.0 driver address mapping failed\n"); return NULL; } @@ -102,7 +102,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) if ((codec_type != MPEG4_ENC) && (codec_type != H264_ENC) && (codec_type != H263_ENC)) { - LOGE("SsbSipMfcEncOpen: Undefined codec type.\n"); + ALOGE("SsbSipMfcEncOpen: Undefined codec type.\n"); return MFC_RET_INVALID_PARAM; } @@ -156,7 +156,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init_mpeg4.in_MS_size = mpeg4_arg->SliceArgument; if (mpeg4_arg->NumberBFrames > 2) { - LOGE("SsbSipMfcEncInit: No such BframeNum is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such BframeNum is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_mpeg4.in_BframeNum = mpeg4_arg->NumberBFrames; @@ -165,7 +165,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) /* rate control*/ EncArg.args.enc_init_mpeg4.in_RC_frm_enable = mpeg4_arg->EnableFRMRateControl; if ((mpeg4_arg->QSCodeMin > 51) || (mpeg4_arg->QSCodeMax > 51)) { - LOGE("SsbSipMfcEncInit: No such Min/Max QP is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such Min/Max QP is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_mpeg4.in_RC_qbound = ENC_RC_QBOUND(mpeg4_arg->QSCodeMin, mpeg4_arg->QSCodeMax); @@ -174,7 +174,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) /* pad control */ EncArg.args.enc_init_mpeg4.in_pad_ctrl_on = mpeg4_arg->PadControlOn; if ((mpeg4_arg->LumaPadVal > 255) || (mpeg4_arg->CbPadVal > 255) || (mpeg4_arg->CrPadVal > 255)) { - LOGE("SsbSipMfcEncInit: No such Pad value is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such Pad value is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_mpeg4.in_luma_pad_val = mpeg4_arg->LumaPadVal; @@ -187,7 +187,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init_mpeg4.in_RC_framerate = (mpeg4_arg->TimeIncreamentRes / mpeg4_arg->VopTimeIncreament); EncArg.args.enc_init_mpeg4.in_RC_bitrate = mpeg4_arg->Bitrate; if ((mpeg4_arg->FrameQp > 51) || (mpeg4_arg->FrameQp_P) > 51 || (mpeg4_arg->FrameQp_B > 51)) { - LOGE("SsbSipMfcEncInit: No such FrameQp is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such FrameQp is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_mpeg4.in_frame_qp = mpeg4_arg->FrameQp; @@ -217,7 +217,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) /* rate control*/ EncArg.args.enc_init_mpeg4.in_RC_frm_enable = h263_arg->EnableFRMRateControl; if ((h263_arg->QSCodeMin > 51) || (h263_arg->QSCodeMax > 51)) { - LOGE("SsbSipMfcEncInit: No such Min/Max QP is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such Min/Max QP is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_mpeg4.in_RC_qbound = ENC_RC_QBOUND(h263_arg->QSCodeMin, h263_arg->QSCodeMax); @@ -226,7 +226,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) /* pad control */ EncArg.args.enc_init_mpeg4.in_pad_ctrl_on = h263_arg->PadControlOn; if ((h263_arg->LumaPadVal > 255) || (h263_arg->CbPadVal > 255) || (h263_arg->CrPadVal > 255)) { - LOGE("SsbSipMfcEncInit: No such Pad value is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such Pad value is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_mpeg4.in_luma_pad_val = h263_arg->LumaPadVal; @@ -237,7 +237,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init_mpeg4.in_RC_framerate = h263_arg->FrameRate; EncArg.args.enc_init_mpeg4.in_RC_bitrate = h263_arg->Bitrate; if (h263_arg->FrameQp > 51) { - LOGE("SsbSipMfcEncInit: No such FrameQp is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such FrameQp is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_mpeg4.in_frame_qp = h263_arg->FrameQp; @@ -259,7 +259,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init_h264.in_gop_num = h264_arg->IDRPeriod; if ((h264_arg->NumberRefForPframes > 2) || (h264_arg->NumberReferenceFrames > 2)) { - LOGE("SsbSipMfcEncInit: No such ref Num is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such ref Num is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_h264.in_reference_num = h264_arg->NumberReferenceFrames; @@ -269,20 +269,20 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) (h264_arg->SliceMode == 2) || (h264_arg->SliceMode == 4)) { EncArg.args.enc_init_h264.in_MS_mode = h264_arg->SliceMode; } else { - LOGE("SsbSipMfcEncInit: No such slice mode is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such slice mode is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_h264.in_MS_size = h264_arg->SliceArgument; if (h264_arg->NumberBFrames > 2) { - LOGE("SsbSipMfcEncInit: No such BframeNum is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such BframeNum is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_h264.in_BframeNum = h264_arg->NumberBFrames; EncArg.args.enc_init_h264.in_deblock_filt = h264_arg->LoopFilterDisable; if ((abs(h264_arg->LoopFilterAlphaC0Offset) > 6) || (abs(h264_arg->LoopFilterBetaOffset) > 6)) { - LOGE("SsbSipMfcEncInit: No such AlphaC0Offset or BetaOffset is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such AlphaC0Offset or BetaOffset is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_h264.in_deblock_alpha_C0 = h264_arg->LoopFilterAlphaC0Offset; @@ -297,7 +297,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) /* pad control */ EncArg.args.enc_init_h264.in_pad_ctrl_on = h264_arg->PadControlOn; if ((h264_arg->LumaPadVal > 255) || (h264_arg->CbPadVal > 255) || (h264_arg->CrPadVal > 255)) { - LOGE("SsbSipMfcEncInit: No such Pad value is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such Pad value is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_h264.in_luma_pad_val = h264_arg->LumaPadVal; @@ -311,7 +311,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init_h264.in_RC_framerate = h264_arg->FrameRate; EncArg.args.enc_init_h264.in_RC_bitrate = h264_arg->Bitrate; if (h264_arg->FrameQp > 51) { - LOGE("SsbSipMfcEncInit: No such FrameQp is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such FrameQp is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_h264.in_frame_qp = h264_arg->FrameQp; @@ -325,7 +325,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) EncArg.args.enc_init_h264.in_frame_B_qp = h264_arg->FrameQp; if ((h264_arg->QSCodeMin > 51) || (h264_arg->QSCodeMax > 51)) { - LOGE("SsbSipMfcEncInit: No such Min/Max QP is supported.\n"); + ALOGE("SsbSipMfcEncInit: No such Min/Max QP is supported.\n"); return MFC_RET_INVALID_PARAM; } EncArg.args.enc_init_h264.in_RC_qbound = ENC_RC_QBOUND(h264_arg->QSCodeMin, h264_arg->QSCodeMax); @@ -348,7 +348,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncInit(void *openHandle, void *param) ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_ENC_INIT, &EncArg); if (EncArg.ret_code != MFC_RET_OK) { - LOGE("SsbSipMfcEncInit: IOCTL_MFC_ENC_INIT (%d) failed\n", EncArg.ret_code); + ALOGE("SsbSipMfcEncInit: IOCTL_MFC_ENC_INIT (%d) failed\n", EncArg.ret_code); return MFC_RET_ENC_INIT_FAIL; } @@ -371,7 +371,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) mfc_common_args EncArg; if (openHandle == NULL) { - LOGE("SsbSipMfcEncExe: openHandle is NULL\n"); + ALOGE("SsbSipMfcEncExe: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -397,7 +397,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncExe(void *openHandle) ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_ENC_EXE, &EncArg); if (EncArg.ret_code != MFC_RET_OK) { - LOGE("SsbSipMfcDecExe: IOCTL_MFC_ENC_EXE failed(ret : %d)\n", EncArg.ret_code); + ALOGE("SsbSipMfcDecExe: IOCTL_MFC_ENC_EXE failed(ret : %d)\n", EncArg.ret_code); return MFC_RET_ENC_EXE_ERR; } @@ -418,7 +418,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncClose(void *openHandle) mfc_common_args free_arg; if (openHandle == NULL) { - LOGE("SsbSipMfcEncClose: openHandle is NULL\n"); + ALOGE("SsbSipMfcEncClose: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -475,7 +475,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU int aligned_y_size, aligned_c_size; if (openHandle == NULL) { - LOGE("SsbSipMfcEncGetInBuf: openHandle is NULL\n"); + ALOGE("SsbSipMfcEncGetInBuf: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -494,7 +494,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU user_addr_arg.args.mem_alloc.mapped_addr = pCTX->mapped_addr; ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_GET_IN_BUF, &user_addr_arg); if (ret_code < 0) { - LOGE("SsbSipMfcEncGetInBuf: IOCTL_MFC_GET_IN_BUF failed\n"); + ALOGE("SsbSipMfcEncGetInBuf: IOCTL_MFC_GET_IN_BUF failed\n"); return MFC_RET_ENC_GET_INBUF_FAIL; } pCTX->virFrmBuf.luma = user_addr_arg.args.mem_alloc.out_uaddr; @@ -522,7 +522,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetInBuf(void *openHandle, SSBSIP_MFC_ENC_INPU _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcEncSetInBuf: openHandle is NULL\n"); + ALOGE("SsbSipMfcEncSetInBuf: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -546,7 +546,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcEncGetOutBuf: openHandle is NULL\n"); + ALOGE("SsbSipMfcEncGetOutBuf: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -577,7 +577,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetOutBuf(void *openHandle, SSBSIP_MFC_ENC_OUT else if (pCTX->encodedframeType == 4) output_info->frameType = MFC_FRAME_TYPE_OTHERS; else { - LOGE("Strange encoded frame type = %d\n", pCTX->encodedframeType); + ALOGE("Strange encoded frame type = %d\n", pCTX->encodedframeType); return MFC_RET_INVALID_PARAM; } @@ -592,7 +592,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetOutBuf(void *openHandle, void *phyOutbuf, v _MFCLIB *pCTX; if (openHandle == NULL) { - LOGE("SsbSipMfcEncSetOutBuf: openHandle is NULL\n"); + ALOGE("SsbSipMfcEncSetOutBuf: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -612,12 +612,12 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON mfc_common_args EncArg; if (openHandle == NULL) { - LOGE("SsbSipMfcEncSetConfig: openHandle is NULL\n"); + ALOGE("SsbSipMfcEncSetConfig: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("SsbSipMfcEncSetConfig: value is NULL\n"); + ALOGE("SsbSipMfcEncSetConfig: value is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -639,13 +639,13 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncSetConfig(void *openHandle, SSBSIP_MFC_ENC_CON return MFC_RET_OK; default: - LOGE("SsbSipMfcEncSetConfig: No such conf_type is supported.\n"); + ALOGE("SsbSipMfcEncSetConfig: No such conf_type is supported.\n"); return MFC_RET_INVALID_PARAM; } ret_code = ioctl(pCTX->hMFC, IOCTL_MFC_SET_CONFIG, &EncArg); if (EncArg.ret_code != MFC_RET_OK) { - LOGE("SsbSipMfcEncSetConfig: IOCTL_MFC_SET_CONFIG failed(ret : %d)\n", EncArg.ret_code); + ALOGE("SsbSipMfcEncSetConfig: IOCTL_MFC_SET_CONFIG failed(ret : %d)\n", EncArg.ret_code); return MFC_RET_ENC_SET_CONF_FAIL; } @@ -661,11 +661,11 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON pCTX = (_MFCLIB *)openHandle; if (openHandle == NULL) { - LOGE("SsbSipMfcEncGetConfig: openHandle is NULL\n"); + ALOGE("SsbSipMfcEncGetConfig: openHandle is NULL\n"); return MFC_RET_INVALID_PARAM; } if (value == NULL) { - LOGE("SsbSipMfcEncGetConfig: value is NULL\n"); + ALOGE("SsbSipMfcEncGetConfig: value is NULL\n"); return MFC_RET_INVALID_PARAM; } @@ -678,7 +678,7 @@ SSBSIP_MFC_ERROR_CODE SsbSipMfcEncGetConfig(void *openHandle, SSBSIP_MFC_ENC_CON break; default: - LOGE("SsbSipMfcEncGetConfig: No such conf_type is supported.\n"); + ALOGE("SsbSipMfcEncGetConfig: No such conf_type is supported.\n"); return MFC_RET_INVALID_PARAM; } |