This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7: OX05B1s camera on AM62A SK EVM results in error with STREAMON 32 (Broken pipe)

Part Number: AM62A7
Other Parts Discussed in Thread: SK-AM62A-LP

Tool/software:

Hi,

I try to get the example from the AM6xA ISP Tuning Guide running and already get stuck at the verification of the functional operation.

I'm using a SK-AM62A-LP where the OX05B1S camera driver was integrated.  For me the query of the device looks ok

root@am62axx-evm:~# v4l2-ctl --list-devices
j721e-csi2rx (platform:30102000.ticsi2rx):
        /dev/video3
        /dev/video4
        /dev/video5
        /dev/video6
        /dev/video7
        /dev/video8
        /dev/media0

e5010 (platform:e5010):
        /dev/video2

wave5-dec (platform:wave5-dec):
        /dev/video0

as well as:

root@am62axx-evm:~# media-ctl -d /dev/media0 -p
Media controller API version 6.1.80

Media device information
------------------------
driver          j721e-csi2rx
model           TI-CSI2RX
serial          
bus info        platform:30102000.ticsi2rx
hw revision     0x1
driver version  6.1.80

Device topology
- entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        routes:
                0/0 -> 1/0 [ACTIVE]
        pad0: Sink
                [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
        pad1: Source
                [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
        pad2: Source
                -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
        pad3: Source
                -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
        pad4: Source
                -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
        pad5: Source
                -> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
        pad6: Source
                -> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]

- entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 1 route)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        routes:
                0/0 -> 1/0 [ACTIVE]
        pad0: Sink
                [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                <- "ox05b 4-0010":0 [ENABLED,IMMUTABLE]
        pad1: Source
                [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
                -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
        pad2: Source
        pad3: Source
        pad4: Source
        
- entity 15: ox05b 4-0010 (1 pad, 1 link, 2 routes)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev2
        routes:
                0/0 -> 0/0 [ACTIVE]
                0/0 -> 0/1 [ACTIVE]
        pad0: Source
                [stream:0 fmt:SBGGI10_1X10/2592x1944@1/30 field:none colorspace:srgb]
                [stream:1 fmt:SBGGI10_1X10/2592x1944@1/30 field:none colorspace:srgb]
                -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

- entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video3
        pad0: Sink
                <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]

- entity 27: 30102000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video4
        pad0: Sink
                <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]

- entity 33: 30102000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video5
        pad0: Sink
                <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]

- entity 39: 30102000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video6
        pad0: Sink
                <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]

- entity 45: 30102000.ticsi2rx context 4 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video7
        pad0: Sink
                <- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]

- entity 51: 30102000.ticsi2rx context 5 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video8
        pad0: Sink
                <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]

The setup of the adapted Gstreamer pipeline does not work as expected but results in the following output:
root@am62axx-evm:~# GST_DEBUG=2 gst-launch-1.0 -v v4l2src num-buffers=5 device=/dev/video3 io-mode=dmabuf ! \
> video/x-bayer, width=2592, height=1944, framerate=30/1, format=bggi10 ! \
> multifilesink location="test%d.raw"
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-bayer, width=(int)2592, height=(int)1944, framerate=(fraction)30/1, format=(string)bggi10, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-bayer, width=(int)2592, height=(int)1944, framerate=(fraction)30/1, format=(string)bggi10, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
/GstPipeline:pipeline0/GstMultiFileSink:multifilesink0.GstPad:sink: caps = video/x-bayer, width=(int)2592, height=(int)1944, framerate=(fraction)30/1, format=(string)bggi10, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-bayer, width=(int)2592, height=(int)1944, framerate=(fraction)30/1, format=(string)bggi10, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
0:00:00.130732460  1720     0x1dc5c800 WARN          v4l2bufferpool gstv4l2bufferpool.c:855:gst_v4l2_buffer_pool_start:<v4l2src0:pool0:src> Uncertain or not enough buffers, enabling copy threshold
0:00:00.135014680  1720     0x1dc5c800 ERROR         v4l2bufferpool gstv4l2bufferpool.c:719:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool0:src> error with STREAMON 32 (Broken pipe)
0:00:00.135101405  1720     0x1dc5c800 ERROR             bufferpool gstbufferpool.c:572:gst_buffer_pool_set_active:<v4l2src0:pool0:src> start failed
0:00:00.135192850  1720     0x1dc5c800 WARN                 v4l2src gstv4l2src.c:777:gst_v4l2src_decide_allocation:<v4l2src0> error: Failed to allocate required memory.
0:00:00.135243965  1720     0x1dc5c800 WARN                 v4l2src gstv4l2src.c:777:gst_v4l2src_decide_allocation:<v4l2src0> error: Buffer pool activation failed
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
../gst-plugins-good-1.20.7/sys/v4l2/gstv4l2src.c(777): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
0:00:00.135820560  1720     0x1dc5c800 WARN                 basesrc gstbasesrc.c:3347:gst_base_src_prepare_allocation:<v4l2src0> Subclass failed to decide allocation
Execution ended after 0:00:00.018579540
Setting pipeline to NULL ...
0:00:00.135925780  1720     0x1dc5c800 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
0:00:00.136247750  1720     0x1dc5c800 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../gstreamer-1.20.7/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline ...

I'm a little lost with the error message, it seems not to be a problem of the settings of the camera.

Thanks in advance.

  • Hello,

    You'll need to setup the media entity formats and the routes:

    # Set CDNS CSI Bridge
    media-ctl -R '"cdns_csi2rx.30101000.csi-bridge" [0/0 -> 1/0 [1], 0/1 -> 1/1 [1]]'
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/0 [fmt:SBGGI10_1X10/2592x1944 field:none colorspace:srgb]'
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/1 [fmt:SBGGI10_1X10/2592x1944 field:none colorspace:srgb]'
    
    # Set j721e-csi2rx routes
    media-ctl -R '"30102000.ticsi2rx" [0/0 -> 1/0 [1], 0/1 -> 2/0 [1]]'
    media-ctl -V '"30102000.ticsi2rx":0/0 [fmt:SBGGI10_1X10/2592x1944 field:none colorspace:srgb]'
    media-ctl -V '"30102000.ticsi2rx":0/1 [fmt:SBGGI10_1X10/2592x1944 field:none colorspace:srgb]' 
    
    # Set video node formats
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 0" -v width=2592,height=1944,pixelformat=BGI0
    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 1" -v width=2592,height=1944,pixelformat=BGI0
    

    The above configuration will be supported out-of-box in the upcoming SDK 10.0 release.

    Regards,

    Jianzhong