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: CSI camera interface with Adv7282m, Video pipe broken

Part Number: AM625

Tool/software:

Trying to bring up Adv7282M with am625 processor using mipi interface

Configured the dtb and i2c is detected

Used adv7180.c module to build the .ko

media-ctl -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 (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]
                <- "adv7180 3-0021":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: adv7180 3-0021 (1 pad, 1 link, 0 route)
             type V4L2 subdev subtype Decoder flags 0
             device node name /dev/v4l-subdev2
        pad0: Source
                [stream:0 fmt:UYVY8_2X8/720x240@1001/30000 field:alternate colorspace:smpte170m]
                -> "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] 

Trying to play media fails with pipeline failed

- 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]
                <- "adv7180 3-0021":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: adv7180 3-0021 (1 pad, 1 link, 0 route)
             type V4L2 subdev subtype Decoder flags 0
             device node name /dev/v4l-subdev2
        pad0: Source
                [stream:0 fmt:UYVY8_2X8/720x240@1001/30000 field:alternate colorspace:smpte170m]
                -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

Issue:
When trying to play media (e.g., using GStreamer or a V4L2 capture app), the pipeline fails.

Does the format conversion happen automatically between the source and sink pads  of entity 13, entity 7  ?

  • Hi,

    Does the format conversion happen automatically between the source and sink pads  of entity 13, entity 7  ?

    No. You'll need to configure the format. Please refer to this FAQ: What are the common reasons V4L2 based applications fail to capture images from a probed CSI sensor?

    Regards,

    Jianzhong

  • v4l2-ctl --device /dev/video0 --stream-mmap --stream-count=1 --stream-to=test.yuv --verbose
    VIDIOC_QUERYCAP: ok
                    VIDIOC_REQBUFS returned 0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Success)
                    VIDIOC_QBUF returned 0 (Success)
                    VIDIOC_QBUF returned 0 (Success)
                    VIDIOC_QBUF returned 0 (Success)
                    VIDIOC_QBUF returned 0 (Success)
                    VIDIOC_STREAMON returned -1 (No such file or directory)
    root@am62xx-evm:~# media-ctl -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 (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/720x480 field:none colorspace:smpte170m]
                    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/720x480 field:none colorspace:smpte170m]
                    -> "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/720x480 field:none colorspace:smpte170m]
                    <- "adv7180 3-0021":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/720x480 field:none colorspace:smpte170m]
                    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
            pad2: Source
            pad3: Source
            pad4: Source

    - entity 13: adv7180 3-0021 (1 pad, 1 link, 0 route)
                 type V4L2 subdev subtype Decoder flags 0
                 device node name /dev/v4l-subdev2
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/720x480@1001/30000 field:none colorspace:smpte170m]
                    -> "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]

    As provided all the format are set to " fmt:UYVY8_1X16/720x480 field:none colorspace:smpte170m"  still same error

  • The "media-ctl -p" output looks correct. Not sure what could still cause the problem.

    I noticed that the sensor had "UYVY8_2X8/720x240" in the log of your first post. Please make sure the sensor is actually sending UYVY8_1X16/720x480.

    Can you try including the image format in your capture command? For example,

    v4l2-ctl --device /dev/video0 --stream-mmap --set-fmt-video=width=720,height=480,pixelformat="UYVY" --stream-mmap

  • Sensor data (8-bit YCrCb 4:2:2):  MEDIA_BUS_FMT_UYVY8_2X8 (Field:none) single data lane to  

    CSI Interface: MEDIA_BUS_FMT_UYVY8_1X16  (Field:none)

    Does the conversion happens automatically?

  • No, UYVY8_2X8 is not supported. Please check this E2E thread for a workaround: e2e.ti.com/.../