![]() |
TI J721E Imaging User Guide
|
RTOS Sensor Driver Framework.
Path: imaging/sensor_drv
Data Structures | |
struct | IssSensor_LineInterleavedExpFrmInfo |
For Line Interleaved WDR mode, this structure is used for specifying position of each exposure frame. More... | |
struct | I2cParams |
Register address and value pair, with delay. More... | |
struct | IssSensor_ExposureParams |
AutoExposure results data structure. More... | |
struct | IssSensor_WhiteBalanceParams |
AutoWhiteBalance results data structure. More... | |
struct | IssSensor_DccParams |
Structure for setting DCC params. More... | |
struct | IssSensor_Info |
Sensor Information structure. More... | |
struct | IssSensor_CreateParams |
Create Time parameters, ISS sensor layer uses these parameters and configures board module and sensor. More... | |
struct | IssCapture_CmplxIoLaneCfg |
CSI-2 COmplex I/O Lane Configuration. More... | |
struct | IssSensorIntfParams |
Structure used for describing sensor interfacing. More... | |
struct | IssSensorConfig |
Structure used for specifying register configurations of sensor, serializer and deserializer. More... | |
struct | IssAeRange |
Min/Max Range, used in AWB calibration data. More... | |
struct | IssAeDynamicParams |
Sensor Specific Auto Exposure Dynamic Parameters. More... | |
struct | IssAwbDynamicParams |
Sensor Specific Auto WhiteBalance Dynamic Parameters. More... | |
struct | IssSensorFxns |
Structure containins sensor information, used for registering it to the sensor framework. More... | |
struct | IssSensors_Handle |
Handle to the sensor driver. Includes all the information about the sensor. More... | |
Functions | |
int32_t | IssSensor_Init () |
Function to initialize sensor driver framework. Registers with remote service. Includes init function of supported sensor drivers. This step is critical for registring a sensor driver with the framework. More... | |
int32_t | IssSensor_DeInit () |
Function to de-initialize sensor driver framework. Unregisters remote service. More... | |
int32_t | IssSensor_Register (IssSensors_Handle *pSensorPrms) |
Function to register a sensor driver with the driver framework. More... | |
int32_t | IssSensor_GetSensorInfo (char *name, IssSensor_CreateParams *pCreatePrms) |
Function to get Sensor information for given sensor It searches in the table of registered sensors, it returns information of first sensor, whose name matches with the given sensor. More... | |
int32_t | IssSensor_GetSensorInfoFromDccId (uint32_t dccId, IssSensor_Info *pInfo) |
Function to get Sensor information for sensor whose DCC ID is passed. It searches in the table of registered sensors, it returns information of first sensor, whose dcc id matches with the given id. Typically used by the DCC Network handler to get the sensor information. More... | |
IssSensors_Handle * | IssSensor_GetSensorHandle (char *name) |
Function to get the sensor handle for the given sensor. This is used by the DCC Network Handler to Read/Write sensor register. Returns sensor handle only if it is opened. More... | |
void * | IssSensor_Create (char *name) |
Creates the sensor, based on the create params, it searches for the given sensor in the registered sensors, configures the board module if sensor supports board module and creates sensor fvid2 driver. It also configures sensor in the given WDR mode and also sets the default output resolution in the sensor. More... | |
int32_t | IssSensor_Control (void *handle, uint32_t cmd, void *cmdArgs, void *cmdRetArgs) |
Used for sending control commands, this layer supports all configuration using control commants. For the list of supported control command, see defines section of this file. More... | |
int32_t | IssSensor_Start (void *handle, uint32_t chId) |
Used Starting the sensor, which is already opened using Create function. Must be called after Create function. More... | |
int32_t | IssSensor_Stop (void *handle, uint32_t chId) |
Used stopping the sensor, which is alraedy opened using Create function. Must be called after Create function. More... | |
int32_t | IssSensor_Delete (void *handle) |
Used for deleting the sensor, which is already opened using Create function. Internally it deletes sensor's fvid2 driver. After this call, handle is not valid. More... | |
int32_t | ub960_cfgScript (I2cParams *script, int8_t ub960InstanceId) |
Function to configure UB960 deserializer. More... | |
int32_t | ub953_cfgScript (uint8_t i2cInstId, uint8_t i2cAddr, I2cParams *script) |
Function to configure UB953 serializer. More... | |
IssSensors_Handle * | getSensorHandleFromName (char *name) |
Function to get sensor handle from name. More... | |
int32_t | IssSensor_PowerOn (void *handle, uint32_t chMask) |
Function to power ON the sensor. More... | |
int32_t | IssSensor_PowerOff (void *handle, uint32_t chId) |
Function to power OFF the sensor. More... | |
int32_t | IssSensor_Config (void *handle, uint32_t chId, uint32_t feat) |
Function to configure the sensor. More... | |
int32_t | IssSensor_SetAeParams (void *handle, uint32_t chId, IssSensor_ExposureParams *pExpPrms) |
Function to send Exposure parameters to the sensor. More... | |
int32_t | IssSensor_SetAwbParams (void *handle, uint32_t chId, IssSensor_WhiteBalanceParams *pWbPrms) |
Function to send WhiteBalance gains to the sensor. More... | |
int32_t | enableUB960Streaming (uint32_t chId) |
Function to enable streaming from UB960 by setting register 0x33 to 0x3 for the given camera channel. More... | |
int32_t | disableUB960Streaming (uint32_t chId) |
Function to enable streaming from UB960 by setting register 0x33 to 0x2 for the given camera channel. More... | |
int8_t | getUB960InstIdFromChId (uint32_t chId) |
Function to map UB960 Instance to channel number On Fusion board the mapping is as follows Camera Channel 0 - UB960 Instance 0 Camera Channel 1 - UB960 Instance 0 Camera Channel 2 - UB960 Instance 0 Camera Channel 3 - UB960 Instance 0 Camera Channel 4 - UB960 Instance 1 Camera Channel 5 - UB960 Instance 1 Camera Channel 6 - UB960 Instance 1 Camera Channel 7 - UB960 Instance 1. More... | |
Typedefs | |
typedef int32_t(* | IssSensor_ProbeFxn) (uint32_t chId, void *pSensorHdl) |
Callback for sensor probe. Detection of sensor HW using chip ID register. More... | |
typedef int32_t(* | IssSensor_ConfigFxn) (uint32_t chId, void *pSensorHdl, uint32_t sensor_features_requested) |
Callback for sensor & SerDes configuration. More... | |
typedef int32_t(* | IssSensor_StreamOnFxn) (uint32_t chId, void *pSensorHdl) |
Callback for starting streaming. More... | |
typedef int32_t(* | IssSensor_StreamOffFxn) (uint32_t chId, void *pSensorHdl) |
Callback for stopping streaming. More... | |
typedef int32_t(* | IssSensor_PowerOnFxn) (uint32_t chId, void *pSensorHdl) |
Callback for powering ON the sensor and/or configuring the deserialser so that the sensor is visible to the SoC. More... | |
typedef int32_t(* | IssSensor_PowerOffFxn) (uint32_t chId, void *pSensorHdl) |
Callback for powering OFF the sensor, if applicable. More... | |
typedef int32_t(* | IssSensor_SetAeParamsFxn) (void *pSensorHdl, uint32_t chId, IssSensor_ExposureParams *pExpPrms) |
Callback for setting sensor exposure and gain. More... | |
typedef int32_t(* | IssSensor_GetDccParamsFxn) (uint32_t chId, void *pSensorHdl, IssSensor_DccParams *pDccPrms) |
Callback for getting DCC parameters. Reserved for future use. More... | |
typedef int32_t(* | IssSensor_GetExpParamsFxn) (uint32_t chId, void *pSensorHdl, IssSensor_ExposureParams *pExpPrms) |
Callback for getting current exposure settings. Reserved for future use. More... | |
typedef void(* | IssSensor_InitAewbConfigFxn) (uint32_t chId, void *pSensorHdl) |
Callback for setting AEWB specific sensor settings, if applicable. Reserved for future use. More... | |
typedef void(* | IssSensor_GetIspConfigFxn) (uint32_t chId, void *pSensorHdl) |
Callback for getting ISP settings specific to the sensor, if applicable. Reserved for future use. More... | |
typedef void(* | IssSensor_DeinitFxn) (uint32_t chId, void *pSensorHdl) |
Callback for de-initializing the sensor, if applicable. Reserved for future use. More... | |
typedef int32_t(* | I2cRegReadWriteFxn) (uint32_t chId, void *pSensorHdl, uint32_t readWriteFlag, I2cParams *pReg) |
Callback for reading/writing sensor registers from the application. Reserved for future use. More... | |
typedef int32_t(* | IssSensor_GetExpPrgFxn) (uint32_t chId, void *pSensorHdl, IssAeDynamicParams *p_ae_dynPrms) |
Callback for getting sensor's exposure constraints. Needed for AutoExposure tuning. More... | |
typedef int32_t(* | IssSensor_GetWbConfigFxn) (uint32_t chId, void *pSensorHdl, IssAwbDynamicParams *p_awb_dynPrms) |
Callback for getting sensor's WB constraints. Needed for AutoWhiteBalance tuning. More... | |
typedef int32_t(* | IssSensor_SetAwbParamsFxn) (void *pSensorHdl, uint32_t chId, IssSensor_WhiteBalanceParams *pWbPrms) |
Callback for setting WB gains in the sensor. More... | |
Macros | |
#define | SENSOR_I2C_TIMEOUT (5000U) |
RPC Commands application can send to sensor driver. More... | |
#define | MAX_AE_DYN_PARAMS (10U) |
Maximum number of dynamic parameter configuration supported for Auto Exposure Algorithm tuning. More... | |
#define SENSOR_I2C_TIMEOUT (5000U) |
RPC Commands application can send to sensor driver.
#define MAX_AE_DYN_PARAMS (10U) |
Maximum number of dynamic parameter configuration supported for Auto Exposure Algorithm tuning.
typedef int32_t(* IssSensor_ProbeFxn) (uint32_t chId, void *pSensorHdl) |
Callback for sensor probe. Detection of sensor HW using chip ID register.
typedef int32_t(* IssSensor_ConfigFxn) (uint32_t chId, void *pSensorHdl, uint32_t sensor_features_requested) |
Callback for sensor & SerDes configuration.
typedef int32_t(* IssSensor_StreamOnFxn) (uint32_t chId, void *pSensorHdl) |
Callback for starting streaming.
typedef int32_t(* IssSensor_StreamOffFxn) (uint32_t chId, void *pSensorHdl) |
Callback for stopping streaming.
typedef int32_t(* IssSensor_PowerOnFxn) (uint32_t chId, void *pSensorHdl) |
Callback for powering ON the sensor and/or configuring the deserialser so that the sensor is visible to the SoC.
typedef int32_t(* IssSensor_PowerOffFxn) (uint32_t chId, void *pSensorHdl) |
Callback for powering OFF the sensor, if applicable.
typedef int32_t(* IssSensor_SetAeParamsFxn) (void *pSensorHdl, uint32_t chId, IssSensor_ExposureParams *pExpPrms) |
Callback for setting sensor exposure and gain.
typedef int32_t(* IssSensor_GetDccParamsFxn) (uint32_t chId, void *pSensorHdl, IssSensor_DccParams *pDccPrms) |
Callback for getting DCC parameters. Reserved for future use.
typedef int32_t(* IssSensor_GetExpParamsFxn) (uint32_t chId, void *pSensorHdl, IssSensor_ExposureParams *pExpPrms) |
Callback for getting current exposure settings. Reserved for future use.
typedef void(* IssSensor_InitAewbConfigFxn) (uint32_t chId, void *pSensorHdl) |
Callback for setting AEWB specific sensor settings, if applicable. Reserved for future use.
typedef void(* IssSensor_GetIspConfigFxn) (uint32_t chId, void *pSensorHdl) |
Callback for getting ISP settings specific to the sensor, if applicable. Reserved for future use.
typedef void(* IssSensor_DeinitFxn) (uint32_t chId, void *pSensorHdl) |
Callback for de-initializing the sensor, if applicable. Reserved for future use.
typedef int32_t(* I2cRegReadWriteFxn) (uint32_t chId, void *pSensorHdl, uint32_t readWriteFlag, I2cParams *pReg) |
Callback for reading/writing sensor registers from the application. Reserved for future use.
typedef int32_t(* IssSensor_GetExpPrgFxn) (uint32_t chId, void *pSensorHdl, IssAeDynamicParams *p_ae_dynPrms) |
Callback for getting sensor's exposure constraints. Needed for AutoExposure tuning.
typedef int32_t(* IssSensor_GetWbConfigFxn) (uint32_t chId, void *pSensorHdl, IssAwbDynamicParams *p_awb_dynPrms) |
Callback for getting sensor's WB constraints. Needed for AutoWhiteBalance tuning.
typedef int32_t(* IssSensor_SetAwbParamsFxn) (void *pSensorHdl, uint32_t chId, IssSensor_WhiteBalanceParams *pWbPrms) |
Callback for setting WB gains in the sensor.
enum IMAGE_SENSOR_CTRLCMD |
IOCTLS supported as part of IM_SENSOR_CMD_CTL command.
enum IssSensor_Features |
Enum for Sensor Features.
enum IssSensor_Exposures |
Enum for different sensor exposures in WDR sensor.
enum AlgItt_IssAewbMode |
AEWB Algorithm Mode.
enum AlgItt_IssAeMode |
enum AlgItt_IssAwbMode |
int32_t IssSensor_Init | ( | ) |
Function to initialize sensor driver framework. Registers with remote service. Includes init function of supported sensor drivers. This step is critical for registring a sensor driver with the framework.
registeredSensorNames | OUT Names of all the registered sensors |
int32_t IssSensor_DeInit | ( | ) |
Function to de-initialize sensor driver framework. Unregisters remote service.
int32_t IssSensor_Register | ( | IssSensors_Handle * | pSensorPrms | ) |
Function to register a sensor driver with the driver framework.
pSensorPrms | All sensor properties and the APIs |
int32_t IssSensor_GetSensorInfo | ( | char * | name, |
IssSensor_CreateParams * | pCreatePrms | ||
) |
Function to get Sensor information for given sensor It searches in the table of registered sensors, it returns information of first sensor, whose name matches with the given sensor.
name | Name of the sensor |
pCreatePrms | [OUT] Pointer to sensor create parmas structure |
int32_t IssSensor_GetSensorInfoFromDccId | ( | uint32_t | dccId, |
IssSensor_Info * | pInfo | ||
) |
Function to get Sensor information for sensor whose DCC ID is passed. It searches in the table of registered sensors, it returns information of first sensor, whose dcc id matches with the given id. Typically used by the DCC Network handler to get the sensor information.
dccId | DCC Id of the sensor |
pInfo | [OUT] Pointer to sensor information structure |
IssSensors_Handle* IssSensor_GetSensorHandle | ( | char * | name | ) |
Function to get the sensor handle for the given sensor. This is used by the DCC Network Handler to Read/Write sensor register. Returns sensor handle only if it is opened.
dccId | DCC Id of the sensor |
pInfo | [OUT] Pointer to sensor information structure |
void* IssSensor_Create | ( | char * | name | ) |
Creates the sensor, based on the create params, it searches for the given sensor in the registered sensors, configures the board module if sensor supports board module and creates sensor fvid2 driver. It also configures sensor in the given WDR mode and also sets the default output resolution in the sensor.
pCreatePrms | Pointer to the create params |
int32_t IssSensor_Control | ( | void * | handle, |
uint32_t | cmd, | ||
void * | cmdArgs, | ||
void * | cmdRetArgs | ||
) |
Used for sending control commands, this layer supports all configuration using control commants. For the list of supported control command, see defines section of this file.
Must be called after Create function
handle | Handle to the created sensor |
cmd | Control command |
cmdArgs | Pointer to the command specific arguments. |
cmdRetArgs | [OUT] Pointer to the command specific return arguments |
int32_t IssSensor_Start | ( | void * | handle, |
uint32_t | chId | ||
) |
Used Starting the sensor, which is already opened using Create function. Must be called after Create function.
handle | Handle of the sensor |
chId | ID of the channel to be started. |
int32_t IssSensor_Stop | ( | void * | handle, |
uint32_t | chId | ||
) |
Used stopping the sensor, which is alraedy opened using Create function. Must be called after Create function.
handle | Handle of the sensor |
chId | ID of the channel to be stopped. |
int32_t IssSensor_Delete | ( | void * | handle | ) |
Used for deleting the sensor, which is already opened using Create function. Internally it deletes sensor's fvid2 driver. After this call, handle is not valid.
Must be called after Create function.
int32_t ub960_cfgScript | ( | I2cParams * | script, |
int8_t | ub960InstanceId | ||
) |
Function to configure UB960 deserializer.
script | Array of type I2CParams with last entry being {0xFFFF, 0x00, 0x00} |
ub960InstanceId | ID 0/1 indicating which UB960 on the board is to be configured |
int32_t ub953_cfgScript | ( | uint8_t | i2cInstId, |
uint8_t | i2cAddr, | ||
I2cParams * | script | ||
) |
Function to configure UB953 serializer.
i2cInstId | I2C bus on which the serializer is populated |
i2cAddr | 7-bit I2C address, usually alias address as configured in UB960 |
script | Array of type I2CParams with last entry being {0xFFFF, 0x00, 0x00} |
IssSensors_Handle* getSensorHandleFromName | ( | char * | name | ) |
Function to get sensor handle from name.
name | name of the sensor as specfied in IssSensor_CreateParams |
int32_t IssSensor_PowerOn | ( | void * | handle, |
uint32_t | chMask | ||
) |
Function to power ON the sensor.
handle | Pointer to sensor handle |
chMask | Binary mask indicating which cameras are to be powered ON For e.g. 0x1F means that first 5 cameras must be enabled This would mean configuring both the UB960 deserializers Another example - chMask = 0x1 means only the first camera should be enabled Therefore, only first instance of UB960 should be configured. |
int32_t IssSensor_PowerOff | ( | void * | handle, |
uint32_t | chId | ||
) |
Function to power OFF the sensor.
handle | Pointer to sensor handle |
chId | Channel ID indicating which camera needs to be disabled |
int32_t IssSensor_Config | ( | void * | handle, |
uint32_t | chId, | ||
uint32_t | feat | ||
) |
Function to configure the sensor.
handle | Pointer to sensor handle |
chId | Channel ID of the camera to be configured |
feat | Feature mask. Sensor drver can apply different settings for different features For e.g. linear mode vs WDR mode OR 30fps mode vs 60fps mode |
int32_t IssSensor_SetAeParams | ( | void * | handle, |
uint32_t | chId, | ||
IssSensor_ExposureParams * | pExpPrms | ||
) |
Function to send Exposure parameters to the sensor.
handle | Pointer to sensor handle |
chId | Channel ID of the camera to be configured |
pExpPrms | Exposure parameters - integration time and sensor gain |
int32_t IssSensor_SetAwbParams | ( | void * | handle, |
uint32_t | chId, | ||
IssSensor_WhiteBalanceParams * | pWbPrms | ||
) |
Function to send WhiteBalance gains to the sensor.
handle | Pointer to sensor handle |
chId | Channel ID of the camera to be configured |
pWbPrms | WhiteBalance parameters - RGB colors gains |
int32_t enableUB960Streaming | ( | uint32_t | chId | ) |
Function to enable streaming from UB960 by setting register 0x33 to 0x3 for the given camera channel.
chId | Channel ID of the camera to be configured |
int32_t disableUB960Streaming | ( | uint32_t | chId | ) |
Function to enable streaming from UB960 by setting register 0x33 to 0x2 for the given camera channel.
chId | Channel ID of the camera to be configured |
int8_t getUB960InstIdFromChId | ( | uint32_t | chId | ) |
Function to map UB960 Instance to channel number On Fusion board the mapping is as follows Camera Channel 0 - UB960 Instance 0 Camera Channel 1 - UB960 Instance 0 Camera Channel 2 - UB960 Instance 0 Camera Channel 3 - UB960 Instance 0 Camera Channel 4 - UB960 Instance 1 Camera Channel 5 - UB960 Instance 1 Camera Channel 6 - UB960 Instance 1 Camera Channel 7 - UB960 Instance 1.
On customer boards, this mapping maybe redefined
chId | Channel ID of the camera to be configured |