[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-video
Subject:    Re: New support for cards from IDS-imaging / ioctl's for digital I/O
From:       Michael Veigel <michael.veigel () netcam-solutions ! de>
Date:       2003-06-27 12:03:04
[Download RAW message or body]

Hi Tom,

thanx for ur suggestions. The problem with the pure GPIO output is, that in 
case of some boards (e.g. Falcon Duo/Quattro) i have to look, which gpio port 
is responsible for Digital I/O ( port on the second chip ). In the driver i 
could handle this quite easy, in the Application it's alot of work.

And i think that it's a good idea to have a easy interface vor Applications to 
deal with digital I/O. In the security market the need for such a feature 
will grow (IMHO). U'r right with the calls over _S_CTRL, _G_CTRL, and i think 
that  the setting of the masks is better done by the driver itself :).

For the _CTRL ioctl the following ID's should be needed

V4L2_CID_READ_DIGITAL_IN	<- Read digital inputs (V4L2_CID_PRIVATE_BASE+6 )
V4L2_CID_WRITE_DIGITAL_OUT	<- Write digital outputs (V4L2_CID_PRIVATE_BASE+7)

Do u know out of the box, if gpio pins are polled frequently? If not, i have a 
look in the sources ;).

In the structure v4l2_queryctrl:

There could be IMHO 2 sights:

.minimum	<- lowest bit shift to use ( normal just 0 )
.maximum	<- highest bit shift to use ( number of bits, counted from 1 )
.step		<- eventuelly we could put the mask in there ( not very intuitiv, more 
a pragmatic solution ;) ).

or

.minimum	<- always 0
.maximum	<- all possible bits or'd ( e.g. 0x000000ff ) for 8 in/ -outputs
.step		<- Maximum number of pins - counted from 1 ( e.g. 8 )

What do u think?

For the capabilities

V4L2_CAP_DIGITAL_IO ( 0x08000000 )

Plz tell me more about ur event model, sounds interessting :).

Last point: Filters. Thx alot for this information :)
There are two ways on the bt... chips for handling the range of the components 
(0-255 or x-255 (?) ) and a filter for marking every pixel under a level as 
black ( putting it to zero ). Is there any way to do this yet - or have  u 
suggestions how to name it (the ioctl's)?

Hope to hear from u ( and anyone other ;) ),

Michael
Am Donnerstag, 26. Juni 2003 22:12 schrieb Tom Zoerner:
> Michael Veigel wrote:
> > I need some ioctl's for the I/O handling, and an ioctl for waiting on
> > special events ( sync, some input ports etc. )  (...)
> >
> > VIDIOC_IO_SETINPUTMASK   (int mask)
> > VIDIOC_IO_SETOUTPUTMASK  (int mask)
>
> Can't you use VIDIOC_S_CTRL, VIDIOC_G_CTRL, VIDIOC_QUERYCTRL for that?
> Identifiers can be allocated from the private range.  BTW are these
> GPIO pins? -> bttv-if.c
>
> > VIDIOC_WAITFOREVENT   ( int event )
>
> Well, if you used S_CTRL this could probably be solved with my proposed
> solution for general event handling (see thread "Proposal for channel
> coordination between multiple v4l2 users" here on the list.)  The main
> intention of the proposal was to report changes which were caused by
> other device users (e.g. via S_CTRL), but it could also be used to
> allow the driver to indicate asynchronous hardware state changes.
>
> > BIT_EVENT_ODDFIELD            0x01
> > BIT_EVENT_EVENFIELD           0x02
> > BIT_EVENT_FRAME               0x04
>
> Can't you use the field element in struct v4l2_buffer for those?
> Basically DQBUF can provide you already with these events, if I
> understand the meaning correctly.  If you're not interested in the
> data you need to capture only a few pixels.
>
> > The last point is, i want to enable some filters on the bt848 -
> > bt878. Are there currently ioctls for this?
>
> S_CTRL(V4L2_CID_PRIVATE_COMBFILTER) et.al.?
>
> -tom
>
>
> --
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic