URGENT! New support for cards from IDS-imaging / ioctl's for digital I/O

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



Hi all,

I post this again, because i think it's important to manage card numbers and 
ioctls. Don't want to change my final code because another one has used the 
same numbers!

I'm currently working on support for a few cards from ids-imaging 
(www.ids-imaging.de).

These are 1/2/4 Chips cards based on Bt878's. The have a few digital 
input/output pins for security applications.

I have assigned the following card - number and defines for the card types:
card 0x68 (106) IDS-Falcon ( 1 chip, no i/o pins )
card 0x69 (105) IDS Falcon Plus ( 1 chip, 8 I/O pins )
card 0x6a (106) IDS Falcon Duo ( 2 Chips, 12 Input/8 Output pins )
card 0x6b (107) IDS Falcon Quattro ( 4 Chips, 12 Input/8 Output pins )
card 0x6c (108) IDS Eagle ( 1 Chips, Sync generators, ? I/O pins )

or in C ;):
#define BTTV_IDS_FALCON     0x68
#define BTTV_IDS_FALCON_PLUS 0x69
#define BTTV_IDS_FALCON_DUO 0x6a
#define BTTV_IDS_FALCON_QUATTRO 0x6b
#define BTTV_IDS_EAGLE2     0x6c

I need some ioctl's for the I/O handling, and an ioctl for waiting on special 
events ( sync, some input ports etc. ). What do u think about the ioctls? Are 
they worth to use global ioctl's, or just private one's for this dirver? I 
think that there could be more cards which support digital I/O, and it would 
be nice to have a unique handling of them :).

My suggestions is, that there should be the following ioctls for this:

VIDIOC_IO_SETINPUTMASK	(int mask)
VIDIOC_IO_SETOUTPUTMASK	(int mask)

eventually the corresponding GET ioctls also :).

for handling a mask of I/O pins, so we could take the other ioctl's always 
from bit 0 upwards ...

VIDIOC_IO_SETOUTPUT 	( int output )
VIDIOC_IO_GETINPUT	( int input )

for setting / getting the values of the pins.

VIDIOC_WAITFOREVENT	( int event )

to wait for events. I need the following events (think these bit's should be 
or'ed together) :

BIT_EVENT_ODDFIELD		0x01
BIT_EVENT_EVENFIELD		0x02
BIT_EVENT_FRAME			0x04
BIT_EVENT_INPUT			0x08
BIT_EVENT_OUTPUT			0x10
BIT_EVENT_GETSYNC		0x20
BIT_EVENT_LOSTSYNC		0x40

The last point is, i want to enable some filters on the bt848 - bt878. Are 
there currently ioctls for this?

And last but not least, plz. help me because of the ioctl values - i'm a total 
newby in asigning these numbers :).

What do u think about that?

Michael




[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux