NVIDIA DRIVE OS Linux SDK API Reference

6.0.3 Release
Camera Device Interface

Detailed Description

The Camera Device Interface API encompasses all DevBlk I2C control related functions, including programming of all I2C controlled components such as deserializers, serializers, EEPROMs, and image sensors.

DevBlkCDI needs a device driver for each attached device. This provides the flexibility of adding new devices easily.

Data Structures

struct  DevBlkCDIDevice
 Holds the handle for an DevBlkCDIDevice object. More...
 
struct  DevBlkCDIModuleConfig
 Holds the CDI Module ISP configuration. More...
 
struct  DevBlkCDIExposureControl
 Holds exposure control information. More...
 
struct  DevBlkCDIWBGainControl
 Holds the white balance control structure. More...
 
struct  DevBlkCDIEmbeddedDataBuffer
 Holds the embedded data buffer structure. More...
 
struct  DevBlkCDIEmbeddedData
 Holds the embedded data structure. More...
 

Modules

 Basic CDI Types
 The Camera Device Interface API provides common CDI processing functions.
 
 CDI Device
 An CDI device represents a device that is attached or linked to the root I2C port.
 
 CDI Device Driver
 Program elements related to DevBlkCDIDeviceDriver, which defines a device driver. The core DevBlkCDI calls the driver when the client calls the related public DevBlkCDI function.
 
 CDI Root Device
 Manage DevBlkCDIRootDevice objects, which represent the root of the SIPL device block.
 

Typedefs

typedef struct DevBlkCDIModuleConfig DevBlkCDIModuleConfig
 Holds the CDI Module ISP configuration. More...
 
typedef struct DevBlkCDIExposureControl DevBlkCDIExposureControl
 Holds exposure control information. More...
 
typedef struct DevBlkCDIWBGainControl DevBlkCDIWBGainControl
 Holds the white balance control structure. More...
 
typedef struct DevBlkCDIEmbeddedData DevBlkCDIEmbeddedData
 Holds the embedded data structure. More...
 

Enumerations

enum  DevBlkCDIPowerItems {
  DEVBLK_CDI_PWR_AGGREGATOR,
  DEVBLK_CDI_PWR_LINK_0,
  DEVBLK_CDI_PWR_LINK_1,
  DEVBLK_CDI_PWR_LINK_2,
  DEVBLK_CDI_PWR_LINK_3
}
 CDI Power control items. More...
 
enum  DevBlkCDIExposureMode {
  DEVBLK_CDI_EXPOSURE_MODE_LONG,
  DEVBLK_CDI_EXPOSURE_MODE_SHORT,
  DEVBLK_CDI_EXPOSURE_MODE_VERY_SHORT,
  DEVBLK_CDI_EXPOSURE_MODE_MAX
}
 Defines Exposure mode. More...
 
enum  DevBlkCDISensorAttrType {
  DEVBLK_CDI_SENSOR_ATTR_FUSE_ID,
  DEVBLK_CDI_SENSOR_ATTR_GAIN_MIN,
  DEVBLK_CDI_SENSOR_ATTR_GAIN_MAX,
  DEVBLK_CDI_SENSOR_ATTR_ET_MIN,
  DEVBLK_CDI_SENSOR_ATTR_ET_MAX,
  DEVBLK_CDI_SENSOR_ATTR_ET_FINE,
  DEVBLK_CDI_SENSOR_ATTR_ET_STEP,
  DEVBLK_CDI_SENSOR_ATTR_HDR_MAX,
  DEVBLK_CDI_SENSOR_ATTR_GAIN_FACTOR,
  DEVBLK_CDI_SENSOR_ATTR_QE_PIXEL_RATIO,
  DEVBLK_CDI_SENSOR_ATTR_FRAME_RATE,
  DEVBLK_CDI_SENSOR_ATTR_NUM_EXPOSURES
}
 CDI sensor attributes. More...
 

Functions

NvMediaStatus DevBlkCDISetSensorCharMode (DevBlkCDIDevice *device, uint8_t expNo)
 Set sensor in characterization mode. More...
 
NvMediaStatus DevBlkCDIGetModuleConfig (DevBlkCDIDevice *device, DevBlkCDIModuleConfig *moduleConfig)
 Gets the Module ISP configuration. More...
 

Typedef Documentation

◆ DevBlkCDIEmbeddedData

Holds the embedded data structure.

Deprecated:
Use the new structure DevBlkCDIEmbeddedDataInfo instead.

◆ DevBlkCDIExposureControl

Holds exposure control information.

Deprecated:
Use DevBlkCDISensorControl instead.

◆ DevBlkCDIModuleConfig

Holds the CDI Module ISP configuration.

◆ DevBlkCDIWBGainControl

Holds the white balance control structure.

Deprecated:
Use DevBlkCDISensorControl instead.

Enumeration Type Documentation

◆ DevBlkCDIExposureMode

Defines Exposure mode.

Deprecated:
Use the DevBlkCDISetSensorCharMode() parameter expNo instead.
Enumerator
DEVBLK_CDI_EXPOSURE_MODE_LONG 

Specifies long exposure mode.

DEVBLK_CDI_EXPOSURE_MODE_SHORT 

Specifies short exposure mode.

DEVBLK_CDI_EXPOSURE_MODE_VERY_SHORT 

Specifies very short exposure mode.

DEVBLK_CDI_EXPOSURE_MODE_MAX 

Specifies the exposure mode count.

Definition at line 1267 of file devblk_cdi.h.

◆ DevBlkCDIPowerItems

CDI Power control items.

Enumerator
DEVBLK_CDI_PWR_AGGREGATOR 

Aggregator Power.

DEVBLK_CDI_PWR_LINK_0 

LINK 0 Power.

DEVBLK_CDI_PWR_LINK_1 

LINK 1 PWR.

DEVBLK_CDI_PWR_LINK_2 

LINK 2 PWR.

DEVBLK_CDI_PWR_LINK_3 

LINK 3 PWR.

Definition at line 1237 of file devblk_cdi.h.

◆ DevBlkCDISensorAttrType

CDI sensor attributes.

Note
This enum will not be supported in future release. It is recommended to use the new API DevBlkCDIGetSensorAttributes
Enumerator
DEVBLK_CDI_SENSOR_ATTR_FUSE_ID 

Specifies a unique ID per instance of camera module.

Data type: char[32] 
DEVBLK_CDI_SENSOR_ATTR_GAIN_MIN 

Specifies minimum possible gain values.

Data type: float_t[DEVBLK_CDI_EXPOSURE_MODE_MAX] 
DEVBLK_CDI_SENSOR_ATTR_GAIN_MAX 

Specifies maximum possible gain values.

Data type: float_t[DEVBLK_CDI_EXPOSURE_MODE_MAX] 
DEVBLK_CDI_SENSOR_ATTR_ET_MIN 

Specifies minimum possible exposure time values in seconds.

Data type: float_t[DEVBLK_CDI_EXPOSURE_MODE_MAX] 
DEVBLK_CDI_SENSOR_ATTR_ET_MAX 

Specifies maximum possible exposure time values in seconds.

Data type: float_t[DEVBLK_CDI_EXPOSURE_MODE_MAX] 
DEVBLK_CDI_SENSOR_ATTR_ET_FINE 

Specifies fine integration time values in seconds.

Data type: float_t[DEVBLK_CDI_EXPOSURE_MODE_MAX] 
DEVBLK_CDI_SENSOR_ATTR_ET_STEP 

Specifies exposure time step values in seconds.

Data type: double[DEVBLK_CDI_EXPOSURE_MODE_MAX] 
DEVBLK_CDI_SENSOR_ATTR_HDR_MAX 

Specifies maximum possible HDR ratio value.

Data type: uint32_t 
DEVBLK_CDI_SENSOR_ATTR_GAIN_FACTOR 

Specifies gain factor between the exposures.

If non zero, possible factors are 1, x, 1/x.

Data type: float_t

DEVBLK_CDI_SENSOR_ATTR_QE_PIXEL_RATIO 

Specifies sensitivity ratios for different exposures.

The ratios are normalized to the maximum sensitivity, so that all ratios are in the range [0.0, 1.0].

Data type: float_t[DEVBLK_CDI_EXPOSURE_MODE_MAX]

DEVBLK_CDI_SENSOR_ATTR_FRAME_RATE 

Specifies frames per second.

Data type: float_t 
DEVBLK_CDI_SENSOR_ATTR_NUM_EXPOSURES 

Specifies active number of exposures.

Data type: uint32_t 

Definition at line 1345 of file devblk_cdi.h.

Function Documentation

◆ DevBlkCDIGetModuleConfig()

NvMediaStatus DevBlkCDIGetModuleConfig ( DevBlkCDIDevice device,
DevBlkCDIModuleConfig moduleConfig 
)

Gets the Module ISP configuration.

Parameters
[in]deviceA pointer to the device to use.
[out]moduleConfigA pointer to the module ISP configuration.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
Usage considerations
  • Allowed context for the API call
    • Thread-safe: No

◆ DevBlkCDISetSensorCharMode()

NvMediaStatus DevBlkCDISetSensorCharMode ( DevBlkCDIDevice device,
uint8_t  expNo 
)

Set sensor in characterization mode.

Description
DevBlkCDISetSensorCharMode API provides ability for the user to configure the sensor for characterization. Sensor characterization provides optimal parameters, corresponding to sensor physical and functional characteristics, for image processing.
Sensor characterization for High Dynamic Range (HDR) sensors with multiple exposures (T1, T2, … , Tn ) involves characterizing individual exposures separately, if required by the sensor. This API provides the ability to configure sensor to capture each exposure separately, if required by sensor characterization. This function re-configures the sensor i.e. changes the sensor static attributes like numActiveExposures, sensorExpRange, sensorGainRange and hence, should be called during sensor initialization time. In order to characterize the sensor exposure number ‘n’, where n = {1,2,3, … , N} for N-exposure HDR sensor, the input parameter ‘expNo’ should be set to ‘n’.
For a non-HDR sensor, the input parameter ‘expNo’ should always be set to ‘1’.
Parameters
[in]deviceA pointer to the sensor control device in use.
[in]expNoSensor exposure number to be used for characterization. Valid range for expNo : [0, (DEVBLK_CDI_MAX_EXPOSURES-1)] For Non-HDR sensor, this should be set to '1'
Returns
NvMediaStatus The completion status of the operation. Possible values are:
Usage considerations
  • Allowed context for the API call
    • Thread-safe: No