summaryrefslogtreecommitdiffstats
path: root/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp')
-rw-r--r--exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp358
1 files changed, 179 insertions, 179 deletions
diff --git a/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp b/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp
index 217ce51..fd135f1 100644
--- a/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp
+++ b/exynos4/hal/libhdmi/SecHdmi/SecHdmiV4L2Utils.cpp
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-//#define LOG_NDEBUG 0
-//#define LOG_TAG "libhdmi"
+//#define ALOG_NDEBUG 0
+//#define ALOG_TAG "libhdmi"
#include <cutils/log.h>
#include <sys/types.h>
@@ -81,7 +81,7 @@ void display_menu(void)
struct HDMIAudioParameter audio;
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
audio.formatCode = LPCM_FORMAT;
@@ -89,142 +89,142 @@ void display_menu(void)
audio.channelNum = CH_2;
audio.sampleFreq = SF_44KHZ;
- LOGI("=============== HDMI Audio =============\n");
+ ALOGI("=============== HDMI Audio =============\n");
if (EDIDAudioModeSupport(&audio))
- LOGI("= 2CH_PCM 44100Hz audio supported =\n");
+ ALOGI("= 2CH_PCM 44100Hz audio supported =\n");
- LOGI("========= HDMI Mode & Color Space =======\n");
+ ALOGI("========= HDMI Mode & Color Space =======\n");
video.mode = HDMI;
if (EDIDHDMIModeSupport(&video)) {
video.colorSpace = HDMI_CS_YCBCR444;
if (EDIDColorSpaceSupport(&video))
- LOGI("= 1. HDMI(YCbCr) =\n");
+ ALOGI("= 1. HDMI(YCbCr) =\n");
video.colorSpace = HDMI_CS_RGB;
if (EDIDColorSpaceSupport(&video))
- LOGI("= 2. HDMI(RGB) =\n");
+ ALOGI("= 2. HDMI(RGB) =\n");
} else {
video.mode = DVI;
if (EDIDHDMIModeSupport(&video))
- LOGI("= 3. DVI =\n");
+ ALOGI("= 3. DVI =\n");
}
- LOGI("=========== HDMI Rseolution ========\n");
+ ALOGI("=========== HDMI Rseolution ========\n");
/* 480P */
video.resolution = v720x480p_60Hz;
video.pixelAspectRatio = HDMI_PIXEL_RATIO_16_9;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= 4. 480P_60_16_9 (0x04000000) =\n");
+ ALOGI("= 4. 480P_60_16_9 (0x04000000) =\n");
video.resolution = v640x480p_60Hz;
video.pixelAspectRatio = HDMI_PIXEL_RATIO_4_3;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= 5. 480P_60_4_3 (0x05000000) =\n");
+ ALOGI("= 5. 480P_60_4_3 (0x05000000) =\n");
/* 576P */
video.resolution = v720x576p_50Hz;
video.pixelAspectRatio = HDMI_PIXEL_RATIO_16_9;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= 6. 576P_50_16_9 (0x06000000) =\n");
+ ALOGI("= 6. 576P_50_16_9 (0x06000000) =\n");
video.pixelAspectRatio = HDMI_PIXEL_RATIO_4_3;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= 7. 576P_50_4_3 (0x07000000) =\n");
+ ALOGI("= 7. 576P_50_4_3 (0x07000000) =\n");
/* 720P 60 */
video.resolution = v1280x720p_60Hz;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= 8. 720P_60 (0x08000000) =\n");
+ ALOGI("= 8. 720P_60 (0x08000000) =\n");
/* 720P_50 */
video.resolution = v1280x720p_50Hz;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= 9. 720P_50 (0x09000000) =\n");
+ ALOGI("= 9. 720P_50 (0x09000000) =\n");
/* 1080P_60 */
video.resolution = v1920x1080p_60Hz;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= a. 1080P_60 (0x0a000000) =\n");
+ ALOGI("= a. 1080P_60 (0x0a000000) =\n");
/* 1080P_50 */
video.resolution = v1920x1080p_50Hz;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= b. 1080P_50 (0x0b000000) =\n");
+ ALOGI("= b. 1080P_50 (0x0b000000) =\n");
/* 1080I_60 */
video.resolution = v1920x1080i_60Hz;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= c. 1080I_60 (0x0c000000) =\n");
+ ALOGI("= c. 1080I_60 (0x0c000000) =\n");
/* 1080I_50 */
video.resolution = v1920x1080i_50Hz;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= d. 1080I_50 (0x0d000000) =\n");
+ ALOGI("= d. 1080I_50 (0x0d000000) =\n");
/* 1080P_30 */
video.resolution = v1920x1080p_30Hz;
video.hdmi_3d_format = HDMI_2D_VIDEO_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= e. 1080P_30 (0x12000000) =\n");
+ ALOGI("= e. 1080P_30 (0x12000000) =\n");
- LOGI("=========== HDMI 3D Format ========\n");
+ ALOGI("=========== HDMI 3D Format ========\n");
/* 720P_60_SBS_HALF */
video.resolution = v1280x720p_60Hz;
video.hdmi_3d_format = HDMI_3D_SSH_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= f. 720P_60_SBS_HALF (0x13000000) =\n");
+ ALOGI("= f. 720P_60_SBS_HALF (0x13000000) =\n");
/* 720P_59_SBS_HALF */
video.resolution = v1280x720p_60Hz;
video.hdmi_3d_format = HDMI_3D_SSH_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= 10. 720P_59_SBS_HALF (0x14000000) =\n");
+ ALOGI("= 10. 720P_59_SBS_HALF (0x14000000) =\n");
/* 720P_50_TB */
video.resolution = v1280x720p_50Hz;
video.hdmi_3d_format = HDMI_3D_TB_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= 11. 720P_50_TB (0x15000000) =\n");
+ ALOGI("= 11. 720P_50_TB (0x15000000) =\n");
/* 1080P_24_TB */
video.resolution = v1920x1080p_24Hz;
video.hdmi_3d_format = HDMI_3D_TB_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= 12. 1080P_24_TB (0x16000000) =\n");
+ ALOGI("= 12. 1080P_24_TB (0x16000000) =\n");
/* 1080P_23_TB */
video.resolution = v1920x1080p_24Hz;
video.hdmi_3d_format = HDMI_3D_TB_FORMAT;
if (EDIDVideoResolutionSupport(&video))
- LOGI("= 13. 1080P_24_TB (0x17000000) =\n");
- LOGI("=========================================\n");
+ ALOGI("= 13. 1080P_24_TB (0x17000000) =\n");
+ ALOGI("=========================================\n");
}
int tvout_open(const char *fp_name)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int fp;
fp = open(fp_name, O_RDWR);
if (fp < 0)
- LOGE("drv (%s) open failed!!\n", fp_name);
+ ALOGE("drv (%s) open failed!!\n", fp_name);
return fp;
}
@@ -232,7 +232,7 @@ int tvout_open(const char *fp_name)
int tvout_std_v4l2_init(int fd, unsigned int preset_id)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s:: preset_id = 0x%x", __func__, preset_id);
+ ALOGD("%s:: preset_id = 0x%x", __func__, preset_id);
#endif
int ret;
@@ -246,7 +246,7 @@ int tvout_std_v4l2_init(int fd, unsigned int preset_id)
if (output_type >= V4L2_OUTPUT_TYPE_DIGITAL &&
output_type <= V4L2_OUTPUT_TYPE_DVI)
if (ioctl(fd_tvout, VIDIOC_HDCP_ENABLE, g_hdcp_en) < 0)
- LOGE("%s::VIDIOC_HDCP_ENABLE failed %d", __func__, errno);
+ ALOGE("%s::VIDIOC_HDCP_ENABLE failed %d", __func__, errno);
*/
i = 0;
@@ -254,7 +254,7 @@ int tvout_std_v4l2_init(int fd, unsigned int preset_id)
do {
output.index = i;
ret = tvout_std_v4l2_enum_output(fd, &output);
- LOGD("tvout_v4l2_enum_output():: output_type=%d output.index=%d output.name=%s", output.type, output.index, output.name);
+ ALOGD("tvout_v4l2_enum_output():: output_type=%d output.index=%d output.name=%s", output.type, output.index, output.name);
if (output.type == output_type) {
matched = 1;
break;
@@ -263,7 +263,7 @@ int tvout_std_v4l2_init(int fd, unsigned int preset_id)
} while (ret >=0);
if (!matched) {
- LOGE("%s::no matched output type [type=%d]", __func__, output_type);
+ ALOGE("%s::no matched output type [type=%d]", __func__, output_type);
// return -1;
}
@@ -276,7 +276,7 @@ int tvout_std_v4l2_init(int fd, unsigned int preset_id)
tvout_std_v4l2_enum_dv_presets(fd);
preset.preset = preset_id;
if (tvout_std_v4l2_s_dv_preset(fd, &preset) < 0 ) {
- LOGE("%s::tvout_std_v4l2_s_dv_preset failed", __func__);
+ ALOGE("%s::tvout_std_v4l2_s_dv_preset failed", __func__);
return -1;
}
// }
@@ -287,23 +287,23 @@ int tvout_std_v4l2_init(int fd, unsigned int preset_id)
int tvout_std_v4l2_querycap(int fd, char *node)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_capability v4l2cap;
if (ioctl(fd, VIDIOC_QUERYCAP, &v4l2cap) < 0) {
- LOGE("%s::VIDIOC_QUERYCAP failed", __func__);
+ ALOGE("%s::VIDIOC_QUERYCAP failed", __func__);
return -1;
}
if (!(v4l2cap.capabilities & V4L2_CAP_STREAMING)) {
- LOGE("%s::%s is not support streaming", __func__, node);
+ ALOGE("%s::%s is not support streaming", __func__, node);
return -1;
}
if (!(v4l2cap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE)) {
- LOGE("%s::%s is not support video output mplane", __func__, node);
+ ALOGE("%s::%s is not support video output mplane", __func__, node);
return -1;
}
@@ -313,7 +313,7 @@ int tvout_std_v4l2_querycap(int fd, char *node)
int tvout_std_v4l2_enum_dv_presets(int fd)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_dv_enum_preset enum_preset;
@@ -326,11 +326,11 @@ int tvout_std_v4l2_enum_dv_presets(int fd)
if (ret < 0) {
if (errno == EINVAL)
break;
- LOGE("%s::VIDIOC_ENUM_DV_PRESETS", __func__);
+ ALOGE("%s::VIDIOC_ENUM_DV_PRESETS", __func__);
return -1;
}
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s::index=%d, preset=0x%08x, name=%s, w=%d, h=%d",
+ ALOGD("%s::index=%d, preset=0x%08x, name=%s, w=%d, h=%d",
__func__, enum_preset.index, enum_preset.preset, enum_preset.name, enum_preset.width, enum_preset.height);
#endif
}
@@ -341,11 +341,11 @@ int tvout_std_v4l2_enum_dv_presets(int fd)
int tvout_std_v4l2_s_dv_preset(int fd, struct v4l2_dv_preset *preset)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
if (ioctl(fd, VIDIOC_S_DV_PRESET, preset) < 0) {
- LOGE("%s::VIDIOC_S_DV_PRESET failed", __func__);
+ ALOGE("%s::VIDIOC_S_DV_PRESET failed", __func__);
return -1;
}
@@ -361,7 +361,7 @@ int tvout_std_v4l2_s_dv_preset(int fd, struct v4l2_dv_preset *preset)
int tvout_std_v4l2_enum_output(int fd, struct v4l2_output *output)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret;
@@ -369,7 +369,7 @@ int tvout_std_v4l2_enum_output(int fd, struct v4l2_output *output)
ret = ioctl(fd, VIDIOC_ENUMOUTPUT, output);
if (ret >=0)
- LOGV("tvout_v4l2_enum_output" "enum. output [index = %d] :: type : 0x%08x , name = %s\n",
+ ALOGV("tvout_v4l2_enum_output" "enum. output [index = %d] :: type : 0x%08x , name = %s\n",
output->index,output->type,output->name);
return ret;
@@ -384,14 +384,14 @@ int tvout_std_v4l2_enum_output(int fd, struct v4l2_output *output)
int tvout_std_v4l2_s_output(int fd, int index)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s:: index = 0x%x", __func__, index);
+ ALOGD("%s:: index = 0x%x", __func__, index);
#endif
int ret;
ret = ioctl(fd, VIDIOC_S_OUTPUT, &index);
if (ret < 0) {
- LOGE("tvout_v4l2_s_output" "VIDIOC_S_OUTPUT failed %d\n", errno);
+ ALOGE("tvout_v4l2_s_output" "VIDIOC_S_OUTPUT failed %d\n", errno);
return ret;
}
@@ -401,17 +401,17 @@ int tvout_std_v4l2_s_output(int fd, int index)
int tvout_std_v4l2_g_output(int fd, int *index)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret;
ret = ioctl(fd, VIDIOC_G_OUTPUT, index);
if (ret < 0) {
- LOGE("tvout_v4l2_g_output" "VIDIOC_G_OUTPUT failed %d\n", errno);
+ ALOGE("tvout_v4l2_g_output" "VIDIOC_G_OUTPUT failed %d\n", errno);
return ret;
} else {
- LOGV("tvout_v4l2_g_output" "Current output index %d\n", *index);
+ ALOGV("tvout_v4l2_g_output" "Current output index %d\n", *index);
}
return ret;
@@ -420,14 +420,14 @@ int tvout_std_v4l2_g_output(int fd, int *index)
int tvout_std_v4l2_s_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field, int w, int h, int colorformat, int num_planes)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_format fmt;
fmt.type = type;
// if (ioctl(fd, VIDIOC_G_FMT, &fmt) < 0) {
-// LOGE("%s::VIDIOC_G_FMT failed", __func__);
+// ALOGE("%s::VIDIOC_G_FMT failed", __func__);
// return -1;
// }
@@ -448,13 +448,13 @@ int tvout_std_v4l2_s_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field,
fmt.fmt.pix_mp.num_planes = num_planes;
break;
default:
- LOGE("%s::invalid buffer type", __func__);
+ ALOGE("%s::invalid buffer type", __func__);
return -1;
break;
}
if (ioctl(fd, VIDIOC_S_FMT, &fmt) < 0) {
- LOGE("%s::VIDIOC_S_FMT failed", __func__);
+ ALOGE("%s::VIDIOC_S_FMT failed", __func__);
return -1;
}
@@ -464,7 +464,7 @@ int tvout_std_v4l2_s_fmt(int fd, enum v4l2_buf_type type, enum v4l2_field field,
int tvout_std_v4l2_s_crop(int fd, enum v4l2_buf_type type, enum v4l2_field, int x, int y, int w, int h)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_crop crop;
@@ -476,7 +476,7 @@ int tvout_std_v4l2_s_crop(int fd, enum v4l2_buf_type type, enum v4l2_field, int
crop.c.height = h;
if (ioctl(fd, VIDIOC_S_CROP, &crop) < 0) {
- LOGE("%s::VIDIOC_S_CROP (x=%d, y=%d, w=%d, h=%d) failed",
+ ALOGE("%s::VIDIOC_S_CROP (x=%d, y=%d, w=%d, h=%d) failed",
__func__, x, y, w, h);
return -1;
}
@@ -487,7 +487,7 @@ int tvout_std_v4l2_s_crop(int fd, enum v4l2_buf_type type, enum v4l2_field, int
int tvout_std_v4l2_s_ctrl(int fd, int id, int value)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_control vc;
@@ -496,7 +496,7 @@ int tvout_std_v4l2_s_ctrl(int fd, int id, int value)
vc.value = value;
if (ioctl(fd, VIDIOC_S_CTRL, &vc) < 0) {
- LOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, id, value);
+ ALOGE("%s::VIDIOC_S_CTRL (id=%d,value=%d) failed", __func__, id, value);
return -1;
}
@@ -506,7 +506,7 @@ int tvout_std_v4l2_s_ctrl(int fd, int id, int value)
int tvout_std_v4l2_reqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, unsigned int num_bufs)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_requestbuffers reqbuf;
@@ -516,12 +516,12 @@ int tvout_std_v4l2_reqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memo
reqbuf.count = num_bufs;
if (ioctl(fd, VIDIOC_REQBUFS, &reqbuf) < 0) {
- LOGE("%s::VIDIOC_REQBUFS failed", __func__);
+ ALOGE("%s::VIDIOC_REQBUFS failed", __func__);
return -1;
}
if (reqbuf.count < num_bufs) {
- LOGE("%s::VIDIOC_REQBUFS failed ((reqbuf.count(%d) < num_bufs(%d))",
+ ALOGE("%s::VIDIOC_REQBUFS failed ((reqbuf.count(%d) < num_bufs(%d))",
__func__, reqbuf.count, num_bufs);
return -1;
}
@@ -532,7 +532,7 @@ int tvout_std_v4l2_reqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memo
int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, unsigned int buf_index, unsigned int num_planes, SecBuffer *secBuf)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_buffer buf;
@@ -544,7 +544,7 @@ int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory me
memset(&planes[i], 0, sizeof(struct v4l2_plane));
if (MAX_BUFFERS_MIXER <= buf_index || MAX_PLANES_MIXER <= num_planes) {
- LOGE("%s::exceed MAX! : buf_index=%d, num_plane=%d", __func__, buf_index, num_planes);
+ ALOGE("%s::exceed MAX! : buf_index=%d, num_plane=%d", __func__, buf_index, num_planes);
return -1;
}
@@ -555,24 +555,24 @@ int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory me
buf.m.planes = planes;
if (ioctl(fd, VIDIOC_QUERYBUF, &buf) < 0) {
- LOGE("%s::VIDIOC_QUERYBUF failed, plane_cnt=%d", __func__, buf.length);
+ ALOGE("%s::VIDIOC_QUERYBUF failed, plane_cnt=%d", __func__, buf.length);
return -1;
}
for (unsigned int i = 0; i < num_planes; i++) {
if ((secBuf->virt.extP[i] = (char *)mmap(0, buf.m.planes[i].length,
PROT_READ | PROT_WRITE, MAP_SHARED, fd, buf.m.planes[i].m.mem_offset)) < 0) {
- LOGE("%s::mmap failed", __func__);
- LOGE("%s::Offset = 0x%x", __func__, buf.m.planes[i].m.mem_offset);
- LOGE("%s::Legnth = %d" , __func__, buf.m.planes[i].length);
- LOGE("%s::vaddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]);
+ ALOGE("%s::mmap failed", __func__);
+ ALOGE("%s::Offset = 0x%x", __func__, buf.m.planes[i].m.mem_offset);
+ ALOGE("%s::Legnth = %d" , __func__, buf.m.planes[i].length);
+ ALOGE("%s::vaddr[%d][%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]);
return -1;
}
secBuf->size.extS[i] = buf.m.planes[i].length;
#ifdef DEBUG_LIB_FIMC
- LOGD("%s::vaddr[bufidx=%d][planeidx=%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]);
- LOGD("%s::Legnth = %d" , __func__, buf.m.planes[i].length);
+ ALOGD("%s::vaddr[bufidx=%d][planeidx=%d] = 0x%x", __func__, buf_index, i, (unsigned int)secBuf->virt.extP[i]);
+ ALOGD("%s::Legnth = %d" , __func__, buf.m.planes[i].length);
#endif
}
@@ -582,7 +582,7 @@ int tvout_std_v4l2_querybuf(int fd, enum v4l2_buf_type type, enum v4l2_memory me
int tvout_std_v4l2_qbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, int buf_index, int num_planes, SecBuffer *secBuf)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_buffer buf;
@@ -605,7 +605,7 @@ int tvout_std_v4l2_qbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory
}
if (ioctl(fd, VIDIOC_QBUF, &buf) < 0) {
- LOGE("%s::VIDIOC_QBUF failed", __func__);
+ ALOGE("%s::VIDIOC_QBUF failed", __func__);
return -1;
}
@@ -615,7 +615,7 @@ int tvout_std_v4l2_qbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory
int tvout_std_v4l2_dqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memory, int *buf_index, int num_planes)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_buffer buf;
@@ -632,7 +632,7 @@ int tvout_std_v4l2_dqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memor
buf.m.planes = planes;
if (ioctl(fd, VIDIOC_DQBUF, &buf) < 0) {
- LOGE("%s::VIDIOC_DQBUF failed", __func__);
+ ALOGE("%s::VIDIOC_DQBUF failed", __func__);
return -1;
}
*buf_index = buf.index;
@@ -643,11 +643,11 @@ int tvout_std_v4l2_dqbuf(int fd, enum v4l2_buf_type type, enum v4l2_memory memor
int tvout_std_v4l2_streamon(int fd, enum v4l2_buf_type type)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
if (ioctl(fd, VIDIOC_STREAMON, &type) < 0) {
- LOGE("%s::VIDIOC_STREAMON failed", __func__);
+ ALOGE("%s::VIDIOC_STREAMON failed", __func__);
return -1;
}
@@ -657,11 +657,11 @@ int tvout_std_v4l2_streamon(int fd, enum v4l2_buf_type type)
int tvout_std_v4l2_streamoff(int fd, enum v4l2_buf_type type)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
if (ioctl(fd, VIDIOC_STREAMOFF, &type) < 0) {
- LOGE("%s::VIDIOC_STREAMOFF failed", __func__);
+ ALOGE("%s::VIDIOC_STREAMOFF failed", __func__);
return -1;
}
@@ -671,7 +671,7 @@ int tvout_std_v4l2_streamoff(int fd, enum v4l2_buf_type type)
int tvout_init(v4l2_std_id std_id)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s:: std_id = 0x%x", __func__, std_id);
+ ALOGD("%s:: std_id = 0x%x", __func__, std_id);
#endif
int ret;
@@ -687,7 +687,7 @@ int tvout_init(v4l2_std_id std_id)
if (fp_tvout <= 0) {
fp_tvout = tvout_open(TVOUT_DEV);
if (fp_tvout < 0) {
- LOGE("tvout video drv open failed\n");
+ ALOGE("tvout video drv open failed\n");
return -1;
}
}
@@ -695,7 +695,7 @@ int tvout_init(v4l2_std_id std_id)
if (output_type >= V4L2_OUTPUT_TYPE_DIGITAL &&
output_type <= V4L2_OUTPUT_TYPE_DVI)
if (ioctl(fp_tvout, VIDIOC_HDCP_ENABLE, g_hdcp_en) < 0)
- LOGE("tvout_init" "VIDIOC_HDCP_ENABLE failed %d\n", errno);
+ ALOGE("tvout_init" "VIDIOC_HDCP_ENABLE failed %d\n", errno);
/* ============== query capability============== */
tvout_v4l2_querycap(fp_tvout);
@@ -719,7 +719,7 @@ int tvout_init(v4l2_std_id std_id)
} while (ret >=0);
if (!matched) {
- LOGE("no matched output type [type : 0x%08x]\n", output_type);
+ ALOGE("no matched output type [type : 0x%08x]\n", output_type);
return -1;
}
@@ -747,7 +747,7 @@ int tvout_init(v4l2_std_id std_id)
int tvout_deinit()
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
if (0 < fp_tvout) {
@@ -760,7 +760,7 @@ int tvout_deinit()
int tvout_v4l2_querycap(int fp)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s:: fp = 0x%x", __func__, fp);
+ ALOGD("%s:: fp = 0x%x", __func__, fp);
#endif
struct v4l2_capability cap;
@@ -769,12 +769,12 @@ int tvout_v4l2_querycap(int fp)
ret = ioctl(fp, VIDIOC_QUERYCAP, &cap);
if (ret < 0) {
- LOGE("tvout_v4l2_querycap" "VIDIOC_QUERYCAP failed %d\n", errno);
+ ALOGE("tvout_v4l2_querycap" "VIDIOC_QUERYCAP failed %d\n", errno);
return ret;
}
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("tvout_v4l2_querycap" "DRIVER : %s, CARD : %s, CAP.: 0x%08x\n",
+ ALOGD("tvout_v4l2_querycap" "DRIVER : %s, CARD : %s, CAP.: 0x%08x\n",
cap.driver, cap.card, cap.capabilities);
#endif
@@ -791,14 +791,14 @@ int tvout_v4l2_querycap(int fp)
int tvout_v4l2_g_std(int fp, v4l2_std_id *std_id)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret;
ret = ioctl(fp, VIDIOC_G_STD, std_id);
if (ret < 0) {
- LOGE("tvout_v4l2_g_std" "VIDIOC_G_STD failed %d\n", errno);
+ ALOGE("tvout_v4l2_g_std" "VIDIOC_G_STD failed %d\n", errno);
return ret;
}
@@ -808,14 +808,14 @@ int tvout_v4l2_g_std(int fp, v4l2_std_id *std_id)
int tvout_v4l2_s_std(int fp, v4l2_std_id std_id)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s:: std_id = 0x%x", __func__, std_id);
+ ALOGD("%s:: std_id = 0x%x", __func__, std_id);
#endif
int ret;
ret = ioctl(fp, VIDIOC_S_STD, &std_id);
if (ret < 0) {
- LOGE("tvout_v4l2_s_std" "VIDIOC_S_STD failed %d\n", errno);
+ ALOGE("tvout_v4l2_s_std" "VIDIOC_S_STD failed %d\n", errno);
return ret;
}
@@ -832,13 +832,13 @@ int tvout_v4l2_s_std(int fp, v4l2_std_id std_id)
int tvout_v4l2_enum_std(int fp, struct v4l2_standard *std, v4l2_std_id std_id)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
std->index = 0;
while (0 == ioctl (fp, VIDIOC_ENUMSTD, std)) {
if (std->id & std_id)
- LOGV("tvout_v4l2_enum_std" "Current video standard: %s\n", std->name);
+ ALOGV("tvout_v4l2_enum_std" "Current video standard: %s\n", std->name);
std->index++;
}
@@ -855,7 +855,7 @@ int tvout_v4l2_enum_std(int fp, struct v4l2_standard *std, v4l2_std_id std_id)
int tvout_v4l2_enum_output(int fp, struct v4l2_output *output)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret;
@@ -863,7 +863,7 @@ int tvout_v4l2_enum_output(int fp, struct v4l2_output *output)
ret = ioctl(fp, VIDIOC_ENUMOUTPUT, output);
if (ret >=0)
- LOGV("tvout_v4l2_enum_output" "enum. output [index = %d] :: type : 0x%08x , name = %s\n",
+ ALOGV("tvout_v4l2_enum_output" "enum. output [index = %d] :: type : 0x%08x , name = %s\n",
output->index,output->type,output->name);
return ret;
@@ -878,14 +878,14 @@ int tvout_v4l2_enum_output(int fp, struct v4l2_output *output)
int tvout_v4l2_s_output(int fp, int index)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s:: index = 0x%x", __func__, index);
+ ALOGD("%s:: index = 0x%x", __func__, index);
#endif
int ret;
ret = ioctl(fp, VIDIOC_S_OUTPUT, &index);
if (ret < 0) {
- LOGE("tvout_v4l2_s_output" "VIDIOC_S_OUTPUT failed %d\n", errno);
+ ALOGE("tvout_v4l2_s_output" "VIDIOC_S_OUTPUT failed %d\n", errno);
return ret;
}
@@ -895,17 +895,17 @@ int tvout_v4l2_s_output(int fp, int index)
int tvout_v4l2_g_output(int fp, int *index)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret;
ret = ioctl(fp, VIDIOC_G_OUTPUT, index);
if (ret < 0) {
- LOGE("tvout_v4l2_g_output" "VIDIOC_G_OUTPUT failed %d\n", errno);
+ ALOGE("tvout_v4l2_g_output" "VIDIOC_G_OUTPUT failed %d\n", errno);
return ret;
} else {
- LOGV("tvout_v4l2_g_output" "Current output index %d\n", *index);
+ ALOGV("tvout_v4l2_g_output" "Current output index %d\n", *index);
}
return ret;
@@ -921,12 +921,12 @@ int tvout_v4l2_g_output(int fp, int *index)
int tvout_v4l2_enum_fmt(int fp, struct v4l2_fmtdesc *desc)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
desc->index = 0;
while (0 == ioctl(fp, VIDIOC_ENUM_FMT, desc)) {
- LOGV("tvout_v4l2_enum_fmt" "enum. fmt [id : 0x%08x] :: type = 0x%08x, name = %s, pxlfmt = 0x%08x\n",
+ ALOGV("tvout_v4l2_enum_fmt" "enum. fmt [id : 0x%08x] :: type = 0x%08x, name = %s, pxlfmt = 0x%08x\n",
desc->index,
desc->type,
desc->description,
@@ -940,7 +940,7 @@ int tvout_v4l2_enum_fmt(int fp, struct v4l2_fmtdesc *desc)
int tvout_v4l2_g_fmt(int fp, int buf_type, void* ptr)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret;
@@ -951,11 +951,11 @@ int tvout_v4l2_g_fmt(int fp, int buf_type, void* ptr)
ret = ioctl(fp, VIDIOC_G_FMT, &format);
if (ret < 0) {
- LOGE("tvout_v4l2_g_fmt" "type : %d, VIDIOC_G_FMT failed %d\n", buf_type, errno);
+ ALOGE("tvout_v4l2_g_fmt" "type : %d, VIDIOC_G_FMT failed %d\n", buf_type, errno);
return ret;
} else {
memcpy(fmt_param, format.fmt.raw_data, sizeof(struct v4l2_pix_format_s5p_tvout));
- LOGV("tvout_v4l2_g_fmt" "get. fmt [base_c : 0x%08x], [base_y : 0x%08x] type = 0x%08x, width = %d, height = %d\n",
+ ALOGV("tvout_v4l2_g_fmt" "get. fmt [base_c : 0x%08x], [base_y : 0x%08x] type = 0x%08x, width = %d, height = %d\n",
fmt_param->base_c,
fmt_param->base_y,
fmt_param->pix_fmt.pixelformat,
@@ -969,7 +969,7 @@ int tvout_v4l2_g_fmt(int fp, int buf_type, void* ptr)
int tvout_v4l2_s_fmt(int fp, int buf_type, void *ptr)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_format format;
@@ -1002,7 +1002,7 @@ int tvout_v4l2_s_fmt(int fp, int buf_type, void *ptr)
ret = ioctl(fp, VIDIOC_S_FMT, &format);
if (ret < 0) {
- LOGE("tvout_v4l2_s_fmt [tvout_v4l2_s_fmt] : type : %d, VIDIOC_S_FMT failed %d\n",
+ ALOGE("tvout_v4l2_s_fmt [tvout_v4l2_s_fmt] : type : %d, VIDIOC_S_FMT failed %d\n",
buf_type, errno);
return ret;
}
@@ -1013,18 +1013,18 @@ int tvout_v4l2_s_fmt(int fp, int buf_type, void *ptr)
int tvout_v4l2_g_fbuf(int fp, struct v4l2_framebuffer *frame)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret;
ret = ioctl(fp, VIDIOC_G_FBUF, frame);
if (ret < 0) {
- LOGE("tvout_v4l2_g_fbuf" "VIDIOC_STREAMON failed %d\n", errno);
+ ALOGE("tvout_v4l2_g_fbuf" "VIDIOC_STREAMON failed %d\n", errno);
return ret;
}
- LOGV("tvout_v4l2_g_fbuf" "get. fbuf: base = 0x%08X, pixel format = %d\n",
+ ALOGV("tvout_v4l2_g_fbuf" "get. fbuf: base = 0x%08X, pixel format = %d\n",
frame->base,
frame->fmt.pixelformat);
return 0;
@@ -1033,14 +1033,14 @@ int tvout_v4l2_g_fbuf(int fp, struct v4l2_framebuffer *frame)
int tvout_v4l2_s_fbuf(int fp, struct v4l2_framebuffer *frame)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret;
ret = ioctl(fp, VIDIOC_S_FBUF, frame);
if (ret < 0) {
- LOGE("tvout_v4l2_s_fbuf" "VIDIOC_STREAMON failed %d\n", errno);
+ ALOGE("tvout_v4l2_s_fbuf" "VIDIOC_STREAMON failed %d\n", errno);
return ret;
}
return 0;
@@ -1049,14 +1049,14 @@ int tvout_v4l2_s_fbuf(int fp, struct v4l2_framebuffer *frame)
int tvout_v4l2_s_baseaddr(int fp, void *base_addr)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret;
ret = ioctl(fp, S5PTVFB_WIN_SET_ADDR, base_addr);
if (ret < 0) {
- LOGE("tvout_v4l2_baseaddr" "VIDIOC_S_BASEADDR failed %d\n", errno);
+ ALOGE("tvout_v4l2_baseaddr" "VIDIOC_S_BASEADDR failed %d\n", errno);
return ret;
}
return 0;
@@ -1065,7 +1065,7 @@ int tvout_v4l2_s_baseaddr(int fp, void *base_addr)
int tvout_v4l2_g_crop(int fp, unsigned int type, struct v4l2_rect *rect)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret;
@@ -1073,7 +1073,7 @@ int tvout_v4l2_g_crop(int fp, unsigned int type, struct v4l2_rect *rect)
crop.type = (enum v4l2_buf_type)type;
ret = ioctl(fp, VIDIOC_G_CROP, &crop);
if (ret < 0) {
- LOGE("tvout_v4l2_g_crop" "VIDIOC_G_CROP failed %d\n", errno);
+ ALOGE("tvout_v4l2_g_crop" "VIDIOC_G_CROP failed %d\n", errno);
return ret;
}
@@ -1082,7 +1082,7 @@ int tvout_v4l2_g_crop(int fp, unsigned int type, struct v4l2_rect *rect)
rect->width = crop.c.width;
rect->height = crop.c.height;
- LOGV("tvout_v4l2_g_crop" "get. crop : left = %d, top = %d, width = %d, height = %d\n",
+ ALOGV("tvout_v4l2_g_crop" "get. crop : left = %d, top = %d, width = %d, height = %d\n",
rect->left,
rect->top,
rect->width,
@@ -1093,7 +1093,7 @@ int tvout_v4l2_g_crop(int fp, unsigned int type, struct v4l2_rect *rect)
int tvout_v4l2_s_crop(int fp, unsigned int type, struct v4l2_rect *rect)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_crop crop;
@@ -1108,7 +1108,7 @@ int tvout_v4l2_s_crop(int fp, unsigned int type, struct v4l2_rect *rect)
ret = ioctl(fp, VIDIOC_S_CROP, &crop);
if (ret < 0) {
- LOGE("tvout_v4l2_s_crop" "VIDIOC_S_CROP failed %d\n", errno);
+ ALOGE("tvout_v4l2_s_crop" "VIDIOC_S_CROP failed %d\n", errno);
return ret;
}
@@ -1118,14 +1118,14 @@ int tvout_v4l2_s_crop(int fp, unsigned int type, struct v4l2_rect *rect)
int tvout_v4l2_start_overlay(int fp)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret, start = 1;
ret = ioctl(fp, VIDIOC_OVERLAY, &start);
if (ret < 0) {
- LOGE("tvout_v4l2_start_overlay" "VIDIOC_OVERLAY failed\n");
+ ALOGE("tvout_v4l2_start_overlay" "VIDIOC_OVERLAY failed\n");
return ret;
}
@@ -1135,14 +1135,14 @@ int tvout_v4l2_start_overlay(int fp)
int tvout_v4l2_stop_overlay(int fp)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int ret, stop =0;
ret = ioctl(fp, VIDIOC_OVERLAY, &stop);
if (ret < 0) {
- LOGE("tvout_v4l2_stop_overlay" "VIDIOC_OVERLAY failed\n");
+ ALOGE("tvout_v4l2_stop_overlay" "VIDIOC_OVERLAY failed\n");
return ret;
}
@@ -1154,7 +1154,7 @@ int hdmi_init_layer(int layer)
{
int fd = -1;
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("### %s (layer = %d) called", __func__, layer);
+ ALOGD("### %s (layer = %d) called", __func__, layer);
#endif
switch (layer) {
@@ -1162,7 +1162,7 @@ int hdmi_init_layer(int layer)
if (fp_tvout_v <= 0) {
fp_tvout_v = tvout_open(TVOUT_DEV_V);
if (fp_tvout_v < 0) {
- LOGE("tvout video layer open failed\n");
+ ALOGE("tvout video layer open failed\n");
return -1;
}
fd = fp_tvout_v;
@@ -1176,7 +1176,7 @@ int hdmi_init_layer(int layer)
fp_tvout_g0 = fb_open(TVOUT_FB_G0);
#endif
if (fp_tvout_g0 < 0) {
- LOGE("tvout graphic layer 0 open failed\n");
+ ALOGE("tvout graphic layer 0 open failed\n");
return -1;
}
fd = fp_tvout_g0;
@@ -1190,14 +1190,14 @@ int hdmi_init_layer(int layer)
fp_tvout_g1 = fb_open(TVOUT_FB_G1);
#endif
if (fp_tvout_g1 < 0) {
- LOGE("tvout graphic layer 1 open failed\n");
+ ALOGE("tvout graphic layer 1 open failed\n");
return -1;
}
fd = fp_tvout_g1;
}
break;
default :
- LOGE("%s::unmathced layer(%d) fail", __func__, layer);
+ ALOGE("%s::unmathced layer(%d) fail", __func__, layer);
fd = -1;
break;
}
@@ -1209,7 +1209,7 @@ int hdmi_deinit_layer(int layer)
{
int ret = 0;
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("### %s(layer = %d) called", __func__, layer);
+ ALOGD("### %s(layer = %d) called", __func__, layer);
#endif
switch (layer) {
case HDMI_LAYER_VIDEO :
@@ -1231,7 +1231,7 @@ int hdmi_deinit_layer(int layer)
}
break;
default :
- LOGE("%s::unmathced layer(%d) fail", __func__, layer);
+ ALOGE("%s::unmathced layer(%d) fail", __func__, layer);
ret = -1;
break;
}
@@ -1277,7 +1277,7 @@ int hdmi_get_src_plane(int srcColorFormat, unsigned int *num_of_plane)
*num_of_plane = 2;
break;
default:
- LOGE("%s::invalid color type", __func__);
+ ALOGE("%s::invalid color type", __func__);
return -1;
}
@@ -1293,7 +1293,7 @@ int hdmi_set_v_param(int fd, int layer,
int dst_x, int dst_y, int dst_w, int dst_h)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int v4l2ColorFormat = HAL_PIXEL_FORMAT_2_V4L2_PIX(srcColorFormat);
@@ -1324,7 +1324,7 @@ int hdmi_set_v_param(int fd, int layer,
num_of_plane = 2;
break;
default:
- LOGE("%s::invalid color type", __func__);
+ ALOGE("%s::invalid color type", __func__);
return false;
break;
}
@@ -1334,25 +1334,25 @@ int hdmi_set_v_param(int fd, int layer,
/* set format for VP input */
if (tvout_std_v4l2_s_fmt(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_ANY, round_up_src_w, round_up_src_h, v4l2ColorFormat, num_of_plane) < 0) {
- LOGE("%s::tvout_std_v4l2_s_fmt()[video layer] failed", __func__);
+ ALOGE("%s::tvout_std_v4l2_s_fmt()[video layer] failed", __func__);
return -1;
}
/* set crop for VP input */
if (tvout_std_v4l2_s_crop(fd, V4L2_BUF_TYPE_VIDEO_OVERLAY, V4L2_FIELD_ANY, 0, 0, src_w, src_h) < 0) {
- LOGE("%s::tvout_std_v4l2_s_crop()[video layer] failed", __func__);
+ ALOGE("%s::tvout_std_v4l2_s_crop()[video layer] failed", __func__);
return -1;
}
/* set crop for VP output */
if (tvout_std_v4l2_s_crop(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_ANY, rect.left, rect.top, rect.width, rect.height) < 0) {
- LOGE("%s::tvout_std_v4l2_s_crop()[video layer] failed", __func__);
+ ALOGE("%s::tvout_std_v4l2_s_crop()[video layer] failed", __func__);
return -1;
}
/* request buffer for VP input */
if (tvout_std_v4l2_reqbuf(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, HDMI_NUM_MIXER_BUF) < 0) {
- LOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d)[video layer] failed", __func__, HDMI_NUM_MIXER_BUF);
+ ALOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d)[video layer] failed", __func__, HDMI_NUM_MIXER_BUF);
return -1;
}
@@ -1366,7 +1366,7 @@ int hdmi_set_g_param(int fd, int layer,
int dst_x, int dst_y, int dst_w, int dst_h)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
struct v4l2_rect rect;
@@ -1392,44 +1392,44 @@ int hdmi_set_g_param(int fd, int layer,
dstBuffer->size.s = rect.width * rect.height << 1;
break;
default:
- LOGE("%s::invalid color type", __func__);
+ ALOGE("%s::invalid color type", __func__);
return false;
break;
}
/* set format for mixer graphic layer input device*/
if (tvout_std_v4l2_s_fmt(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_ANY, rect.width, rect.height, v4l2ColorFormat, 1) < 0) {
- LOGE("%s::tvout_std_v4l2_s_fmt() [layer=%d] failed", __func__, layer);
+ ALOGE("%s::tvout_std_v4l2_s_fmt() [layer=%d] failed", __func__, layer);
return -1;
}
/* set crop for mixer graphic layer input device*/
if (tvout_std_v4l2_s_crop(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_FIELD_ANY, rect.left, rect.top, rect.width, rect.height) < 0) {
- LOGE("%s::tvout_std_v4l2_s_crop() [layer=%d] failed", __func__, layer);
+ ALOGE("%s::tvout_std_v4l2_s_crop() [layer=%d] failed", __func__, layer);
return -1;
}
/* request buffer for mixer graphic layer input device */
if (tvout_std_v4l2_reqbuf(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_MEMORY_USERPTR, HDMI_NUM_MIXER_BUF) < 0) {
- LOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d) [layer=%d] failed", __func__, HDMI_NUM_MIXER_BUF, layer);
+ ALOGE("%s::tvout_std_v4l2_reqbuf(buf_num=%d) [layer=%d] failed", __func__, HDMI_NUM_MIXER_BUF, layer);
return -1;
}
/* enable alpha blending for mixer graphic layer */
if (tvout_std_v4l2_s_ctrl(fd, V4L2_CID_TV_LAYER_BLEND_ENABLE, 1) < 0) {
- LOGE("%s::tvout_std_v4l2_s_ctrl() [layer=%d] failed", __func__, layer);
+ ALOGE("%s::tvout_std_v4l2_s_ctrl() [layer=%d] failed", __func__, layer);
return -1;
}
/* enable per-pixel blending for mixer graphic layer */
if (tvout_std_v4l2_s_ctrl(fd, V4L2_CID_TV_PIXEL_BLEND_ENABLE, 1) < 0) {
- LOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] failed", __func__, layer);
+ ALOGE("%s::tvout_std_v4l2_s_ctrl [layer=%d] failed", __func__, layer);
return false;
}
/* set global alpha value for mixer graphic layer */
if (tvout_std_v4l2_s_ctrl(fd, V4L2_CID_TV_LAYER_BLEND_ALPHA, 255) < 0) {
- LOGE("%s::tvout_std_v4l2_s_ctrl() [layer=%d] failed", __func__, layer);
+ ALOGE("%s::tvout_std_v4l2_s_ctrl() [layer=%d] failed", __func__, layer);
return -1;
}
@@ -1522,7 +1522,7 @@ int hdmi_set_g_scaling(int layer,
g2d_rotation = ROT_270;
break;
default:
- LOGE("%s::invalid rotVal(%d) fail", __func__, rotVal);
+ ALOGE("%s::invalid rotVal(%d) fail", __func__, rotVal);
return -1;
break;
}
@@ -1530,12 +1530,12 @@ int hdmi_set_g_scaling(int layer,
BlitParam = {BLIT_OP_SRC, NON_PREMULTIPLIED, 0xff, 0, g2d_rotation, &Scaling, 0, 0, &dstClip, 0, &srcImage, &dstImage, NULL, &srcRect, &dstRect, NULL, 0};
if (stretchFimgApi(&BlitParam) < 0) {
- LOGE("%s::stretchFimgApi() fail", __func__);
+ ALOGE("%s::stretchFimgApi() fail", __func__);
return -1;
}
#ifdef DEBUG_MSG_ENABLE
- LOGD("hdmi_set_g_scaling:: \n \\
+ ALOGD("hdmi_set_g_scaling:: \n \\
layer=%d,\n \\
srcColorFormat=%d,\n \\
src_w=%d, src_h=%d,\n\\
@@ -1562,13 +1562,13 @@ int hdmi_set_v_param(int layer,
int dst_w, int dst_h)
{
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int round_up_src_w;
int round_up_src_h;
if (fp_tvout_v <= 0) {
- LOGE("fp_tvout is < 0 fail\n");
+ ALOGE("fp_tvout is < 0 fail\n");
return -1;
}
@@ -1714,7 +1714,7 @@ int hdmi_gl_set_param(int layer,
g2d_rotation = ROT_270;
break;
default:
- LOGE("%s::invalid rotVal(%d) fail", __func__, rotVal);
+ ALOGE("%s::invalid rotVal(%d) fail", __func__, rotVal);
return -1;
break;
}
@@ -1722,7 +1722,7 @@ int hdmi_gl_set_param(int layer,
BlitParam = {BLIT_OP_SRC, NON_PREMULTIPLIED, 0xff, 0, g2d_rotation, &Scaling, 0, 0, &dstClip, 0, &srcImage, &dstImage, NULL, &srcRect, &dstRect, NULL, 0};
if (stretchFimgApi(&BlitParam) < 0) {
- LOGE("%s::stretchFimgApi() fail", __func__);
+ ALOGE("%s::stretchFimgApi() fail", __func__);
return -1;
}
@@ -1744,7 +1744,7 @@ int hdmi_gl_set_param(int layer,
put_vscreeninfo(fp_tvout_g, &var);
if (ioctl(fp_tvout_g, S5PTVFB_WIN_POSITION, &window) < 0) {
- LOGE("%s::S5PTVFB_WIN_POSITION ioctl failed.", __func__);
+ ALOGE("%s::S5PTVFB_WIN_POSITION ioctl failed.", __func__);
return -1;
}
}
@@ -1760,7 +1760,7 @@ int hdmi_gl_set_param(int layer,
int fp_tvout_g;
#ifdef DEBUG_MSG_ENABLE
- LOGD("hdmi_gl_set_param:: \n \\
+ ALOGD("hdmi_gl_set_param:: \n \\
layer=%d,\n \\
srcColorFormat=%d,\n \\
src_w=%d, src_h=%d,\n\\
@@ -1802,7 +1802,7 @@ int hdmi_gl_set_param(int layer,
tvout_v4l2_s_baseaddr(fp_tvout_g, (void *)src_y_address);
put_vscreeninfo(fp_tvout_g, &var);
if (ioctl(fp_tvout_g, S5PTVFB_WIN_POSITION, &window) < 0) {
- LOGE("%s:: S5PTVFB_WIN_POSITION ioctl failed.", __func__);
+ ALOGE("%s:: S5PTVFB_WIN_POSITION ioctl failed.", __func__);
return -1;
}
@@ -1815,7 +1815,7 @@ int hdmi_cable_status()
{
#if defined(BOARD_USE_V4L2)
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("%s", __func__);
+ ALOGD("%s", __func__);
#endif
int cable_status = 0;
@@ -1824,21 +1824,21 @@ int hdmi_cable_status()
fd = open(TVOUT_DEV_G0, O_RDWR);
if (fd <= 0) {
- LOGE("%s: graphic layer 0 drv open failed", __func__);
+ ALOGE("%s: graphic layer 0 drv open failed", __func__);
return -1;
}
ctrl.id = V4L2_CID_TV_HPD_STATUS;
if (ioctl(fd, VIDIOC_S_CTRL, &ctrl) < 0) {
- LOGE("Get HPD_STATUS fail");
+ ALOGE("Get HPD_STATUS fail");
cable_status = -1;
} else {
cable_status = ctrl.value;
}
#ifdef DEBUG_HDMI_HW_LEVEL
- LOGD("HPD_STATUS = %d", cable_status);
+ ALOGD("HPD_STATUS = %d", cable_status);
#endif
close(fd);
@@ -1850,14 +1850,14 @@ int hdmi_cable_status()
fp_hpd = open(HPD_DEV, O_RDWR);
if (fp_hpd <= 0) {
- LOGE("hpd drv open failed\n");
+ ALOGE("hpd drv open failed\n");
return -1;
}
//Delay about 0.3s
usleep(500000);
if (ioctl(fp_hpd, HPD_GET_STATE, &cable_status) < 0) {
- LOGE("hpd drv HPD_GET_STATE ioctl failed\n");
+ ALOGE("hpd drv HPD_GET_STATE ioctl failed\n");
cable_status = -1;
}
@@ -1885,7 +1885,7 @@ int hdmi_outputmode_2_v4l2_output_type(int output_mode)
v4l2_output_type = V4L2_OUTPUT_TYPE_COMPOSITE;
break;
default:
- LOGE("%s::unmathced HDMI_mode(%d)", __func__, output_mode);
+ ALOGE("%s::unmathced HDMI_mode(%d)", __func__, output_mode);
v4l2_output_type = -1;
break;
}
@@ -1911,7 +1911,7 @@ int hdmi_v4l2_output_type_2_outputmode(int v4l2_output_type)
outputMode = COMPOSITE_OUTPUT_MODE;
break;
default:
- LOGE("%s::unmathced v4l2_output_type(%d)", __func__, v4l2_output_type);
+ ALOGE("%s::unmathced v4l2_output_type(%d)", __func__, v4l2_output_type);
outputMode = -1;
break;
}
@@ -1946,7 +1946,7 @@ int composite_std_2_v4l2_std_id(int std)
std_id = V4L2_STD_PAL_60;
break;
default:
- LOGE("%s::unmathced composite_std(%d)", __func__, std);
+ ALOGE("%s::unmathced composite_std(%d)", __func__, std);
break;
}
@@ -1969,14 +1969,14 @@ int hdmi_check_output_mode(int v4l2_output_type)
video.mode = HDMI;
if (!EDIDHDMIModeSupport(&video)) {
calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DVI;
- LOGI("Change mode into DVI\n");
+ ALOGI("Change mode into DVI\n");
break;
}
video.colorSpace = HDMI_CS_YCBCR444;
if (!EDIDColorSpaceSupport(&video)) {
calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_HDMI_RGB;
- LOGI("Change mode into HDMI_RGB\n");
+ ALOGI("Change mode into HDMI_RGB\n");
}
break;
@@ -1984,14 +1984,14 @@ int hdmi_check_output_mode(int v4l2_output_type)
video.mode = HDMI;
if (!EDIDHDMIModeSupport(&video)) {
calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DVI;
- LOGI("Change mode into DVI\n");
+ ALOGI("Change mode into DVI\n");
break;
}
video.colorSpace = HDMI_CS_RGB;
if (!EDIDColorSpaceSupport(&video)) {
calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DIGITAL;
- LOGI("Change mode into HDMI_YCBCR\n");
+ ALOGI("Change mode into HDMI_YCBCR\n");
}
break;
@@ -2001,10 +2001,10 @@ int hdmi_check_output_mode(int v4l2_output_type)
video.colorSpace = HDMI_CS_YCBCR444;
if (!EDIDColorSpaceSupport(&video)) {
calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_HDMI_RGB;
- LOGI("Change mode into HDMI_RGB\n");
+ ALOGI("Change mode into HDMI_RGB\n");
} else {
calbirate_v4l2_mode = V4L2_OUTPUT_TYPE_DIGITAL;
- LOGI("Change mode into HDMI_YCBCR\n");
+ ALOGI("Change mode into HDMI_YCBCR\n");
}
break;
}
@@ -2099,14 +2099,14 @@ int hdmi_check_resolution(unsigned int preset_id)
video.hdmi_3d_format = HDMI_3D_TB_FORMAT;
break;
default:
- LOGE("%s::unmathced preset_id(%d)", __func__, preset_id);
+ ALOGE("%s::unmathced preset_id(%d)", __func__, preset_id);
return -1;
break;
}
if (!EDIDVideoResolutionSupport(&video)) {
#ifdef DEBUG_MSG_ENABLE
- LOGD("%s::EDIDVideoResolutionSupport(%d) fail (not suppoted preset_id) \n", __func__, preset_id);
+ ALOGD("%s::EDIDVideoResolutionSupport(%d) fail (not suppoted preset_id) \n", __func__, preset_id);
#endif
return -1;
}
@@ -2190,7 +2190,7 @@ int hdmi_resolution_2_preset_id(unsigned int resolution, int * w, int * h, unsig
*preset_id = V4L2_DV_480P60;
break;
default:
- LOGE("%s::unmathced resolution(%d)", __func__, resolution);
+ ALOGE("%s::unmathced resolution(%d)", __func__, resolution);
ret = -1;
break;
}
@@ -2289,14 +2289,14 @@ int hdmi_check_resolution(v4l2_std_id std_id)
video.hdmi_3d_format = HDMI_3D_TB_FORMAT;
break;
default:
- LOGE("%s::unmathced std_id(%lld)", __func__, std_id);
+ ALOGE("%s::unmathced std_id(%lld)", __func__, std_id);
return -1;
break;
}
if (!EDIDVideoResolutionSupport(&video)) {
#ifdef DEBUG_MSG_ENABLE
- LOGD("%s::EDIDVideoResolutionSupport(%llx) fail (not suppoted std_id) \n", __func__, std_id);
+ ALOGD("%s::EDIDVideoResolutionSupport(%llx) fail (not suppoted std_id) \n", __func__, std_id);
#endif
return -1;
}
@@ -2380,7 +2380,7 @@ int hdmi_resolution_2_std_id(unsigned int resolution, int * w, int * h, v4l2_std
*h = 480;
break;
default:
- LOGE("%s::unmathced resolution(%d)", __func__, resolution);
+ ALOGE("%s::unmathced resolution(%d)", __func__, resolution);
ret = -1;
break;
}
@@ -2392,7 +2392,7 @@ int hdmi_resolution_2_std_id(unsigned int resolution, int * w, int * h, v4l2_std
int hdmi_enable_hdcp(unsigned int hdcp_en)
{
if (ioctl(fp_tvout, VIDIOC_HDCP_ENABLE, hdcp_en) < 0) {
- LOGD("%s::VIDIOC_HDCP_ENABLE(%d) fail \n", __func__, hdcp_en);
+ ALOGD("%s::VIDIOC_HDCP_ENABLE(%d) fail \n", __func__, hdcp_en);
return -1;
}
@@ -2418,12 +2418,12 @@ int hdmi_check_audio(void)
#endif
if (audio_state == ON) {
if (ioctl(fp_tvout, VIDIOC_INIT_AUDIO, 1) < 0) {
- LOGE("%s::VIDIOC_INIT_AUDIO(1) fail", __func__);
+ ALOGE("%s::VIDIOC_INIT_AUDIO(1) fail", __func__);
ret = -1;
}
} else {
if (ioctl(fp_tvout, VIDIOC_INIT_AUDIO, 0) < 0) {
- LOGE("%s::VIDIOC_INIT_AUDIO(0) fail", __func__);
+ ALOGE("%s::VIDIOC_INIT_AUDIO(0) fail", __func__);
ret = -1;
}
}