This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-utils.git tree:
Subject: v4l2-compliance: EIO after getting/setting a control is now a warning Author: Hans Verkuil <[email protected]> Date: Fri Apr 27 13:42:42 2012 +0200 USB devices can return EIO when setting or getting certain controls due to hardware constraints. Warn about this, but no longer treat it as an error. Signed-off-by: Hans Verkuil <[email protected]> (cherry picked from commit 3d1feaebac107977acda8fc23d3b8c66d18c7194) Signed-off-by: Gregor Jasny <[email protected]> utils/v4l2-compliance/v4l2-compliance.h | 2 +- utils/v4l2-compliance/v4l2-test-controls.cpp | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) --- http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=75a9a78598e17ae03af0ac3d207b4ecaad9144f6 diff --git a/utils/v4l2-compliance/v4l2-compliance.h b/utils/v4l2-compliance/v4l2-compliance.h index 951f839..b22011c 100644 --- a/utils/v4l2-compliance/v4l2-compliance.h +++ b/utils/v4l2-compliance/v4l2-compliance.h @@ -71,7 +71,7 @@ struct node { do { \ warnings++; \ if (verbose) \ - printf("\t\twarn: " fmt, ##args); \ + printf("\t\twarn: %s(%d): " fmt, __FILE__, __LINE__, ##args); \ } while (0) #define fail(fmt, args...) \ diff --git a/utils/v4l2-compliance/v4l2-test-controls.cpp b/utils/v4l2-compliance/v4l2-test-controls.cpp index dffe39a..7c7bdd3 100644 --- a/utils/v4l2-compliance/v4l2-test-controls.cpp +++ b/utils/v4l2-compliance/v4l2-test-controls.cpp @@ -361,8 +361,11 @@ int testSimpleControls(struct node *node) if (iter->flags & V4L2_CTRL_FLAG_READ_ONLY) { if (ret != EACCES) return fail("s_ctrl did not check the read-only flag\n"); + } else if (ret == EIO) { + warn("s_ctrl returned EIO\n"); + ret = 0; } else if (ret) { - return fail("s_ctrl returned an error\n"); + return fail("s_ctrl returned an error (%d)\n", ret); } if (ret) continue; @@ -543,8 +546,12 @@ int testExtendedControls(struct node *node) ctrl.size = iter->maximum + 1; ret = doioctl(node, VIDIOC_G_EXT_CTRLS, &ctrls); } + if (ret == EIO) { + warn("g_ext_ctrls returned EIO\n"); + ret = 0; + } if (ret) - return fail("g_ext_ctrls returned an error\n"); + return fail("g_ext_ctrls returned an error (%d)\n", ret); if (checkExtendedCtrl(ctrl, *iter)) return fail("invalid control %08x\n", iter->id); } @@ -568,6 +575,10 @@ int testExtendedControls(struct node *node) if (ctrls.error_idx != ctrls.count) return fail("invalid error index\n"); } else { + if (ret == EIO) { + warn("s_ext_ctrls returned EIO\n"); + ret = 0; + } if (ret) return fail("s_ext_ctrls returned an error\n"); @@ -629,6 +640,10 @@ int testExtendedControls(struct node *node) if (ret) return fail("could not try all controls\n"); ret = doioctl(node, VIDIOC_S_EXT_CTRLS, &ctrls); + if (ret == EIO) { + warn("s_ext_ctrls returned EIO\n"); + ret = 0; + } if (ret) return fail("could not set all controls\n"); @@ -648,6 +663,10 @@ int testExtendedControls(struct node *node) if (multiple_classes && ctrls.error_idx >= ctrls.count) return fail("error_idx should be < count\n"); ret = doioctl(node, VIDIOC_S_EXT_CTRLS, &ctrls); + if (ret == EIO) { + warn("s_ext_ctrls returned EIO\n"); + ret = 0; + } if (ret && !multiple_classes) return fail("could not set all controls of a specific class\n"); if (ret != EINVAL && multiple_classes) _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
