public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Comments on V4L controls
@ 2009-02-12 22:44 gilles
  2009-02-18 14:51 ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: gilles @ 2009-02-12 22:44 UTC (permalink / raw)
  To: linux-media

Hi everyone,
Sorry for double posting, but I originally sent this to the old mailing
list. Here it is:

I have a couple of comments / suggestions regarding the part on controls of
the V4L2 api:
Some controls, such as pan relative and tilt relative are write-only, and
reading their value makes little sense. Yet, there is no way of knowing
about this, but to try and read a value and be greeted with EINVAL or
similar. There is already a read-only flag (V4L2_CTRL_FLAG_READ_ONLY) in
struct v4l2_query. Does it make sense to add another one for write-only
controls ?
The extended controls Pan / Tilt  reset are defined in the API as boolean
controls. Shouldnt these be defined as buttons instead, as they dont really
hold a state (enabled/disabled) ?
Comments are welcome.
Cheers,
Gilles


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Comments on V4L controls
  2009-02-12 22:44 Comments on V4L controls gilles
@ 2009-02-18 14:51 ` Laurent Pinchart
  2009-02-20  6:56   ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2009-02-18 14:51 UTC (permalink / raw)
  To: gilles; +Cc: linux-media

Hi Gilles,

On Thursday 12 February 2009 23:44:55 gilles wrote:
> Hi everyone,
> Sorry for double posting, but I originally sent this to the old mailing
> list. Here it is:
>
> I have a couple of comments / suggestions regarding the part on controls of
> the V4L2 api:
> Some controls, such as pan relative and tilt relative are write-only, and
> reading their value makes little sense. Yet, there is no way of knowing
> about this, but to try and read a value and be greeted with EINVAL or
> similar. There is already a read-only flag (V4L2_CTRL_FLAG_READ_ONLY) in
> struct v4l2_query. Does it make sense to add another one for write-only
> controls ?

Yes it does. Martin Rubli from Logitech sent a mail in April 2008 to the 
video4linux mailing list. Search the list archives for "[PATCH] Support for 
write-only controls". Feel free to submit a patch.

> The extended controls Pan / Tilt  reset are defined in the API as boolean
> controls. Shouldnt these be defined as buttons instead, as they dont really
> hold a state (enabled/disabled) ?

Agreed. As no driver seem to be using those controls yet, it should be safe to 
update the spec. Could you submit a patch ?

Best regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Comments on V4L controls
  2009-02-18 14:51 ` Laurent Pinchart
@ 2009-02-20  6:56   ` Hans Verkuil
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2009-02-20  6:56 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: gilles, linux-media

On Wednesday 18 February 2009 15:51:32 Laurent Pinchart wrote:
> Hi Gilles,
>
> On Thursday 12 February 2009 23:44:55 gilles wrote:
> > Hi everyone,
> > Sorry for double posting, but I originally sent this to the old mailing
> > list. Here it is:
> >
> > I have a couple of comments / suggestions regarding the part on
> > controls of the V4L2 api:
> > Some controls, such as pan relative and tilt relative are write-only,
> > and reading their value makes little sense. Yet, there is no way of
> > knowing about this, but to try and read a value and be greeted with
> > EINVAL or similar. There is already a read-only flag
> > (V4L2_CTRL_FLAG_READ_ONLY) in struct v4l2_query. Does it make sense to
> > add another one for write-only controls ?
>
> Yes it does. Martin Rubli from Logitech sent a mail in April 2008 to the
> video4linux mailing list. Search the list archives for "[PATCH] Support
> for write-only controls". Feel free to submit a patch.
>
> > The extended controls Pan / Tilt  reset are defined in the API as
> > boolean controls. Shouldnt these be defined as buttons instead, as they
> > dont really hold a state (enabled/disabled) ?
>
> Agreed. As no driver seem to be using those controls yet, it should be
> safe to update the spec. Could you submit a patch ?

Hi Gilles, Laurent,

I will take care of this. I have to do some doc updates relating to controls 
anyway, so it's easy for me to add this as well.

Regards,

	Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-20  6:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12 22:44 Comments on V4L controls gilles
2009-02-18 14:51 ` Laurent Pinchart
2009-02-20  6:56   ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox