Re: V4L2_SUBDEV_FL_HAS_EVENTS and (un)subscribe_event for subdevice drivers

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

 



Hi Hans

On Mon, 31 Oct 2022 at 12:36, Hans Verkuil <hverkuil-cisco@xxxxxxxxx> wrote:
>
> Hi Dave,
>
> On 31/10/2022 13:27, Dave Stevenson wrote:
> > Hi Hans & Sakari
> >
> > A question raised from review of [1]:
> >
> > Is it correct that any subdevice driver that supports any controls
> > should advertise V4L2_SUBDEV_FL_HAS_EVENTS and have
> > subscribe_event/unsubscribe_event core_ops?
> >
> > I added that patch for ov9282 to resolve a v4l2-compliance failure:
> > fail: v4l2-test-controls.cpp(835): subscribe event for control 'User
> > Controls' failed
> > test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
> > but it surprised Jacopo, and he has observed that many of the current
> > drivers with controls don't meet this requirement.
> >
> > I just wanted confirmation from those in the know.
>
> It should only be needed if V4L2_SUBDEV_FL_HAS_DEVNODE is also set in the
> subdev driver. If HAS_DEVNODE is set, and there are controls, then HAS_EVENTS
> must be set and you have to be able to (un)subscribe to events.
>
> Because the controls can be exposed to userspace via a v4l-subdevX device, and
> userspace has to be able to subscribe to control events so that it is
> notified when the control changes value.
>
> The compliance testing of v4l-subdev devices isn't that old, so a lot of older
> subdev drivers where never checked for compliance.

Thanks for the swift response - I'm glad I'm not going crazy then :-)

  Dave.

> Regards,
>
>         Hans
>
> >
> > Thanks
> >   Dave
> >
> > [1] https://patchwork.linuxtv.org/project/linux-media/patch/20221005152809.3785786-17-dave.stevenson@xxxxxxxxxxxxxxx/
>



[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