2002-01-25 03:29:17

by christophe barbé

[permalink] [raw]
Subject: usb or video4linux problem


I send a mail few days ago about a problem with a usb webcam (Dlink
DCS100). I see the same thing with various webcam apps (gnomemeeting,
gqcam, camstream, xawtv, ...). So clearly it's not a user-level problem.
It can be a hardware one but i'm convinced it is not (or in the OHCI
chip in my toshiba satellite 2520cds).

With all app I can see the stream but suddenly it freezes.
Because of the following output from xawtv when the problem occurs:

v4l: timeout (got SIGALRM), hardware/driver problems?
ioctl: VIDIOCSYNC(0): Appel syst?me interrompu

I have checked out the code and the interesting part in drv1-v4l.c is :

alarms=0;
alarm(SYNC_TIMEOUT);

retry:
if (-1 == (rc = xioctl(h->fd,VIDIOCSYNC,h->buf_v4l+frame))) {
if (errno == EINTR && !alarms)
goto retry;
}

From which I conclude that SYNC_TIMEOUT could be to small. The value is
3 secondes which seems to be quite enough. To be sure I've tried with 30
and got the same thing.

So It's a justified timeout because the nextframe will never be there.
usbview sees the webcam before and after the problem.
Restarting the app is enough to get the stream.

I'm convinced that it's a problem with OHCI.
I think it's a soft problem because I can trigger it with cpu/io
activity.

What can I do to go further ?

Christophe

--
Christophe Barb? <[email protected]>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E

People that hate cats will come back as mice in their next life.
--Faith Resnick


Attachments:
(No filename) (1.47 kB)
(No filename) (241.00 B)
Download all attachments

2002-01-25 04:13:05

by Greg KH

[permalink] [raw]
Subject: Re: usb or video4linux problem

On Thu, Jan 24, 2002 at 10:28:57PM -0500, christophe barb? wrote:
>
> I'm convinced that it's a problem with OHCI.
> I think it's a soft problem because I can trigger it with cpu/io
> activity.

Does the kernel log show any USB errors, or any USB messages at all?
What kernel version are you using?

thanks,

greg k-h

2002-01-25 04:42:58

by christophe barbé

[permalink] [raw]
Subject: Re: usb or video4linux problem

On Thu, Jan 24, 2002 at 08:12:26PM -0800, Greg KH wrote:
> On Thu, Jan 24, 2002 at 10:28:57PM -0500, christophe barb? wrote:
> >
> > I'm convinced that it's a problem with OHCI.
> > I think it's a soft problem because I can trigger it with cpu/io
> > activity.
>
> Does the kernel log show any USB errors, or any USB messages at all?
> What kernel version are you using?

But I see ov511 output (with debug=4 option) until the freeze and then
nothing :

Jan 24 23:23:53 turing kernel: ov511.c: [ov511_move_data:4291] Frame end, curframe = 0, packnum=159, hw=352, vw=288, recvd=152631
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_move_data:4338] Frame start, framenum = 1
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5470] CMCAPTURE
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5472] frame: 0, size: 352x288, format: 7
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5530] VIDIOCMCAPTURE: renewing frame 0
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_new_frame:4836] ov511->curframe = 1, framenum = 0
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5550] syncing to frame 1, grabstate = 1
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_move_data:4291] Frame end, curframe = 1, packnum=159, hw=352, vw=288, recvd=152631
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_move_data:4338] Frame start, framenum = 0
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5470] CMCAPTURE
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5472] frame: 1, size: 352x288, format: 7
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5530] VIDIOCMCAPTURE: renewing frame 1
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_new_frame:4836] ov511->curframe = 0, framenum = 1
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5550] syncing to frame 0, grabstate = 1
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_move_data:4291] Frame end, curframe = 0, packnum=159, hw=352, vw=288, recvd=152631
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5470] CMCAPTURE
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5472] frame: 0, size: 352x288, format: 7
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5530] VIDIOCMCAPTURE: renewing frame 0
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_new_frame:4836] ov511->curframe = 1, framenum = 0
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5550] syncing to frame 1, grabstate = 1
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_move_data:4338] Frame start, framenum = 1
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_move_data:4291] Frame end, curframe = 1, packnum=159, hw=352, vw=288, recvd=152631
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_move_data:4338] Frame start, framenum = 0
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5470] CMCAPTURE
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5472] frame: 1, size: 352x288, format: 7
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5530] VIDIOCMCAPTURE: renewing frame 1
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_new_frame:4836] ov511->curframe = 0, framenum = 1
Jan 24 23:23:53 turing kernel: ov511.c: [ov511_ioctl_internal:5550] syncing to frame 0, grabstate = 1

Then the video freeze and I get no more output.


>
> thanks,
>
> greg k-h
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
Christophe Barb? <[email protected]>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E

Cats are rather delicate creatures and they are subject to a good
many ailments, but I never heard of one who suffered from insomnia.
--Joseph Wood Krutch


Attachments:
(No filename) (3.77 kB)
(No filename) (241.00 B)
Download all attachments

2002-01-25 04:40:18

by christophe barbé

[permalink] [raw]
Subject: Re: usb or video4linux problem

On Thu, Jan 24, 2002 at 08:12:26PM -0800, Greg KH wrote:
> On Thu, Jan 24, 2002 at 10:28:57PM -0500, christophe barb? wrote:
> >
> > I'm convinced that it's a problem with OHCI.
> > I think it's a soft problem because I can trigger it with cpu/io
> > activity.
>
> Does the kernel log show any USB errors, or any USB messages at all?

No message at all and the usb debug kernel option is on.

> What kernel version are you using?

2.4.17

>
> thanks,

Remember that I see a (I believe related) problem with the usb mouse.
Suddenly I can't use it. Switching on the console and then back to X
give me the mouse back.

Christophe

> greg k-h
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
Christophe Barb? <[email protected]>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E

Thousands of years ago, cats were worshipped as gods.
Cats have never forgotten this. --Anonymous


Attachments:
(No filename) (1.09 kB)
(No filename) (241.00 B)
Download all attachments