About two years ago, I had published some notes about how to use the good old Creative PC-CAM 750 digital camera/webcam combo under Linux using the spca5xx kernel module. Many things have changed since then. The ‘spca5xx‘ driver has been re-released under the name GSPCA, which has lately made its way into the kernel. This should have made things simpler, but, apparently, the fact that this device can be used both as a digital camera and a webcamera complicates its use under GNOME. By default, GNOME mounts the device’s internal flash memory, so you can pull those digital photographs you have taken. This is a rather expected behaviour despite the fact that this is an old-tech digital camera. The main problem though is that there is no obvious way to switch to webcam-mode from within GNOME. Below are some notes about how to do it.
The following steps have been tested on Fedora 10 (GNOME v2.24.2). Most probably, they will work on other recent Linux distributions (Ubuntu, OpenSUSE, Mandriva, etc).
As mentioned previously, as soon as the device is plugged into the USB port, GNOME mounts its internal flash memory.
Looking at dmesg output as root:
# dmesg usb 3-1: new full speed USB device using uhci_hcd and address 2 usb 3-1: configuration #1 chosen from 1 choice usb 3-1: New USB device found, idVendor=041e, idProduct=4013 usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 3-1: Product: Creative PC-CAM 750 usb 3-1: Manufacturer: ViewQuest Technologies INC. Linux video capture interface: v2.00 gspca: main v2.2.0 registered gspca: probing 041e:4013 gspca: probe ok gspca: probing 041e:4013 usbcore: registered new interface driver sunplus sunplus: registered gspca: disconnect complete
As you can see, despite the fact that the webcam has been recognized by the gspca-sunplus driver, gspca loses control of the webcam. This happens because GNOME (gvfs) has mounted its memory. Obviously, the device cannot operate as a webcam while its internal memory is mounted.
To list the currently mounted block devices by gvfs run the following command as your currently logged in user:
$ gvfs-mount -l Drive(0): CD-RW/DVD±RW Drive Drive(1): Mass Storage Drive ... ... Mount(0): Creative Technology, Ltd PC-Cam 750 -> gphoto2://[usb:003,002]/
So, there it is. The gphoto2 driver has been used to mount the device’s flash memory.
To unmount it run (as the currently logged in user):
$ gvfs-mount -u gphoto2://[usb:003,002]/
Replace the usb port reference according to your
gvfs-mount -l output.
Alternatively, you can unmount all devices mounted by the gphoto2 driver with the following command:
$ gvfs-mount --unmount-scheme gphoto2
Now, the camera’s memory shouldn’t be listed in
gvfs-mount -l output.
All you have to do now to get to webcam-mode is reload the gspca-sunplus module.
# /sbin/modprobe -vr gspca-sunplus # /sbin/modprobe -v gspca-sunplus
Running dmesg we confirm that the gspca-sunplus module controls the device
# dmesg ... ... Linux video capture interface: v2.00 gspca: main v2.2.0 registered gspca: probing 041e:4013 gspca: probe ok gspca: probing 041e:4013 usbcore: registered new interface driver sunplus sunplus: registered
Also, the ls command shows that our v4l device has been created:
# ls -l /dev/video* lrwxrwxrwx 1 root root 6 2008-12-08 15:49 /dev/video -> video0 crw-rw----+ 1 root root 81, 0 2008-12-08 15:49 /dev/video0
That’s it. As a user, run cheese and say hello to yourself!
This should work for all other digital-camera / web-camera combo devices as well, provided that you use the appropriate gspca driver as shown in the dmesg output.
Your feedback is welcome.
Creative PC-CAM 750 on Fedora 10 by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2008 - Some Rights Reserved