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.

AM625: am625 version 09.00.00.03 Add csi interface camera

Part Number: AM625

The am625 version 08.04 test imx327 , can output the image correctly on hdmi, but always reports an error on version 09.

command:

gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw , width=1920, height=1080 ! waylandsink

08.04 serial port output

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

09.00.00.03 serial port output

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
../gst-plugins-good-1.20.6/sys/v4l2/gstv4l2src.c(777): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.019267235
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Setting pipeline to NULL ...
Additional debug info:
../gstreamer-1.20.6/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:

I don't know the reason。

  • Hi Tip,

    Our CSI expert is out of office today. Please expect delayed response.

  • Hello,

    Do you see a similar issue with kmssink?

    Regards,
    Krunal

  • Hi,Krunal:

    Yes,the same problem exits with kmssink.

  • Hi Tip,

    Could you run the command "media-ctl -p" and share the output?

    Thanks,

    Jianzhong

  • Hi Jian,

    The following is the output of this command:

    media-ctl -p
    Media controller API version 6.1.33

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

    Device topology
    - entity 1: 30102000.ticsi2rx (5 pads, 5 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]

    - entity 7: 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]
    <- "veye327 2-003b":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 13: veye327 2-003b (1 pad, 1 link, 0 route)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [stream:0 fmt:UYVY8_2X8/1920x1080 field:none]
    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

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

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

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

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

  • Hello Tip,

    Thanks for sharing the log. Can you try to configure the csi bridge to have the same format as the sensor?

    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/0 [fmt:UYVY8_2X8/1920x1080 field:none]'

    Please run a "media-ctl -p" to verify the csi bridge has the same format as the sensor. Then run the streaming and see if it works.

    Regards,

    Jianzhong

  • HI Jianzhong,

    Thank you for your reply, but I don't quite understand what you mean, my csi bridge and sensor format is the same before executing the command you gave. Nothing changed after changing it.

    I'm not too familiar with the operations related to video streaming, so please advise me!


    root@am62xx-evm:~# media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0/0 [fmt:UYVY8_2X8/1920x1080 field:none]'
    root@am62xx-evm:~# -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]^C
    root@am62xx-evm:~# media-ctl -p
    Media controller API version 6.1.33

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

    Device topology
    - entity 1: 30102000.ticsi2rx (5 pads, 5 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:YUYV8_1X16/1920x1080 field:none]
    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:YUYV8_1X16/1920x1080 field:none]
    -> "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]

    - entity 7: 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:YUYV8_1X16/1920x1080 field:none]
    <- "veye327 2-003b":0 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:YUYV8_1X16/1920x1080 field:none]
    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    pad2: Source
    pad3: Source
    pad4: Source

    - entity 13: veye327 2-003b (1 pad, 1 link, 0 route)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [stream:0 fmt:UYVY8_2X8/1920x1080 field:none]
    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

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

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

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

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

    root@am62xx-evm:~# gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw , width=1920, height=1080 ! waylandsink
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
    Additional debug info:
    ../gst-plugins-good-1.20.6/sys/v4l2/gstv4l2src.c(777): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    Buffer pool activation failed
    Execution ended after 0:00:00.017509425
    Setting pipeline to NULL ...
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
    Additional debug info:
    ../gstreamer-1.20.6/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming stopped, reason not-negotiated (-4)
    Freeing pipeline ...
    root@am62xx-evm:~#

  • Hi Tip,

    The csi-bridge and the sensor actually have different format. Please see highlights below:

    - entity 7: 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:YUYV8_1X16/1920x1080 field:none]
    <- "veye327 2-003b":0 [ENABLED,IMMUTABLE]
    pad1: Source
    [stream:0 fmt:YUYV8_1X16/1920x1080 field:none]
    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    pad2: Source
    pad3: Source
    pad4: Source

    - entity 13: veye327 2-003b (1 pad, 1 link, 0 route)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [stream:0 fmt:UYVY8_2X8/1920x1080 field:none]
    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

    Regards,

    Jianzhong