Spca5xx
The spca5xx driver works out of the box for most people, as it has been the case for myself until recently when I tried using my Webcam on an my other computers.

Unfortunately for some, trying to use their camera with the spca5xx driver when other USB devices are present on the same host controller bus as the camera, the following error appear:
No space left on device
can't open /dev/video0: No space left on device.


I have a Logitech QuickCam Communicate STX and an hp USB Multimedia Cordless Kit with a wireless keyboard and wireless mouse connected to the same host controller as my camera which. I also had the same error message as a result of this configuration.

The spca5xx driver supports a variety of cameras. For a full list of supported cameras, take a look at http://mxhaard.free.fr/spca5xx.html

I originally wrote this howto for Ubuntu, but it also applies to other debian based distros.
Please make the necessary adjustments if you are using another distro.

http://www.ubuntuforums.org/showthread.php?t=247646

Problem
When other USB devices are present on the same host controller bus as the camera, the bandwidth requirements of the spca5xx driver are not being met, with some hardware configurations. The spca5xx driver is asking for more bandwidth than is available which results in the following error messages:

No space left on device
can't open /dev/video0: No space left on device.


There is a very good howto for the Spca5xx driver at https://help.ubuntu.com/community/Spca5xx
if you haven't encountered the “No space left on device” error message.

Solutions
There are multiple solutions which will work depending on your hardware configuration.
Please be advised that it is best to connect the camera directly to the motherboard and not use a USB HUB.

The only solution which worked in my particular situation, was to dig into the spca5xx source code (spca5xx-20060501) and modify it by adding a fix, due to the fact that no matter which USB port I used, my camera always appeared on the same host controller bus as my USB keyboard and mouse.

If you've already unsuccessfully shuffled your USB devices from port to port, you might want to skip ahead to Solution 2 and compile and install the modified spca5xx source code.
  1. Solution 1 - Put the camera on a separate USB host controller bus.
  2. Solution 2 - Compile and install the modified spca5xx source code.
  3. Solution 3 - Buy an separate USB controller card. (This is a last resort solution which I wanted to avoid at all cost.)

Solution 1 - Put the camera on a separate USB host controller bus
Try to put the camera on a separate USB host controller bus with no other devices on it.
(Assuming you don't have a USB keyboard and USB mouse. If you do skip to the next section)
  1. Unplug all other USB devices from your computer, leaving only the camera.
  2. If the camera works, then you need to figure out which USB ports are connected to which controller. You need to use your other USB devices after all. Experiment by connecting your other USB devices one by one to another USB port and see if the camera still works. If the camera stops working after connecting a device it means that the port you just used is on the same USB host controller bus as you camera.
  3. If after trying different combination of USB ports, you are not successful, try one of the following solutions.


Solution 1 - Put the camera on a separate USB host controller bus (USB keyboard and USB mouse)
Try to put the camera on a separate USB host controller bus with no other devices on it.
(If you can find a set PS/2 keyboard and mouse, try the above solution if not continue)
  1. Unplug all other USB devices from your computer, leaving only the camera and USB keyboard or only the camera and USB mouse, not both.
  2. If the camera doesn't work, experiment by connecting the camera to another USB port. Try all the other ports until you find one that works.
  3. If the camera works, then you need to figure out which USB ports are connected to which controller. You need to use your other USB devices after all. Experiment by connecting your other USB devices one by one to another USB port and see if the camera still works. If the camera stops working after connecting a device it means that the port you just used is on the same USB host controller bus as you camera.
  4. If the camera still doesn't work, please do not despair. Try the following solution.


Solution 2 - Compile the modified spca5xx source code.
The fix works by gradually lowering the bandwidth requirements of the driver (spca5xx-20060501) and works even when other USB devices are present on the same host controller bus as the camera.
Then same method can also be used to resolve the same issue on the qc-usb QuickCam Express Driver.

The new driver will be installed at this location (kernel 2.6 +): /lib/modules/`uname -r`/kernel/drivers/media/video/spca5xx/
The new driver will be installed at this location (kernel 2.4): /lib/modules/`uname -r`/kernel/drivers/usb/


Automated Installation Script
  1. Download the modified spca5xx source code and save it on your desktop.
  2. Download the script or copy and paste it in a new file and save it on your desktop.
  3. If you downloaded the script extract it from the archive using:
    Code:
    tar xfvz  spca5xxVodunVibeFixScript.tar.gz
  4. Execute the script on your desktop or in the same directory as the archive spca5xx-20060501VodunVibeFix.tar.gz
    Code:
    ./spca5xxVodunVibeFix


Manual Installation

  1. Download the necessary packages.
    To compile the drivers we need to make sure that the following packages are installed from the Ubuntu repositories (Please install the tools necessary to compile, if you are using another distro):
    Code:
    sudo apt-get install linux-headers-`uname -r` linux-restricted-modules-`uname -r` build-essential gcc
    If you are using Ubuntu Breezy Badger (5.10) you need gcc 3.4:
    Code:
    sudo apt-get install linux-headers-`uname -r` linux-restricted-modules-`uname -r` build-essential gcc-3.4
    export CC=gcc-3.4
  2. Create a link to the kernel source if it does not exist.
    Code:
    sudo ln -s /usr/src/linux-headers-`uname -r` /lib/modules/`uname -r`/build
  3. Download the modified spca5xx source code and save it on your desktop.
  4. Move the modified spca5xx-20060501VodunVibeFix.tar.gz from your home directory to /usr/src
    Code:
    cd /usr/src
    sudo mv ~/Desktop/spca5xx-20060501VodunVibeFix.tar.gz .
  5. Extract the files from the archive.
    Code:
    sudo tar xfvz spca5xx-20060501VodunVibeFix.tar.gz
  6. Enter the directory.
    Code:
    cd spca5xx-20060501VodunVibeFix
  7. Compile the spca5xx source code.
    Code:
    sudo make clean
    sudo make
  8. Remove the old driver from memory.
    Code:
    sudo modprobe -r spca5xx
  9. Backup the current spca5xx.ko kernel module.
    Code:
    sudo cp -p /lib/modules/`uname -r`/kernel/drivers/media/video/spca5xx/spca5xx.ko /lib/modules/`uname -r`/kernel/drivers/media/video/spca5xx/spca5xx.ko.`date -Iseconds`
  10. Install the new driver at this location: /lib/modules/`uname -r`/kernel/drivers/media/video/spca5xx/
    Code:
    sudo make install
  11. Load the new driver.
    Code:
    sudo modprobe spca5xx
  12. Check dmesg and the system logs for errors.
    Code:
    dmesg
    tail -f /var/log/syslog
  13. Enjoy your webcam.



Many thanks to all the wonderful people contributing to this project.