pwc
[Top] [All Lists]

[pwc] Ubuntu 8.10 vs. PCW vs. SPC900NC/00

To:
Subject: [pwc] Ubuntu 8.10 vs. PCW vs. SPC900NC/00
From: "Brynjar S. Larssen" <>
Date: Sun, 23 Nov 2008 19:12:11 +0000
Hi all, and as a fresh pwc user let me first thank you all for your
effort on this driver!

1) Some background first: I've recently switched to Linux, and will be
using OpenCV for a project. I found a webpage by Andreas Geiger -
http://www.rainsoft.de/projects/pwc.html - which convinced me I should
use the SPC900 for my project as well. I went out and bought this
camera, and so far it seems to be the perfect choice for me, except one
problem; the driver.



2) The current situation: The camera seems to be recognized correctly by
pwc, but shows up as something else in lsusb. When using setpwc or
Geiger's pwc wrapper for OpenCV, it won't actually set values correctly.
OpenCV also complains about receiving an unsupported pixel format.

Some output:

modinfo pwc

filename:       
/lib/modules/2.6.27-7-generic/kernel/drivers/media/video/pwc/pwc.ko
version:        10.0.13
alias:          pwcx
license:        GPL
author:         Luc Saillard <>
description:    Philips & OEM USB webcam driver
srcversion:     321D34F7F0E9DD46DC919A6
alias: [i left these out]
depends:        usbcore,videodev
vermagic:       2.6.27-7-generic SMP mod_unload modversions 586 
parm: [i left these out]

dmesg | grep pwc

[ 8811.991515] pwc: Philips webcam module version 10.0.13 loaded.
[ 8811.991529] pwc: Supports Philips PCA645/646, PCVC675/680/690,
PCVC720[40]/730/740/750 & PCVC830/840.
[ 8811.991535] pwc: Also supports the Askey VC010, various Logitech
Quickcams, Samsung MPC-C10 and MPC-C30,
[ 8811.991542] pwc: the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and
Visionite VCS-UC300 and VCS-UM100.
[ 8812.455931] pwc: Philips SPC 900NC USB webcam detected.
[ 8812.488331] pwc: Registered as /dev/video0.

lsusb | grep Philips

Bus 003 Device 002: ID 0471:0329 Philips ORITE CCD Webcam(PC370R)



3) I guess I need a new driver: According to Luc Saillard's site the
latest snapshot has added support for the SPC900, so I should try it.
This is where I'm stuck now, as it won't compile on my computer.

First attempt:

tar xjf pwc-v4l2-20081120-042701.tar.bz2 
cd pwc-v4l2-20081120-042701/
make

make -C /lib/modules/2.6.27-7-generic/build
SUBDIRS=/home/bsl/pwc-v4l2-20081120-042701 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic'
  CC [M]  /home/bsl/pwc-v4l2-20081120-042701/pwc-if.o
In file included from /home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:69:
/home/bsl/pwc-v4l2-20081120-042701/pwc.h:35:27: error: asm/semaphore.h:
No such file or directory
[skip the rest]



4) After looking around a bit I found that my semaphore.h lives not in
asm/ but in /linux, so I made a symlink to it, and re-tried make. This
now yields the same output as the first attempt, except it doesn't
complain about the missing semaphore.h:

make -C /lib/modules/2.6.27-7-generic/build
SUBDIRS=/home/bsl/pwc-v4l2-20081120-042701 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic'
  CC [M]  /home/bsl/pwc-v4l2-20081120-042701/pwc-if.o
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:163: error:
âv4l_compat_ioctl32â undeclared here (not in a function)
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:167: error: unknown field
âownerâ specified in initializer
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:167: warning: initialization
from incompatible pointer type
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:169: error: unknown field
âtypeâ specified in initializer
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:170: error: unknown field
âhardwareâ specified in initializer
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:170: error:
âVID_HARDWARE_PWCâ undeclared here (not in a function)
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1019: warning: âstruct
class_deviceâ declared inside parameter list
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1019: warning: its scope is
only this definition or declaration, which is probably not what you want
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: In function âcd_to_pwcâ:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1021: warning:
initialization from incompatible pointer type
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: At top level:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1025: warning: âstruct
class_deviceâ declared inside parameter list
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: In function
âshow_pan_tiltâ:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1027: warning: passing
argument 1 of âcd_to_pwcâ from incompatible pointer type
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: At top level:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1032: warning: âstruct
class_deviceâ declared inside parameter list
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: In function
âstore_pan_tiltâ:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1034: warning: passing
argument 1 of âcd_to_pwcâ from incompatible pointer type
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: At top level:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1048: error: expected â)â
before â(â token
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1051: warning: âstruct
class_deviceâ declared inside parameter list
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: In function
âshow_snapshot_button_statusâ:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1053: warning: passing
argument 1 of âcd_to_pwcâ from incompatible pointer type
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: At top level:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1059: error: expected â)â
before â(â token
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: In function
âpwc_create_sysfs_filesâ:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1067: error: implicit
declaration of function âvideo_device_create_fileâ
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1067: error:
âclass_device_attr_buttonâ undeclared (first use in this function)
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1067: error: (Each
undeclared identifier is reported only once
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1067: error: for each
function it appears in.)
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1071: error:
âclass_device_attr_pan_tiltâ undeclared (first use in this function)
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1078: error: implicit
declaration of function âvideo_device_remove_fileâ
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: In function
âpwc_remove_sysfs_filesâ:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1087: error:
âclass_device_attr_pan_tiltâ undeclared (first use in this function)
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1088: error:
âclass_device_attr_buttonâ undeclared (first use in this function)
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: In function
âpwc_video_ioctlâ:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1389: error: implicit
declaration of function âvideo_usercopyâ
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c: In function
âusb_pwc_probeâ:
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1752: error: incompatible
types in assignment
/home/bsl/pwc-v4l2-20081120-042701/pwc-if.c:1754: error: âstruct
video_deviceâ has no member named âownerâ
make[2]: *** [/home/bsl/pwc-v4l2-20081120-042701/pwc-if.o] Error 1
make[1]: *** [_module_/home/bsl/pwc-v4l2-20081120-042701] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic'
make: *** [all] Error 2



5) Any ideas on what I could do next to make this compile? I'm guessing
there are differences introduced with kernel 2.6.27, but I don't know if
this requires a new driver version or if there are any more hacks I
could perform to force the damned thing in place :)

Any feedback on this would be greatly appreciated, and thanks for
reading this far!


Cheers,

Brynjar


_______________________________________________
pwc mailing list

http://lists.saillard.org/mailman/listinfo/pwc
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU