NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Detailed Description

An ISC device represents a device that is attached or linked to the root I2C port.

Data Structures

struct  NvMediaISCAdvancedConfig
 Holds the description of the target I2C device. More...
 
struct  NvMediaISCExposureControl
 Exposure control structure. 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...
 
struct  NvMediaISCModuleConfig
 Holds the ISC Module ISP configuration. More...
 

Macros

#define NVMEDIA_ISC_TIMEOUT_INFINITE
 Infinite time-out. More...
 

Typedefs

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

Enumerations

enum  NvMediaISCExposureMode {
  NVMEDIA_ISC_EXPOSURE_MODE_LONG,
  NVMEDIA_ISC_EXPOSURE_MODE_SHORT,
  NVMEDIA_ISC_EXPOSURE_MODE_VERY_SHORT,
  NVMEDIA_ISC_EXPOSURE_MODE_MAX
}
 Exposure mode. More...
 
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...
 

Functions

NvMediaISCDeviceNvMediaISCDeviceCreate (NvMediaISCRootDevice *rootDevice, uint32_t *deviceAddressList, uint32_t numDevices, NvMediaISCDeviceDriver *deviceDriver, NvMediaISCAdvancedConfig *advancedConfig)
 Creates an NvMediaISCDevice object. More...
 
void NvMediaISCDeviceDestroy (NvMediaISCDevice *device)
 Destroys an NvMediaISCDevice device. More...
 
NvMediaStatus NvMediaISCCheckPresence (NvMediaISCDevice *device)
 Check that the device is present. More...
 
NvMediaStatus NvMediaISCCheckLink (NvMediaISCDevice *device, uint32_t instanceNumber, uint32_t link)
 check the result of link detection of the numbered instance. More...
 
NvMediaStatus NvMediaISCSetDefaults (NvMediaISCDevice *device)
 Sets defaults for the device. More...
 
NvMediaStatus NvMediaISCSetDeviceConfig (NvMediaISCDevice *device, uint32_t enumeratedDeviceConfig)
 Sets enumerated device configuration to the device. More...
 
NvMediaStatus NvMediaISCReadParameters (NvMediaISCDevice *device, uint32_t parameterType, uint32_t parameterSize, void *parameter)
 Reads device specific parameters. More...
 
NvMediaStatus NvMediaISCWriteParameters (NvMediaISCDevice *device, uint32_t parameterType, uint32_t parameterSize, void *parameter)
 Writes device specific parameters. More...
 
NvMediaStatus NvMediaISCParseEmbeddedData (NvMediaISCDevice *device, uint32_t lineCount, uint32_t *lineLength, uint8_t *lineData[], struct NvMediaISCEmbeddedData *parsedInformation)
 Parses embedded data in the captured image. More...
 
NvMediaStatus NvMediaISCGetSensorFrameId (NvMediaISCDevice *device, uint32_t lineCount, uint32_t *lineLength, uint8_t *lineData[], uint32_t *sensorFrameId)
 Gets sensor frame ID from embedded data. More...
 
NvMediaStatus NvMediaISCGetTemperature (NvMediaISCDevice *device, float_t *temperature)
 Gets a device temperature. More...
 
NvMediaStatus NvMediaISCSetExposure (NvMediaISCDevice *device, NvMediaISCExposureControl *exposureControl)
 Sets exposure control parameters. More...
 
NvMediaStatus NvMediaISCSetWBGain (NvMediaISCDevice *device, NvMediaISCWBGainControl *wbControl)
 Sets white balance control parameters. More...
 
NvMediaStatus NvMediaISCReadRegister (NvMediaISCDevice *device, uint32_t deviceIndex, uint32_t registerAddress, uint32_t dataByteNumber, uint8_t *dataBuffer)
 Reads a device register. More...
 
NvMediaStatus NvMediaISCWriteRegister (NvMediaISCDevice *device, uint32_t deviceIndex, uint32_t registerAddress, uint32_t dataByteNumber, uint8_t *dataBuffer)
 Reads a device register. More...
 
NvMediaStatus NvMediaISCDumpRegisters (NvMediaISCDevice *device)
 Dumps all device register to the standard output. More...
 
NvMediaStatus NvMediaISCGetErrorStatus (NvMediaISCDevice *device, uint32_t parameterSize, void *parameter)
 Gets error information about an ISC device. More...
 
NvMediaStatus NvMediaISCRootDeviceRegisterCallback (NvMediaISCRootDevice *device, int32_t sigNum, void(*cbFunc)(void *), void *context)
 Registers a callback function to handle error messages. More...
 
NvMediaStatus NvMediaISCRootDevicePowerControl (NvMediaISCRootDevice *device, NvMediaISCPowerItems powerItem, NvMediaBool powerOn)
 Turns ON/OFF the power of a specific sub-device. More...
 
NvMediaStatus NvMediaISCGetSensorAttr (NvMediaISCDevice *device, NvMediaISCSensorAttrType type, uint32_t size, void *attribute)
 Get sensor attribute. More...
 
