Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116549 - spca5xx webcam driver fails on AMD64
Summary: spca5xx webcam driver fails on AMD64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Mike Doty (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-23 15:43 UTC by Marti Raudsepp
Modified: 2006-01-08 11:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
lsusb-v.txt (lsusb-v.txt,23.68 KB, text/plain)
2005-12-29 02:16 UTC, Marti Raudsepp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marti Raudsepp 2005-12-23 15:43:57 UTC
The media-video/spca5xx-20051212 webcam driver fails with Creative Webcam Notebook on AMD64, kernel gentoo-sources-2.6.14-r2. I tried opening /dev/video0 with several different programs, included is the output of spcaview and relevant messages from syslog.

== spcaview output: ==
[marti@non ~]$ spcaview
 Spcaview version: 1.1.5 date: 12:12:2005 (C) mxhaard@magic.fr 
Initializing SDL.
SDL initialized.
bpp 3 format 15
Using video device /dev/video0.
Initializing v4l.
ERROR opening V4L interface 
: No space left on device

== Plugging in: ==
Dec 24 03:30:57 non usb 2-4.3: new full speed USB device using ohci_hcd and address 9
Dec 24 03:30:58 non /var/tmp/portage/spca5xx-20051212/work/spca5xx-20051212/drivers/usb/spca5xx.c: USB SPCA5XX camera found. Type Creative Webcam Notebook Zc301+Tas5130c
Dec 24 03:30:58 non /var/tmp/portage/spca5xx-20051212/work/spca5xx-20051212/drivers/usb/spca5xx.c: [spca5xx_probe:8380] Camera type JPEG 
Dec 24 03:30:58 non /var/tmp/portage/spca5xx-20051212/work/spca5xx-20051212/drivers/usb/zc3xx.h: [zc3xx_config:346] Find Sensor UNKNOW_0 force Tas5130
Dec 24 03:30:58 non /var/tmp/portage/spca5xx-20051212/work/spca5xx-20051212/drivers/usb/spca5xx.c: [spca5xx_getcapability:2207] maxw 640 maxh 480 minw 176 minh 144

== Running spcaview: ==
Dec 24 03:32:29 non /var/tmp/portage/spca5xx-20051212/work/spca5xx-20051212/drivers/usb/spca5xx.c: init isoc: usb_submit_urb(0) ret -28
Dec 24 03:32:29 non /var/tmp/portage/spca5xx-20051212/work/spca5xx-20051212/drivers/usb/spca5xx.c: [spca5xx_open:4009]  DEALLOC error on init_Isoc
Dec 24 03:32:29 non 

== Unlugging: ==
Dec 24 03:33:15 non usb 2-4.3: USB disconnect, address 9
Dec 24 03:33:15 non ohci_hcd 0000:00:02.0: leak ed ffff810002299500 (#81) state 2
Comment 1 Mike Doty (RETIRED) gentoo-dev 2005-12-23 15:47:28 UTC
seems to be something with the usb driver, and not specificly spca5xx.

kernel team: any thoughts?
Comment 2 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-12-23 15:57:19 UTC
As this is an out-of-tree kernel driver, not much we can do, how about asking
upstream if they have ever tested it on amd64 platforms?
Comment 3 Mike Doty (RETIRED) gentoo-dev 2005-12-23 16:10:00 UTC
(In reply to comment #2)
> As this is an out-of-tree kernel driver, not much we can do, how about asking
> upstream if they have ever tested it on amd64 platforms?
> 

I'm the package maintainer and I do all my testing on amd64.  I suppose I can upgrade to 2.6.14 this weekend and see if I can recreate the problem.
Comment 4 Mike Doty (RETIRED) gentoo-dev 2005-12-25 22:30:58 UTC
ok, upgraded to 2.6.14-gentoo-r2, and I can partly confirm the bug.

spcaview /dev/video*:   hardlock
spcaserv + spcaview -w: works(seems to be a window destruction bug in spcaview though)
gqcam /dev/video*:      works perfectly
camserv /dev/video*:    random colors in resulting webpage.

I'll be contacting upstream about this.  In the mean time, if you need to use your camera and can't use gqcam, then I suggest downgrading to 2.6.13
Comment 5 Mike Doty (RETIRED) gentoo-dev 2005-12-26 10:48:20 UTC
Found a fix:  Enable "Enforce USB Bandwidth Allocation" (CONFIG_USB_BANDWIDTH)

everything seems to work after enabling this.  Please reopen if the bug still happens.
Comment 6 Marti Raudsepp 2005-12-28 07:22:41 UTC
Turned on USB bandwidth allocation, but still getting the same results.

[non ~]# lgrep USB_BANDWIDTH /proc/config.gz
CONFIG_USB_BANDWIDTH=y
[non ~]# spcaview /dev/video0
 Spcaview version: 1.1.5 date: 12:12:2005 (C) mxhaard@magic.fr
Initializing SDL.
SDL initialized.
bpp 3 format 15
Using video device /dev/video0.
Initializing v4l.
ERROR opening V4L interface
: No space left on device
[non ~]# spcaserv
 Spcaview version: 1.1.5 date: 12:12:2005 (C) mxhaard@magic.fr
video /dev/video0
ERROR opening V4L interface
[non /usr/src/linux]# gqcam
/dev/video: No space left on device
[non ~]# uname -a
Linux non 2.6.14-gentoo-r2-non-3 #7 PREEMPT Wed Dec 28 19:02:53 EET 2005 x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux



In case this has some relevance, my kernel configuration can be found here:
http://juffo.org/stuff/kernel-non-3.config
Comment 7 Marti Raudsepp 2005-12-28 07:43:38 UTC
From the spca5xx driver homepage (http://mxhaard.free.fr/spca5xx.html), the best match for my webcam is bridge Zc0301P sensor Tas5130C, Model No. PD1171, while mine is PD1170, with bridge claimed to be 'Zc301' (no 'P') by spca5xx when loading.

I wonder if this minor change might make a difference? Although the DEALLOC error reported by dmesg and the awkward error 'No space left on device' still hint this might be a bug.

I'll also try it out with other kernel versions when I have some more time to play around...
Comment 8 Marti Raudsepp 2005-12-29 02:16:49 UTC
Created attachment 75702 [details]
lsusb-v.txt

Verbose output of lsusb
Comment 9 Marti Raudsepp 2005-12-29 02:31:50 UTC
Finally got the camera to work. After unplugging and replugging my other USB devices in various combinations, I seem to have tracked down the problem. The webcam fails to work whenever my USB keyboard (04f2:0111 Chicony Electronics Co., Ltd) is plugged in. Fortunately, I'm primarily using another PS/2 keyboard, so it was redundant anyway.

It seems that the webcam and keyboard mutually exclude each other on the bus. spcaview and gqcam only fail when the webcam is attached while starting the program. After they have been started, plugging in the keyboard doesn't interrupt the webcam, but the keyboard won't work until the webcam is stopped and the keyboard is replugged.

I thought this might help at tracking down the bug...
[marti@non ~]$ /usr/sbin/lsusb
Bus 002 Device 020: ID 04f2:0111 Chicony Electronics Co., Ltd [keyboard]
Bus 002 Device 019: ID 041e:401f Creative Technology, Ltd     [webcam]
Bus 002 Device 016: ID 04e6:e001 SCM Microsystems, Inc.       [smartcard reader]
Bus 002 Device 015: ID 046d:c293 Logitech, Inc. WingMan Formula Force GP
Bus 002 Device 012: ID 0416:5518 Winbond Electronics Corp. 4-Port Hub
Bus 002 Device 011: ID 03f0:1204 Hewlett-Packard DeskJet 930c
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  

The only thing connected to the Winbond USB hub is the webcam itself. For a verbose listing, refer to attachment #75702 [details].
Comment 10 Mike Doty (RETIRED) gentoo-dev 2006-01-07 07:25:11 UTC
(In reply to comment #9)
> [marti@non ~]$ /usr/sbin/lsusb
> Bus 002 Device 020: ID 04f2:0111 Chicony Electronics Co., Ltd [keyboard]
> Bus 002 Device 019: ID 041e:401f Creative Technology, Ltd     [webcam]
> Bus 002 Device 016: ID 04e6:e001 SCM Microsystems, Inc.       [smartcard
> reader]
> Bus 002 Device 015: ID 046d:c293 Logitech, Inc. WingMan Formula Force GP
> Bus 002 Device 012: ID 0416:5518 Winbond Electronics Corp. 4-Port Hub
> Bus 002 Device 011: ID 03f0:1204 Hewlett-Packard DeskJet 930c
> Bus 002 Device 001: ID 0000:0000  
> Bus 001 Device 001: ID 0000:0000  
Upstream tells me that you simply don't have enough bandwidth on your USB bus to run the camera.  try moving some of the devices to a different bus.  also, you could try the 20060101 version.
Comment 11 Marti Raudsepp 2006-01-08 11:04:39 UTC
I don't think this is the problem either, I'm getting really confused.

I now also tried connecting the Logitech mouse receiver to an USB port (as opposed to PS/2). For some odd reason, it would only work when connected through the hub, but not when directly plugging it to the bus (?). It seems to have the same mutually exclusive effect on the webcam. Both the keyboard and mouse are can work simultaneously. Could this be a more generic HID problem?

When unplugging all other devices and leaving one of the HID devices, the webcam still doesn't work. It does, however, does work in any other combination while neither of the offending HID devices is plugged in. Unfortunately, I don't currently have any other HID devices to test with. And this doesn't seem to be a bandwidth-related problem because HID devices aren't supposed to use much bandwidth.

I also had some awkward problems with HID devices on this computer under Windows. Could it be a problem with the controller? Whatever it is, it doesn't seem to be necessarily related to this webcam or the driver, so I guess this bug can be closed. Do you have any ideas about what I can do to find out more about these problems?