Mailing List Archive

V4L2_CTRL_CLASS_USER and VIDIOC_S_CTRL ?
Since many years I use struct v4l2_ext_controls and VIDIOC_S_EXT_CTRLS for
setting both User Controls and MPEG Controls. This works with ivtv and
pvrusb2.

Now I discovered that saa7134-empress returns "Invalid argument" if I do this.
I have to use struct v4l2_control ctrl and VIDIOC_S_EXT_CTRLS. And this works
also with ivtv.
Is this the right method for all V4L2_CTRL_CLASS_USER control IDs?

Or is it a bug of the saa7134 driver that it doesn't work with
VIDIOC_S_EXT_CTRLS ?

_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel
Re: V4L2_CTRL_CLASS_USER and VIDIOC_S_CTRL ? [ In reply to ]
> Since many years I use struct v4l2_ext_controls and VIDIOC_S_EXT_CTRLS for
> setting both User Controls and MPEG Controls. This works with ivtv and
> pvrusb2.
>
> Now I discovered that saa7134-empress returns "Invalid argument" if I do
> this. I have to use struct v4l2_control ctrl and VIDIOC_S_EXT_CTRLS. And
> this works also with ivtv.
> Is this the right method for all V4L2_CTRL_CLASS_USER control IDs?
>
> Or is it a bug of the saa7134 driver that it doesn't work with
> VIDIOC_S_EXT_CTRLS ?

ups, copy and paste mistake.
should be " I have to use struct v4l2_control ctrl and VIDIOC_S_CTRL."

The API says in chapter 1.9.2. (The Extended Control API):
"For example, control class V4L2_CTRL_CLASS_USER contains all user controls
(i. e. all controls that can also be set using the old VIDIOC_S_CTRL ioctl). "

I think this means that it should also be possible to set the User Class
controls with the extended control API. (Like ivtv and pvrusb2 does)

In the meantime I think found the explanation why this doesn't work with the
KNC One TV Station DVR (saa7134-empress): It is a shared device, and the User
controls must be executed on the analogue device - and this one does not
support the extended control API. Only the mpeg device does this.





_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel
Re: V4L2_CTRL_CLASS_USER and VIDIOC_S_CTRL ? [ In reply to ]
On Mon, 2010-11-29 at 19:19 +0100, Martin Dauskardt wrote:
> > Since many years I use struct v4l2_ext_controls and VIDIOC_S_EXT_CTRLS for
> > setting both User Controls and MPEG Controls. This works with ivtv and
> > pvrusb2.
> >
> > Now I discovered that saa7134-empress returns "Invalid argument" if I do
> > this. I have to use struct v4l2_control ctrl and VIDIOC_S_EXT_CTRLS. And
> > this works also with ivtv.
> > Is this the right method for all V4L2_CTRL_CLASS_USER control IDs?
> >
> > Or is it a bug of the saa7134 driver that it doesn't work with
> > VIDIOC_S_EXT_CTRLS ?
>
> ups, copy and paste mistake.
> should be " I have to use struct v4l2_control ctrl and VIDIOC_S_CTRL."
>
> The API says in chapter 1.9.2. (The Extended Control API):
> "For example, control class V4L2_CTRL_CLASS_USER contains all user controls
> (i. e. all controls that can also be set using the old VIDIOC_S_CTRL ioctl). "
>
> I think this means that it should also be possible to set the User Class
> controls with the extended control API. (Like ivtv and pvrusb2 does)

Hi Martin,

Yes, a driver can provide for manipulating the User controls (all
controls that can be set or get by VIDIOC_S/G_CTRL) using
VIDIOC_S/G_EXT_CTRLS.

Unfortunately Linux V4L2 drivers vary in their implementation of the
controls API, and the specification doesn't appear to mandate that User
controls be supported under the Extended controls ioctl() calls.

It looks like an application writer is forced to use
VIDIOC_TRY_EXT_CTRLS with the User control class to find out. :(


> In the meantime I think found the explanation why this doesn't work with the
> KNC One TV Station DVR (saa7134-empress): It is a shared device, and the User
> controls must be executed on the analogue device - and this one does not
> support the extended control API. Only the mpeg device does this.

I've just looked at the saa7134 source code; you are correct.


If I recall correctly, Hans' new V4L2 control framework will
automatically implement VIDIOC_S_EXT_CTRLS and similar ioctl()s for
drivers that use the new framework. The saa7134 driver has not been
converted to the new control framework yet.

Regards,
Andy


_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel