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 <[EMAIL PROTECTED]>
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
[email protected]
http://lists.saillard.org/mailman/listinfo/pwc

Reply via email to