Getting my webcam to work on Linux 2.6.31
- # udevadm monitor
- Plug webcam into USB port
- See the following from udevadm:
KERNEL[1258313701.178493] add /kernel/uids/1006 (uids)
UDEV [1258313701.178517] add /kernel/uids/1006 (uids)
KERNEL[1258313701.829976] add /devices/pci0000:00/0000:00:02.0/usb2/2-4 (usb)
UDEV [1258313701.831655] add /devices/pci0000:00/0000:00:02.0/usb2/2-4 (usb)
KERNEL[1258313701.833268] add /devices/pci0000:00/0000:00:02.0/usb2/2-4/2-4:1.0 (usb)
UDEV [1258313701.834303] add /devices/pci0000:00/0000:00:02.0/usb2/2-4/2-4:1.0 (usb) - # udevadm info --query=all --attribute-walk --path /devices/pci0000:00/0000:00:02.0/usb2/2-4
looking at device '/devices/pci0000:00/0000:00:02.0/usb2/2-4':ATTR{idVendor}=="046d"
ATTR{idProduct}=="092f"ATTR{manufacturer}==" "
ATTR{product}=="Camera"looking at parent device '/devices/pci0000:00/0000:00:02.0/usb2':
looking at parent device '/devices/pci0000:00/0000:00:02.0':
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS=="" - Google 046d:092f and find out it's a Logitech QuickCam Express. Google some more and discover its driver is GSPCA, which is no longer a separate module but an in-kernel one.
- # cd /usr/src/linux && make menuconfig
Enable:
Device Drivers -> Multimedia Support -> Video For Linux
Device Drivers -> Multimedia Support -> Video capture adapters -> V4L USB Devices -> GSPCA based webcams -> Enable all SPCA5xx camera drivers. (Once the camera worked I found out by using lsmod that only SPCA561 was needed) - modprobe the new modules or reboot the computer
- # udevadm monitor
After plugging in the camera:
KERNEL[1258315384.769022] add /devices/pci0000:00/0000:00:02.0/usb2/2-3 (usb)
UDEV [1258315384.770643] add /devices/pci0000:00/0000:00:02.0/usb2/2-3 (usb)
KERNEL[1258315384.771997] add /devices/pci0000:00/0000:00:02.0/usb2/2-3/2-3:1.0 (usb)
KERNEL[1258315384.810075] add /module/gspca_main (module)
UDEV [1258315384.810481] add /module/gspca_main (module)
KERNEL[1258315384.821031] add /module/gspca_spca561 (module)
UDEV [1258315384.821191] add /module/gspca_spca561 (module)
KERNEL[1258315384.993956] add /devices/pci0000:00/0000:00:02.0/usb2/2-3/2-3:1.0/video4linux/video0 (video4linux)
KERNEL[1258315384.994056] add /bus/usb/drivers/spca561 (drivers)
UDEV [1258315384.994171] add /bus/usb/drivers/spca561 (drivers)
UDEV [1258315384.994277] add /devices/pci0000:00/0000:00:02.0/usb2/2-3/2-3:1.0 (usb)
UDEV [1258315385.011577] add /devices/pci0000:00/0000:00:02.0/usb2/2-3/2-3:1.0/video4linux/video0 (video4linux) - $ camorama
The LED on the camera blinked and camorama reported "Cannot capture" - Google gspca_spca561 and come across http://lists.zerezo.com/video4linux/msg24804.html
- # emerge -avt libv4l
- $ LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so camorama
And then it worked, yay.
Note: all commands starting with # are run by root, with $ are run by my own user.
blogtags:
Post new comment