@@ -140,7 +140,7 @@ const unsigned short mt9f002_ahead_tab[] =
...
@@ -140,7 +140,7 @@ const unsigned short mt9f002_ahead_tab[] =
onchange_initsensor,1,0,0,0,0,0,/// resets sensor, reads sensor registers, schedules "secret" manufacturer's corrections to the registers (stops/re-enables hardware i2c)
onchange_initsensor,1,0,0,0,0,0,/// resets sensor, reads sensor registers, schedules "secret" manufacturer's corrections to the registers (stops/re-enables hardware i2c)
onchange_afterinit,0,0,0,0,0,0,/// restore image size, decimation,... after sensor reset or set them according to sensor capabilities if none were specified
onchange_afterinit,0,0,0,0,0,0,/// restore image size, decimation,... after sensor reset or set them according to sensor capabilities if none were specified
onchange_multisens,0,2,1,1,1,0,/// chnages related to multiplexed sensors
onchange_multisens,0,2,1,1,1,0,/// chnages related to multiplexed sensors
onchange_window,0,2,1,1,1,0,/// program sensor WOI and mirroring (flipping) - NOTE: 1 bad frame to skip
onchange_window,0,2,1,2,1,0,/// program sensor WOI and mirroring (flipping) - NOTE: 1 bad frame to skip
onchange_window_safe,0,1,1,1,1,0,/// program sensor WOI and mirroring (flipping) - NOTE: no bad frames
onchange_window_safe,0,1,1,1,1,0,/// program sensor WOI and mirroring (flipping) - NOTE: no bad frames
onchange_exposure,0,2,1,2,1,0,/// program exposure
onchange_exposure,0,2,1,2,1,0,/// program exposure
onchange_gains,0,1,1,1,1,0,/// program analog gains
onchange_gains,0,1,1,1,1,0,/// program analog gains
...
@@ -156,7 +156,7 @@ const unsigned short mt9f002_ahead_tab[] =
...
@@ -156,7 +156,7 @@ const unsigned short mt9f002_ahead_tab[] =
onchange_memcompressor,0,0,0,0,0,0,/// program memory channel 2 (memory->compressor) (delays programming until onchange_comprestart if needed)
onchange_memcompressor,0,0,0,0,0,0,/// program memory channel 2 (memory->compressor) (delays programming until onchange_comprestart if needed)
/// For Micron sensors limitfps should have the same latency as changing window height, otherwise when WOI_HEIGHT 0x3c0->0x790 and next frame VBLANK 0x13e->0x284
/// For Micron sensors limitfps should have the same latency as changing window height, otherwise when WOI_HEIGHT 0x3c0->0x790 and next frame VBLANK 0x13e->0x284
/// sensor waits till the counter overflows (>10 seconds) without any frame sync pulses
/// sensor waits till the counter overflows (>10 seconds) without any frame sync pulses
onchange_limitfps,0,2,1,1,1,0,/// check compressor will keep up, limit sensor FPS if needed
onchange_limitfps,0,2,1,2,1,0,/// check compressor will keep up, limit sensor FPS if needed
onchange_compmode,0,0,0,0,0,0,/// program compressor modes
onchange_compmode,0,0,0,0,0,0,/// program compressor modes
onchange_focusmode,1,0,0,0,0,0,/// program focus modes (through writing the tables, so no sequencer)
onchange_focusmode,1,0,0,0,0,0,/// program focus modes (through writing the tables, so no sequencer)
onchange_trigseq,0,2,1,1,1,0,/// NC393: OK to program through the sequencer (full 32 bits)
onchange_trigseq,0,2,1,1,1,0,/// NC393: OK to program through the sequencer (full 32 bits)
...
@@ -732,9 +732,16 @@ int mt9f002_pgm_sensorin (int sensor_port, ///< sensor port number
...
@@ -732,9 +732,16 @@ int mt9f002_pgm_sensorin (int sensor_port, ///< sensor port number
@@ -918,6 +919,7 @@ int mt9x001_pgm_detectsensor (int sensor_port, ///< sensor port
...
@@ -918,6 +919,7 @@ int mt9x001_pgm_detectsensor (int sensor_port, ///< sensor port
dev_dbg(g_dev_ptr,"{%d} copied %d bytes of sensor static parameters\n",sensor_port,sizeof(mt9p001));
dev_dbg(g_dev_ptr,"{%d} copied %d bytes of sensor static parameters\n",sensor_port,sizeof(mt9p001));
add_sensor_proc(sensor_port,onchange_detectsensor,&mt9x001_pgm_detectsensor);// detect sensor type, sets sensor structure (capabilities), function pointers NOTE: will be called directly, not through pointers
add_sensor_proc(sensor_port,onchange_detectsensor,&mt9x001_pgm_detectsensor);// detect sensor type, sets sensor structure (capabilities), function pointers NOTE: will be called directly, not through pointers
add_sensor_proc(sensor_port,onchange_initsensor,&mt9x001_pgm_initsensor);// resets sensor, reads sensor registers, schedules "secret" manufacturer's corrections to the registers (stops/re-enables hardware i2c)
add_sensor_proc(sensor_port,onchange_initsensor,&mt9x001_pgm_initsensor);// resets sensor, reads sensor registers, schedules "secret" manufacturer's corrections to the registers (stops/re-enables hardware i2c)
add_sensor_proc(sensor_port,onchange_sensorin,&mt9x001_pgm_sensorin);// see mt9f002
add_sensor_proc(sensor_port,onchange_exposure,&mt9x001_pgm_exposure);// program exposure
add_sensor_proc(sensor_port,onchange_exposure,&mt9x001_pgm_exposure);// program exposure
add_sensor_proc(sensor_port,onchange_window,&mt9x001_pgm_window);// program sensor WOI and mirroring (flipping)
add_sensor_proc(sensor_port,onchange_window,&mt9x001_pgm_window);// program sensor WOI and mirroring (flipping)
add_sensor_proc(sensor_port,onchange_window_safe,&mt9x001_pgm_window_safe);// program sensor WOI and mirroring (flipping) - now - only flipping? with lower latency
add_sensor_proc(sensor_port,onchange_window_safe,&mt9x001_pgm_window_safe);// program sensor WOI and mirroring (flipping) - now - only flipping? with lower latency
...
@@ -1096,6 +1098,33 @@ int mt9x001_pgm_initsensor (int sensor_port, ///< sensor port
...
@@ -1096,6 +1098,33 @@ int mt9x001_pgm_initsensor (int sensor_port, ///< sensor port
return0;
return0;
}
}
/**
* Program sensor input in FPGA (Bayer, 8/16 bits, FPN, test mode, number of lines).
*/
intmt9x001_pgm_sensorin(intsensor_port,///< sensor port number (0..3)