NVIDIA DRIVE OS Linux SDK API Reference

6.0.3 Release
devblk_cdi.h File Reference

Detailed Description

NVIDIA Device Block Interface: Camera Device Interface (CDI)

This file contains the Camera Device Interface API.

Definition in file devblk_cdi.h.

Go to the source code of this file.

Data Structures

struct  DevBlkCDIDevice
 Holds the handle for an DevBlkCDIDevice object. More...
 
struct  DevBlkCDIGPIOIndices
 Structure to hold array of CDAC GPIO indices. More...
 
struct  DevBlkCDIDeviceDriver
 Holds device driver data. More...
 
struct  DevBlkCDIAdvancedConfig
 Holds the description of the target I2C device. More...
 
struct  DevBlkCDISensorControl
 Holds the sensor control structure. 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...
 

Macros

#define DEVBLK_CDI_SIMULATOR_ADDRESS   0xFF1U
 Device address to use for an CDI simulator device. More...
 
#define RDEV_CFG_I2C_BITS   8
 Bits reserved for the I2C bus number in CDI_RDEV_CFG(csi, i2c). More...
 
#define RDEV_CFG_CSI_BITS   (RDEV_CFG_I2C_BITS + 8)
 Bits reserved for the CSI port in CDI_SLV_RDEV_CFG(csi, i2c). More...
 
#define RDEV_CFG_SLV_BIT   (RDEV_CFG_CSI_BITS + 1)
 Bit reserved for the passive mode flag in CDI_SLV_RDEV_CFG(csi, i2c). More...
 
#define CDI_RDEV_CFG(csi, i2c)   (((uint32_t)(csi) << (uint32_t)RDEV_CFG_I2C_BITS) | (i2c))
 Macro to create root device configuration with the connected CSI port and I2C bus. More...
 
#define CDI_RDEV_CFG_EX(csi, i2c, disPwrCtrl)
 Extended macro to create root device configuration with the connected CSI port, I2C bus, and an option to disable power control from root device. More...
 
#define CDI_SLV_RDEV_CFG(csi, i2c)   ((i2c) | ((uint32_t)(csi) << RDEV_CFG_I2C_BITS) | ((uint32_t)(1U) << RDEV_CFG_CSI_BITS))
 Macro to create a passive root device configuration with the connected CSI port and I2C bus when the application is run on a passive SoC. More...
 
#define DEVBLK_CDI_ROOT_DEVICE_MAX_GPIOS   (8U)
 The maximum number of GPIOs supported on a CDI Root Device. More...
 
#define DEVBLK_CDI_GPIO_LEVEL_LOW   (1U)
 CDI codes for CDAC GPIO Levels. More...
 
#define DEVBLK_CDI_GPIO_LEVEL_HIGH   (2U)
 

Typedefs

typedef void DevBlkCDIRootDevice
 An opaque handle for an DevBlkCDIRootDevice object. More...
 
typedef struct DevBlkCDISensorControl DevBlkCDISensorControl
 Holds the sensor control structure. More...
 
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  DevBlkCDI_I2CPort {
  DEVBLK_CDI_I2C_BUS_0 = 0,
  DEVBLK_CDI_I2C_BUS_1 = 1,
  DEVBLK_CDI_I2C_BUS_2 = 2,
  DEVBLK_CDI_I2C_BUS_3 = 3,
  DEVBLK_CDI_I2C_BUS_4 = 4,
  DEVBLK_CDI_I2C_BUS_5 = 5,
  DEVBLK_CDI_I2C_BUS_6 = 6,
  DEVBLK_CDI_I2C_BUS_7 = 7,
  DEVBLK_CDI_I2C_BUS_8 = 8,
  DEVBLK_CDI_I2C_BUS_9 = 9,
  DEVBLK_CDI_I2C_BUS_10 = 10,
  DEVBLK_CDI_I2C_BUS_11 = 11,
  DEVBLK_CDI_I2C_SIMULATOR = 255
}
 Defines the I2C buses on the host hardware device. More...
 
enum  DevBlkCDIGpioEvent {
  DEVBLK_CDI_GPIO_EVENT_NOTHING = 0,
  DEVBLK_CDI_GPIO_EVENT_INTR,
  DEVBLK_CDI_GPIO_EVENT_ERROR_WAIT_CANCELLED,
  DEVBLK_CDI_GPIO_EVENT_ERROR_CDAC,
  DEVBLK_CDI_GPIO_EVENT_ERROR_BACKEND,
  DEVBLK_CDI_GPIO_EVENT_ERROR_UNKNOWN
}
 CDI codes for CDAC GPIO Interrupt Events. More...
 
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 DevBlkCDIRootDeviceGetGPIOPinLevel (DevBlkCDIRootDevice const *device, uint32_t gpio_idx, uint32_t *level)
 Queries the logic level of a Tegra GPIO input pin associated with the root device. More...
 
NvMediaStatus DevBlkCDIRootDeviceSetGPIOPinLevel (DevBlkCDIRootDevice const *device, uint32_t gpio_idx, uint32_t level)
 Sets the logic level of Tegra GPIO output pin associated with this root device. More...
 
NvMediaStatus DevBlkCDIRootDeviceCheckAndClearIntr (DevBlkCDIRootDevice const *device, uint32_t gpio_idx)
 Verifies that the level of a GPIO pin configured as an interrupt is at the correct pre-transition level, and then clears any pending interrupt event. More...
 
NvMediaStatus DevBlkCDIRootDeviceGetGpioIntrEvent (DevBlkCDIRootDevice const *device, uint32_t gpio_idx, DevBlkCDIGpioEvent *event_code)
 Queries CDAC for the latest event code of a GPIO pin. More...
 
NvMediaStatus DevBlkCDIDeviceRead (DevBlkCDIDevice const *device, uint32_t deviceIndex, uint32_t regLength, uint8_t *regData, uint32_t dataLength, uint8_t *data)
 Performs a read operation over I2C. More...
 
NvMediaStatus DevBlkCDIDeviceWrite (DevBlkCDIDevice const *device, uint32_t deviceIndex, uint32_t dataLength, const uint8_t *data)
 Performs a write operation over I2C. More...
 
NvMediaStatus DevBlkCDIGetSensorAttributes (DevBlkCDIDevice *device, DevBlkCDISensorAttributes *sensorAttr, const size_t sensorAttrStructSize)
 Queries the sensor attributes. More...
 
NvMediaStatus DevBlkCDISetSensorControls (DevBlkCDIDevice *device, const DevBlkCDISensorControl *sensorControl, const size_t sensrCtrlStructSize)
 Sets sensor control parameters. More...
 
NvMediaStatus DevBlkCDIParseEmbedDataInfo (DevBlkCDIDevice *device, const DevBlkCDIEmbeddedDataChunk *embeddedTopDataChunk, const DevBlkCDIEmbeddedDataChunk *embeddedBotDataChunk, const size_t embeddedDataChunkStructSize, DevBlkCDIEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)
 Parses sensor embedded data info and provides sensor image settings information for the captured frame. More...
 
NvMediaStatus DevBlkCDISetCameraPower (DevBlkCDIRootDevice const *device, uint8_t linkIndex, NvMediaBool enable)
 Set the camera module power. More...
 
NvMediaStatus DevBlkCDIEnableErrorReport (DevBlkCDIRootDevice const *device)
 Enable the error report. More...
 
NvMediaStatus DevBlkCDIGetDesPowerControlMethod (DevBlkCDIDevice *device, uint8_t *desPwrMethod)
 Get the deserialzer's power control method. More...
 
NvMediaStatus DevBlkCDIGetCamPowerControlMethod (DevBlkCDIDevice *device, uint8_t *camPwrMethod)
 Get the camera's power control method. More...
 
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...