# Get the output of 4 cameras with SIPL

**URL:** <https://forums.developer.nvidia.com/t/get-the-output-of-4-cameras-with-sipl/177898>\
**Category:** DRIVE AGX Xavier General\
**Tags:** driveos-nvmedia\
**Created:** [May 13, 2021, 9:39pm UTC](https://forums.developer.nvidia.com/t/get-the-output-of-4-cameras-with-sipl/177898 "2021-05-13T21:39:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shayan.manoochehri](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@shayan.manoochehri](https://forums.developer.nvidia.com/u/shayan.manoochehri)\
**Post date:** [May 13, 2021, 9:39pm UTC](https://forums.developer.nvidia.com/t/get-the-output-of-4-cameras-with-sipl/177898/1 "2021-05-13T21:39:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [May 14, 2021, 3:47pm UTC](https://forums.developer.nvidia.com/t/get-the-output-of-4-cameras-with-sipl/177898/3 "2021-05-14T15:47:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![shayan.manoochehri](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@shayan.manoochehri](https://forums.developer.nvidia.com/u/shayan.manoochehri)\
**Post date:** [May 14, 2021, 4:16pm UTC](https://forums.developer.nvidia.com/t/get-the-output-of-4-cameras-with-sipl/177898/4 "2021-05-14T16:16:37Z")

</div>

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

```

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [May 17, 2021, 3:14pm UTC](https://forums.developer.nvidia.com/t/get-the-output-of-4-cameras-with-sipl/177898/5 "2021-05-17T15:14:46Z")

</div>

Please refer to --link-enable-masks switch of [nvsipl\_camera](https://docs.nvidia.com/drive/drive-os-5.2.0.0L/drive-os/index.html#page/DRIVE_OS_Linux_SDK_Development_Guide/NvMedia/nvmedia_nvsipl_camera.html#) 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.

---

<div class="post-metadata">

**Author:** ![shayan.manoochehri](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@shayan.manoochehri](https://forums.developer.nvidia.com/u/shayan.manoochehri)\
**Post date:** [May 17, 2021, 5:10pm UTC](https://forums.developer.nvidia.com/t/get-the-output-of-4-cameras-with-sipl/177898/6 "2021-05-17T17:10:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![VickNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vicknv/32/14043_2.png) [@VickNV](https://forums.developer.nvidia.com/u/VickNV)\
**Post date:** [May 17, 2021, 8:06pm UTC](https://forums.developer.nvidia.com/t/get-the-output-of-4-cameras-with-sipl/177898/7 "2021-05-17T20:06:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 8:03pm UTC](https://forums.developer.nvidia.com/t/get-the-output-of-4-cameras-with-sipl/177898/8 "2021-10-12T20:03:35Z")

</div>


