How do people's webcams behave on USB cable disconnect?

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



Hi,

If you have a USB webcam please let me know what happens if you 
disconnect its usb cable while it is streaming images to a v4l viewer
(e.g. xawtv)


I'm trying to understand what the "normal" behaviour of a USB
v4l1 webcam should be (and what it actually is)
when the usb cable is just yanked out and 
the /dev/video<n> it is connected to disappears.

(even if the cable is not yanked, 2.4.x usb/hub.c can 
simulate this if the USB hub bandwidth is overloaded, which
it seems to intepret as "Electromagnetic Interference (EMI)
due to bad cables", according to an error message.... )

I'm working on maintaining the cpia driver, and this causes a nasty hang of
the v4l application (xawtv, gqcam...) when one tries to close 
the app, the app (and the kernel driver) are left in a frozen "busy" state that
can only be cleared by a reboot....

The same thing happens when I yank the usb cable of a running ov511
cam, so its not just a cpia issue....
(I only have cpia and ov511 cams to test with).

Do *any* usb v4l1 webcams + apps behave nicely when the cable
is yanked?  (I would like to hear about 
actual behavior, not just theoretical!)


I would guess what *should* happen is that image on the
v4l app freezes (I see this), but the app should be closable and the
kernel module unloadable before the app is closed.

In my case, I see that deregistration of the cpia module is postponed
until I attempt to close the app, (which until then shows a frozen image,
and is producing lots of error messages that the image can't be found) 
and then the hang occurs.

The XFree86 desktop still functions OK, but it hangs
if I attempt to log out. (because the v4l app cant be
shut down).

Thanks for any info about how other drivers/apps handle this.

----------------------------------
E-Mail: Duncan Haldane <f.duncan.m.haldane@xxxxxxxxxxxxxxxx>
Date: 02-Dec-2002
Time: 12:20:09

This message was sent by XFMail
----------------------------------





[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