Get the output of 4 cameras with SIPL

Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
Software Version
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.5.0.7774
other

Host Machine Version
native Ubuntu 18.04
other

Hi. I’m using the SIPL API to get the output of 4 Sekonix cameras. I used the platform config hardcoded in the nvsipl sample since the platform config for SF3324_CPHY_x4 from the SIPL database doesn’t work.

The nvSCI buffers from the SIPL completion queue contain the image from one camera. I mapped the buffers to CUDA and viewed the image to make sure.

I want to get the output of all cameras. The ICP sample indicates that I should be getting a buffer with 4x the width of a single image. I think I need to set the number of virtual groups in ICP properly, however, the SIPL API doesn’t expose that.

I suspect I need to change the platform config I’m using to match the hardware setup. I tried the obvious way, i.e. change numCameraModules from 1 to 4 and add more entries in cameraModuleInfoList, but it didn’t work. I’m shooting in the dark here.

Does someone have a working configuration?

Thanks.

Hi @shayan.manoochehri ,

Which sample application are you using? Can you start with 2 Sekonix cameras? Can you share the log of the error and the steps to reproduce the issue? Thanks.

The sample I’m based on is /samples/nvmedia/nvsipl/test/sample/nvsipl_sample

This is the stock configuration.

static PlatformCfg platformCfg = {
    .platform = "SF3324_CPHY_x4",
    .platformConfig = "SF3324_CPHY_x4",
    .description = "SF3324 module in 4 lane CPHY mode",
    .numDeviceBlocks = 1U,
    .deviceBlockList = {
        {
            .csiPort = NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_AB,
            .phyMode = NVMEDIA_ICP_CSI_CPHY_MODE,
            .i2cDevice = 0U,
            .deserInfo = {
                .name = "MAX96712",
#if !NV_IS_SAFETY
                .description = "Maxim 96712 Aggregator",
#endif // !NV_IS_SAFETY
                .i2cAddress = 0x29
            },
            .numCameraModules = 1U,
            .cameraModuleInfoList = {
                {
                    .name = "SF3324",
#if !NV_IS_SAFETY
                    .description = "Sekonix SF3324 module - 120-deg FOV, DVP AR0231-RCCB, MAX96705",
#endif // !NV_IS_SAFETY
                    .linkIndex = 0U,
                    .serInfo = {
                        .name = "MAX96705",
#if !NV_IS_SAFETY
                        .description = "Maxim 96705 Serializer",
#endif // !NV_IS_SAFETY
                        .i2cAddress = 0x40
                    },
                    .isEEPROMSupported = false,
                    .eepromInfo = {
                    },
                    .sensorInfo = {
                            .id = SIPL_PIPELINE_ID,
                            .name = "AR0231",
#if !NV_IS_SAFETY
                            .description = "OnSemi AR0231 Sensor",
#endif // !NV_IS_SAFETY
                            .i2cAddress = 0x10,
                            .vcInfo = {
                                    .cfa = NVM_SURF_ATTR_COMPONENT_ORDER_CRBC,
                                    .embeddedTopLines = 24U,
                                    .embeddedBottomLines = 4U,
                                    .inputFormat = NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW12,
                                    .resolution = {
                                        .width = 1920U,
                                        .height = 1208U
                                    },
                                    .fps = 30.0,
                                    .isEmbeddedDataTypeEnabled = false
                            },
                            .isTriggerModeEnabled = true
                    }
                }
            }
        }
    }
};

I have no idea how to patch it to support two cameras. Here’s an example of what I tried.

