Sunday, August 24, 2008

To submit the m5602 webcam driver mainline (or not)

I'm currently torn between submitting the m5602 webcam upstream.
So far, the software has been maturing pretty nicely. Some applications still do not work with the libv4l combo, but this seems more to be some initial struggle and Hans de Goede (the libv4l developer) has been pretty busy filing bugs at various projects trying to gain support for the library.

There are still various issues remaining: One sensor is still unidentified, the s5k83a goes crazy in high-lighting environments, the mt9m111 is still to dark initially but all in all things start to work.

One hard issue is that quite often someone reports an issue directly to me or via one of the mailing list. As I query the submitter for information no response is ever received. This makes it impossible for me to actually fix the bug, most annoying.

Anyway, submitting the project upstream is a good idea to get more coverage for the software and the submission must be done eventually. I've also been investigating to option to port the project to use the gspca framework but I still don't like the structure of it.

Tuesday, August 12, 2008

More progress on the m5602, protecting against sudden disconnects

I today experimented with how the driver reacts to usb disconnects.
Turns out that if no stream is active, this is no problem. If a disconnect happens during live video, the driver improperly doesn't release the /dev/video* device. Creating a new one upon usb connection.

I commit a fix today which always releases the video device but not until all clients have exited the program. I then realized that it's possible for the device to be reconnected while waiting for all clients to exit, then some kind of recovery has to happen. I haven't written the code to catch this but expect a commit soon.

Also under investigation is suspend/resume support. Currently suspend just fails when a stream is active...