5 of 9
5
[Tutorial] PS3 Eye Working on Linux
Posted: 31 March 2009 11:49 PM   [ Ignore ]   [ # 61 ]
Rank
Joined  2009-03-10
Total Posts:  22
New Member

I had audio work back when I was experimenting with Kaswy’s driver, and it still works for me now on the 2.6.29 driver.  For now, and I just did it real quick so I could bang out this post, I only seem to get audio in vlc.  On my system, /dev/dsp1 is the mic from my Eye.

What program are you trying to use?  After this, I will spend a few more minutes trying to get mplayer to work with audio.

Profile
 
 
Posted: 01 April 2009 12:52 AM   [ Ignore ]   [ # 62 ]
Rank
Joined  2009-03-31
Total Posts:  2
New Member

I was trying to set some properties (like volume master control) for the microphone and alsamixer won’t save that..

it in turn tries to use alsastore ...and alsa store fails with that error I provided unfortunately.

Which kernel did you have it working on way back ?

or ..maybe I’m getting a buggy alsa-utils with ubuntu 8.10 smile

P.S. I’m trying to use the Ubuntu sound recorder for testing if recording also works..and I can’t hear myself after speaking in the microphone
P.S.2: I checked and am not using the default sound card for recording but the USB PS3 eye camera

Profile
 
 
Posted: 07 April 2009 06:50 PM   [ Ignore ]   [ # 63 ]
Avatar
Rank
Joined  2008-12-02
Total Posts:  31
New Member

Hello,

I had some little time these days to play with my PS3eye cam and i have
added some new controls to it.
Here the new accepted control values:

gain [0..63]
exposure 
[0..255]
autogain 
[0|1]
hflip 
[0|1]
vflip 
[0|1]

All of these option can be modified at the module loading time :

modprobe gspca_ov534 videomode=10 autogain=0 exposure=200 hflip=1

Or via V4L control while running:

List all available V4L control of the driver :

v4l2-ctl -/dev/video0 -l

View actual control value :

v4l2-ctl -/dev/video0 -C [gainexposurevflip .....]

Set control value :

v4l2-ctl -/dev/video0 -c  [gain=xxexposure=yyvflip=.....]

It sould work with xawtv too.

TIP: You must set autogain=0 before to set other controls like gain or exposure.

Here the files on my download page
Build it as usual.

Do not hesitate to send me some feedback, remarks, or bug !!!

hope this help,

 Signature 

My Setup :http://kaswy.free.fr

Profile
 
 
Posted: 07 April 2009 07:37 PM   [ Ignore ]   [ # 64 ]
RankRank
Joined  2008-12-10
Total Posts:  209
Member

kaswy strikes again!

Can’t wait to try out the new build, will hopefully have some time to dig back into MT land in the next few days smile

 Signature 

22” LLP-LCD ftw
TUIO Smoke (Windows / Linux) - http://projects.edencomputing.com/projects/tuiosmoke

Profile
 
 
Posted: 07 April 2009 09:26 PM   [ Ignore ]   [ # 65 ]
Rank
Joined  2009-03-10
Total Posts:  22
New Member

How does this compare to the kernel driver?

I could probably research it some, but is there a reason why these neat features you add do not get into the kernel driver?  Are you doing them in a way that isn’t the standard way, or have you just not bothered to send patches upstream?

Profile
 
 
Posted: 08 April 2009 12:38 AM   [ Ignore ]   [ # 66 ]
RankRank
Joined  2008-12-10
Total Posts:  209
Member

The kernel driver lacks the support for changing resolution, and no V4L controls.  As far as I gathered from following the development of the mainline kernel driver, it’s original purpose was to support the PS3 eye in PS3 linux installs since Sony did not release any hardware specification for the device.

Development stagnated a bit once the driver was working, and kaswy’s is a definite improvement if for the extra camera control alone.  As for stability, I haven’t used it for long enough periods to gauge the difference.  Incidentally, kaswy’s driver is built upon the original source that was integrated into 2.6.29, in theory it should be just as stable, but neither has had rigorous testing so far.

I’d definitely like to see these changes hit the mainline version, until then the extra camera control alone makes it worth using kaswy’s version imo.

 Signature 

22” LLP-LCD ftw
TUIO Smoke (Windows / Linux) - http://projects.edencomputing.com/projects/tuiosmoke

Profile
 
 
Posted: 08 April 2009 01:45 AM   [ Ignore ]   [ # 67 ]
Rank
Joined  2009-03-10
Total Posts:  22
New Member

Hrmm.  It kind of bothers me building the driver out of tree.  Maybe I should see if I can patch Kaswy’s driver into the kernel.

Profile
 
 
Posted: 08 April 2009 09:58 AM   [ Ignore ]   [ # 68 ]
Avatar
Rank
Joined  2009-03-17
Total Posts:  20
New Member

Nice work kaswy! Thanks!

 Signature 

The links i post are only to help people finding things that i’ve found. I dont have any deal with sellers/websites.

Sorry of my english.

Profile
 
 
Posted: 08 April 2009 11:40 PM   [ Ignore ]   [ # 69 ]
Rank
Joined  2009-03-28
Total Posts:  4
New Member

Sweet, new driver!  Thanks kaswy!

I successfully have the ps3 eye working with my own Java code now, at full 125fps, using my prof’s JCam program (here, if you’re curious:  http://april.eecs.umich.edu/packages.php)

I’d love to be able to switch video modes (resolution and framerate) from within my Java GUI, is there any way to do that with these drivers other than unloading them and reloading again with different videomode=?? Here’s my attempt, it at least doesn’t crash as long as my program (or in this case, my editor Eclipse) is run with “sudo”; however it doesn’t actually successfully switch video modes, even though the System.out.prints say it did. 

Process unload Runtime.getRuntime().exec("sudo modprobe -r gspca_ov534");            
               try 
{
                unload
.waitFor();
            
catch (InterruptedException e{
                
// TODO Auto-generated catch block
                
e.printStackTrace();
            
}
            System
.out.println("unloaded current driver");
 
            
str "sudo modprobe gspca_ov534 videomode=" str;
            
Process reload Runtime.getRuntime().exec(str);
              try 
{
                reload
.waitFor();
            
catch (InterruptedException e{
                
// TODO Auto-generated catch block
                
e.printStackTrace();
            
}
            System
.out.println("reloaded new driver");

Profile
 
 
Posted: 14 April 2009 09:00 AM   [ Ignore ]   [ # 70 ]
Avatar
Rank
Joined  2008-12-02
Total Posts:  31
New Member

Hi keegreil,

There is actualy no way to change resolution or framerate without reloading the gspca_ov534 module and it’s not really a problem for MT use.
Once your choice is done about the resolution and framerate you want to use for blob tracking, you load the module at boot time.
The videomode module parameter can be put in the /etc/modprobe/options file.

... but your code must work anyway…
Is the /dev/video file is closed when your unload process is called ?
What are the messages in your /var/log/message log file ?

 Signature 

My Setup :http://kaswy.free.fr

Profile
 
 
Posted: 14 April 2009 10:18 AM   [ Ignore ]   [ # 71 ]
RankRank
Joined  2008-12-10
Total Posts:  209
Member

Has anyone had any luck getting this to work with OpenCV apps in debian-ish distros?

Touchlib, tBeta, ucview - all fail with an ‘unable to start capture’ type of error - they appear to be detecting the cam, resolution, framerate, etc, but fail trying to grab frames.  Any ideas?

 Signature 

22” LLP-LCD ftw
TUIO Smoke (Windows / Linux) - http://projects.edencomputing.com/projects/tuiosmoke

Profile
 
 
Posted: 14 April 2009 02:17 PM   [ Ignore ]   [ # 72 ]
Rank
Joined  2009-03-10
Total Posts:  22
New Member

My team has been able to write OpenCV test programs that opened the PS3 eye w/o doing anything special.  We have had trouble getting touchlib and tbeta to run well enough on Linux to do anything at all with them, though.

Profile
 
 
Posted: 18 April 2009 09:18 PM   [ Ignore ]   [ # 73 ]
Avatar
Rank
Joined  2008-12-02
Total Posts:  31
New Member
cicada - 14 April 2009 10:18 AM

Has anyone had any luck getting this to work with OpenCV apps in debian-ish distros?

Touchlib, tBeta, ucview - all fail with an ‘unable to start capture’ type of error - they appear to be detecting the cam, resolution, framerate, etc, but fail trying to grab frames.  Any ideas?

For touchlib it seems to be a know problem with highgui opencv on linux.(settings are difficult but when it’s ok....... “osc” work well for me).
For tbeta and ucview it’s a unicap lib problem with v4l2 buffers allocation, i have made a patch for the unicap v0.9.3 lib that is working for ucview
but tbeta need to be rebuilt, the unicap lib is built inside tbeta (not ext link) and we don’t have the source code.

There is some news on the unicap download page (a new version 0.9.5) but the link is dead or not ready for download, maybe this bug will be soon officially closed.

Wait and see !!!

Edit : The new version libunicap 0.5.9 does not have the buffer problem fixed. So i’m going to post my patch ASAP.

Image Attachments
unicap_ps3eye_ok.png
 Signature 

My Setup :http://kaswy.free.fr

Profile
 
 
Posted: 19 April 2009 03:19 AM   [ Ignore ]   [ # 74 ]
Avatar
RankRank
Joined  2009-01-06
Total Posts:  213
Member

so, the thing is that tbeta and v4l2 isn’t talking to each other at this point? No wounder why i cant get my ps3 to work on tbeta… or am i wrong?

[edit] I’m using ubuntu 9.04 [/edit]

 Signature 

---- Interactive Multi Touch Systems ----
-------- The future of computing! --------
------- Black Hole Productions -------

Profile
 
 
Posted: 19 April 2009 12:08 PM   [ Ignore ]   [ # 75 ]
Avatar
RankRank
Joined  2009-01-06
Total Posts:  213
Member

@kaswy: I’ll gladly test the patch on my system.

I cant use windows as tbeta is so slow with the 4 FPS in the config window.
But I’ll gladly try to get my PS3 eye up and running using unicap insted of the v4l2 until tbeta gets improved for it.
No, I havent got tbeta to run with v4l2… :/

[edit] gah! sorry for the double post [/edit]

 Signature 

---- Interactive Multi Touch Systems ----
-------- The future of computing! --------
------- Black Hole Productions -------

Profile
 
 
   
5 of 9
5
 
‹‹ Why 5?      Binoculars idea for camera ››