NvMediaStatus NvMediaISCGetModuleConfig (NvMediaISCDevice *device, NvMediaISCModuleConfig *moduleConfig)
 Gets the Module ISP configuration. More...
 
NvMediaStatus NvMediaISCSetBracketedExposure (NvMediaISCDevice *device, uint32_t numExposureControls, NvMediaISCExposureControl *exposureControls)
 Sets bracketed exposure control parameters. More...
 
NvMediaStatus NvMediaISCSetCompandingCurve (NvMediaISCDevice *device, uint32_t numPoints, NvMediaPoint *kneePoints)
 Sets the companding curve control parameters. 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 NvMediaISCSetCharacterizationAttr (NvMediaISCDevice *device, NvMediaISCSensorCharAttr type, uint32_t size, void *attribute)
 Set sensor characterization attribute. More...
 
NvMediaStatus NvMediaISCGetCharacterizationAttr (NvMediaISCDevice *device, NvMediaISCSensorCharAttr type, uint32_t size, void *attribute)
 Get sensor characterization attribute. More...
 

Macro Definition Documentation

#define NVMEDIA_ISC_TIMEOUT_INFINITE

Infinite time-out.

Definition at line 690 of file nvmedia_isc.h.

Typedef Documentation

Holds the embedded data structure.

Exposure control structure.

Holds the ISC Module ISP configuration.

Holds the white balance control structure.

Enumeration Type Documentation

Exposure mode.

Enumerator
NVMEDIA_ISC_EXPOSURE_MODE_LONG 

Long exposure mode.

NVMEDIA_ISC_EXPOSURE_MODE_SHORT 

Short exposure mode.

NVMEDIA_ISC_EXPOSURE_MODE_VERY_SHORT 

Very short exposure mode.

NVMEDIA_ISC_EXPOSURE_MODE_MAX 

Exposure mode count.

Definition at line 922 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 1139 of file nvmedia_isc.h.

Function Documentation

NvMediaStatus NvMediaISCCheckLink ( NvMediaISCDevice device,
uint32_t  instanceNumber,
uint32_t  link 
)

check the result of link detection of the numbered instance.

Parameters
[in]deviceThe device to use.
[in]instanceNumberThe attached device's instance number.
[in]linkThe specific link defined by the device (optional).
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCCheckPresence ( NvMediaISCDevice device)

Check that the device is present.

Parameters
[in]deviceThe device to use.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaISCDevice* NvMediaISCDeviceCreate ( NvMediaISCRootDevice rootDevice,
uint32_t *  deviceAddressList,
uint32_t  numDevices,
NvMediaISCDeviceDriver deviceDriver,
NvMediaISCAdvancedConfig advancedConfig 
)

Creates an NvMediaISCDevice object.

Parameters
[in]rootDeviceA pointer to the root device that you created with NvMediaISCRootDeviceCreate().
[in]deviceAddressListThe list of I2C device addresses corresponding to this NvMediaISCDevice object
[in]numDevicesThe number of I2C addresses in the above list
[in]deviceDriverThe driver structure that defines the behavior of the device.
[in]advancedConfigAdvanced configuration.
Returns
device The new device's handle or NULL if unsuccessful.
void NvMediaISCDeviceDestroy ( NvMediaISCDevice device)

Destroys an NvMediaISCDevice device.

Parameters
[in]deviceThe device to destroy.
NvMediaStatus NvMediaISCDumpRegisters ( NvMediaISCDevice device)

Dumps all device register to the standard output.

Parameters
[in]deviceThe device to use.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCGetCharacterizationAttr ( NvMediaISCDevice device,
NvMediaISCSensorCharAttr  type,
uint32_t  size,
void *  attribute 
)

Get sensor characterization attribute.

Parameters
[in]deviceThe device to use.
[in]typeSensor characterization attribute type.
[in]sizeSize of the attribute.
[out]attributeSensor characterization attribute value.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCGetErrorStatus ( NvMediaISCDevice device,
uint32_t  parameterSize,
void *  parameter 
)

Gets error information about an ISC device.

Parameters
[in]deviceThe device to use.
[in]parameterSizeSize of the error information structure
[out]parameterDevice specific error information structure
Returns
NvMediaStatus The completion status of the operation. Possible values are:
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 NvMediaISCGetSensorAttr ( NvMediaISCDevice device,
NvMediaISCSensorAttrType  type,
uint32_t  size,
void *  attribute 
)

Get sensor attribute.

Parameters
[in]deviceThe device to use.
[in]typeSensor attribute type.
[in]sizeSize of the attribute.
[out]attributeSensor attribute value.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCGetSensorFrameId ( NvMediaISCDevice device,
uint32_t  lineCount,
uint32_t *  lineLength,
uint8_t *  lineData[],
uint32_t *  sensorFrameId 
)

Gets sensor frame ID from embedded data.

Parameters
[in]deviceThe device to use.
[in]lineCountNumber of lines to parse.
[in]lineLengthLine length of each line in bytes.
[in]lineDataArray of pointers containing the line data.
[out]sensorFrameIdThe sensor frame ID. This information is device-specific.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCGetTemperature ( NvMediaISCDevice device,
float_t *  temperature 
)

