[Title] Added some logs
authorjinhyung.jo <jinhyung.jo@samsung.com>
Wed, 5 Sep 2012 18:42:51 +0000 (03:42 +0900)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Wed, 5 Sep 2012 18:42:51 +0000 (03:42 +0900)
[Type]
[Module] emulator tools
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/hw/maru_camera_linux_pci.c

index d110552..786be9b 100644 (file)
@@ -109,7 +109,7 @@ struct marucam_qctrl {
 static struct marucam_qctrl qctrl_tbl[] = {\r
     { V4L2_CID_BRIGHTNESS, 0, },\r
     { V4L2_CID_CONTRAST, 0, },\r
-    { V4L2_CID_SATURATION,0, },\r
+    { V4L2_CID_SATURATION, 0, },\r
     { V4L2_CID_SHARPNESS, 0, },\r
 };\r
 \r
@@ -119,10 +119,12 @@ static void marucam_reset_controls(void)
     for (i = 0; i < ARRAY_SIZE(qctrl_tbl); i++) {\r
         if (qctrl_tbl[i].hit) {\r
             struct v4l2_control ctrl = {0,};\r
+            qctrl_tbl[i].hit = 0;\r
             ctrl.id = qctrl_tbl[i].id;\r
             ctrl.value = qctrl_tbl[i].init_val;\r
             if (xioctl(v4l2_fd, VIDIOC_S_CTRL, &ctrl) < 0) {\r
-                ERR("failed to set video control value while reset values : %s\n", strerror(errno));\r
+                ERR("failed to reset control value : id(0x%x), errstr(%s)\n",\r
+                    ctrl.id, strerror(errno));\r
             }\r
         }\r
     }\r
@@ -489,7 +491,9 @@ void marucam_device_s_fmt(MaruCamState* state)
     dst_fmt.fmt.pix.field = param->stack[3];\r
 \r
     if (xioctl(v4l2_fd, VIDIOC_S_FMT, &dst_fmt) < 0) {\r
-        ERR("failed to set video format: %s\n", strerror(errno));\r
+        ERR("failed to set video format: format(0x%x), width:height(%d:%d), "\r
+          "errstr(%s)\n", dst_fmt.fmt.pix.pixelformat, dst_fmt.fmt.pix.width,\r
+          dst_fmt.fmt.pix.height, strerror(errno));\r
         param->errCode = errno;\r
         return;\r
     }\r
@@ -543,7 +547,9 @@ void marucam_device_try_fmt(MaruCamState* state)
     format.fmt.pix.field = param->stack[3];\r
 \r
     if (xioctl(v4l2_fd, VIDIOC_TRY_FMT, &format) < 0) {\r
-        ERR("failed to check video format: %s\n", strerror(errno));\r
+        ERR("failed to check video format: format(0x%x), width:height(%d:%d),"\r
+            " errstr(%s)\n", format.fmt.pix.pixelformat, format.fmt.pix.width,\r
+            format.fmt.pix.height, strerror(errno));\r
         param->errCode = errno;\r
         return;\r
     }\r
@@ -637,7 +643,8 @@ void marucam_device_qctrl(MaruCamState* state)
             sctrl.value = (ctrl.maximum + ctrl.minimum) / 2;\r
         }\r
         if (xioctl(v4l2_fd, VIDIOC_S_CTRL, &sctrl) < 0) {\r
-            ERR("failed to set video control value : %s\n", strerror(errno));\r
+            ERR("failed to set control value: id(0x%x), value(%d), "\r
+                "errstr(%s)\n", sctrl.id, sctrl.value, strerror(errno));\r
             param->errCode = errno;\r
             return;\r
         }\r
@@ -695,7 +702,9 @@ void marucam_device_s_ctrl(MaruCamState* state)
     ctrl.value = value_convert_from_guest(qctrl_tbl[i].min,\r
             qctrl_tbl[i].max, param->stack[1]);\r
     if (xioctl(v4l2_fd, VIDIOC_S_CTRL, &ctrl) < 0) {\r
-        ERR("failed to set video control value : value(%d), %s\n", param->stack[1], strerror(errno));\r
+        ERR("failed to set control value : id0x%x), value(r:%d, c:%d), "\r
+            "errstr(%s)\n", ctrl.id, param->stack[1], ctrl.value,\r
+            strerror(errno));\r
         param->errCode = errno;\r
         return;\r
     }\r