V4L2, USB drivers and devfs

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



Hi, 

I am writing a device driver for the Intel CS330 USB webcam to meet the
V4L2 Video Capture device specification.  I am here to ask some advice on
the interface to V4L2 that is not made clear in the ``V4L2 - Driver
Writer's Guide''.  

I am attempting to figure out how V4L2 works with regards devfs.  The
guide mentioned above says that the videodev driver claims character
device major 81 and it is up to the specific device driver to choose a
minor number from parameters passed to the module upon instantiation. 
While I can see that this would make sense for a device such as a TV card
that is installed in the machine permanently it does not appear to suit
the nature of a hotplug device such as a USB webcam.  

Currently I have followed this advice and am using module parameters to
choose the minor version number.  I call v4l2_device_register() in
response to the USB probe function, choose the next minor number from the
list in parameters and bind the v4l2_device and usb_device together thus
connecting each minor number to a particular USB camera plugged into the
bus.  

I have no real problem with this method and it does work fine but it does
not seem the most elegant solution.  I would rather the driver choose a
minor number automatically.  Better still, if videodev used devfs, I would
like to do away with major/minor numbers all together and have the driver
automatically create /dev/videoN devices using devfs for each camera that
is plugged in.  The guide mentioned above makes no reference to devfs and
if/how videodev makes use of it (it appears not to have been updated since
Dec 23, 1999).  

- Can anyone offer any advice on how they have tackled this issue in their
drivers?  
- Could anyone point me to an updated or more pertinent version of the
V4L2 Driver Writer's guide?  
- If this is all rubbish and what I am already doing is OK, could you let
me know?  

I'd really appreciate any help.  

I haven't really got anything release worthy yet, still getting the
groundwork done.  I'm borrowing a CATC from work on Wednesday so hope to
get the USB side of things sorted out in the next week or two.  I'll have
a website up for the driver over the weekend.  

Thanks in advance, 

Robin





[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