NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

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

Detailed Description

Holds device driver data.

Definition at line 611 of file nvmedia_isc.h.

Data Fields

char * deviceName
 Holds the device name. More...
 
int32_t regLength
 Holds the target device offset length in bytes. More...
 
int32_t dataLength
 Holds the target device data length in bytes. More...
 
NvMediaStatus(* DriverCreate )(NvMediaISCDriverHandle **handle, NvMediaISCSupportFunctions *supportFunctions, void *clientContext)
 Holds the function that creates the driver. More...
 
NvMediaStatus(* DriverDestroy )(NvMediaISCDriverHandle *handle)
 Holds the function that destroys the driver. More...
 
NvMediaStatus(* CheckPresence )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction)
 Holds the function that checks the pre-sense of the device. More...
 
NvMediaStatus(* CheckLink )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t linkIndex, uint32_t linkType)
 Holds the function that initiates a link check to the device. More...
 
NvMediaStatus(* SetDefaults )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction)
 Holds the function that sets device defaults. More...
 
NvMediaStatus(* SetDeviceConfig )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t enumeratedDeviceConfig)
 Holds the function that sets a specific configuration to the device. More...
 
NvMediaStatus(* ReadParameters )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t parameterType, uint32_t parameterSize, void *parameter)
 Holds the function that reads parameters from a device. More...
 
NvMediaStatus(* WriteParameters )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t parameterType, uint32_t parameterSize, void *parameter)
 Holds the function that writes parameters to a device. More...
 
NvMediaStatus(* ParseEmbeddedData )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t lineCount, uint32_t *lineLength, uint8_t *lineData[], struct NvMediaISCEmbeddedData *parsedInformation)
 Holds the function that parses the embedded data returned as part of the captured buffer. More...
 
NvMediaStatus(* GetSensorFrameId )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t lineCount, uint32_t *lineLength, uint8_t *lineData[], uint32_t *sensorFrameId)
 Holds the function that gets the sensor frame ID from embedded lines. More...
 
NvMediaStatus(* GetTemperature )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, float_t *temperature)
 Holds the function that gets the device's temperature. More...
 
NvMediaStatus(* SetExposure )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, struct NvMediaISCExposureControl *exposureControl)
 Holds the function that sets exposure control. More...
 
NvMediaStatus(* SetWBGain )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, struct NvMediaISCWBGainControl *wbControl)
 Holds the function that sets white balance control. More...
 
NvMediaStatus(* ReadRegister )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t *dataBuff)
 Holds the function that reads device register. More...
 
NvMediaStatus(* WriteRegister )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t *dataBuff)
 Holds the function that writes the device register. More...
 
NvMediaStatus(* DumpRegisters )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction)
 Holds the function that dumps device registers. More...
 
NvMediaStatus(* GetErrorStatus )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t parameterSize, void *parameter)
 Holds the function that gets error information from a device. More...
 
NvMediaStatus(* GetModuleConfig )(NvMediaISCDriverHandle *handle, struct NvMediaISCModuleConfig *moduleConfig)
 Holds the function that gets module configuration. More...
 
NvMediaStatus(* SetBracketedExposure )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t numExposureControls, struct NvMediaISCExposureControl *exposureControls)
 Holds the function that sets bracketed exposure control. More...
 
NvMediaStatus(* GetSensorAttr )(NvMediaISCDriverHandle *handle, NvMediaISCSensorAttrType type, uint32_t size, void *attribute)
 Holds the function that gets sensor attributes. More...
 
NvMediaStatus(* SetCompandingCurve )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t numPoints, NvMediaPoint *kneePoints)
 Holds the function that sets companding curve
The function will not be supported in future release. More...
 
NvMediaStatus(* SetSensorCharAttr )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, NvMediaISCSensorCharAttr type, uint32_t size, void *attribute)
 Holds the function that sets characterization attributes. More...
 
NvMediaStatus(* GetSensorCharAttr )(NvMediaISCDriverHandle *handle, NvMediaISCSensorCharAttr type, uint32_t size, void *attribute)
 Holds the function that gets characterization attributes. More...
 
NvMediaStatus(* SetSensorControls )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, const struct NvMediaISCSensorControl *sensorControl, const size_t sensrCtrlStructSize)
 Holds the function that sets sensor controls
