Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Yet another thread of webcam woes [UNSOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 325
Location: Sweden

PostPosted: Tue Aug 24, 2010 9:31 am    Post subject: Yet another thread of webcam woes [UNSOLVED] Reply with quote

Same cam on previous (x86) computer worked fine. But can't get it to work on my new (amd64) one. Unsure if it's the 64-bit libs, upgrade in kernel, or what. Here goes.

Camera id / output of lsusb:
Code:
Bus 002 Device 006: ID 041e:4053 Creative Technology, Ltd Live! Cam Video IM

Driver to use: gspca_zc3xx:
Code:
~ $ grep 041e:4053 /usr/src/linux/Documentation/ -r
/usr/src/linux/Documentation/video4linux/gspca.txt:zc3xx                041e:4053       Creative Live!Cam Video IM

Camera detected by udev, and drivers properly loaded:
Code:
~ $ dmesg
<snip>
[  121.966721] Linux video capture interface: v2.00
[  121.968059] gspca: main v2.9.0 registered
[  121.968938] gspca: probing 041e:4053
[  121.968942] zc3xx: Sensor Tas5130 (VF0250)
[  121.969438] input: zc3xx as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/input/input9
[  121.969518] gspca: video0 created
[  121.969519] gspca: found int in endpoint: 0x82, buffer_len=8, interval=10
[  121.969552] usbcore: registered new interface driver zc3xx
[  121.969553] zc3xx: registered
<snip>
Code:
~ $ lsmod
Module                  Size  Used by
gspca_zc3xx            40788  0
gspca_main             23753  1 gspca_zc3xx
videodev               36891  1 gspca_main
v4l1_compat            13962  1 videodev
v4l2_compat_ioctl32    10113  1 videodev


Everything kind of looks fine, up until the point of actually trying to test it...

Mplayer output (no video screen at all, btw!)
Code:
~ $ mplayer tv://
MPlayer SVN-r29796-4.4.3 (C) 2000-2009 MPlayer Team
Spelar tv://.
TV filformat detekterat.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: USB Camera (041e:4053)
 Capabilites:  video capture  read/write  streaming
 supported norms:
 inputs: 0 = zc3xx;
 Current input: 0
 Current format: unknown (0x4745504a)
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: Cannot get fps
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
==========================================================================
Öppnar videodecoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================
Audio: inget ljud
Påbörjar uppspelning...
v4l2: ioctl streamon failed: Input/output error
V:   0.0   8/  8 ??% ??% ??,?% 0 0


When issuing the above mplayer the commend, the following is found in dmesg:
Code:
[ 1400.484887] gspca: found int in endpoint: 0x82, buffer_len=8, interval=10
[ 1400.701876] gspca: bandwidth not wide enough - trying again
[ 1400.722845] gspca: found int in endpoint: 0x82, buffer_len=8, interval=10
[ 1400.940313] gspca: bandwidth not wide enough - trying again
[ 1400.961261] gspca: found int in endpoint: 0x82, buffer_len=8, interval=10
[ 1401.178757] gspca: bandwidth not wide enough - trying again
[ 1401.199728] gspca: found int in endpoint: 0x82, buffer_len=8, interval=10
[ 1401.417197] gspca: bandwidth not wide enough - trying again
[ 1401.438159] gspca: found int in endpoint: 0x82, buffer_len=8, interval=10
[ 1401.654523] gspca: bandwidth not wide enough - trying again
[ 1401.675606] gspca: found int in endpoint: 0x82, buffer_len=8, interval=10
[ 1401.893079] gspca: bandwidth not wide enough - trying again
[ 1401.913798] gspca: no transfer endpoint found


Guvcview reports something similar:
Code:
 ~ $ guvcview
guvcview 1.2.2
video device: /dev/video0
/dev/video0 - device 1
Init. USB Camera (041e:4053) (location: usb-0000:00:1d.0-1.4)
{ pixelformat = 'JPEG', description = 'JPEG' }
{ discrete: width = 320, height = 240 }
        Time interval between frame:
{ discrete: width = 640, height = 480 }
        Time interval between frame:
vid:041e
pid:4053
driver:zc3xx
checking format: 1195724874
VIDIOC_G_COMP:
    quality:      50
    APPn:         0
    APP_len:      0
    APP_data:
    COM_len:      0
    COM_data:
    jpeg_markers: 0x18
fps is set to 0/0
V4L2_CTRL_FLAG_NEXT_CTRL supported
VIDIOC_STREAMON - Unable to start capture: Input/output-error
fps is set to 1/1
VIDIOC_STREAMON - Unable to start capture: Input/output-error
VIDIOC_STREAMON - Unable to start capture: Input/output-error
VIDIOC_REQBUFS - Failed to delete buffers: Enhet eller resurs upptagen (errno 16)


Exact same output in dmesg.

I've tried with combinations of LD_PRELOAD v4l1compat and v4l2convert; I've tried compiling drivers into kernel, and (most recently) having all video-stuff as modules. I've tried with and without the kernel v4l1 compatibility layer. Nothing seems to help. With some combinations of LD_PRELOAD, I get a green output (even in mplayer), but I kind of suspect it's just the libs trying to make sense of it and outputting something, rather than it actually being a step in the right direction.

It's starting to get a tad frustrating.


Last edited by krisse on Mon Sep 20, 2010 7:13 am; edited 1 time in total
Back to top
View user's profile Send private message
moult
Retired Dev
Retired Dev


Joined: 31 Mar 2008
Posts: 146
Location: Australia

PostPosted: Tue Aug 24, 2010 10:30 am    Post subject: Reply with quote

It's futile. I'm having the same problem: https://forums.gentoo.org/viewtopic-p-6399323.html - I've had it since early 2009.
_________________
thinkMoult - I write articles online. You might like some of them.
Planet Larry - do you write a blog and use Gentoo? Get your blog added to the Planet Larry Gentoo user blog aggregator!
Back to top
View user's profile Send private message
tuxtor
n00b
n00b


Joined: 22 Apr 2007
Posts: 43
Location: Guatemala

PostPosted: Mon Aug 30, 2010 3:55 am    Post subject: Reply with quote

I'm having the same issue with sonixj driver. Low bandwidth

I tried the same today:

1) Build the driver as a module, directly in the kernel

2) Disabling the v4l1 compatibility layer

3) The webcam is connected in a exclusive root hub with EHCI driver.

My webcam only works with .33 kernel, is very very strange. I expect that someone could give me a hint. Or I'll be in the .33 kernel for many months.
Back to top
View user's profile Send private message
JohnBlbec
Guru
Guru


Joined: 08 Feb 2003
Posts: 306

PostPosted: Fri Sep 03, 2010 6:18 am    Post subject: Reply with quote

the same problem. i can confirm my webcam worked with kernel 32 w/o problem.
now i am using kernel 35 and an upper part of screen freezes - lower part works ok :-)
(the same bug for kernel 33 and 34)

# lsusb | grep Camera
Code:

Bus 002 Device 005: ID 0471:032d Philips SPC 210NC PC Camera


# lsmod | grep zc
Code:

gspca_zc3xx        40436  0
gspca_main         24001  1 gspca_zc3xx
usbcore            130623  8 gspca_zc3xx,gspca_main,sl811_hcd,usbhid,ohci_hcd,uhci_hcd,usb_storage,ehci_hcd


gentoo-sources-2.6.35-r5
Code:

CONFIG_USB_GSPCA_ZC3XX=m
CONFIG_VIDEO_V4L2_COMMON=m
CONFIG_VIDEO_V4L1_COMPAT=y
CONFIG_VIDEO_V4L2=m
CONFIG_V4L_USB_DRIVERS


--- from dmesg begin ---
Code:

zc3x=yx: probe sif 0x0000
zc3xx: probe 2wr ov vga 0x0000
zc3xx: probe 3wr vga 1 0x0000
zc3xx: probe 3wr vga 2 0x0000
zc3xx: Sensor UNKNOWN_0 force Tas5130
input: zc3xx as /devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5.2/input/input12
gspca: video0 created
gspca: found int in endpoint: 0x82, buffer_len=8, interval=10
usbcore: registered new interface driver zc3xx
zc3xx: registered
usb 2-5.2: USB disconnect, address 4
gspca: video0 disconnect
gspca: video0 released
usb 2-5.2: new full speed USB device using ehci_hcd and address 5
gspca: probing 0471:032d
zc3xx: probe sif 0x0007
zc3xx: probe sensor -> 000f
zc3xx: Find Sensor PAS106
input: zc3xx as /devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5.2/input/input13
gspca: video0 created
gspca: found int in endpoint: 0x82, buffer_len=8, interval=10

--- from dmesg end ---

i have tried to load gspca_zc3xx module with param force_sensor=0x000f directly but the result is the same. camera does not work correctly.

my test command line using mplayer is: mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 15 -flip
and the output:
Code:

MPlayer SVN-r30554-4.4.3 (C) 2000-2010 MPlayer Team

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: SPC 210NC     
 Capabilites:  video capture  read/write  streaming
 supported norms:
 inputs: 0 = zc3xx;
 Current input: 0
 Current format: unknown (0x4745504a)
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: Cannot get fps
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================
Audio: no sound
FPS forced to be 15.000  (ftime: 0.067).
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [gl] 352x288 => 352x288 Planar 422P  [flip]
[mjpeg @ 0xab1ce0]error count: 64
[mjpeg @ 0xab1ce0]error y=19 x=3
[mjpeg @ 0xab1ce0]EOI missing, emulating
[mjpeg @ 0xab1ce0]EOI missing, emulating
[mjpeg @ 0xab1ce0]mjpeg_decode_dc: bad vlc: 0:0 (0x1438900)
[mjpeg @ 0xab1ce0]error dc
[mjpeg @ 0xab1ce0]error y=35 x=11
[mjpeg @ 0xab1ce0]EOI missing, emulating
[mjpeg @ 0xab1ce0]mjpeg_decode_dc: bad vlc: 0:0 (0x1438900)
[mjpeg @ 0xab1ce0]error dc
.
.
.
[mjpeg @ 0xab1ce0]mjpeg_decode_dc: bad vlc: 0:0 (0x1438900)
[mjpeg @ 0xab1ce0]error dc
[mjpeg @ 0xab1ce0]error y=35 x=21
[mjpeg @ 0xab1ce0]EOI missing, emulating
[mjpeg @ 0xab1ce0]EOI missing, emulating
[mjpeg @ 0xab1ce0]EOI missing, emulating
v4l2: ioctl set mute failed: Invalid argument
v4l2: 216 frames successfully processed, 162 frames dropped.

Exiting... (Quit)


for skype i am usinng LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so, of course, because my system is 64bit.

updated on 09/04/2010

i have removed from the kernel following:
Code:

# CONFIG_USB_VIDEO_CLASS=m
# CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y


and dmesg output looks better, but the troubles are still present

--- from dmesg begin ---
Code:

zc3xx: probe sif 0x0007
zc3xx: probe sensor -> 000f
zc3xx: Find Sensor PAS106
input: zc3xx as /devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5.2/input/input12
gspca: video0 created
gspca: found int in endpoint: 0x82, buffer_len=8, interval=10
usbcore: registered new interface driver zc3xx
zc3xx: registered

--- from dmesg end ---

i have noticed a warning gspca: bandwidth not wide enough - trying again in the /var/log/messages

hope it helps to investigate the issue...
Back to top
View user's profile Send private message
opalmirror
n00b
n00b


Joined: 26 Sep 2010
Posts: 2
Location: Colton, OR, US

PostPosted: Sun Sep 26, 2010 10:47 pm    Post subject: Reply with quote

Looks like this issue is at least partially understood here.

James
Back to top
View user's profile Send private message
furanku
l33t
l33t


Joined: 08 May 2003
Posts: 905
Location: Hamburg, Germany

PostPosted: Tue Sep 28, 2010 1:38 pm    Post subject: Reply with quote

I just checked out the mecurial version from linuxtv.org. Now spcaview shows exacty one frame before it crashes with
Code:
cvsync err
: Invalid argument
Segmentation fault

Code:
# lsusb
[...]
Bus 002 Device 005: ID 041e:4036 Creative Technology, Ltd Webcam Live!/Live! Pro
[...]

Code:
 # lsmod | grep gspca
gspca_zc3xx            40350  0
gspca_main             23880  1 gspca_zc3xx
videodev               41710  5 tuner,gspca_main,cx8800,cx88xx,v4l2_common
usbcore               136597  7 gspca_zc3xx,gspca_main,usbhid,usb_storage,ohci_hcd,ehci_hcd

Kernel Version 2.6.35-gentoo-r9-default on ~amd64.

EDIT
Code:
$ mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video1 -fps 15
(/dev/video0 is my DVB card) works with the latest linuxtv.org drivers! Just follow the instructions on this page.
Back to top
View user's profile Send private message
opalmirror
n00b
n00b


Joined: 26 Sep 2010
Posts: 2
Location: Colton, OR, US

PostPosted: Tue Sep 28, 2010 2:19 pm    Post subject: Reply with quote

I have also seen where I can successfully capture large (640x480) images under bright light but not under low light where the data readback from /dev/video0 is corrupted. More significantly, I have discovered I have general USB instabilities, not just video... Currently low-speed devices (keyboard/mouse) and a single USB external hard disk seem to be no problem, but both PL2303 serial devices and the gspca video camera, when using significant scheduled bandwidth (every few seconds to few minutes) seem to lock up my system (running a recent Linux kernel). So, I'm chalking this up to an instability in supporting my older hardware (Asus AS8-X motherboard with AMD Athlon(tm) 64 FX-60 Dual Core CPU, SiS 765 North Bridge, SiS 965L South Bridge - a 'bare bones' system assembled from pieces). On this board, the South Bridge hosts all 8 USB ports. The system has been a bit underpowered for its current application, so maybe it's time to go with some newer, better supported hardware on a popular mainboard, where race conditions in the USB subsystem are better wrung out.
Back to top
View user's profile Send private message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 325
Location: Sweden

PostPosted: Tue Sep 28, 2010 6:07 pm    Post subject: Reply with quote

opalmirror wrote:
Looks like this issue is at least partially understood here.

James

Interesting!
Back to top
View user's profile Send private message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 325
Location: Sweden

PostPosted: Wed Sep 29, 2010 8:42 pm    Post subject: Reply with quote

Tried checking if earlier kernel versions would work for me --- tried stable 2.6.29-r5 and 2.6.32-r7, but exactly same problems with them as with 2.6.34-r* and 2.6.35-r8. :-/ *sigh*
Back to top
View user's profile Send private message
aoeuaoue
n00b
n00b


Joined: 26 Feb 2010
Posts: 31

PostPosted: Fri Nov 05, 2010 8:51 pm    Post subject: same symptoms here!! Reply with quote

hey,

I have the same problem with gentoo-sources-2.6.36 with a PlayStation3 Eye webcam. In earlier kernels I was able to have 2 PS3 Eye webcams plus another Philips webcam playing at the same time. Now NONE work!!

Code:
[495763.549018] usb 2-5: new high speed USB device using ehci_hcd and address 2
[495763.667787] usb 2-5: New USB device found, idVendor=1415, idProduct=2000
[495763.667791] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[495763.667794] usb 2-5: Product: USB Camera-B4.04.27.1
[495763.667795] usb 2-5: Manufacturer: OmniVision Technologies, Inc.
[495954.493831] gspca: main v2.10.0 registered
[495954.494437] gspca: probing 1415:2000
[495954.611029] ov534: Sensor ID: 7721
[495954.705402] ov534: frame_rate: 30
[495954.705469] gspca: video1 created
[495954.705501] usbcore: registered new interface driver ov534
[495954.705503] ov534: registered


Everything is detected ok even the /dev/video1 is created (/dev/video0 is my DVB). Then I try mplayer like this:
mplayer tv:// -tv driver=v4l2:device=/dev/video1
Quote:
MPlayer SVN-r32533-4.4.5 (C) 2000-2010 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: USB Camera-B4.04.27.1
Capabilities: video capture read/write streaming
supported norms:
inputs: 0 = ov534;
Current input: 0
Current format: YUYV
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl streamon failed: Input/output error
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 640x480 => 640x480 Packed YUY2
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...
V: 0.0 5/ 5 ??% ??% ??,?% 0 0


Which results in GREEN output

█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████
█████████████████████████████████████████████

and dmesg message as:

Code:
[496371.617803] gspca: no transfer endpoint found
[496459.920476] gspca: no transfer endpoint found


The modules:

Code:
Module                  Size  Used by
gspca_ov534             9784  0
gspca_main             22653  1 gspca_ov534


Any ideas as to what could be the cause and where is a solution to this?
Back to top
View user's profile Send private message
Fahrstuhl
n00b
n00b


Joined: 23 Oct 2006
Posts: 2
Location: Germany

PostPosted: Sun Dec 19, 2010 2:58 pm    Post subject: Making the PSEye work again with Kernel >= 2.6.34 Reply with quote

Hi,

I had the same problems as aoeuaoue (PSEye doesn't work for 2.6.34 and up) and found a solution after reading this:
opalmirror wrote:
Looks like this issue is at least partially understood here.

James

I went to the website of one of the gspca-driver developers and downloaded his test-version of the driver (It's on the right side of the homepage).
Untar it to whereever you want to, read the README, then install it by make && sudo make install.

WARNING: It removes and replaces all of the system's gspca drivers, which might cause problems. Worked for me, but YMMV.
Back to top
View user's profile Send private message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 325
Location: Sweden

PostPosted: Mon Jan 10, 2011 9:36 am    Post subject: Reply with quote

Tried with the aforementioned dev's current test-driver (2.11.19), but sadly experienced exactly the same errors as before -- at least with driver (gspca_)zc3xx.
Back to top
View user's profile Send private message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 325
Location: Sweden

PostPosted: Thu Nov 22, 2012 7:53 pm    Post subject: Reply with quote

Bumping in case some webcam-wiz has joined the gentoo community. :P
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54097
Location: 56N 3W

PostPosted: Thu Nov 22, 2012 8:13 pm    Post subject: Reply with quote

krisse,

Please pastebin your dmesg output and post the usb setup from your kernel.
In particular, the options relating to Transaction Translation.

These often have a bearing on bandwidth issues.

The other thing to try is to make sure the webcam is on a usb bus on its own, so it can get all of the bus bandwidth.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
krisse
Guru
Guru


Joined: 15 Mar 2005
Posts: 325
Location: Sweden

PostPosted: Thu Nov 22, 2012 8:21 pm    Post subject: Reply with quote

NeddySeagoon, thanks for replying!

Indeed it seems you're right. Moving it to a bus of it's own has enabled me to get a crappy image. But an image, nevertheless! It works, as least in some fashion. There's reason to hope.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum