NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Image Sensor Control (ISC)

Detailed Description

The Image Sensor Control API encompasses all NvMedia I2C control related functions, including programming of all I2C controlled components such as deserializers, serializers, EEPROMs, and image sensors.

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

Data Structures

struct  NvMediaISCDevice
 Holds the handle for an NvMediaISCDevice object. More...
 
struct  NvMediaISCModuleConfig
 Holds the ISC Module ISP configuration. More...
 
struct  NvMediaISCExposureControl
 Holds exposure control information. More...
 
struct  NvMediaISCWBGainControl
 Holds the white balance control structure. More...
 
struct  NvMediaISCEmbeddedDataBuffer
 Holds the embedded data buffer structure. More...
 
struct  NvMediaISCEmbeddedData
 Holds the embedded data structure. More...
 

Modules

 Basic ISC Types
 The Image Sensor Control API provides common ISC processing functions.
 
 ISC Device
 An ISC device represents a device that is attached or linked to the root I2C port.
 
 ISC Device Driver
 Program elements related to NvMediaISCDeviceDriver, which defines a device driver.
 
 ISC Root Device
 Manage NvMediaISCRootDevice objects, which represent the root of the Nvmedia ISC object system.
 
 ISC Version Information
 Provides version information for the NvMedia ISC library.
 

Typedefs

typedef struct
NvMediaISCModuleConfig 
NvMediaISCModuleConfig
 Holds the ISC Module ISP configuration. More...
 
typedef struct
NvMediaISCExposureControl 
NvMediaISCExposureControl
 Holds exposure control information. More...
 
typedef struct
NvMediaISCWBGainControl 
NvMediaISCWBGainControl
 Holds the white balance control structure. More...
 
typedef struct
NvMediaISCEmbeddedData 
NvMediaISCEmbeddedData
 Holds the embedded data structure. More...
 

Enumerations

enum  NvMediaISCPowerItems {
  NVMEDIA_ISC_PWR_AGGREGATOR,
  NVMEDIA_ISC_PWR_LINK_0,
  NVMEDIA_ISC_PWR_LINK_1,
  NVMEDIA_ISC_PWR_LINK_2,
  NVMEDIA_ISC_PWR_LINK_3
}
 ISC Power control items. More...
 
enum  NvMediaISCExposureMode {
  NVMEDIA_ISC_EXPOSURE_MODE_LONG,
  NVMEDIA_ISC_EXPOSURE_MODE_SHORT,
  NVMEDIA_ISC_EXPOSURE_MODE_VERY_SHORT,
  NVMEDIA_ISC_EXPOSURE_MODE_MAX
}
 Defines Exposure mode. More...
 
enum  NvMediaISCSensorAttrType {
  NVMEDIA_ISC_SENSOR_ATTR_FUSE_ID,
  NVMEDIA_ISC_SENSOR_ATTR_GAIN_MIN,
  NVMEDIA_ISC_SENSOR_ATTR_GAIN_MAX,
  NVMEDIA_ISC_SENSOR_ATTR_ET_MIN,
  NVMEDIA_ISC_SENSOR_ATTR_ET_MAX,
  NVMEDIA_ISC_SENSOR_ATTR_ET_FINE,
  NVMEDIA_ISC_SENSOR_ATTR_ET_STEP,
  NVMEDIA_ISC_SENSOR_ATTR_HDR_MAX,
  NVMEDIA_ISC_SENSOR_ATTR_GAIN_FACTOR,
  NVMEDIA_ISC_SENSOR_ATTR_QE_PIXEL_RATIO,
  NVMEDIA_ISC_SENSOR_ATTR_FRAME_RATE,
  NVMEDIA_ISC_SENSOR_ATTR_NUM_EXPOSURES
}
 ISC sensor attributes. More...
 

Functions

NvMediaStatus NvMediaISCRootDevicePowerControl (NvMediaISCRootDevice *device, NvMediaISCPowerItems powerItem, NvMediaBool powerOn)
 Turns ON/OFF the power of a specific sub-device. More...
 
NvMediaStatus NvMediaISCRootDeviceGetPowerStatus (NvMediaISCRootDevice *device, NvMediaISCPowerItems powerItem, NvMediaBool *powerStatus)
 Gets the power ON/OFF status of a specific sub-device. More...
 
NvMediaStatus NvMediaISCRootDeviceEnableSync (NvMediaISCRootDevice *device, NvMediaBool enable)
 Enables or disables pulse width modulation (PWM) for the external synchronization. More...
 
NvMediaStatus NvMediaISCRootDeviceSetSyncConfig (NvMediaISCRootDevice *device, float_t freq, float_t dutyRatio)
 Sets the pulse width modulation (PWM) frequency and duty. More...
 
NvMediaStatus NvMediaISCRootDeviceGetSyncConfig (NvMediaISCRootDevice *device, float_t *freq, float_t *dutyRatio)
 Gets the pulse width modulation (PWM) frequency and duty. More...
 
NvMediaStatus NvMediaISCSetSensorCharMode (NvMediaISCDevice *device, uint8_t expNo)
 Set sensor in characterization mode. More...
 
NvMediaStatus NvMediaISCGetModuleConfig (NvMediaISCDevice *device, NvMediaISCModuleConfig *moduleConfig)
 Gets the Module ISP configuration. More...
 

Typedef Documentation

Holds the embedded data structure.

Deprecated:
Use the new structure NvMediaISCEmbeddedDataInfo instead.

Holds exposure control information.

Deprecated:
Use NvMediaISCSensorControl instead.

Holds the ISC Module ISP configuration.

Holds the white balance control structure.

Deprecated:
Use NvMediaISCSensorControl instead.

Enumeration Type Documentation