This function is invoked by NvMediaISCSetSensorControls function call. More...
 
NvMediaStatus(* ParseEmbedDataInfo )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, const struct NvMediaISCEmbeddedDataChunk *embeddedTopDataChunk, const struct NvMediaISCEmbeddedDataChunk *embeddedBotDataChunk, const size_t dataChunkStructSize, struct NvMediaISCEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)
 Holds the function that parses embedded data returned as part of the captured buffer. More...
 
NvMediaStatus(* SetSensorCharMode )(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint8_t expNo)
 Holds the function that sets sensor in characterization mode. More...
 
NvMediaStatus(* GetSensorAttributes )(NvMediaISCDriverHandle *handle, struct NvMediaISCSensorAttributes *sensorAttr, const size_t sensorAttrStructSize)
 Holds the function that gets sensor attributes. More...
 

Field Documentation

NvMediaStatus(* NvMediaISCDeviceDriver::CheckLink)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t linkIndex, uint32_t linkType)

Holds the function that initiates a link check to the device.

The device is identified by the linkIndex argument. In case when the device has multiple kinds of links per devices, additional linkType argument can be used as optional.

Definition at line 634 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::CheckPresence)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction)

Holds the function that checks the pre-sense of the device.

Definition at line 627 of file nvmedia_isc.h.

int32_t NvMediaISCDeviceDriver::dataLength

Holds the target device data length in bytes.

Definition at line 617 of file nvmedia_isc.h.

char* NvMediaISCDeviceDriver::deviceName

Holds the device name.

Definition at line 613 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::DriverCreate)(NvMediaISCDriverHandle **handle, NvMediaISCSupportFunctions *supportFunctions, void *clientContext)

Holds the function that creates the driver.

Definition at line 619 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::DriverDestroy)(NvMediaISCDriverHandle *handle)

Holds the function that destroys the driver.

Definition at line 624 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::DumpRegisters)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction)

Holds the function that dumps device registers.

Definition at line 729 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::GetErrorStatus)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t parameterSize, void *parameter)

Holds the function that gets error information from a device.

Definition at line 733 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::GetModuleConfig)(NvMediaISCDriverHandle *handle, struct NvMediaISCModuleConfig *moduleConfig)

Holds the function that gets module configuration.

Definition at line 739 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::GetSensorAttr)(NvMediaISCDriverHandle *handle, NvMediaISCSensorAttrType type, uint32_t size, void *attribute)

Holds the function that gets sensor attributes.

Note
The function will not be supported in future release. It is recommended to use GetSensorAttributes

Definition at line 755 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::GetSensorAttributes)(NvMediaISCDriverHandle *handle, struct NvMediaISCSensorAttributes *sensorAttr, const size_t sensorAttrStructSize)

Holds the function that gets sensor attributes.


This function is invoked by NvMediaISCGetSensorAttributes function call.

Sample Usage:
//Pseudo code for isc device driver function GetSensorAttributes invoked by NvMediaISCGetSensorAttributes function call.
const size_t sensorAttrStructSize)
{
// check input parameters
if (!handle || !sensorAttr || !sensorAttrStructSize)
{
}
// check api version
if(sensorAttrStructSize != sizeof(NvMediaISCSensorAttributes))
{
}
// populate sensorAttr(NvMediaISCSensorAttributes) structure
memset(sensorAttr, 0, sizeof(NvMediaISCSensorAttributes));
//populate attribute sensor name
status = GetDeviceDriverName(handle,&sensorAttr->sensorName, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
//populate attribute sensor fuse id
status = GetSensorFuseId(handle, &sensorAttr->fuseId, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
//populate attribute number of active exposures
status = GetNumActiveExposures(handle, &sensorAttr->numActiveExposures, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// populate attributes sensor exposure range, gain range for active exposures
For each i in array [0, sensorAttr->numActiveExposures)
{
sensorAttr->sensorExpRange[i].min = ...
sensorAttr->sensorExpRange[i].max = ...
.
.
.
sensorAttr->sensorGainRange[i].min = ...
sensorAttr->sensorGainRange[i].max = ...
sensorAttr->sensorGainFactor[i] = 1.0;
}
// populate sensor frame report bytes, if supported by sensor driver
sensorAttr->numFrameReportBytes = ...
return status;
}

Definition at line 1090 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::GetSensorCharAttr)(NvMediaISCDriverHandle *handle, NvMediaISCSensorCharAttr type, uint32_t size, void *attribute)

Holds the function that gets characterization attributes.

Note
The function will not be supported in future release.

Definition at line 781 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::GetSensorFrameId)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t lineCount, uint32_t *lineLength, uint8_t *lineData[], uint32_t *sensorFrameId)

