Open main menu

Changes

C779-Software

109 bytes added, 12:46, 27 December 2021
no edit summary
TC358743 HDMI to CSI-2 install instructions, We refer to [https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=281972 HDMI to CSI-2 Install Instructions] 1. To use the kernel drivers, please update your system. There are a few things that have changed with the 5.4 kernel, so these instructions are for 5.4 or later. If "uname -a" reports anything less, then fix this before proceeding.
1. Update & upgrade the raspberry pi system (It will take a long time depend on the different country)
Navigate to ''''Interfacing Options'''' and hit Enter. Now select the ''''Camera'''' option, and hit the Enter key to enable it. Select “Finish” and select to '''reboot''' your Raspberry Pi.
23. Edit /boot/config.txt to add the line (that will need sudo, and use your preferred editor)
dtoverlay=tc358743
to the end of the file.
dtoverlay=tc358743,4lane=1
34. Check the amount of memory assigned to the CMA heap with "dmesg | grep cma". The first line should be along the lines of
pi@raspberrypi:~ $ dmesg | grep cma
[ 0.000000] cma: Reserved 256 MiB at 0x000000001ec00000
to the start of the line. Do NOT add any carriage returns.
45. Reboot. If all is well you should get a /dev/video0 device, and "v4l2-ctl --list-devices" will tell you that it is provided by Unicam.
After connecting all the cables, power on the Raspberry Pi, the C779 indicator light is normally green, and after opening the Raspberry Pi terminal, enter the following command:
<pre>
</pre>
56. This driver puts all the control in the hands of the user, or the user's application. By default there is no EDID loaded into the chip to allow it to tell the HDMI source what resolutions are supported. There are EDID editors around.
If you create a file edid.txt, then you can push this to the device using
</pre>
67. The driver does NOT automatically switch to the resolution detected. Use the command:
<pre>
pi@raspberrypi:~ $ v4l2-ctl --query-dv-timings
should now reflect the resolution detected.
78. The chip supports two formats - BGR3 (the default) and UYVY. BGR3 is 24bpp, and UYVY is YUV4:2:2 16bpp.
Over the normal 2 CSI-2 lanes the data rate is such that BGR3 can run at a maximum of 1080p30, whilst UYVY will go up to 1080p50. Use the following command to select UYVY, however your application may override that.
v4l2-ctl -v pixelformat=UYVY
89. Use gstreamer to save video and audio
gst-launch-1.0 v4l2src io-mode=5 ! video/x-raw, format=UYVY, framerate=25/1 ! v4l2h264enc output-io-mode=4 ! video/x-h264,profile=high ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv alsasrc device=hw:1 ! audio/x-raw,rate=48000,channels=2 ! audioconvert ! avenc_aac bitrate=48000 ! aacparse ! queue ! mux.