Hi Hans, On Friday 17 December 2010 20:57:32 Hans Verkuil wrote: > On Friday, December 17, 2010 20:52:25 Hans Verkuil wrote: > > On Friday, December 17, 2010 17:17:05 Laurent Pinchart wrote: > > > Hi Hans, > > > > > > I've recently run into an issue when porting a sensor driver to the > > > control framework. > > > > > > A userspace application using that driver using VIDIOC_G_EXT_CTRLS to > > > retrieve the value of a bunch of controls in a single call. Those > > > controls don't belong to the same class, and the application started > > > failing. > > > > > > What's the rationale behind forbidding that ? > > > > Which driver? The control framework doesn't have that limitation anymore. > > Originally the API had that limitation, mostly to reduce driver > > complexity, but that limitation is lifted in the control framework. > > A follow-up: if the ctrl_class field of v4l2_ext_controls is set to a > specific control class by the application, then all controls in the list > must belong to that control class. This is checked by the control > framework. This matches the behavior as defined in the spec. If ctrl_class > is 0, then the control framework allows controls from any class. You're correct. Thanks for the clarification. > This doesn't seem to be documented yet. I thought I did :-( The VIDIOC_[GS]_EXT_CTRLS documentation should state that ctrl_class = 0 is a valid option. -- Regards, Laurent Pinchart -- 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