Failing V4l2-compliance test with a sensor driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I believe you are the creator of v4l2-compliance, right? My hope is that you might be able to lead me in the right direction.
I am currently finishing up a sensor driver that I ported from a downstream kernel. And I try to clear up the last compliance error:

```
    info: checking control event 'User Controls' (0x00980001)
    VIDIOC_SUBSCRIBE_EVENT returned -1 (Inappropriate ioctl for device)
    fail: v4l2-test-controls.cpp(818): subscribe event for control 'User Controls' failed
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
```

I notice that it calls a normal v4l2 ioctl on my subdevice. I implemented the event handling just like I was able to find in other devices like:
imx219, imx355, ov2640 by adding:

```
#include <media/v4l2-event.h>
...
	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
		     V4L2_SUBDEV_FL_HAS_EVENTS;
...
static const struct v4l2_subdev_core_ops ov13850_core_ops = {
    ...
	.subscribe_event = v4l2_ctrl_subdev_subscribe_event,
	.unsubscribe_event = v4l2_event_subdev_unsubscribe
    ...
```

Am I supposed to correct that error, or asked in another way is it actually an error when a subdevice doesn't implement VIDIOC_SUBSCRIBE_EVENT?
Additionally, I noticed that the compliance check doesn't look at my VIDIOC_SUBDEV_G_SELECTION implementation but instead searches for any implementation of the VIDIOC_G_SELECTION ioctl.

I invoked the compliance test with:

v4l2-compliance -u /dev/v4l-subdev3 -v -T

My current code can be located here: https://github.com/initBasti/Linux_kernel_media_tree_fork/blob/fix_subscribe_event_user_controls/drivers/media/i2c/ov13850.c

Greetings and thanks in advance,
Sebastian



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux