|
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
View previous topic :: View next topic |
Author |
Message |
nbpengo
Joined: 17 Sep 2008 Posts: 6
|
Posted: Thu Sep 18, 2008 6:21 am Post subject: Re: NetBSD driver |
|
|
ao2 wrote: |
I in the test app I have Code: | #define LIBUSB_BULK_SIZE 16384 |
|
Interesting -- I'm actually doing much larger bulk xfers (full frame sizes) in my driver. Wasn't aware that I could get away with smaller. How do you detect end of frame?
ao2 wrote: |
BTW that 7720Rev2.set is quite useful as a reference, I found (trivial indeed), how to write the sensor model:
Code: | info("Sensor Model: ov%02x%02x\n", ov_read(0x0a), ov_read(0x0b));
|
Code: | Sensor Model: ov7721
|
|
Now the only question is how similar is the 7721 to the 7720 rev2.. |
|
Back to top |
|
|
ao2
Joined: 30 Aug 2008 Posts: 28
|
Posted: Mon Sep 22, 2008 7:41 am Post subject: |
|
|
mmh, in OV534.INF from ovt.com drivers there is also how to turn off capture:
Code: | HKR,%CamSet%, PowerOnCamera, 1, e7,3a,ff, e0,08,ff
HKR,%CamSet%, PowerDownCamera, 1, e7,3b,ff, e0,08,ff
HKR,%CamSet%, BlockStream, 1, e0,08,ff
HKR,%CamSet%, StartStream, 1, e0,00,ff
|
Maybe it can be useful to save some power when not capturing? |
|
Back to top |
|
|
someone Idiot
Joined: 13 Sep 2005 Posts: 74
|
Posted: Sat Sep 27, 2008 5:18 am Post subject: Re: NetBSD driver |
|
|
nbpengo wrote: | ao2 wrote: |
I in the test app I have Code: | #define LIBUSB_BULK_SIZE 16384 |
|
Interesting -- I'm actually doing much larger bulk xfers (full frame sizes) in my driver. Wasn't aware that I could get away with smaller. How do you detect end of frame?
ao2 wrote: |
BTW that 7720Rev2.set is quite useful as a reference, I found (trivial indeed), how to write the sensor model:
Code: | info("Sensor Model: ov%02x%02x\n", ov_read(0x0a), ov_read(0x0b));
|
Code: | Sensor Model: ov7721
|
|
Now the only question is how similar is the 7721 to the 7720 rev2.. |
The model 0x7721 read from these registers actually refers to OV7720 sensor. The OV7721 is a monochrome version of OV7720. |
|
Back to top |
|
|
ao2
Joined: 30 Aug 2008 Posts: 28
|
Posted: Fri Oct 03, 2008 7:15 pm Post subject: |
|
|
hi,
the windows driver developer has also some interesting posts about different camera versions.
See http://alexpopovich.wordpress.com/ |
|
Back to top |
|
|
compeee2008
Joined: 11 Oct 2008 Posts: 7
|
Posted: Sat Oct 11, 2008 2:26 pm Post subject: Re: Playstation Eye |
|
|
Hi Jim,
I'm quite new with Linux but how did you get the microphone working or enabled using the alsa driver? I get the similar output as below when I type sudo lsusb -v | less but I want to be able to record the sound using this driver. In the sound recorder, I can only choose between digital, capture, capture2, IEC958, MIC Boost and Front MIC Boost. In System->Preference->Sound under default mixer track, I have set it to ALSA PCM on surround 40:1 (USB Audio). Would I have to modify the alsa base file?
Paul
jimparis wrote: | I picked up my Playstation Eye today. The VID/PID are 1415:2000. Strangely, 1415 is not assigned to any company, according to any list that I've found, including the official one here.
For video, it's not just a UVC device (disappointing), so it will take some effort to get it working outside of GameOS.
The audio input works fine under Linux using the usual ALSA usb driver. As advertised there are 4 microphones inside, and they're all individually exposed as different channels. With the camera facing you, the channel order is 1, 3, 2, 4 from left to right.
Code: |
Bus 001 Device 102: ID 1415:2000
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1415
idProduct 0x2000
bcdDevice 1.00
iManufacturer 1 OmniVision Technologies, Inc.
iProduct 2 USB Camera-B4.04.27.1
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 142
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 10
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 42
bInCollection 1
baInterfaceNr( 0) 2
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Microphone
bAssocTerminal 2
bNrChannels 4
wChannelConfig 0x0000
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 1
bSourceID 3
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 3
bSourceID 1
bControlSize 1
bmaControls( 0) 0x00
bmaControls( 1) 0x02
Volume
bmaControls( 2) 0x02
Volume
bmaControls( 3) 0x02
Volume
bmaControls( 4) 0x02
Volume
iFeature 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 4
bSubframeSize 2
bBitResolution 16
bSamFreqType 1 Discrete
tSamFreq[ 0] 16000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0300 1x 768 bytes
bInterval 4
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered) |
|
|
|
Back to top |
|
|
compeee2008
Joined: 11 Oct 2008 Posts: 7
|
Posted: Sat Oct 11, 2008 10:07 pm Post subject: Using SnoopyPro to analyse the NUI group windows driver |
|
|
Hi,
I thought I might share some information about the fps and the resolution. I use snoopypro to analyse the usb packets from the Nui group test software using different frame rates and resolution and here are the results.
For 15fps, the software seems to send the following commands for 640x480 and 320x240:
0x11, 0x03
0x0d, 0x41
0x04
0x14, 0x41
For 30fps:
0x11, 0x01
0x0d, 0x41
0x04
0x14, 0x41
For 45fps:
0x11, 0x01
0x0d, 0x81
0x04
0x14, 0x41
For 50fps:
0x11, 0x01
0x0d, 0x81
0x02
0x14, 0x41
For 60fps:
0x11, 0x01
0x0d, 0xc1
0x04
0x14, 0x41
Each time when a commands is sent, the ps3eye seems to respond with 0x37 packet and the software send 0x00 command. But for 0x02 and 0x04, it responds with 0x02 and 0x04 respectively.
For resolutions, the following packets are sent:
For 320x240:
0x29, 0x50
0x2c, 0x78
0x65, 0x2c
0xa0, 0x05
For 640x480:
0x29, 0xa0
0x2c, 0xf0
0x65, 0x20
0xa0, 0x00
Each set of command, the ps3eye responds with 0x37 and the software sends a 0x00 command afterward.
There are other commands that are sent by the software but I have not listed it as it is the same for different resolution and frame rates.
Paul |
|
Back to top |
|
|
ps2devman
Joined: 09 Oct 2006 Posts: 265
|
Posted: Sun Oct 12, 2008 1:36 am Post subject: |
|
|
Thx a lot Paul! Precious data! |
|
Back to top |
|
|
compeee2008
Joined: 11 Oct 2008 Posts: 7
|
Posted: Sun Oct 12, 2008 8:04 am Post subject: Webcam driver |
|
|
From your previous post it seems like you are in the process of written a driver for Fedora. I was wondering how would you start writing a driver for linux? Can I simply based the driver design similar to the philip pwc driver (http://www.saillard.org/linux/pwc/files/) but without the other interfaces to Kiara and Video4linux? What do you think is the best way to start for an experience embedded C and moderate Visual C++ programmer but with some knowledge of linux?
ps2devman wrote: | Thx a lot Paul! Precious data! |
|
|
Back to top |
|
|
ao2
Joined: 30 Aug 2008 Posts: 28
|
Posted: Sun Oct 12, 2008 11:55 pm Post subject: Re: Webcam driver |
|
|
compeee2008 wrote: | From your previous post it seems like you are in the process of written a driver for Fedora. I was wondering how would you start writing a driver for linux? Can I simply based the driver design similar to the philip pwc driver (http://www.saillard.org/linux/pwc/files/) but without the other interfaces to Kiara and Video4linux? What do you think is the best way to start for an experience embedded C and moderate Visual C++ programmer but with some knowledge of linux?
ps2devman wrote: | Thx a lot Paul! Precious data! |
|
hi compeee2008, thanks again for that info. The commands you reported are for the sensor driver, as we verified before regarding the resolution settings.
Currently there is a tentative driver for that camera:
http://marc.info/?l=linux-video&m=121886284726264&w=2
I've tried to contact the author to see if he is still working on it, but he haven't replyed yet.
Regards, ao2. |
|
Back to top |
|
|
compeee2008
Joined: 11 Oct 2008 Posts: 7
|
Posted: Tue Oct 14, 2008 7:39 pm Post subject: Re: Webcam driver |
|
|
Sorry ao2,
I am new in compiling a linux module. What is the commands that I have to use compile the OV534 code for a 64bit ubuntu installation?
I tried the following:
cc -D__KERNEL__ -I/usr/src/linux-2.6.21-19-generic/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=4 -march=x64_86 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.6.24-19-generic/include/config/modversions.h -Wall -Wstrict-prototypes -Wno-trigraphs -c -o OV534.o OV534.c
but I get the following:
OV534.c:1: error: bad value (x64_86) for -march= switch
OV534.c:1: error: bad value (x64_86) for -mtune= switch
Paul |
|
Back to top |
|
|
ao2
Joined: 30 Aug 2008 Posts: 28
|
Posted: Tue Oct 14, 2008 11:48 pm Post subject: |
|
|
compeee2008 put this in a Makefile, in the same dir with ov534.c:
Code: | obj-m := ov534.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
|
And just call 'make'. You may need to install some linux-headers or linux-kbuild package.
Note that this driver is not fully functional as far as I can say.
I am vaguely researching how to rewrite it, I still don't know if it is worth relying on the gspca framework for that.
Regards, ao2 |
|
Back to top |
|
|
compeee2008
Joined: 11 Oct 2008 Posts: 7
|
Posted: Wed Oct 15, 2008 4:21 pm Post subject: |
|
|
I have copied the commands to the makefile and have already installed linux-headers-2.6.24-19, linux-headers-2.6.24-19-generic, linux-headers-generic. I also use synaptic to install the kbuild but I get:
make: Nothing to be done for `default'.
Paul
ao2 wrote: | compeee2008 put this in a Makefile, in the same dir with ov534.c:
Code: | obj-m := ov534.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
|
And just call 'make'. You may need to install some linux-headers or linux-kbuild package.
Note that this driver is not fully functional as far as I can say.
I am vaguely researching how to rewrite it, I still don't know if it is worth relying on the gspca framework for that.
Regards, ao2 |
|
|
Back to top |
|
|
ao2
Joined: 30 Aug 2008 Posts: 28
|
Posted: Wed Oct 15, 2008 11:16 pm Post subject: |
|
|
Hi, a driver for ov772x has been posted on linux-video today:
http://marc.info/?l=linux-video&m=122406831802990&w=2
Yes, it is an i2c driver, so not directly usable for our purposes, but the registers set is documented, so this part can be reused.
I've heard that there is some work going on to have a clean separation in linux between bridge/protocol drivers and sensor drivers, but it will take a lot of time IMHO, so for now code duplication is inevitable.
Regards, ao2 |
|
Back to top |
|
|
compeee2008
Joined: 11 Oct 2008 Posts: 7
|
Posted: Thu Oct 16, 2008 8:39 pm Post subject: |
|
|
Okay I fixed the makefile by adding a tab at the last line. I shouldn't have copy directly from the website but the problem is I get the following message when I run make.
make -C /lib/modules/2.6.24-19-generic/build SUBDIRS=/home/paul/Desktop/ps3eye/OV534 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-generic'
scripts/Makefile.build:41: /home/paul/Desktop/ps3eye/OV534/Makefile: No such file or directory
make[2]: *** No rule to make target `/home/paul/Desktop/ps3eye/OV534/Makefile'. Stop.
make[1]: *** [_module_/home/paul/Desktop/ps3eye/OV534] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-19-generic'
make: *** [default] Error 2
Any ideas?
If I can't get the driver working properly, I may have to resort using Jim's code for my software as I can retrieve images from the ps3eye. I am trying to use opencv to track objects using the ps3eye which I managed to get working using a standard cheap webcam but the picture quality is lacking.
compeee2008 wrote: | I have copied the commands to the makefile and have already installed linux-headers-2.6.24-19, linux-headers-2.6.24-19-generic, linux-headers-generic. I also use synaptic to install the kbuild but I get:
make: Nothing to be done for `default'.
Paul
ao2 wrote: | compeee2008 put this in a Makefile, in the same dir with ov534.c:
Code: | obj-m := ov534.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
|
And just call 'make'. You may need to install some linux-headers or linux-kbuild package.
Note that this driver is not fully functional as far as I can say.
I am vaguely researching how to rewrite it, I still don't know if it is worth relying on the gspca framework for that.
Regards, ao2 |
|
|
|
Back to top |
|
|
ao2
Joined: 30 Aug 2008 Posts: 28
|
Posted: Fri Oct 17, 2008 12:31 am Post subject: |
|
|
compeee2008 wrote: | Okay I fixed the makefile by adding a tab at the last line. I shouldn't have copy directly from the website but the problem is I get the following message when I run make.
|
Maybe the forum code shouldn't have replaced the tab with spaces ;)
Quote: |
make -C /lib/modules/2.6.24-19-generic/build SUBDIRS=/home/paul/Desktop/ps3eye/OV534 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-generic'
scripts/Makefile.build:41: /home/paul/Desktop/ps3eye/OV534/Makefile: No such file or directory
make[2]: *** No rule to make target `/home/paul/Desktop/ps3eye/OV534/Makefile'. Stop.
make[1]: *** [_module_/home/paul/Desktop/ps3eye/OV534] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-19-generic'
make: *** [default] Error 2
Any ideas?
|
Check you've called the file 'Makefile', with capital M and not 'makefile'. 'make' itself recognizes the latter but the linux build system doesn't.
Quote: |
If I can't get the driver working properly, I may have to resort using Jim's code for my software as I can retrieve images from the ps3eye. I am trying to use opencv to track objects using the ps3eye which I managed to get working using a standard cheap webcam but the picture quality is lacking.
|
Also, the PlayStation Eye can capture at high framerates :)
Regards, ao2
P.S. (it's Post Scriptum, not PlayStation...) : Please compeee2008 don't top-post it is annoying in forums almost like it is in emails... |
|
Back to top |
|
|
compeee2008
Joined: 11 Oct 2008 Posts: 7
|
Posted: Mon Oct 20, 2008 7:36 pm Post subject: |
|
|
Hi ao2,
I made a mistake with my filename and corrected it but I'm seem to having problems compiling the file. It seems to be missing the the following headers
#include <media/videobuf-vmalloc.h>
#include <media/v4l2-common.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-ioctl.h>
I checked the media folder of the linux-generic headers, the media folder seems to be symbolic link to the following folder ../../linux-headers-2.6.24-21/include/media.
How would I resolve this?
Cheers |
|
Back to top |
|
|
Dralt
Joined: 30 Oct 2008 Posts: 4
|
Posted: Thu Oct 30, 2008 1:30 am Post subject: |
|
|
Quick interruption...
How hard would it be to make a virtual Eye?
I mean: This program would run on a PC (Linux or Mac or Windows), the PC would connect via USB to the PS3, the program would allow to submit arbitrary picture files (with all the right characteristics in terms of resolution and color gamut) to the PS3 as if they had been taken by a real Eye.
Would that be hard? |
|
Back to top |
|
|
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Thu Oct 30, 2008 6:34 am Post subject: |
|
|
A typical PC does not have the hardware necessary to be a USB gadget. If you had such a chipset available that supported USB 2.0, then yeah, it could be done, wouldn't be too hard. |
|
Back to top |
|
|
Dralt
Joined: 30 Oct 2008 Posts: 4
|
Posted: Thu Oct 30, 2008 6:40 am Post subject: |
|
|
jimparis wrote: | A typical PC does not have the hardware necessary to be a USB gadget. If you had such a chipset available that supported USB 2.0, then yeah, it could be done, wouldn't be too hard. |
Thanks, Jim. Is the missing hardware commercially available in a PnP form? |
|
Back to top |
|
|
Dralt
Joined: 30 Oct 2008 Posts: 4
|
|
Back to top |
|
|
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Fri Oct 31, 2008 4:17 am Post subject: |
|
|
Close, but that only does USB 1.1 and the Eye needs 2.0 (for high speed). If something like that existed for 2.0 it could work. |
|
Back to top |
|
|
Dralt
Joined: 30 Oct 2008 Posts: 4
|
Posted: Fri Oct 31, 2008 8:37 am Post subject: |
|
|
jimparis wrote: | Close, but that only does USB 1.1 and the Eye needs 2.0 (for high speed). If something like that existed for 2.0 it could work. |
Like this one?
http://www.nital.com/corporate/usb2builder-d.html
Some of you may wonder why I am dancing around such a crazy idea.
Well, it's LittleBigPlanet's fault. In LBP, you can import new graphics assets via the Eye only! So, to import your assets, you have to do this:
1) Work on your graphics in PS.
2) Make a high quality print.
3) Prepare your lighting conditions.
4) Take a snapshot of your print with the Eye.
This process is nonsense, IMO. You lose a lot of quality between 1 and 4.
The idea of a virtual Eye would allow to go pretty much directly from PS to LBP.
Now, if this project is going to take more than 1 month, it may not be worth the effort. |
|
Back to top |
|
|
ao2
Joined: 30 Aug 2008 Posts: 28
|
Posted: Fri Oct 31, 2008 7:00 pm Post subject: |
|
|
Hi Drait,
this page has some hints about usb device chips, maybe the net2280 could work.
Or you could try with one of those linux PDAs or phones like the NEO Freerunner, they do have usb device hardware and are programmable.
Regards, ao2 |
|
Back to top |
|
|
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Sat Nov 01, 2008 3:58 am Post subject: |
|
|
The PSP could work really well, as it's a USB 2.0 gadget :)
Most of the required reverse engineering has already been done by Tyranid anyway, I think. Might not be too hard to modify his stuff to look like a PS Eye and then implement the protocol on top of it. |
|
Back to top |
|
|
ps3fanboy
Joined: 06 Jul 2008 Posts: 66
|
Posted: Sat Nov 15, 2008 5:57 pm Post subject: |
|
|
jimparis wrote: | Mihawk wrote: | Any chance to get you to post some sample program with source code? ;) | Here's my test app: https://jim.sh/svn/jim/devl/playstation/ps3/eye/test/. It drops most of the data because libusb just can't handle it well. After initializing it waits for 100 complete frames for the camera to settle, then prints out the last one as a ppm. |
should this work on a ps3 as well?
tried it, but didn't get any pictures yet.
camera was detected, init routine completed, but then it hangs...
any advice?
thanks. _________________ http://playstation3-homebrew-multimedia.blogspot.com/ |
|
Back to top |
|
|
ao2
Joined: 30 Aug 2008 Posts: 28
|
Posted: Wed Nov 19, 2008 11:57 pm Post subject: |
|
|
Hi,
here's how to dump the camera eeprom (derived sniffing the windows drivers):
Code: |
void eye_dump_firmware()
{
#define EEPROM_SIZE 8192
uint8_t byte;
uint8_t buf[EEPROM_SIZE];
int i, ret;
int fd;
eye_write(EYEREG_SCCB_ADDRESS, 0xac);
eye_sccb_write(0x00, 0x00);
eye_sccb_check_status();
for (i=0; i < EEPROM_SIZE; i++) {
eye_write(EYEREG_SCCB_OPERATION, EYE_SCCB_OP_READ_2);
eye_sccb_check_status();
byte = eye_read(EYEREG_SCCB_READ);
buf[i] = byte;
printf("0x%02x\n", byte);
}
fd = open("__firmware.bin", O_CREAT|O_WRONLY);
if (fd < 0) {
perror("open");
exit(1);
}
ret = write(fd, buf, EEPROM_SIZE);
if (ret < 0) {
perror("write");
exit(1);
}
close(fd);
}
|
The code is for eye.c from jim paris.
I am also porting the previously posted ov534 driver to gspca, a preview here.
It needs this patch on linux 2.6.28-rc series.
Regards, ao2 |
|
Back to top |
|
|
ao2
Joined: 30 Aug 2008 Posts: 28
|
Posted: Thu Nov 20, 2008 2:28 am Post subject: |
|
|
ao2 wrote: | Hi,
I am also porting the previously posted ov534 driver to gspca, a preview here.
It needs this patch on linux 2.6.28-rc series.
Regards, ao2 |
Poted here for review. |
|
Back to top |
|
|
andre_pl
Joined: 20 Nov 2008 Posts: 2
|
Posted: Thu Nov 20, 2008 2:54 pm Post subject: |
|
|
I'm currently compiling a custom 2.6.28-rc kernel for ubuntu 8.10 including the ov534 and ov772 drivers from this thread. finger's crossed, and thanks to everyone for the hard work. Not much of a C Coder, but I'm willing to help in anyway I can to get this cam working. I will post with my results in a few weeks when the kernel finally finishes compiling. :P |
|
Back to top |
|
|
ps3fanboy
Joined: 06 Jul 2008 Posts: 66
|
Posted: Thu Nov 20, 2008 7:09 pm Post subject: |
|
|
ao2 wrote: | ao2 wrote: | Hi,
I am also porting the previously posted ov534 driver to gspca, a preview here.
It needs this patch on linux 2.6.28-rc series.
Regards, ao2 |
Poted here for review. |
thanks. just a dumb question: which app are you using to test the driver? _________________ http://playstation3-homebrew-multimedia.blogspot.com/ |
|
Back to top |
|
|
ao2
Joined: 30 Aug 2008 Posts: 28
|
Posted: Thu Nov 20, 2008 7:13 pm Post subject: |
|
|
ps3fanboy wrote: | ao2 wrote: | ao2 wrote: | Hi,
I am also porting the previously posted ov534 driver to gspca, a preview here.
It needs this patch on linux 2.6.28-rc series.
Regards, ao2 |
Poted here for review. |
thanks. just a dumb question: which app are you using to test the driver? |
mplayer:
Code: | mplayer -tv driver=v4l2:device=/dev/video1 tv:// |
or
Code: | gstreamer-properties |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|