Ultra96+ov9281 : VIDIOC_STREAMON failed: broken pipe (32)

Hello everyone, i hope am posting on the right forum. I tried to contact the person in charge of the documentation for the adapter board but without any response. So i thought maybe one of you already had the issue I am having right now.

Project: using ultra96 and Mipi adapter board i would like to capture frame from a cmos camera (ov9281)

Problem: when try to stream i receive the error VIDIOC_STREAMON failed: broken pipe (32)

Am using vivado 2018.3 and generating my own linux kernel using the linux-xlnx from xilinx github.
The video pipelin is well recognize, i have my node /dev/video0; /dev/media0 and /dev/v4l-subdev*
the camera is well link to the i2c
i can change the parameter not problems on this part. but if i try to launch a capture i have this error, that i use v4l2-ctl command or yavta
By “chance” has one of you already encounter this issue?

best regards
sarah

How did you configured the pipeline, with media-ctl (media-ctrl- l)? what is returned by media-ctl -p?

if i do media-ctl -p i have this result :

root@linaro-developer:~# media-ctl -p
Media controller API version 4.19.0

Media device information

driver xilinx-video
model Xilinx Video Composite Device
serial
bus info
hw revision 0x0
driver version 4.19.0

Device topology

  • entity 1: vcap_csi output 0 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video0
    pad0: Sink
    ← “a00c0000.scaler”:1 [ENABLED]

  • entity 5: vc_mipi_ov9281 4-0060 (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev0
    pad0: Source
    [fmt:Y8_1X8/1280x800 field:none]
    → “a0000000.mipi_csi2_rx_subsystem”:1 [ENABLED]

  • entity 7: a0000000.mipi_csi2_rx_subsystem (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev1
    pad0: Source
    [fmt:RBG888_1X24/1920x1080 field:none]
    → “a0020000.v_demosaic”:0 [ENABLED]
    pad1: Sink
    [fmt:RBG888_1X24/1920x1080 field:none]
    ← “vc_mipi_ov9281 4-0060”:0 [ENABLED]

  • entity 10: a0020000.v_demosaic (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev2
    pad0: Sink
    [fmt:SRGGB8_1X8/1280x720 field:none]
    ← “a0000000.mipi_csi2_rx_subsystem”:0 [ENABLED]
    pad1: Source
    [fmt:RBG888_1X24/1280x720 field:none]
    → “a0030000.v_gamma_lut”:0 [ENABLED]

  • entity 13: a0030000.v_gamma_lut (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev3
    pad0: Sink
    [fmt:RBG888_1X24/1280x720 field:none]
    ← “a0020000.v_demosaic”:1 [ENABLED]
    pad1: Source
    [fmt:RBG888_1X24/1280x720 field:none]
    → “a0040000.csc”:0 [ENABLED]

  • entity 16: a0040000.csc (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev4
    pad0: Sink
    [fmt:RBG888_1X24/1280x720 field:none]
    ← “a0030000.v_gamma_lut”:1 [ENABLED]
    pad1: Source
    [fmt:RBG888_1X24/1280x720 field:none]
    → “a00c0000.scaler”:0 [ENABLED]

  • entity 19: a00c0000.scaler (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev5
    pad0: Sink
    [fmt:RBG888_1X24/1280x720 field:none]
    ← “a0040000.csc”:1 [ENABLED]
    pad1: Source
    [fmt:RBG888_1X24/1920x1080 field:none]
    → “vcap_csi output 0”:0 [ENABLED]

Also if i try to capture with yavta i get this answer:

root@linaro-developer:/opt/yavta/yavta# ./yavta -f SBGGR10P -s 1280x960 -n 4 --capture=5 -F /dev/video0
Device /dev/video0 opened.
Device vcap_csi output 0' on platform:vcap_csi:0’ (driver ‘xilinx-vipp’) supports video, capture, with
mplanes.
Video format set: SBGGR10P (41414270) 1280x960 field
none, 1 planes:

  • Stride 2560, buffer size 2457600
    Video format: SBGGR10P (41414270) 1280x960 field none, 1 planes:
  • Stride 2560, buffer size 2457600
    4 buffers requested.
    length: 1 offset: 3851172336 timestamp type/source: mono/EoF
    Buffer 0/0 mapped at address 0x7f96560000.
    length: 1 offset: 3851172336 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at address 0x7f96308000.
    length: 1 offset: 3851172336 timestamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0x7f960b0000.
    length: 1 offset: 3851172336 timestamp type/source: mono/EoF
    Buffer 3/0 mapped at address 0x7f95e58000.
    Unable to start streaming: Broken pipe (32).
    4 buffers released.

i was wondering if the issue could come from the mplane parameter

Well, from you pipeline, Sensor element seems to be configured with Y8_1X8/1280x800 while CSI2 is configured with RBG888_1X24/1920x1080, which could cause this issue.

So you may have to configure your pipeline elements format with media-ctl. e.g. for db410c we run something like

media-ctl -v -d /dev/media0 -V ‘“ov5640 2-003b”:0[fmt:UYVY2X8/1920x1080field:none],“msm_csiphy0”:0[fmt:UYVY2X8/1920x1080...

Hi i tried how you said, changed the parameter of my pipeline so the elements have the same format, but ended up with the same result. One thing that i observed is that the driver for the mipi-csi2 interface doesn’t accept other format than Mono sensor/rgb/or YUV_422 at the definition in the devicetree… for now since my camera is delivering raw data I am using the mono_sensor format. and later with the command you gave converting to Y8_1X8/1280x800.

i wonder if the issue doesn’t come from the driver am using for the camera. The driver is for raspberry and checking at the devicetree from raspberry and the one from the ultra96 there is some part missing (“cam0-pwnd” for example). Will try to modify the driver a bit to make it fit to the platform.

Well in that case I would suggest to add some debug in each v4l2 subdevice (e.g. s_power, set_fmt…) to check which one causes the pipeline failure.