Defines Exposure mode.

Deprecated:
Use the NvMediaISCSetSensorCharMode() parameter expNo instead.
Enumerator
NVMEDIA_ISC_EXPOSURE_MODE_LONG 

Specifies long exposure mode.

NVMEDIA_ISC_EXPOSURE_MODE_SHORT 

Specifies short exposure mode.

NVMEDIA_ISC_EXPOSURE_MODE_VERY_SHORT 

Specifies very short exposure mode.

NVMEDIA_ISC_EXPOSURE_MODE_MAX 

Specifies the exposure mode count.

Definition at line 1496 of file nvmedia_isc.h.

ISC Power control items.

Enumerator
NVMEDIA_ISC_PWR_AGGREGATOR 

Aggregator Power.

NVMEDIA_ISC_PWR_LINK_0 

LINK 0 Power.

NVMEDIA_ISC_PWR_LINK_1 

LINK 1 PWR.

NVMEDIA_ISC_PWR_LINK_2 

LINK 2 PWR.

NVMEDIA_ISC_PWR_LINK_3 

LINK 3 PWR.

Definition at line 1363 of file nvmedia_isc.h.

ISC sensor attributes.

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

Specifies a unique ID per instance of camera module.

Data type: char[32]

NVMEDIA_ISC_SENSOR_ATTR_GAIN_MIN 

Specifies minimum possible gain values.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_GAIN_MAX 

Specifies maximum possible gain values.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_MIN 

Specifies minimum possible exposure time values in seconds.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_MAX 

Specifies maximum possible exposure time values in seconds.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_FINE 

Specifies fine integration time values in seconds.

Data type: float_t[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_ET_STEP 

Specifies exposure time step values in seconds.

Data type: double[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_HDR_MAX 

Specifies maximum possible HDR ratio value.

Data type: uint32_t

NVMEDIA_ISC_SENSOR_ATTR_GAIN_FACTOR 

Specifies gain factor between the exposures.

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

Data type: float_t

NVMEDIA_ISC_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[NVMEDIA_ISC_EXPOSURE_MODE_MAX]

NVMEDIA_ISC_SENSOR_ATTR_FRAME_RATE 

Specifies frames per second.

Data type: float_t

NVMEDIA_ISC_SENSOR_ATTR_NUM_EXPOSURES 

Specifies active number of exposures.

Data type: uint32_t

Definition at line 1574 of file nvmedia_isc.h.

Function Documentation

NvMediaStatus NvMediaISCGetModuleConfig ( NvMediaISCDevice device,
NvMediaISCModuleConfig 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:
NvMediaStatus NvMediaISCRootDeviceEnableSync ( NvMediaISCRootDevice device,
NvMediaBool  enable 
)

Enables or disables pulse width modulation (PWM) for the external synchronization.

Parameters
[in]deviceThe root device to use.
[in]enableThe PWM state. Possible values are:
NVMEDIA_TRUE PWM is enabled.
NVMEDIA_FALSE PWM is disabled.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_BAD_PARAMETER if any of the input parameter is NULL.
NVMEDIA_STATUS_ERROR if other error occurred.
NvMediaStatus NvMediaISCRootDeviceGetPowerStatus ( NvMediaISCRootDevice device,
NvMediaISCPowerItems  powerItem,
NvMediaBool powerStatus 
)

Gets the power ON/OFF status of a specific sub-device.

Parameters
[in]deviceThe root device to use.
[in]powerItemThe power item to get power status in the root device.
[in]powerStatusThe power state of the power item provided Possible values are:
NVMEDIA_TRUE power is on
NVMEDIA_FALSE power is off
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_BAD_PARAMETER if any of the input parameter is NULL.
NVMEDIA_STATUS_NOT_SUPPORTED if the functionality is not supported by the device driver.
NVMEDIA_STATUS_ERROR if any other error occurred.
NvMediaStatus NvMediaISCRootDeviceGetSyncConfig ( NvMediaISCRootDevice device,
float_t *  freq,
float_t *  dutyRatio 
)

Gets the pulse width modulation (PWM) frequency and duty.

Parameters
[in]deviceThe root device to use.
[out]freqPWM frequency.
[out]dutyRatioHigh level ratio in one PWM period.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_BAD_PARAMETER if any of the input parameter is NULL.
NVMEDIA_STATUS_NOT_SUPPORTED if the functionality is not supported.
NVMEDIA_STATUS_ERROR if other error occurred.
NvMediaStatus NvMediaISCRootDevicePowerControl ( NvMediaISCRootDevice device,
NvMediaISCPowerItems  powerItem,
NvMediaBool  powerOn 
)

Turns ON/OFF the power of a specific sub-device.

Parameters
[in]deviceThe root device to use.
[in]powerItemThe power item to control the power in the root device.
[in]powerOnThe power state after this call. Possible values are:
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCRootDeviceSetSyncConfig ( NvMediaISCRootDevice device,
float_t  freq,
float_t  dutyRatio 
)

Sets the pulse width modulation (PWM) frequency and duty.

Parameters
[in]deviceThe root device to use.
[in]freqPWM frequency.
[in]dutyRatioHigh level ratio in one PWM period.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_BAD_PARAMETER if any of the input parameter is NULL.
NVMEDIA_STATUS_ERROR if other error occurred.
NvMediaStatus NvMediaISCSetSensorCharMode ( NvMediaISCDevice device,
uint8_t  expNo 
)

Set sensor in characterization mode.

Description
NvMediaISCSetSensorCharMode 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 induvial 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, (NVMEDIA_ISC_MAX_EXPOSURES-1)] For Non-HDR sensor, this should be set to '1'
Returns
NvMediaStatus The completion status of the operation. Possible values are: