Thread (11 messages) 11 messages, 2 authors, 2018-02-06

Re: [PATCH 4/5] add V4L2 control functions

From: Florian Echtler <hidden>
Date: 2018-02-05 21:36:54
Also in: linux-media

Hello Hans,

On Mon, 5 Feb 2018, Hans Verkuil wrote:
On 02/05/2018 03:29 PM, Florian Echtler wrote:
quoted
+
+static int sur40_vidioc_queryctrl(struct file *file, void *fh,
+			       struct v4l2_queryctrl *qc)
Sorry, but this is very wrong. Use the control framework instead. See
https://hverkuil.home.xs4all.nl/spec/kapi/v4l2-controls.html and pretty much all
media drivers (with the exception of uvc). See for example this driver:
drivers/media/pci/tw68/tw68-video.c (randomly chosen).

It actually makes life a lot easier for you as you don't have to perform any
range checks and all control ioctls are automatically supported for you.
thanks for the quick reply, I wasn't aware of that framework at all :-) Will certainly use it.

What's the earliest kernel version this is supported on, in case we want to backport this for our standalone module, too?

Best regards, Florian
-- 
"_Nothing_ brightens up my morning. Coffee simply provides a shade of
grey just above the pitch-black of the infinite depths of the _abyss_."
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help