15 #ifndef _NVMEDIA_ISC_H
16 #define _NVMEDIA_ISC_H
48 #define NVMEDIA_ISC_VERSION_MAJOR 3
50 #define NVMEDIA_ISC_VERSION_MINOR 0
55 #define NVMEDIA_ISC_SIMULATOR_ADDRESS 0xFF1u
57 #define RDEV_CFG_I2C_BITS 8
59 #define RDEV_CFG_CSI_BITS (RDEV_CFG_I2C_BITS + 8)
61 #define RDEV_CFG_SLV_BIT (RDEV_CFG_CSI_BITS + 1)
68 #define ISC_RDEV_CFG(csi, i2c) (((uint32_t)(csi) << RDEV_CFG_I2C_BITS) | (i2c))
85 #define ISC_RDEV_CFG_EX(csi, i2c, disPwrCtrl) \
87 ((uint32_t)(csi & 0xffu) << RDEV_CFG_I2C_BITS) | \
88 ((uint32_t)(disPwrCtrl & 1u) << RDEV_CFG_SLV_BIT))
97 #define ISC_SLV_RDEV_CFG(csi, i2c) \
98 ((i2c) | ((uint32_t)(csi) << RDEV_CFG_I2C_BITS) | ((uint32_t)(1u) << RDEV_CFG_CSI_BITS))
107 #define ADV_CONFIG_INIT(cfg, ctx) \
109 memset(&cfg, 0, sizeof(cfg)); \
110 cfg.clientContext = (void *)(ctx); \
114 #define NVMEDIA_ISC_MAX_EXPOSURES (8u)
117 #define NVM_ISC_MAX_COLOR_COMPONENT (4u)
120 #define NVMEDIA_ISC_MAX_SENSOR_CONTEXTS (4u)
126 #define NVMEDIA_ISC_MAX_PWL_KNEEPOINTS (64u)
129 #define NVMEDIA_ISC_MAX_FRAME_REPORT_BYTES (4u)
132 #define NVMEDIA_ISC_MAX_NUM_TEMPERATURES (4u)
135 #define NVMEDIA_ISC_MAX_SENSOR_NAME_LENGTH (32u)
138 #define NVMEDIA_ISC_MAX_FUSE_ID_LENGTH (32u)
276 NvMediaISCRootDevice *
287 NvMediaISCRootDevice *device
300 NvMediaISCRootDevice *device
312 NvMediaISCRootDevice *device
347 NvMediaISCRootDevice *device,
367 NvMediaISCRootDevice *device,
385 NvMediaISCRootDevice *device,
401 NvMediaISCRootDevice *device,
421 NvMediaISCRootDevice *device,
571 void *clientContext);
703 const size_t sensrCtrlStructSize);
792 const size_t dataChunkStructSize,
794 const size_t dataInfoStructSize);
918 const size_t sensorAttrStructSize);
957 NvMediaISCRootDevice *rootDevice,
958 uint32_t *deviceAddressList,
996 uint32_t deviceIndex,
1026 uint32_t deviceIndex,
1027 uint32_t dataLength,
1177 const size_t sensorAttrStructSize);
1413 const size_t sensrCtrlStructSize
1529 const size_t embeddedDataChunkStructSize,
1531 const size_t dataInfoStructSize);
struct NvMediaISCModuleConfig NvMediaISCModuleConfig
Holds the ISC Module ISP configuration.
NvMediaStatus NvMediaISCDeviceRead(NvMediaISCDevice *device, uint32_t deviceIndex, uint32_t regLength, uint8_t *regData, uint32_t dataLength, uint8_t *data)
Performs a read operation over I2C.
NvMediaStatus NvMediaISCRootDeviceGetSyncConfig(NvMediaISCRootDevice *device, float_t *freq, float_t *dutyRatio)
Gets the pulse width modulation (PWM) frequency and duty cycle.
Specifies maximum possible exposure time values in seconds.
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
NvMediaISCExposureMode
Defines Exposure mode.
NvMediaStatus NvMediaISCGetModuleConfig(NvMediaISCDevice *device, NvMediaISCModuleConfig *moduleConfig)
Gets the module ISP configuration.
Specifies sensitivity ratios for different exposures.
Specifies exposure time step values in seconds.
Specifies maximum possible gain values.
struct NvMediaISCSensorControl NvMediaISCSensorControl
Holds the sensor control structure.
struct NvMediaISCExposureControl NvMediaISCExposureControl
Holds exposure control information.
NvMediaStatus NvMediaISCRootDevicePowerControl(NvMediaISCRootDevice *device, NvMediaISCPowerItems powerItem, NvMediaBool powerOn)
Sets a power item's power status (on or off).
Specifies active number of exposures.
Specifies gain factor between the exposures.
NvMediaStatus NvMediaISCGetVersion(NvMediaVersion *version)
Gets version compatibility information for the NvMedia ISC library.
Specifies very short exposure mode.
struct NvMediaISCPWL NvMediaISCPWL
Holds the sensor companding piecewise linear (PWL) structure.
NvMediaStatus NvMediaISCGetSensorAttributes(NvMediaISCDevice *device, NvMediaISCSensorAttributes *sensorAttr, const size_t sensorAttrStructSize)
Gets the sensor attributes.
void NvMediaISCRootDeviceDestroy(NvMediaISCRootDevice *device)
Destroys an NvMediaISCRootDevice object.
Specifies long exposure mode.
NvMediaStatus
Defines all possible error codes.
struct NvMediaISCExposure NvMediaISCExposure
Holds sensor exposure information.
NvMediaStatus NvMediaISCSetSensorCharMode(NvMediaISCDevice *device, uint8_t expNo)
Set sensor to characterization mode.
Specifies a unique ID per instance of camera module.
NvMediaStatus NvMediaISCRootDeviceAbortWaitForError(NvMediaISCRootDevice *device)
Aborts a call to NvMediaISCRootDeviceWaitForError().
Specifies fine integration time values in seconds.
struct NvMediaISCEmbeddedDataChunk NvMediaISCEmbeddedDataChunk
void NvMediaISCDeviceDestroy(NvMediaISCDevice *device)
Destroys the object that describes an ISC device.
Specifies minimum possible gain values.
struct NvMediaISCEmbeddedData NvMediaISCEmbeddedData
Holds the embedded data structure.
struct NvMediaISCFrameReport NvMediaISCFrameReport
Holds the sensor report frame report structure.
NvMediaISCRootDevice * NvMediaISCRootDeviceCreate(uint32_t portCfg)
Creates an NvMediaISCRootDevice object.
NvMediaStatus NvMediaISCRootDeviceWaitForError(NvMediaISCRootDevice *device)
Waits until an error condition is reported or NvMediaISCRootDeviceAbortWaitForError() is called...
NvMediaISC_I2CPort
Defines the I2C buses on the host hardware device.
Specifies minimum possible exposure time values in seconds.
struct NvMediaISCTemperature NvMediaISCTemperature
Holds the sensor temperature structure.
struct NvMediaISCWBGainControl NvMediaISCWBGainControl
Holds the white balance control structure.
struct NvMediaISCFrameSeqNum NvMediaISCFrameSeqNum
Holds the sensor frame sequence number structure.
struct NvMediaISCWhiteBalance NvMediaISCWhiteBalance
Holds the sensor white balance gain structure.
NvMediaStatus NvMediaISCRootDeviceGetPowerStatus(NvMediaISCRootDevice *device, NvMediaISCPowerItems powerItem, NvMediaBool *powerStatus)
Gets a power item's power status (on or off).
NvMediaISCDevice * NvMediaISCDeviceCreate(NvMediaISCRootDevice *rootDevice, uint32_t *deviceAddressList, uint32_t numDevices, NvMediaISCDeviceDriver *deviceDriver, NvMediaISCAdvancedConfig *advancedConfig)
Creates an object that describes a device and returns a handle to the object.
struct NvMediaISCAttrRange NvMediaISCAttrRange
Holds the range of a sensor attribute.
NvMediaISCSensorAttrType
Defines ISC sensor attributes.
Specifies frames per second.
Specifies maximum possible HDR ratio value.
Specifies aggregator power.
NvMediaISCPowerItems
Defines ISC power items, objects whose power can be turned on or off and queried with NvMediaISCRootD...
struct NvMediaISCEmbeddedDataInfo NvMediaISCEmbeddedDataInfo
Holds the sensor embedded data parsed info structure.
NvMediaStatus NvMediaISCSetSensorControls(NvMediaISCDevice *device, const NvMediaISCSensorControl *sensorControl, const size_t sensrCtrlStructSize)
Sets sensor control parameters.
void NvMediaISCRootDevice
An opaque handle for an NvMediaISCRootDevice object.
NvMediaStatus NvMediaISCRootDeviceEnableSync(NvMediaISCRootDevice *device, NvMediaBool enable)
Enables or disables pulse width modulation (PWM) for external synchronization.
NvMediaStatus NvMediaISCRootDeviceSetSyncConfig(NvMediaISCRootDevice *device, float_t freq, float_t dutyRatio)
Sets the pulse width modulation (PWM) frequency and duty cycle.
NvMediaStatus NvMediaISCGetVersionInfo(NvMediaISCVersionInfo *versionInfo)
Returns the version information for the NvMedia ISC library.
Specifies the exposure mode count.
struct NvMediaISCCRC NvMediaISCCRC
Holds the sensor CRC structure.
struct NvMediaISCSensorAttributes NvMediaISCSensorAttributes
Holds the sensor attributes.
NvMediaStatus NvMediaISCParseEmbedDataInfo(NvMediaISCDevice *device, const NvMediaISCEmbeddedDataChunk *embeddedTopDataChunk, const NvMediaISCEmbeddedDataChunk *embeddedBotDataChunk, const size_t embeddedDataChunkStructSize, NvMediaISCEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)
Parses sensor embedded data info and provides sensor image settings information for the captured fram...
Specifies short exposure mode.
NvMediaStatus NvMediaISCDeviceWrite(NvMediaISCDevice *device, uint32_t deviceIndex, uint32_t dataLength, const uint8_t *data)
Performs a write operation over I2C.