Holds the function that gets the sensor frame ID from embedded lines.

Note
The function will not be supported in future release.

Definition at line 681 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::GetTemperature)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, float_t *temperature)

Holds the function that gets the device's temperature.

Note
The function will not be supported in future release. It is recommended to use ParseEmbedDataInfo

Definition at line 692 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::ParseEmbedDataInfo)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, const struct NvMediaISCEmbeddedDataChunk *embeddedTopDataChunk, const struct NvMediaISCEmbeddedDataChunk *embeddedBotDataChunk, const size_t dataChunkStructSize, struct NvMediaISCEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)

Holds the function that parses embedded data returned as part of the captured buffer.


This function is invoked by NvMediaISCParseEmbedDataInfo function call.

Sample Usage:
//Pseudo code for isc device driver function ParseEmbedDataInfo invoked by \ref NvMediaISCParseEmbedDataInfo function call.
const NvMediaISCEmbeddedDataChunk *embeddedTopDataChunk,
const NvMediaISCEmbeddedDataChunk *embeddedBotDataChunk,
const size_t embeddedDataChunkStructSize,
NvMediaISCEmbeddedDataInfo *embeddedDataInfo,
const size_t dataInfoStructSize);
{
// check input parameters
if(!handle || !embeddedTopDataChunk || !embeddedBotDataChunk ||
!embeddedDataChunkStructSize || !dataInfoStructSize)
{
}
// check api version
if ((embeddedDataChunkStructSize != sizeof(NvMediaISCEmbeddedDataChunk)) ||
(dataInfoStructSize != sizeof(NvMediaISCEmbeddedDataInfo))) {
// Handle version mismatch
}
memset(parsedInfo, 0, sizeof(NvMediaISCEmbeddedDataInfo));
// decode top embedded lines
status = DepackTopEmbeddedLine (handle, embeddedTopDataChunk, … );
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// decode bottom embedded lines, if supported by sensor driver
status = DepackBottomEmbeddedLine (handle, embeddedBotDataChunk, … );
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// populate number of active exposures for the captured frame
status = ParseNumExposures(&parsedInfo->numActiveExposures);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// populate frame exposure info block
status = ParseExposure(&parsedInfo->sensorExpInfo, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// populate frame white balance info block
status = ParseWBGain(&parsedInfo->sensorWBInfo, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// populate frame temperature info block
status = ParseTemperatureInfo(&parsedInfo->sensorTempInfo, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// Set valid flag to FALSE for unsupported info blocks
parsedInfo->sensorReportInfo.frameReportValid = NVMEDIA_FALSE;
parsedInfo->sensorTempInfo.tempValid = NVMEDIA_FALSE;
return status;
}

Definition at line 962 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::ParseEmbeddedData)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t lineCount, uint32_t *lineLength, uint8_t *lineData[], struct NvMediaISCEmbeddedData *parsedInformation)

Holds the function that parses the embedded data returned as part of the captured buffer.

The data type and the parsed data structure definition are located in the device driver's header file.

Note
The function will not be supported in future release. It is recommended to use ParseEmbedDataInfo

Definition at line 671 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::ReadParameters)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t parameterType, uint32_t parameterSize, void *parameter)

Holds the function that reads parameters from a device.

The parameter type and parameter structure definition are located in the device driver's header file.

Definition at line 651 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::ReadRegister)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t *dataBuff)

Holds the function that reads device register.

Definition at line 713 of file nvmedia_isc.h.

int32_t NvMediaISCDeviceDriver::regLength

Holds the target device offset length in bytes.

Definition at line 615 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::SetBracketedExposure)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t numExposureControls, struct NvMediaISCExposureControl *exposureControls)

Holds the function that sets bracketed exposure control.


The function will not be supported in future release. It is recommended to use SetSensorControls

Definition at line 746 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::SetCompandingCurve)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t numPoints, NvMediaPoint *kneePoints)

