Hi,
TC358743 is a chip that captures HDMI signals and sends it over CSI2.
I'm working on Apalis iMX6 with the mainline BSP 6.2.0 kernel with which
i'm not able to capture the video.
I followed the below steps:
1) v4l2-ctl --device=/dev/v4l-subdev15 --set-edid file=1080P60EDID.txt
--fix-edid-checksums
2) run this script to form the pipeline :
media-ctl --links "'tc358743 1-000f':0->'imx6-mipi-csi2':0[1]"
media-ctl --links "'imx6-mipi-csi2':1->'ipu1_csi0_mux':0[1]"
media-ctl --links "'ipu1_csi0_mux':2->'ipu1_csi0':0[1]"
media-ctl --links "'ipu1_csi0':2->'ipu1_csi0 capture':0[1]"
media-ctl --set-dv "'tc358743 1-000f':0"
media-ctl --set-v4l2 "'tc358743 1-000f':0[fmt:UYVY8_1X16/1280x720]"
media-ctl --set-v4l2 "'imx6-mipi-csi2':1[fmt:UYVY8_1X16/1280x720]"
media-ctl --set-v4l2 "'ipu1_csi0_mux':2[fmt:UYVY8_1X16/1280x720]"
media-ctl --set-v4l2 "'ipu1_csi0':0[fmt:UYVY8_1X16/1280x720]"
media-ctl --set-v4l2 "'ipu1_csi0':2[fmt:UYVY8_1X16/1280x720]"
3) The below commands fail :
root@apalis-imx6-10774951:~# v4l2-ctl --stream-mmap -d /dev/video0
[ 216.963413] imx-ipuv3-csi imx-ipuv3-csi.0: capture format not valid
VIDIOC_STREAMON returned -1 (Broken pipe)
or
root@apalis-imx6-10774951:~# gst-launch-1.0 v4l2src device='/dev/video0'
! videoconvert ! waylandsink
Setting pipeline to PAUSED ...
Pipeline is live and does not nee[ 279.222350] imx-ipuv3-csi
imx-ipuv3-csi.0: failed to get src_sd format
d PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal
data stream error.
Additional debug info:
../gstreamer-1.20.3/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop
(): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.008354813
Setting pipeline to NULL ...
Freeing pipeline ...
4) The log status looks as follows:
root@apalis-imx6-10774951:~# v4l2-ctl --log-status -d /dev/v4l-subdev15
Status Log:
[ 827.988944] tc358743 1-000f: ================= START STATUS
=================
[ 827.999859] tc358743 1-000f: -----Chip status-----
[ 828.006018] tc358743 1-000f: Chip ID: 0x00
[ 828.011387] tc358743 1-000f: Chip revision: 0x00
[ 828.016167] tc358743 1-000f: Reset: IR: 1, CEC: 1, CSI TX: 0, HDMI: 0
[ 828.022703] tc358743 1-000f: Sleep mode: off
[ 828.027195] tc358743 1-000f: Cable detected (+5V power): yes
[ 828.034139] tc358743 1-000f: DDC lines enabled: yes
[ 828.041060] tc358743 1-000f: Hotplug enabled: yes
[ 828.047086] tc358743 1-000f: CEC enabled: no
[ 828.051389] tc358743 1-000f: -----Signal status-----
[ 828.056492] tc358743 1-000f: TMDS signal detected: yes
[ 828.061708] tc358743 1-000f: Stable sync signal: yes
[ 828.066783] tc358743 1-000f: PHY PLL locked: yes
[ 828.071430] tc358743 1-000f: PHY DE detected: yes
[ 828.090507] tc358743 1-000f: Detected format: 1280x720p60.00
(1650x750)
[ 828.097227] tc358743 1-000f: horizontal: fp = 0, -sync = 370, bp = 0
[ 828.103899] tc358743 1-000f: vertical: fp = 0, -sync = 30, bp = 0
[ 828.110088] tc358743 1-000f: pixelclock: 74250000
[ 828.114914] tc358743 1-000f: flags (0x0):
[ 828.118982] tc358743 1-000f: standards (0x0):
[ 828.123464] tc358743 1-000f: Configured format: 1280x720p60.00
(1650x750)
[ 828.130351] tc358743 1-000f: horizontal: fp = 0, -sync = 370, bp = 0
[ 828.136835] tc358743 1-000f: vertical: fp = 0, -sync = 30, bp = 0
[ 828.142959] tc358743 1-000f: pixelclock: 74250000
[ 828.147754] tc358743 1-000f: flags (0x0):
[ 828.151795] tc358743 1-000f: standards (0x0):
[ 828.156263] tc358743 1-000f: -----CSI-TX status-----
[ 828.161258] tc358743 1-000f: Lanes needed: 2
[ 828.165620] tc358743 1-000f: Lanes in use: 2
[ 828.171334] tc358743 1-000f: Waiting for particular sync signal: no
[ 828.178908] tc358743 1-000f: Transmit mode: no
[ 828.187628] tc358743 1-000f: Receive mode: no
[ 828.193422] tc358743 1-000f: Stopped: no
[ 828.197389] tc358743 1-000f: Color space: YCbCr 422 16-bit
[ 828.206541] tc358743 1-000f: -----HDMI status-----
[ 828.211373] tc358743 1-000f: HDCP encrypted content: no
[ 828.216761] tc358743 1-000f: Input color space: RGB limited range
[ 828.224550] tc358743 1-000f: AV Mute: off
[ 828.229628] tc358743 1-000f: Deep color mode: 8-bits per channel
[ 828.240354] tc358743 1-000f: HDMI infoframe: Auxiliary Video
Information (AVI), version 2, length 13
[ 828.249632] tc358743 1-000f: colorspace: RGB
[ 828.254407] tc358743 1-000f: scan mode: No Data
[ 828.259318] tc358743 1-000f: colorimetry: No Data
[ 828.264479] tc358743 1-000f: picture aspect: 16:9
[ 828.269563] tc358743 1-000f: active aspect: Same as Picture
[ 828.275582] tc358743 1-000f: itc: No Data
[ 828.279972] tc358743 1-000f: extended colorimetry: xvYCC 601
[ 828.286097] tc358743 1-000f: quantization range: Default
[ 828.291788] tc358743 1-000f: nups: Unknown Non-uniform Scaling
[ 828.298085] tc358743 1-000f: video code: 4
[ 828.302562] tc358743 1-000f: ycc quantization range: Limited
[ 828.308677] tc358743 1-000f: hdmi content type: Graphics
[ 828.314460] tc358743 1-000f: pixel repeat: 0
[ 828.319110] tc358743 1-000f: bar top 0, bottom 0, left 0, right 0
[ 828.325664] tc358743 1-000f: ================== END STATUS
==================
But the same command doesn't work for /dev/video0
root@apalis-imx6-10774951:~# v4l2-ctl --log-status -d /dev/video0
VIDIOC_LOG_STATUS: failed: Inappropriate ioctl for device
The same bridge works well with the latest RaspberryPI kernel (6.1.y)
but there the above script to form the pipeline is not required.
I'm grateful for any hints or comments?
Regards,
Aishwarya Kothari