Le Samedi 14 Mai 2005 16:02, Thomas Kaiser a =E9crit :
> Hello Michel or anybody how can help me
> I am now pretty sure that the sensor in the Creative Labs WebCam NX is a
> PAS106B. The zc030x linux driver detects it as a PAS106B and PAS106B,
> PAS202B is in the .inf file of the windows driver.
> So, I tried to add support for this sensor (PAS106B) in spca50x.
> 1. The spca50x driver autodetcts the sensor (PAS106B) as a HDCS2020.
> Even if I have initialised the spca50x struct with spca50x->sensor =3D
> SENSOR_PAS106;. I did turn of the autodetection and return
> spca50x->sensor =3D SENSOR_PAS106; in zc3xx_init.
> 2. I have to add the sensor to zc3xx_start. There is the function
> zc3xxWriteVector which needs a parameter ..._start_data or
> ..._scale_data. I check the .h file from the other sensors and see a lot
> of hex numbers in this parameter. I did check the PAS106B.h file from
> the zc030x, but there are different constants like PAS106B_Initial, .....
> How can I create a PAS106B.h file for the spca50x driver? Or can I
> somehow convert the const from the zc030x driver to ..._start_data,
> ..._scale_data for the spca50x driver?
> Anyway, Am I on the right way to add support for PAS106B?
> Help is warmly welcome.
> Thanks in advance
Don't take the zc030x driver as a reference, starting with the spca5xx code=
and his tasklet it is now very instable and crash the kernel:(
There are two array for the sensor setting the first is for streaming in la=
the second in small . The zc030x chip only know these 2 range all others=20
resolution are made by interpolation in the windoze driver.
your large is 352x288 as the NX have a SIF sensor and small is a subsampled=
2 so give 176x144.
You can make the array from the snoop get between windoze and your device.
The probe routine is a little bit more complex. The zc030x know two hardwar=
sensor setting one get by i2c the others from a 3 wires bus (maybe by the=20
all sensor is know by an index i suspect the SIF sensor used the same as th=
VGA one because windoze have two drivers. You should modify the routine for=
each index to test if that is a VGA or a CIF sensor read the id by i2c firs=
by the 3 wires bus in second if you find a match write a sensor register th=
reread if that match you have find the sensor.
The rest of the routine are simple to follow
Good luck :)