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.

AM69: How to get video streaming from imx219 sensor

Part Number: AM69

Hi TI team

I am currently trying to get video streaming from imx219 respberry Pi camera on AM69.

I connected the camera to CSI0, using your default imx219.c to build a driver, and I added "name_overlays=ti/k3-j721e-sk-csi2-dual-imx219.dtbo" to the uEnv.txt. 

The driver is loaded correctly, but I can not get any video when I click the "Live Camera" icon in the TI Apps Launcher. I checked the kernel log and the imx219_start_streaming function is not called.

Could you give me some advice?

Thanks

Sixian

  • Hi ,

    Does the camera enumerate when you log into the shell? What SDK are you using?

    Best,
    Jared

  • Hi Jared

    Yes, there are more than 4 video* devices listed in the /dev, and 0x10 i2c slave address  can be scaned via i2cdetect tool

  • Hi ,

    I meant, do you see something like this:

    IMX219 Camera 0 detected
        device = /dev/video-imx219-cam0
        name = imx219
        format = [fmt:SRGGB8_1X8/1920x1080]
        subdev_id = /dev/v4l-imx219-subdev0
        isp_required = yes

    Additionally, what does media -p output?

    Can you test a yavta command to see if capturing RAW images works?

    Best,
    Jared

  • Hi Jared

    1. my SDK is:  ti-processor-sdk-linux-am69-sk-11_00_10_01

    2. root@am69-sk:~# sh /opt/ti-apps-launcher/setup_cameras.sh
    CSI Camera 0 detected
    device = /dev/video4
    name = imx219
    format = [fmt:SRGGB8_1X8/1920x1080]
    subdev_id = /dev/v4l-subdev2
    isp_required = yes

    3. And here are the outputs of media-ctl -p, it seems correct:

    Media controller API version 6.12.17

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

    Device topology
    - entity 1: 4500000.ticsi2rx (9 pads, 9 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.4504000.csi-bridge":1 [ENABLED,IMMUTABLE]
    pad1: SOURCE
    [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    -> "4500000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
    pad2: SOURCE
    -> "4500000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
    pad3: SOURCE
    -> "4500000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
    pad4: SOURCE
    -> "4500000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
    pad5: SOURCE
    -> "4500000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
    pad6: SOURCE
    -> "4500000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
    pad7: SOURCE
    -> "4500000.ticsi2rx context 6":0 [ENABLED,IMMUTABLE]
    pad8: SOURCE
    -> "4500000.ticsi2rx context 7":0 [ENABLED,IMMUTABLE]

    - entity 11: cdns_csi2rx.4504000.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:SRGGB8_1X8/1920x1080 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
    <- "imx219 7-0010":0 [ENABLED,IMMUTABLE]
    pad1: SOURCE
    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
    -> "4500000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    pad2: SOURCE
    pad3: SOURCE
    pad4: SOURCE

    - entity 17: imx219 7-0010 (1 pad, 1 link, 0 routes)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: SOURCE
    [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range
    crop.bounds:(8,8)/3280x2464
    crop:(688,160)/1920x2160]
    -> "cdns_csi2rx.4504000.csi-bridge":0 [ENABLED,IMMUTABLE]

    - entity 23: 4500000.ticsi2rx context 0 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video4
    pad0: SINK
    <- "4500000.ticsi2rx":1 [ENABLED,IMMUTABLE]

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

    - entity 35: 4500000.ticsi2rx context 2 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video6
    pad0: SINK
    <- "4500000.ticsi2rx":3 [ENABLED,IMMUTABLE]

    - entity 41: 4500000.ticsi2rx context 3 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video7
    pad0: SINK
    <- "4500000.ticsi2rx":4 [ENABLED,IMMUTABLE]

    - entity 47: 4500000.ticsi2rx context 4 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video8
    pad0: SINK
    <- "4500000.ticsi2rx":5 [ENABLED,IMMUTABLE]

    - entity 53: 4500000.ticsi2rx context 5 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video9
    pad0: SINK
    <- "4500000.ticsi2rx":6 [ENABLED,IMMUTABLE]

    - entity 59: 4500000.ticsi2rx context 6 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video10
    pad0: SINK
    <- "4500000.ticsi2rx":7 [ENABLED,IMMUTABLE]

    - entity 65: 4500000.ticsi2rx context 7 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video11
    pad0: SINK
    <- "4500000.ticsi2rx":8 [ENABLED,IMMUTABLE]

    4. And there is a error message "Unable to start streaming: Broken pipe (32)." while runing yavta 

    root@am69-sk:~# yavta /dev/video4 -c1 -n4 -s1920x1080 -fSRGGB8 -Fvideo.raw

    Device /dev/video4 opened.
    Device `j721e-csi2rx' on `platform:4500000.ticsi2rx' (driver 'j721e-csi2rx') supports video, capture, without mplanes.
    Video format set: SRGGB8 (42474752) 1920x1080 (stride 1920) field none buffer size 2073600
    Video format: SRGGB8 (42474752) 1920x1080 (stride 1920) field none buffer size 2073600
    4 buffers requested.
    length: 2073600 offset: 0 timestamp type/source: mono/EoF
    Buffer 0/0 mapped at address 0xffffa1175000.
    length: 2073600 offset: 32768 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at address 0xffffa0f7a000.
    length: 2073600 offset: 65536 timestamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0xffffa0d7f000.
    length: 2073600 offset: 98304 timestamp type/source: mono/EoF
    Buffer 3/0 mapped at address 0xffffa0b84000.
    Unable to start streaming: Broken pipe (32).
    4 buffers released.

  • Hi ,

    Yavta should work. Can you try:

    $ yavta -c1 -Fimage.raw /dev/video4

    You won't be able to stream video, through. You need to use an EdgeAI release to enable the ISPs, or use a USB camera.

    Best,
    Jared

  • Hi Jared

    I have a few question:

    1. only EdgeAI release can enable the ISPs and get video streaming?

    2. should I refer to the Processor SDK Linux Software Developer’s Guide — Processor SDK Linux for AM69A Documentation to use the EdgeAI release?

    3. In the current OS, there is a Live camera feature in the TI Apps Launcher, isn't it used for getting video streaming?

    4. imx219 should output RGGB10, and the setup_cameras.sh changes the format to RRGB8, if there is no ISP, I think it should not work. And I tried to modify both format in the setup_cameras.sh, none of then can work with command yavta -c1 -Fimage.raw /dev/video4

  • Hi ,

    1. only EdgeAI release can enable the ISPs and get video streaming?

    EdgeAI or ADAS releases.

    1. Overview — Processor SDK Linux Edge AI for AM69A Documentation

    3. In the current OS, there is a Live camera feature in the TI Apps Launcher, isn't it used for getting video streaming?

    Maybe, it's likely for USB cameras that have built in ISPs.

    4. imx219 should output RGGB10, and the setup_cameras.sh changes the format to RRGB8, if there is no ISP, I think it should not work. And I tried to modify both format in the setup_cameras.sh, none of then can work with command yavta -c1 -Fimage.raw /dev/video4

    Have you tried the setup_cameras.sh script from here: edgeai-gst-apps/scripts/setup_cameras.sh at main · TexasInstruments/edgeai-gst-apps · GitHub

    Best,
    Jared

  • Hi Jared

    applying setup_cameras.sh in this link, I can capture raw data now, thank you for your reply

  • Hi ,

    Please mark the thread as resolved.

    Best,
    Jared