Part Number: AM625
Tool/software:
Hello all,
I'm trying to make my dual camera setup work on my AM625. 1x ISX021 camera, 1x OV2311 camera. However when I try to execute the below script I get an ``Dangling sink streams: mask 0x2`` error. I think this error happens because I'm doing something wrong on my media-ctl setup script but do have a look please:
```
And here is the `media-ctl -p` output:
root@myd-am62x:~# ./setup_cameras.sh
ISX021 Camera 0 detected
device = /dev/video1
name = isx021
format = [fmt:UYVY8_1X16/1920x1280 field: none]
subdev_id = /dev/v4l-subdev5
isp_required = yes
ldc_required = no
max96716 1-004c [1/0 -> 3/0 [1]]
OV2311 Camera 0 detected
device = /dev/video0
name = ov2311
format = [fmt:Y8_1X8/1280x800 field: none]
subdev_id = /dev/v4l-subdev6
isp_required = yes
ldc_required = no
max96716 1-004c [0/0 -> 2/0 [1]]
root@myd-am62x:~# media-ctl -p
Media controller API version 6.1.46
Media device information
------------------------
driver j721e-csi2rx
model TI-CSI2RX
serial
bus info platform:30102000.ticsi2rx
hw revision 0x1
driver version 6.1.46
Device topology
- entity 1: 30102000.ticsi2rx (5 pads, 5 links, 2 routes)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
routes:
0/0 -> 1/0 [ACTIVE]
0/1 -> 2/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:Y8_1X8/1280x800 field:none colorspace:srgb]
[stream:1 fmt:UYVY8_1X16/1920x1280 field:none colorspace:srgb]
<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:Y8_1X8/1280x800 field:none colorspace:srgb]
-> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
pad2: Source
[stream:0 fmt:UYVY8_1X16/1920x1280 field:none colorspace:srgb]
-> "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, 2 routes)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
routes:
0/0 -> 1/0 [ACTIVE]
0/1 -> 1/1 [ACTIVE]
pad0: Sink
[stream:0 fmt:Y8_1X8/1280x800 field:none colorspace:srgb]
[stream:1 fmt:UYVY8_1X16/1920x1280 field:none colorspace:srgb]
<- "max96716 1-004c":2 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:Y8_1X8/1280x800 field:none colorspace:srgb]
[stream:1 fmt:UYVY8_1X16/1920x1280 field:none colorspace:srgb]
-> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
pad2: Source
pad3: Source
pad4: Source
- entity 13: max96716 1-004c (4 pads, 3 links, 2 routes)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev2
routes:
0/0 -> 2/0 [ACTIVE]
1/0 -> 3/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
<- "max96717 1-0040":1 [ENABLED,IMMUTABLE]
pad1: Sink
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
<- "max96717 1-0041":1 [ENABLED,IMMUTABLE]
pad2: Source
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
-> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
pad3: Source
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
- entity 20: max96717 1-0040 (2 pads, 2 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev3
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:Y8_1X8/1280x800 field:none]
<- "ov2311_mipi 1-0010":0 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:Y8_1X8/1280x800 field:none]
-> "max96716 1-004c":0 [ENABLED,IMMUTABLE]
- entity 25: max96717 1-0041 (2 pads, 2 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev4
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:UYVY8_1X16/1920x1280 field:none]
<- "isx021_mipi 1-001a":0 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:UYVY8_1X16/1920x1280 field:none]
-> "max96716 1-004c":1 [ENABLED,IMMUTABLE]
- entity 30: isx021_mipi 1-001a (1 pad, 1 link, 0 route)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev5
pad0: Source
[stream:0 fmt:UYVY8_1X16/1920x1280 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
-> "max96717 1-0041":0 [ENABLED,IMMUTABLE]
- entity 34: ov2311_mipi 1-0010 (1 pad, 1 link, 0 route)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev6
pad0: Source
[stream:0 fmt:Y8_1X8/1280x800 field:none colorspace:srgb]
-> "max96717 1-0040":0 [ENABLED,IMMUTABLE]
- entity 40: 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 46: 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 52: 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 58: 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]
and I get the `Dangling sink streams: mask 0x2` error when I execute the following commands:
```
v4l2-ctl --device /dev/video1 --set-fmt-video=width=1920,height=1280,pixelformat=UYVY --stream-mmap --stream-to=frame.raw --stream-count=1
```
Dmesg output:
[ 7208.698540] j721e-csi2rx 30102000.ticsi2rx: Dangling sink streams: mask 0x2
```
v4l2-ctl --device /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --stream-mmap --stream-to=frame.raw --stream-count=1
```
Dmesg output:
[ 7233.079826] j721e-csi2rx 30102000.ticsi2rx: Dangling sink streams: mask 0x2
[ 7233.087193] ------------[ cut here ]------------
[ 7233.091806] WARNING: CPU: 1 PID: 2975 at drivers/media/common/videobuf2/videobuf2-core.c:1063 vb2_buffer_done+0x1b8/0x244 [videobuf2_common]
[ 7233.104421] Modules linked in: cfg80211 rfkill isx021_mipi ov2311_mipi xhci_plat_hcd snd_soc_hdmi_codec rpmsg_ctrl max96717 rpmsg_char dwc3 cdns_csi2rx irq_pruss_intc pru_rproc snd_soc_simple_card snd_soc_simple_card_utils crct10dif_ce display_connector dwc3_am62 rti_wdt j721e_csi2rx tidss sii902x drm_dma_helper ti_k3_r5_remoteproc videobuf2_dma_contig at24 drm_kms_helper videobuf2_memops virtio_rpmsg_bus videobuf2_v4l2 rpmsg_ns ti_k3_m4_remoteproc cfbfillrect max96716 ti_k3_common videobuf2_common v4l2_fwnode syscopyarea cfbimgblt k3_j72xx_bandgap sysfillrect v4l2_async sysimgblt extcon_ptn5150 mcrc fb_sys_fops videodev cfbcopyarea sa2ul snd_soc_davinci_mcasp mc snd_soc_ti_udma rtc_ti_k3 snd_soc_ti_edma m_can_platform snd_soc_ti_sdma m_can pruss cdns_dphy_rx can_dev drm fuse drm_panel_orientation_quirks ipv6
[ 7233.176123] CPU: 1 PID: 2975 Comm: v4l2-ctl Tainted: G W 6.1.46-g09315e93456b-dirty #12
[ 7233.185500] Hardware name: Texas Instruments K3 AM625 SoC (DT)
[ 7233.191319] pstate: 800000c5 (Nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 7233.198266] pc : vb2_buffer_done+0x1b8/0x244 [videobuf2_common]
[ 7233.204197] lr : ti_csi2rx_cleanup_buffers+0xf4/0x130 [j721e_csi2rx]
[ 7233.210546] sp : ffff800011693a80
[ 7233.213849] x29: ffff800011693a80 x28: ffff0000092fe600 x27: ffff0000039614b8
[ 7233.220976] x26: 0000000000000000 x25: 0000000000000000 x24: ffff0000039615a8
[ 7233.228101] x23: dead000000000100 x22: 0000000000000001 x21: ffff0000039615b8
[ 7233.235226] x20: 0000000000000003 x19: ffff000009db8c00 x18: ffffffffffffffff
[ 7233.242351] x17: 0000000000000000 x16: 0000000000000000 x15: ffff800091693557
[ 7233.249475] x14: 00000000000003a2 x13: 0000000000000001 x12: 0000000000000000
[ 7233.256598] x11: 0000000000000001 x10: 00000000000009b0 x9 : ffff800011693810
[ 7233.263723] x8 : ffff00007f2b9180 x7 : 0000800000000000 x6 : ffff00007f2b91a8
[ 7233.270849] x5 : ffff00007f2b9568 x4 : 0000000000000000 x3 : ffff00000396144c
[ 7233.277975] x2 : ffff0000039615b8 x1 : 0000000000000003 x0 : 0000000000000000
[ 7233.285101] Call trace:
[ 7233.287539] vb2_buffer_done+0x1b8/0x244 [videobuf2_common]
[ 7233.293117] ti_csi2rx_cleanup_buffers+0xf4/0x130 [j721e_csi2rx]
[ 7233.299118] ti_csi2rx_start_streaming+0x6c/0x25c [j721e_csi2rx]
[ 7233.305118] vb2_start_streaming+0x68/0x15c [videobuf2_common]
[ 7233.310951] vb2_core_streamon+0x90/0x190 [videobuf2_common]
[ 7233.316612] vb2_ioctl_streamon+0x5c/0xb0 [videobuf2_v4l2]
[ 7233.322104] v4l_streamon+0x24/0x30 [videodev]
[ 7233.326622] __video_do_ioctl+0x184/0x3d0 [videodev]
[ 7233.331632] video_usercopy+0x214/0x6c4 [videodev]
[ 7233.336468] video_ioctl2+0x18/0x2c [videodev]
[ 7233.340957] v4l2_ioctl+0x40/0x60 [videodev]
[ 7233.345272] __arm64_sys_ioctl+0xa8/0xf0
[ 7233.349193] invoke_syscall+0x48/0x114
[ 7233.352937] el0_svc_common.constprop.0+0xd4/0xfc
[ 7233.357632] do_el0_svc+0x30/0xd0
[ 7233.360940] el0_svc+0x2c/0x84
[ 7233.363990] el0t_64_sync_handler+0xbc/0x140
[ 7233.368248] el0t_64_sync+0x18c/0x190
[ 7233.371905] ---[ end trace 0000000000000000 ]---
Also it may be worth mentioning that below script works:
```
Can you give me directions about what is wrong?
Thanks.