You are not logged in.

#1 2010-07-22 11:02:52

mikeym
Member
Registered: 2009-01-30
Posts: 54

PS3 Eye in Arch

Hi there,

I'm just wondering if anyone knows how to get a PS3 Eye working in Arch. From what I've been able to find it should just work with recent kernels but mine seems to not behave as expected. When I plug it in it loads the gspca_ov534 module automatically and I can get output with mplayer tv:// but the contrast or brightness is way off.

Moderator edit: Read the rules for image uploading, thank you
(edit) Didn't realise there was a self censorship rule. Here's a link to the image http://img687.imageshack.us/img687/764/00000001c.jpg

I've had a look for module parameters as I noticed in one of the pages on it that there was an option for contrast but /sys/module/gspca_ov534/ doesn't have a folder parameters.

Does anyone have any experience or ideas?

Last edited by mikeym (2010-07-22 18:31:32)

Offline

#2 2010-07-22 12:26:18

ise
Developer
From: Karlsruhe / Germany
Registered: 2005-10-06
Posts: 404
Website

Re: PS3 Eye in Arch

I don't have experience with mplayer's tv:// handling nor with PS3 eye, but it's a webcam for the kernel, nothing else, right? So have you tried 'cheese' from our repo? I know that you can control brightness and contrast there by default, maybe you have more luck with 'cheese'. Or you can try other webcam software like wxcam (in AUR).

Last edited by ise (2010-07-22 12:28:18)

Offline

#3 2010-07-22 13:50:17

kokoko3k
Member
Registered: 2008-11-14
Posts: 1,829

Re: PS3 Eye in Arch

As far as i remember mplayer has options to control contrast and other knobs too.

Offline

#4 2010-07-22 17:20:45

mikeym
Member
Registered: 2009-01-30
Posts: 54

Re: PS3 Eye in Arch

kokoko3k, ise thanks for the replies. I think you're going down the wrong route though. The problem appears to be with the driver for the camera itself.  You can see from this picture taken with cheese and with brightness and contrast adjusted to their best values that the colour data just isn't there. (I've confirmed this by looking at the colour levels in the GIMP.)

Moderator edit: Read the rules for image uploading, thank you
(edit) Here's a link to the 2nd image http://img7.imageshack.us/img7/6712/20100722171730.jpg

I've looked around for info on getting the PS3 Eye working with Linux and found these pages:

(1)     http://nuigroup.com/forums/viewthread/4079/
(2)     http://kaswy.free.fr/?q=en/node/53
(3)     http://blog.10100111001.com/2009/02/pla … ng-on.html
(4)     http://kaswy.free.fr/?q=node/38#ps3

(1) appears to be the thread that's got people working on PS3 Eye drivers. The instructions no longer work as jfrancois' source has been taken down but from there I found out about (2) which is kaswyweb's version of the driver. The instructions in (2) are for patching the Ubuntu kernel to build the module. (3) is how to install the same driver on Ubuntu by compiling a new module from a complete source and appears to be the one that would probably stand the best chance of working on Arch. (4) is the downloads page for kaswyweb's PS3EyeMT module driver the latest version of which appears to be version 0.5.

The PS3EyeMT driver appears to give you a bunch of parameters that can be passed to the module such as exposure and gamma and brightness.

Unfortunately I'm fairly new to Arch and not really sure about how to compile modules, and the instructions in (3) fail for me when I try to make the module:

[mikey@nixon gspca-ps3eyeMT]$ make
make -C /mnt/data/mikey/src/gspca-ps3eyeMT/v4l 
/bin/sh: /sbin/lsmod: No such file or directory
make[1]: Entering directory `/mnt/data/mikey/src/gspca-ps3eyeMT/v4l'
creating symbolic links...
Kernel build directory is /lib/modules/2.6.34-ARCH/build
make -C /lib/modules/2.6.34-ARCH/build SUBDIRS=/mnt/data/mikey/src/gspca-ps3eyeMT/v4l  modules
make[2]: Entering directory `/usr/src/linux-2.6.34-ARCH'
/bin/sh: /sbin/lsmod: No such file or directory
  CC [M]  /mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.o
In file included from <command-line>:0:0:
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/config-compat.h:4:28: fatal error: linux/autoconf.h: No such file or directory
compilation terminated.
make[3]: *** [/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.o] Error 1
make[2]: *** [_module_/mnt/data/mikey/src/gspca-ps3eyeMT/v4l] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.34-ARCH'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/mnt/data/mikey/src/gspca-ps3eyeMT/v4l'
make: *** [all] Error 2

Any advice on how to go about this would be great.

Last edited by mikeym (2010-07-22 18:33:16)

Offline

#5 2010-07-23 07:49:21

kokoko3k
Member
Registered: 2008-11-14
Posts: 1,829

Re: PS3 Eye in Arch

Maybe the driver has just wrong equalizer defaults that lead the image levels to clip.
I don't know about cheese, but mplayer adjusts contrast and brightness at driver level, from man mplayer:

mplayer tv://[channel][/input_id] [options]
[..]
[brightness|contrast|hue|saturation]=<-100-100>
                      Set the image equalizer on the card.

...so it is not postprocessing, and the color data 'could' be there, maybe you can still give it a try.


About your compilation issue,it seems that /sbin/lsmod is missing, in fact on arch it is actually /bin/lsmod.
So, edit the makefile or make a temporary symlink and it should compile.

Last edited by kokoko3k (2010-07-23 07:53:18)

Offline

#6 2010-07-23 11:22:18

mikeym
Member
Registered: 2009-01-30
Posts: 54

Re: PS3 Eye in Arch

kokoko3k,

Playing with mplayer brightness and contrast produces similar effects to with cheese (actually brightness doesn't do anything and and contrast will only change the difference between the about of white you see and the tiny amount of black it picks up), but I did notice on the mplayer output:

$ mplayer tv:// -tv brightness=-100:contrast=50
MPlayer SVN-r31630-4.5.0 (C) 2000-2010 MPlayer Team
156 audio & 340 video codecs
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: USB Camera-B3.04.06.1
 Capabilites:  video capture  read/write  streaming
 supported norms:
 inputs: 0 = ov534;
 Current input: 0
 Current format: YUYV
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 640x480 => 640x480 Packed YUY2 
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...
v4l2: ioctl set mute failed: Invalid argument
v4l2: 438 frames successfully processed, 0 frames dropped.

Exiting... (Quit)

Error: Cannot set norm!    I tried different settings for the norm and normid parameters and they all produced this error.

I tried what you said with lsmod but it still failed on fatal error: linux/autoconf.h: No such file or directory and with a bit of searching on that I found some vague reference on line that that should be generated/autoconf.h so I changed all the references to this and it seemed to get a bit further before dying:

$ make
make -C /mnt/data/mikey/src/gspca-ps3eyeMT/v4l 
make[1]: Entering directory `/mnt/data/mikey/src/gspca-ps3eyeMT/v4l'
creating symbolic links...
Kernel build directory is /lib/modules/2.6.34-ARCH/build
make -C /lib/modules/2.6.34-ARCH/build SUBDIRS=/mnt/data/mikey/src/gspca-ps3eyeMT/v4l  modules
make[2]: Entering directory `/usr/src/linux-2.6.34-ARCH'
  CC [M]  /mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.o
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c:55:27: error: 'FIRMWARE_NAME_MAX' undeclared here (not in a function)
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c: In function 'free_firmware':
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c:251:3: error: implicit declaration of function 'kfree'
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c: In function 'load_all_firmwares':
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c:313:2: error: implicit declaration of function 'kzalloc'
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c:313:13: warning: assignment makes pointer from integer without a cast
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c:364:21: warning: assignment makes pointer from integer without a cast
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c: In function 'xc2028_attach':
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c:1238:13: warning: assignment makes pointer from integer without a cast
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c: At top level:
/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.c:55:13: warning: 'firmware_name' defined but not used
make[3]: *** [/mnt/data/mikey/src/gspca-ps3eyeMT/v4l/tuner-xc2028.o] Error 1
make[2]: *** [_module_/mnt/data/mikey/src/gspca-ps3eyeMT/v4l] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.34-ARCH'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/mnt/data/mikey/src/gspca-ps3eyeMT/v4l'
make: *** [all] Error 2

I suspect that the source is designed to work with the Ubuntu 2.6.31 kernel judging from the guides to using it. I'm running 2.6.34-ARCH.

I found another site with a patched version of the driver that requires applying it to your kernel source and rebuilding the module. http://bear24rw.blogspot.com/2009/11/ps … patch.html so I tried following the arch Kernel Compilation From Source guide (as I've compiled from source before on Gentoo and this approach seemed most similar). However the build died when I got as far as building the patched driver. I suspect that this was because I was still using version 2.6.34, but from kernel.org, rather than downgrading to 2.6.31. This may work, I've yet to try it, as I'd much rather have an up to date kernel if possible.

Offline

#7 2010-07-23 17:36:45

mikeym
Member
Registered: 2009-01-30
Posts: 54

Re: PS3 Eye in Arch

OK,

I can get it working by patching the 2.6.32.16 kernel from kernel.org with http://kaswy.free.fr/?q=en/node/53

This appears to be the latest version of the kernel that has a patch that works.

I've done this following the Kernel Compilation From Source guide. I wouldn't mind finding a way to make it work using the ABS system or an AUR package to make sure it's got the appropriate patches and updates but I couldn't figure out the guide. http://wiki.archlinux.org/index.php/Cus … n_with_ABS

And I couldn't find a version of the Kernel that was old enough.

Offline

Board footer

Powered by FluxBB