Re: V4L2 control API - choosing base CID for private controls

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

 



On 05/22/2014 01:33 PM, Krzysztof Czarnowski wrote:
> Hi,
> 
> I got completely confused while trying to create private controls with
> control API and when I finally got down to sanity checks in
> v4l2_ctrl_new() in v4l2-ctrls.c...
> 
> It would be nice if the following explanation by Hans (archive msg69922)
> or maybe some more elaborate version could somehow make its way to
> Documentation/video4linux/v4l2-controls.txt
> :-)

Yeah, I need to improve that.

But basically you add a 'driver base' to include/uapi/linux/v4l2-controls.h
(see e.g. V4L2_CID_USER_SAA7134_BASE) where you reserve a range of private
controls for your driver and you use that base to define your controls. See
drivers/media/pci/saa7134/saa7134.h how that's done for the saa7134.

You probably tried to use V4L2_CID_PRIVATE_BASE which is not allowed in
combination with the control framework. The control framework will emulate
V4L2_CID_PRIVATE_BASE internally so old applications still work, but it's
not how they should be defined in the drivers.

Regards,

	Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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