static PlatformCfg platformCfg = {
    .platform = "SF3324_CPHY_x4",
    .platformConfig = "SF3324_CPHY_x4",
    .description = "SF3324 module in 4 lane CPHY mode",
    .numDeviceBlocks = 1U,
    .deviceBlockList = {
        {
            .csiPort = NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_AB,
            .phyMode = NVMEDIA_ICP_CSI_CPHY_MODE,
            .i2cDevice = 0U,
            .deserInfo = {
                .name = "MAX96712",
#if !NV_IS_SAFETY
                .description = "Maxim 96712 Aggregator",
#endif // !NV_IS_SAFETY
                .i2cAddress = 0x29
            },
            .numCameraModules = 2U,
            .cameraModuleInfoList = {
                {
                    .name = "SF3324",
#if !NV_IS_SAFETY
                    .description = "Sekonix SF3324 module - 120-deg FOV, DVP AR0231-RCCB, MAX96705",
#endif // !NV_IS_SAFETY
                    .linkIndex = 0U,
                    .serInfo = {
                        .name = "MAX96705",
#if !NV_IS_SAFETY
                        .description = "Maxim 96705 Serializer",
#endif // !NV_IS_SAFETY
                        .i2cAddress = 0x40
                    },
                    .isEEPROMSupported = false,
                    .eepromInfo = {
                    },
                    .sensorInfo = {
                            .id = SIPL_PIPELINE_ID,
                            .name = "AR0231",
#if !NV_IS_SAFETY
                            .description = "OnSemi AR0231 Sensor",
#endif // !NV_IS_SAFETY
                            .i2cAddress = 0x10,
                            .vcInfo = {
                                    .cfa = NVM_SURF_ATTR_COMPONENT_ORDER_CRBC,
                                    .embeddedTopLines = 24U,
                                    .embeddedBottomLines = 4U,
                                    .inputFormat = NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW12,
                                    .resolution = {
                                        .width = 1920U,
                                        .height = 1208U
                                    },
                                    .fps = 30.0,
                                    .isEmbeddedDataTypeEnabled = false
                            },
                            .isTriggerModeEnabled = true
                    }
                },
		
                {
                    .name = "SF3324",
#if !NV_IS_SAFETY
                    .description = "Sekonix SF3324 module - 120-deg FOV, DVP AR0231-RCCB, MAX96705",
#endif // !NV_IS_SAFETY
                    .linkIndex = 1U,
                    .serInfo = {
                        .name = "MAX96705",
#if !NV_IS_SAFETY
                        .description = "Maxim 96705 Serializer",
#endif // !NV_IS_SAFETY
                        .i2cAddress = 0x40
                    },
                    .isEEPROMSupported = false,
                    .eepromInfo = {
                    },
                    .sensorInfo = {
                            .id = 1,
                            .name = "AR0231",
#if !NV_IS_SAFETY
                            .description = "OnSemi AR0231 Sensor",
#endif // !NV_IS_SAFETY
                            .i2cAddress = 0x10,
                            .vcInfo = {
                                    .cfa = NVM_SURF_ATTR_COMPONENT_ORDER_CRBC,
                                    .embeddedTopLines = 24U,
                                    .embeddedBottomLines = 4U,
                                    .inputFormat = NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW12,
                                    .resolution = {
                                        .width = 1920U,
                                        .height = 1208U
                                    },
                                    .fps = 30.0,
                                    .isEmbeddedDataTypeEnabled = false
                            },
                            .isTriggerModeEnabled = true
                    }
                }
		
            }
        }
    }
};

Output.

MAX96712: Revision 2 detected
MAX96712: Enable periodic AEQ on Link 0
MAX96705: Pre-emphasis set to 0xaa
MAX96705: Revision 1 detected!
Sensor AR0231 RCCB Rev7 detected!
MAX96712: Enable periodic AEQ on Link 1
MAX96705: Pre-emphasis set to 0xaa
MAX96705: Revision 1 detected!
Sensor AR0231 RCCB Rev7 detected!
nvsipl_sample: CNvMCamera.cpp: 458: Init: Incorrect pipeline state:0 for pipeline:1
nvsipl_sample: ERROR: INvSIPLCamera::Init() failed, status: 6

nvsipl_sample: CNvMCamera.cpp: 1088: Deinit: Incorrect pipeline state:1 for pipeline:0
nvsipl_sample: CNvMCamera.cpp: 48: ~CNvMCamera: CNvMCamera object fails to deinit
nvsipl_sample: ERROR: Unexpected output type

nvsipl_sample: ERROR: Unexpected output type

Please refer to --link-enable-masks switch of nvsipl_camera sample application and its source code (under /nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/drive-t186ref-linux/samples/nvmedia/nvsipl/test/camera). Thanks.

Thanks. I tried specifying the mask in the platform config and it didn’t work. I give up. I switched to the DriveWorks API.

If you change your mind and need our help on NvMedia API again, let us know. Thanks.