uvcvideo: Failed to submit URB 0 (-28) with Cam Sync HD VF0770 (041e:4095)

1,823 views
Skip to first unread message

Piotr Król

unread,
Aug 6, 2016, 10:00:29 AM8/6/16
to linux...@vger.kernel.org, linux...@googlegroups.com, Thomas Johnson, George Saliba
Hi all,
We have custom Allwinner A20 based hardware on which we try to utilize
USB DRD (configured in device tree as host [1]) to connect Creative web
camera [2].

We use 4.7 kernel release built using buildroot. Hardware configuration can
be described like that:

A20 mainboard -> LAN9514i -> Creative web camera

I tried v4l2grab and fswebcam, but both application result in
"uvcvideo: Failed to submit URB 0 (-28)" and further complaining that
there is no space left on device, despite there is planty of free
space [3]. We also tried to capture in /tmp with the same result.

v4l2grab output:
# v4l2grab -d /dev/video0 -o image.jpg
[ 1802.800160 ] uvcvideo: Failed to submit URB 0 (-28).
libv4l2: error turning on stream: No space left on device
VIDIOC_STREAMON error 28, No space left on device

fswebcam output:
# fswebcam -r 1280x720 --jpeg 95 -D 1 image.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Delaying 1 seconds.
[ 432.952080 ] uvcvideo: Failed to submit URB 0 (-28).
Error starting stream.
VIDIOC_STREAMON: No space left on device
Unable to use mmap. Using read instead.
Unable to use read.

What we also tried is checking camera with Raspberry Pi Compute Module
in that way:

RPICM -> LAN9514i -> LAN9514i -> Creative web camera

And this works without problem.

We proved that USB was correctly configured in host mode by trying
usb-storage, usbhid and ftdi driver, what can be found in dmesg [4].

I have hard time with finding from what code -28 came from, since calls
are nested in usb subsystem. What this error means ? How it can be
avoided ?

Any other ideas how to debug this issue further are welcome.

[1] http://paste.ubuntu.com/22446905/
[2] http://www.scanmalta.com/scanshop/creative-live-cam-sync-1-3mp-hd-webcam.html
[3] http://paste.ubuntu.com/22448114/
[4] http://paste.ubuntu.com/22446585/

--
Best Regards,
Piotr Król
Embedded Systems Consultant
http://3mdeb.com | @3mdeb_com

Bastiaan van den Berg

unread,
Aug 6, 2016, 10:05:26 AM8/6/16
to piotr...@3mdeb.com, linux...@vger.kernel.org, linux...@googlegroups.com, Thomas Johnson, George Saliba
First google hit on actual error suggests the 'out of space' is a way to denote bandwidth limitation
it also has a workaround


--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Piotr Król

unread,
Aug 6, 2016, 11:14:50 AM8/6/16
to Bastiaan van den Berg, linux...@vger.kernel.org, linux...@googlegroups.com, Thomas Johnson, George Saliba
On Sat, Aug 06, 2016 at 04:05:04PM +0200, Bastiaan van den Berg wrote:

Hi Bastiaan,

> First google hit on actual error suggests the 'out of space' is a way to denote
> bandwidth limitation
> it also has a workaround
>
> http://answers.ros.org/question/12582/usb_cam-vidioc_streamon-error-28/

Apparently my goole results are not tweaked well for UVC issues. Thanks
for this link.

Unfortunately this doesn't help. Full test log can be found here [1].

I assume this log mean quirk was applied correctly:
# modprobe uvcvideo quirks=128
[ 63.137035] uvcvideo: Found UVC 1.00 device Live! Cam Sync HD VF0770 (041e:4095)
[ 63.144561] uvcvideo: Forcing device quirks to 0x80 by module parameter for testing purpose.
[ 63.152987] uvcvideo: Please report required quirks to the linux-uvc-devel mailing list.
[ 63.172943] input: Live! Cam Sync HD VF0770 as /devices/platform/soc@01c00000/1c13000.usb/musb-hdrc.1.auto/usb5/5-1/5-1.2/5-1.2:1.0/input/input1
[ 63.186367] usbcore: registered new interface driver uvcvideo
[ 63.192113] USB Video Class driver (1.1.1)

# v4l2grab -d /dev/video0 -o image.jpg
[ 78.631747] uvcvideo: Failed to submit URB 0 (-28).
libv4l2: error turning on stream: No space left on device
VIDIOC_STREAMON error 28, No space left on device

Maybe I should cc linux-uvc-devel as mention in log ?

[1] http://paste.ubuntu.com/22455180/

Bastiaan van den Berg

unread,
Aug 6, 2016, 11:25:46 AM8/6/16
to Bastiaan van den Berg, linux...@vger.kernel.org, linux...@googlegroups.com, Thomas Johnson, George Saliba
Here is the second google hit on 'VIDIOC_STREAMON error 28, No space left on device'

Piotr Król

unread,
Aug 8, 2016, 6:45:22 PM8/8/16
to linux-sunxi, buzz...@gmail.com, linux...@vger.kernel.org, tjoh...@motionfigures.com, grgs...@gmail.com, Piotr Król


On Saturday, August 6, 2016 at 5:25:46 PM UTC+2, Bastiaan van den Berg wrote:
Here is the second google hit on 'VIDIOC_STREAMON error 28, No space left on device'


Hi Bastiaan,
thanks for second link. We have just one camera and tried various ways to limit bandwidth 
used. This is not LAN9514 issue since we see the same behavior when connecting 
camera directly to board.

# v4l2-ctl -d /dev/video0 --list-formats
ioctl: VIDIOC_ENUM_FMT
Index       : 0
Type        : Video Capture
Pixel Format: 'YUYV'
Name        : YUYV 4:2:2

Index       : 1
Type        : Video Capture
Pixel Format: 'MJPG' (compressed)
Name        : Motion-JPEG

ffmpeg list_formats [1]:
(...)
[video4linux2,v4l2 @ 0x4fa80] Raw       :     yuyv422 :           YUYV 4:2:2 : 640x360 320x240 640x480 960x720 1280x720
[video4linux2,v4l2 @ 0x4fa80] Compressed:       mjpeg :          Motion-JPEG : 640x360 320x240 640x480 960x720 1280x720

ffmpeg -f video4linux2 -input_format mjpeg -framerate 5 -video_size 320x240 -i /dev/video0 -c:v copy output.mkv [2]
(...)
uvcvideo: Failed to submit URB 0 (-28).
(...)
[video4linux2,v4l2 @ 0x4fb60] The driver changed the time per frame from 1/1 to 1/5
[video4linux2,v4l2 @ 0x4fb60] ioctl(VIDIOC_STREAMON): No space left on device
/dev/video0: No space left on device

Even framerate 1 fails.

We also tested musb driver in host mode with USB storage device. For vfat filesystem
we had 1.8MB/s writes and 15MB/s reads using simple dd (bs=500K count=1024).

I found this thread [3]. I will include Igor and Hans to initial post maybe they can add something.

Please keep me on CC since I'm not subscribed to this mailing list.

Piotr Król

unread,
Aug 8, 2016, 7:02:39 PM8/8/16
to linux...@vger.kernel.org, linux...@googlegroups.com, Thomas Johnson, George Saliba, Igor Pečovnik, hdeg...@redhat.com
On Sat, Aug 06, 2016 at 04:00:22PM +0200, Piotr Król wrote:
> Hi all,

Hi Hans, Igor,
I found your discussion about very similar issue here [5]. It looks
like musb driver in host mode doesn't give enough bandwidth for USB
camera in my case.

We tested USB device and getting not so bad results for bulk endpoint
read (15MB/s) and write (1.8MB/s). I'm not sure, if this numbers make
sense for isochronous endpoint, but it seems there is enough bandwidth
for video data transfer.

Full dmesg can be found here [6]

Have you got any ideas what maybe wrong ? Does it make sense to use musb
in host mode to transfer video stream ?

Any help appreciated.
[5] https://groups.google.com/d/msg/linux-sunxi/-O3GckFuje8/aTAkPk1JCQAJ
[6] http://paste.ubuntu.com/22747309/

Piotr Król

unread,
Aug 8, 2016, 7:04:34 PM8/8/16
to linux...@vger.kernel.org, linux...@googlegroups.com, Thomas Johnson, George Saliba, hdeg...@redhat.com, pecovn...@gmail.com
On Tue, Aug 09, 2016 at 01:02:31AM +0200, Piotr Król wrote:
> On Sat, Aug 06, 2016 at 04:00:22PM +0200, Piotr Król wrote:
> > Hi all,
>
> Hi Hans, Igor,

+Igor
Reply all
Reply to author
Forward
0 new messages