Holds the function that sets companding curve
The function will not be supported in future release.

Definition at line 763 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::SetDefaults)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction)

Holds the function that sets device defaults.

Definition at line 640 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::SetDeviceConfig)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t enumeratedDeviceConfig)

Holds the function that sets a specific configuration to the device.

The configuration number definition is located in the device driver's header file.

Definition at line 645 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::SetExposure)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, struct NvMediaISCExposureControl *exposureControl)

Holds the function that sets exposure control.


The function will not be supported in future release. It is recommended to use SetSensorControls

Definition at line 700 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::SetSensorCharAttr)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, NvMediaISCSensorCharAttr type, uint32_t size, void *attribute)

Holds the function that sets characterization attributes.

Note
The function will not be supported in future release. It is recommended to use SetSensorCharMode

Definition at line 772 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::SetSensorCharMode)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint8_t expNo)

Holds the function that sets sensor in characterization mode.


This function is invoked by NvMediaISCSetSensorCharMode function call.

Sample Usage:
//Pseudo code for isc device driver function SetSensorCharMode invoked by NvMediaISCSetSensorCharMode function call.
uint8_t expNo);
{
// check input parameters
if (!handle || !transaction || !expNo)
{
}
// set sensor in characterization mode for expNo
status = ExpBypass(handle, transaction, expNo, ...)
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// update driver internal state and sensor attributes
drvrHandle->numActiveExposures = 1;
drvrHandle->charModeEnabled = NVMEDIA_TRUE;
drvrHandle->charModeExpNo = expNo;
return status;
}

Definition at line 1012 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::SetSensorControls)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, const struct NvMediaISCSensorControl *sensorControl, const size_t sensrCtrlStructSize)

Holds the function that sets sensor controls
This function is invoked by NvMediaISCSetSensorControls function call.


Sample Usage:
//Pseudo code for isc device driver function SetSensorControls invoked by NvMediaISCSetSensorControls function call.
const NvMediaISCSensorControl *sensorControl,
const size_t sensrCtrlStructSize)
{
uint8_t regVal[2];
// check input parameters
if (!handle || !transaction || !sensorControl || !sensrCtrlStructSize)
{
}
// check api version
if(sensrCtrlStructSize != sizeof(NvMediaISCSensorControl))
{
}
// check num sensor context
if(sensorControl->numSensorContexts IS NOT SUPPORTED) {
}
// set sensor group hold acquire register, if supported
regVal[0] = ...
status = WriteRegister(handle, transaction,...,REG_GROUP_HOLD, regVal);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
For each i in array [0, sensorControl->numSensorContexts)
{
// apply sensor exposure control settings
if(sensorControl->exposureControl[i].expTimeValid IS NVMEDIA_TRUE ||
sensorControl->exposureControl[i].gainValid IS NVMEDIA_TRUE)
{
status = SetExposure(&sensorControl->exposureControl[i], ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
}
// apply sensor white balance control settings
if(sensorControl->wbControl[i].wbValid == NVMEDIA_TRUE)
{
status = SetSensorWbGain(&sensorControl->wbControl[i], ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
}
}
// apply sensor frame report control settings
if(sensorControl->frameReportControl.frameReportValid == NVMEDIA_TRUE)
{
status = SetSensorFrameReport(&sensorControl->frameReportControl, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
}
// set group hold release register
regVal[0] = ...
status = WriteRegister(handle, transaction,.., REG_GROUP_HOLD, regVal);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling //
}
return status;
}

Definition at line 874 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::SetWBGain)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, struct NvMediaISCWBGainControl *wbControl)

Holds the function that sets white balance control.

Note
The function will not be supported in future release. It is recommended to use SetSensorControls

Definition at line 708 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::WriteParameters)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t parameterType, uint32_t parameterSize, void *parameter)

Holds the function that writes parameters to a device.

The parameter type and parameter structure definition are located in the device driver's header file.

Definition at line 659 of file nvmedia_isc.h.

NvMediaStatus(* NvMediaISCDeviceDriver::WriteRegister)(NvMediaISCDriverHandle *handle, NvMediaISCTransactionHandle *transaction, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t *dataBuff)

Holds the function that writes the device register.

Definition at line 721 of file nvmedia_isc.h.


The documentation for this struct was generated from the following file: