From 11dce4f6eebd325e3d237aa9ad7d0ffa8559448f Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Thu, 5 Dec 2013 18:44:29 +0200 Subject: Integer64 and string controls can't be accessed using VIDIOC_[GS]_CTRL So don't even try. Signed-off-by: Sakari Ailus Signed-off-by: Laurent Pinchart --- yavta.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yavta.c b/yavta.c index cbcf310..cfee473 100644 --- a/yavta.c +++ b/yavta.c @@ -278,7 +278,8 @@ static int get_control(struct device *dev, unsigned int id, int type, *val = ctrl.value; return 0; } - if (errno == EINVAL || errno == ENOTTY) { + if (type != V4L2_CTRL_TYPE_INTEGER64 && type != V4L2_CTRL_TYPE_STRING && + (errno == EINVAL || errno == ENOTTY)) { struct v4l2_control old; old.id = id; @@ -322,7 +323,8 @@ static void set_control(struct device *dev, unsigned int id, int type, val = ctrl.value64; else val = ctrl.value; - } else if (errno == EINVAL || errno == ENOTTY) { + } else if (!is_64 && type != V4L2_CTRL_TYPE_STRING && + (errno == EINVAL || errno == ENOTTY)) { struct v4l2_control old; old.id = id; -- cgit v1.2.3