Web lists-archives.com

[Spca50x-devs] How to port a new sensor?




Hi all,

I have a USB cam which Vendor/product ID is: 0x0ac8:0x307b, Z-Star Microelectronics Crop.
Which Sensor is ov7620 and bridge should be zc3xx.

When I followed the codes for 0x0ac8:0x305b in spca5xx and added a similar section for 0x0ac8:0x307b.
The Linux found the USB cam and I can access /dev/video0 now also.
However, when I use spcaview and other webcam viewer I cannot see anything from my webcam.
The display window always in black.

1. I guess it was because the Start/Scale code of the sensor ov7620 was differ from ov7630c.
How can I transfer the Start/Scale code in .ini file into header file ov7620.c ?

2 .Also, the spca5xx driver detected the sensor should be ov7630c. I guess the detection was wrong.
Need I to add some code in sensor detection functions?

The following was the Start/Scale code of the sensor ov7620 from .ini file.
In ov7630c.h, I found each code were reformatted into 3 - 4 bytes.
Please help me to reformatted it.
Moreover, if the whole .ini file may help, please let me know and post it in this thread.

HKR,%OV7620%,CMD,                  0x00001,FF,20,00,00, F0,01,02,00, F0,02,10,30

HKR,%OV7620%,Initial,            0X00001,00,00,01,cc,00,02,40,cc,00,08,00,cc,00,01,01,cc,00,10,06,cc,\
                        00,83,02,cc,00,85,01,cc,00,86,80,cc,00,87,81,cc,00,88,10,cc,\
                        00,8b,a1,cc,00,8d,08,cc,00,03,02,cc,00,04,80,cc,00,05,01,cc,\
                        00,06,d8,cc,00,12,03,cc,00,12,01,cc,00,98,00,cc,00,9a,00,cc,\
                        01,1a,00,cc,01,1c,00,cc,00,9c,de,cc,00,9e,86,cc,00,12,88,aa,\
                        00,12,48,aa,00,75,8a,aa,00,13,a3,aa,00,04,00,aa,00,05,00,aa,\
                        00,14,00,aa,00,15,04,aa,00,17,18,aa,00,18,ba,aa,00,19,02,aa,00,1a,f1,aa,\
                    00,20,40,aa,00,24,88,aa,00,25,78,aa,00,27,f6,aa,00,28,a0,aa,00,21,00,aa,00,2a,83,aa,\
                        00,2b,96,aa,00,2d,05,aa,00,74,20,aa,00,61,68,aa,00,64,88,aa,\
                        00,00,00,aa,00,06,80,aa,00,01,90,aa,00,02,30,aa,01,01,77,cc,00,12,05,cc,\
                        01,00,0d,cc,01,89,06,cc,01,ad,00,cc,01,c5,03,cc,01,cb,13,cc,\
                        02,50,08,cc,03,01,08,cc,01,16,68,cc,01,18,52,cc,01,1d,40,cc,\
                        01,80,02,cc,01,a8,50,cc

HKR,%OV7620%,InitialScale,        0X00001,00,00,01,cc,00,02,50,cc,00,08,00,cc,00,01,01,cc,00,10,06,cc,\
                        00,83,02,cc,00,85,01,cc,00,86,80,cc,00,87,81,cc,00,88,10,cc,\
                        00,8b,a1,cc,00,8d,08,cc,00,03,02,cc,00,04,80,cc,00,05,01,cc,\
                        00,06,d0,cc,00,12,03,cc,00,12,01,cc,00,98,00,cc,00,9a,00,cc,\
                        01,1a,00,cc,01,1c,00,cc,00,9c,d6,cc,00,9e,88,cc,00,12,88,aa,\
                        00,12,48,aa,00,75,8a,aa,00,13,a3,aa,00,04,00,aa,00,05,00,aa,\
                        00,14,00,aa,00,15,04,aa,00,24,88,aa,00,25,78,aa,00,17,18,aa,00,18,ba,aa,00,19,02,aa,00,1a,f2,aa,\
                        00,20,40,aa,00,27,f6,aa,00,28,a0,aa,00,21,00,aa,00,2a,83,aa,\
                        00,2b,96,aa,00,2d,05,aa,00,74,20,aa,00,61,68,aa,00,64,88,aa,\
                        00,00,00,aa,00,06,80,aa,00,01,90,aa,00,02,30,aa,01,01,77,cc,00,12,05,cc,\
                        01,00,0d,cc,01,89,06,cc,01,ad,00,cc,01,c5,03,cc,01,cb,13,cc,\
                        02,50,08,cc,03,01,08,cc,01,16,68,cc,01,18,52,cc,01,1d,50,cc,\
                        01,80,02,cc,01,a8,50,cc

HKR,%OV7620%\AE,50HZ,            0X00001,00,13,a3,aa,00,01,00,dd,00,2b,96,aa,00,75,8a,aa,00,2d,05,aa,01,90,00,cc,\
                        01,91,04,cc,01,92,18,cc,01,95,00,cc,01,96,00,cc,01,97,83,cc,\
                        00,10,82,aa,00,76,03,aa,00,02,40,cc

HKR,%OV7620%\AE,50HZScale,        0X00001,00,13,a3,aa,00,01,00,dd,00,2b,96,aa,00,75,8a,aa,00,2d,05,aa,01,90,00,cc,\
                        01,91,04,cc,01,92,18,cc,01,95,00,cc,01,96,00,cc,01,97,83,cc,\
                        00,10,82,aa,00,76,03,aa

HKR,%OV7620%\AE,60HZ,            0X00001,00,13,a3,00,01,00,dd,aa,00,2b,00,aa,00,75,8a,aa,00,2d,05,aa,01,90,00,cc,\
                        01,91,04,cc,01,92,18,cc,01,95,00,cc,01,96,00,cc,01,97,83,cc,\
                        00,10,20,aa,00,76,03,aa,00,02,40,cc

HKR,%OV7620%\AE,60HZScale,        0X00001,00,13,a3,00,01,00,dd,aa,00,2b,00,aa,00,75,8a,aa,00,2d,05,aa,01,90,00,cc,\
                        01,91,04,cc,01,92,18,cc,01,95,00,cc,01,96,00,cc,01,97,83,cc,\
                        00,10,20,aa,00,76,03,aa

HKR,%OV7620%\AE,NoFliker,        0X00001,00,13,e3,00,01,00,dd,aa,00,2b,00,aa,00,75,8e,aa,00,2d,01,aa,01,90,00,cc,\
                        01,91,04,cc,01,92,18,cc,01,95,00,cc,01,96,00,cc,01,97,01,cc,00,02,44,cc

HKR,%OV7620%\AE,NoFlikerScale,        0X00001,00,13,e3,00,01,00,dd,aa,00,2b,00,aa,00,75,8e,aa,00,2d,01,aa,01,90,00,cc,\
                        01,91,04,cc,01,92,18,cc,01,95,00,cc,01,96,00,cc,01,97,01,cc



--
Best regards,
Macpaul Lin
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Spca50x-devs mailing list
Spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spca50x-devs