Gets a device temperature.

Parameters
[in]deviceThe device to use.
[out]temperatureThe device's temperature in Celsius.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCParseEmbeddedData ( NvMediaISCDevice device,
uint32_t  lineCount,
uint32_t *  lineLength,
uint8_t *  lineData[],
struct NvMediaISCEmbeddedData parsedInformation 
)

Parses embedded data in the captured image.

Parameters
[in]deviceThe device to use.
[in]lineCountNumber of lines to parse.
[in]lineLengthLine length of each line in bytes.
[in]lineDataArray of pointers containing the line data.
[out]parsedInformationPointer to the parsed information structure. This information is device specific.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCReadParameters ( NvMediaISCDevice device,
uint32_t  parameterType,
uint32_t  parameterSize,
void *  parameter 
)

Reads device specific parameters.

This read is implemented in the device driver and the device driver's header file contains the definitions for the parameters.

Parameters
[in]deviceThe device to use.
[in]parameterTypeDevice specific parameter type.
[in]parameterSizeSize of the parameter structure
[out]parameterDevice specific parameter
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCReadRegister ( NvMediaISCDevice device,
uint32_t  deviceIndex,
uint32_t  registerAddress,
uint32_t  dataByteNumber,
uint8_t *  dataBuffer 
)

Reads a device register.

Parameters
[in]deviceThe device to use.
[in]deviceIndexThe index of the device address passed during NvMediaISCDeviceCreate.
[in]registerAddressThe register address to read from.
[in]dataByteNumberNumber of bytes to read.
[in]dataBufferThe data buffer to read to.
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 NvMediaISCRootDeviceRegisterCallback ( NvMediaISCRootDevice device,
int32_t  sigNum,
void(*)(void *)  cbFunc,
void *  context 
)

Registers a callback function to handle error messages.

Parameters
[in]deviceThe root device to use.
[in]sigNumThe signal number to use for notifying errors.
[in]cbFuncThe callback function to handle the signal.
[in]contextCan be used to store local context.
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 NvMediaISCSetBracketedExposure ( NvMediaISCDevice device,
uint32_t  numExposureControls,
NvMediaISCExposureControl exposureControls 
)

Sets bracketed exposure control parameters.

Parameters
[in]deviceA pointer to the device to use.
[in]numExposureControlsNumber of entries in exposureControls array
[in]exposureControlsAn array of exposure control parameters.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCSetCharacterizationAttr ( NvMediaISCDevice device,
NvMediaISCSensorCharAttr  type,
uint32_t  size,
void *  attribute 
)

Set sensor characterization attribute.

Parameters
[in]deviceThe device to use.
[in]typeSensor characterization attribute type.
[in]sizeSize of the attribute.
[out]attributeSensor characterization attribute value.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCSetCompandingCurve ( NvMediaISCDevice device,
uint32_t  numPoints,
NvMediaPoint kneePoints 
)

Sets the companding curve control parameters.

Parameters
[in]deviceA pointer to the device to use.
[in]numPointsNumber of points in the kneePoints array
[in]kneePointsAn array of points
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCSetDefaults ( NvMediaISCDevice device)

Sets defaults for the device.

Parameters
[in]deviceThe device to use.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCSetDeviceConfig ( NvMediaISCDevice device,
uint32_t  enumeratedDeviceConfig 
)

Sets enumerated device configuration to the device.

This configuration is device specific and it is defined in the device driver's header file.

Parameters
[in]deviceThe device to use.
[in]enumeratedDeviceConfigConfiguration number.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCSetExposure ( NvMediaISCDevice device,
NvMediaISCExposureControl exposureControl 
)

Sets exposure control parameters.

Parameters
[in]deviceA pointer to the device to use.
[out]exposureControlA pointer to exposure control parameters.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCSetWBGain ( NvMediaISCDevice device,
NvMediaISCWBGainControl wbControl 
)

Sets white balance control parameters.

Parameters
[in]deviceThe device to use.
[out]wbControlWhite Balance control parameters.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCWriteParameters ( NvMediaISCDevice device,
uint32_t  parameterType,
uint32_t  parameterSize,
void *  parameter 
)

Writes device specific parameters.

This write is implemented in the device driver and the device driver's header file contains the definitions for the parameters.

Parameters
[in]deviceThe device to use.
[in]parameterTypeDevice specific parameter type.
[in]parameterSizeSize of the parameter structure
[in]parameterDevice specific parameter.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaISCWriteRegister ( NvMediaISCDevice device,
uint32_t  deviceIndex,
uint32_t  registerAddress,
uint32_t  dataByteNumber,
uint8_t *  dataBuffer 
)

Reads a device register.

Parameters
[in]deviceThe device to use.
[in]deviceIndexThe index of the device address passed during NvMediaISCDeviceCreate.
[in]registerAddressThe register address to write to.
[in]dataByteNumberNumber of bytes to write.
[in]dataBufferThe data buffer to be written to the register.
Returns
NvMediaStatus The completion status of the operation. Possible values are: