HDMI to CSI & Audio
HDMI to CSI&I2S bridge guide
Convert HDMI signal acquisition into CSI signal and I2S audio signal. Currently, all platforms are supported (Zero, Pi3B, Pi4B, CM4, Pi5B), and the maximum capture resolution not only depends on the HDMI to CSI converter board you are using but also on the Raspberry Pi hardware version you have. Raspberry Pi hardware versions are primarily divided into two series, one supporting a maximum of 1080P60Hz and the other supporting a maximum of 1080P50Hz.
-
The Raspberry Pi versions that support a maximum of 1080P60Hz are CM3, CM4, and Pi5B.
-
The Raspberry Pi versions that support a maximum of 1080P50Hz are Zero, Zero 2, Pi3B, Pi4B, and so on.
Introduction
This module takes the incoming HDMI signal and converts it into a separate CSI signal and I2S audio signal. HDMI input supports up to 1080P60Hz. It works well on Raspberry Pi, there are three versions of this module in history (C779, C780, C790). C790 is the latest version. C790 has mitigated HDMI backpowering, and also has two csi channels and four csi channels at the same time.
Features
C790
- HDMI input: supports up to 1080P60Hz on Raspberry Pi
- HDMI to CSI-2 bridge chip: Toshiba TC358743XBG
- 4 CSI-2 channels & clock
- The CSI-2 interface, with 15 pin FPC seat, spacing 1.0 mm, is located on the front of the C790 module.
- The CSI-2 interface, with 22 pin FPC seat, spacing 0.5 mm, is located on the back of the C790 module.
- Size: 30 x 45 mm
- Install: 4 x M2.5
- Power supply: 3.3V
- Weight: 10g
C790 has two CSI output interfaces. In front of C790, the CSI-2 interface is 15 pin FPC seat, spacing 1.0 mm. In back of C790, the CSI-2 interface is 22 pin FPC seat, spacing 0.5 mm.
C780
- HDMI input: supports up to 1080P50Hz on Raspberry Pi(Limited by the number of CSI-2 channels)
- HDMI to CSI-2 bridge chip: Toshiba TC358743XBG
- 2 CSI-2 channels & clock
- CSI-2 interface: 15 pin FPC seat, spacing 1.0 mm
- Size: 30 x 65 mm (unbroken PCB size); 30 x 45 mm (PCB size after breaking)
- Install: 6 x M2.5
- Power supply: 3.3V
- Weight: 10g
- HDMI input: supports up to 1080P60Hz on Raspberry Pi
- HDMI to CSI-2 bridge chip: Toshiba TC358743XBG
- 4 CSI-2 channels & clock
- CSI-2 interface: 22 pin FPC seat, spacing 0.5 mm
- Size: 30 x 65 mm (unbroken PCB size); 30 x 45 mm (PCB size after breaking)
- Install: 6 x M2.5
- Power supply: 3.3V
- Weight: 10g
The wiring of audio part is shown in Figure.
The size of C780 is shown in the image below. There are 6 mounting holes with a diameter of 2.75mm, which are suitable for M2.5 screws.
As shown in the image below, the user can directly fix the module on the Raspberry Pi Zero. C780 is designed to be broken, and the hole spacing before breaking can be perfectly installed with most series of Raspberry Pi.
C779
- HDMI input: supports up to 1080P50Hz on Raspberry Pi(Limited by the number of CSI-2 channels)
- HDMI to CSI-2 bridge chip: Toshiba TC358743XBG
- 2 CSI-2 channels & clock
- CSI-2 interface: 15 pin FPC seat, spacing 1.0 mm
- Size: 35 x 50 mm
- Install: 4 x M2.5
- Power supply: 3.3V
- Weight: 10g
The size of C779 is shown in Figure. There are 4 mounting holes with a diameter of 2.75mm, which are suitable for M2.5 screws.
CSI Interface Definitions
The CSI (Camera Serial Interface) interfaces C779 and C780A have 15 pins each, while the C780B interface has 22 pins. The C790 interface is unique as it supports both 15 and 22 PIN configurations.



Software Demo
The use guide of C790/C780/C779 depends on the official Raspberry Pi OS version you are using.
Different versions have different usage methods. If you have some questions, Join our BLIKVM Discord Community for Support, FAQ & News!
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.
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l GNU/Linux
sudo apt-get update
sudo apt-get upgrade
sudo raspi-config
sudo reboot
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. reboot is important!!
All Pi except for Pi5B & CM5
Edit /boot/config.txt (that will need sudo)
sudo nano /boot/config.txt
Add the line:
dtoverlay=tc358743
Add the line if your shield support audio like C780 or C790.
dtoverlay=tc358743-audio
If (and only if) you have a device such as the C780 or C790 that supports the 22pin connector with all 4 lanes wired out, and are using a Compute Module with the CAM1 connector that also has all 4 lanes wired up, you can use:
dtoverlay=tc358743,4lane=1
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
If it reports less than 96MB assigned to CMA, then edit /boot/cmdline.txt and add to the start of the line. Do NOT add any carriage returns.
cma=96M
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 C790 indicator light is normally green, and after opening the Raspberry Pi terminal, enter the following command:
pi@raspberrypi:~ $ ls /dev/video0
/dev/video0
pi@raspberrypi:~ $ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
/dev/video10
/dev/video11
/dev/video12
/dev/video18
/dev/media1
bcm2835-isp (platform:bcm2835-isp):
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/media0
unicam (platform:fe801000.csi):
/dev/video0
/dev/video1
/dev/media2
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 the comment of edid.txt file:
00ffffffffffff005262888800888888
1c150103800000780aEE91A3544C9926
0F505400000001010101010101010101
010101010101011d007251d01e206e28
5500c48e2100001e8c0ad08a20e02d10
103e9600138e2100001e000000fc0054
6f73686962612d4832430a20000000FD
003b3d0f2e0f1e0a2020202020200100
020321434e041303021211012021a23c
3d3e1f2309070766030c00300080E300
7F8c0ad08a20e02d10103e9600c48e21
0000188c0ad08a20e02d10103e960013
8e210000188c0aa01451f01600267c43
00138e21000098000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
cd ~
sudo nano edid.txt
#copy the above commend in edid.txt, save&exit;
pi@raspberrypi:~ $ v4l2-ctl --set-edid=file=edid.txt --fix-edid-checksums
CTA-861 Header
IT Formats Underscanned: yes
Audio: yes
YCbCr 4:4:4: no
YCbCr 4:2:2: no
HDMI Vendor-Specific Data Block
Physical Address: 3.0.0.0
YCbCr 4:4:4 Deep Color: no
30-bit: no
36-bit: no
48-bit: no
CTA-861 Video Capability Descriptor
RGB Quantization Range: yes
YCC Quantization Range: no
PT: Supports both over- and underscan
IT: Supports both over- and underscan
CE: Supports both over- and underscan
The driver does NOT automatically switch to the resolution detected. Use the command:
pi@raspberrypi:~ $ v4l2-ctl --query-dv-timings
Active width: 1280
Active height: 720
Total width: 1650
Total height: 750
Frame format: progressive
Polarities: -vsync -hsync
Pixelclock: 74250000 Hz (60.00 frames per second)
Horizontal frontporch: 0
Horizontal sync: 370
Horizontal backporch: 0
Vertical frontporch: 0
Vertical sync: 30
Vertical backporch: 0
Standards:
Flags:
You MUST set the timings via “v4l2-ctl –set-dv-bt-timings”. You can pass in an index to the detected mode, or use:
v4l2-ctl --set-dv-bt-timings query
to select the currently detected timings.
v4l2-ctl -V
should now reflect the resolution detected. 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
Check that the audio drivers / card is available to ALSA.
pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: tc358743 [tc358743], device 0: bcm2835-i2s-dir-hifi dir-hifi-0 [bcm2835-i2s-dir-hifi dir-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
Note: card 1 means that the card number for the TC358743XBG is “1” and it might be different.
Install GStreamer tool.
sudo apt install gstreamer1.0-tools
Check gstreamer tool version:
pi@raspberrypi:~ $ gst-launch-1.0 --version
gst-launch-1.0 version 1.18.4
GStreamer 1.18.4
http://packages.qa.debian.org/gstreamer1.0
Note: Different versions have different command line parameters, which is very annoying.
Use gstreamer to record video and audio
#GStreamer v1.14 command
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.
foo.mkv is the output file. If your gstreamer is version 1.8 or above, you can try the following test command. In addition, alsasrc device=hw:1 represents the sound card of TC358743, you can use “arecord -l” to query.
#The command to recode a video with audio. (GStreamer 1.18.4)
gst-launch-1.0 -vvv v4l2src ! "video/x-raw,framerate=30/1,format=UYVY" ! v4l2h264enc extra-controls="controls,h264_profile=4,h264_level=13,video_bitrate=256000;" ! "video/x-h264,profile=high, level=(string)4.2" ! 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.
#The sample command to recode a video without audio. (C779 doesn't support audio)
gst-launch-1.0 -vvv v4l2src ! "video/x-raw,framerate=30/1,format=UYVY" ! v4l2h264enc extra-controls="controls,h264_profile=4,h264_level=13,video_bitrate=256000;" ! "video/x-h264,profile=high, level=(string)4.2" ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv
Press CTRL+C to end recording.
PS: We recommend that you modify the above framerate parameter to the actual frame rate of your HDMI signal,
the actual frame rate value is from the result of ‘v4l2-ctl –query-dv-timings’ command.
For the above HDMI device, because the frame rate is 60, so we modify the framerate parameter to 60 like the followint command.
Record the video only:
gst-launch-1.0 -vvv v4l2src ! "video/x-raw,framerate=60/1,format=UYVY" ! v4l2h264enc extra-controls="controls,h264_profile=4,h264_level=13,video_bitrate=256000;" ! "video/x-h264,profile=high, level=(string)4.2" ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv
Record the video and audio: (if your shield supports audio also)
gst-launch-1.0 -vvv v4l2src ! "video/x-raw,framerate=60/1,format=UYVY" ! v4l2h264enc extra-controls="controls,h264_profile=4,h264_level=13,video_bitrate=256000;" ! "video/x-h264,profile=high, level=(string)4.2" ! 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.
Note: alsasrc device=hw:1 – “1” means the audio card number, You must change to correct audio card number. (Query the car number via ‘arecord –l’, refer to step 9)
Pi5B & CM5
"
The Raspberry Pi image used is: 2025-05-13-raspios-bookworm-arm64-full.img.xz
, with the kernel version:
Linux raspberrypi 6.12.25+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.25-1+rpt1 (2025-04-30) aarch64 GNU/Linux
.
First, add the following two lines to /boot/firmware/config.txt
:
dtoverlay=tc358743,4lane=1
dtoverlay=tc358743-audio
After adding the driver configuration, restart the Raspberry Pi for it to take effect. If the configuration is correct, execute ls /dev/video*
in the terminal, and you should see video devices listed:
pi@raspberrypi:~/Desktop $ ls /dev/video*
/dev/video0 /dev/video19 /dev/video20 /dev/video22 /dev/video24 /dev/video26 /dev/video28 /dev/video3 /dev/video31 /dev/video33 /dev/video35 /dev/video5 /dev/video7
/dev/video1 /dev/video2 /dev/video21 /dev/video23 /dev/video25 /dev/video27 /dev/video29 /dev/video30 /dev/video32 /dev/video34 /dev/video4 /dev/video6
Next, create an EDID file for 1080p60Hz by executing nano 1080p60edid
in the terminal. The content of this file is as follows:
00 ff ff ff ff ff ff 00 52 62 00 37 00 00 00 00
01 1b 01 03 80 46 28 78 0a cf 74 a3 57 4c b0 23
09 48 4c 21 08 00 b3 00 95 00 a9 40 90 40 81 00
81 80 81 40 01 01 02 3a 80 18 71 38 2d 40 58 2c
45 00 00 d0 52 00 00 1e 02 3a 80 d0 72 38 2d 40
10 2c 45 80 00 d0 52 00 00 1e 00 00 00 fc 00 33
32 46 48 44 5f 4c 43 44 5f 54 56 0a 00 00 00 fd
00 30 3e 0f 46 11 00 0a 20 20 20 20 20 20 01 38
02 03 30 f1 52 10 9f 04 13 05 14 03 02 11 12 20
21 22 15 16 01 06 07 2c 09 07 07 15 07 50 57 06
00 3f 06 c0 83 01 00 00 67 03 0c 00 10 00 b0 2d
01 1d 80 3e 73 38 2d 40 7e 2c 45 80 00 d0 52 00
00 1e 01 1d 80 d0 72 1c 2d 20 10 2c 25 80 00 d0
52 00 00 9e 01 1d 00 bc 52 d0 1e 20 b8 28 55 40
00 d0 52 00 00 1e 01 1d 80 18 71 1c 16 20 58 2c
25 00 00 d0 52 00 00 9e 00 00 00 00 00 00 00 8f
Then, create a test script by executing nano testC7xx.sh
in the same directory. The content of this script is as follows:
#!/bin/bash
MEDIADEVICE=-1
#SELECT RESOLUTION VALID VALUES (720p60edid, 1080p25edid, 1080p30edid, 1080p50edid, 1080p60edid)
VIDEDID=1080p60edid
# Finding Media Device
i=0
while true ; do
MEDIADEVICE=$(udevadm info -a -n /dev/media$i | grep --line-buffered 'DRIVERS=="\rp1-cfe"' | while read -r line; do echo $i ; done)
if ! [[ $MEDIADEVICE = '' ]]; then
break
fi
i=$((i+1))
done
#v4l2-ctl --list-devices
# Locate the node corresponding to tc358743 as v4l-subdev2, and the pad0 of rp1-cfe-csi2_ch0 as video0:
#media-ctl -d /dev/media$MEDIADEVICE -p
# Loading Driver
v4l2-ctl -d /dev/v4l-subdev2 --set-edid=file=$VIDEDID --fix-edid-checksums
# Wait drive loads
sleep 5s
# To query the current input source information, if the resolution displays as 0, it indicates that no input source signal has been detected. In this case, you should check the hardware connections and follow the steps mentioned above to troubleshoot.
v4l2-ctl -d /dev/v4l-subdev2 --query-dv-timings
# Confirm the current input source information.
v4l2-ctl -d /dev/v4l-subdev2 --set-dv-bt-timings query
# Initialize media
media-ctl -d /dev/media$MEDIADEVICE -r
# Connect CSI2's pad4 to rp1-cfe-csi2_ch0's pad0.
media-ctl -d /dev/media$MEDIADEVICE -l ''\''csi2'\'':4 -> '\''rp1-cfe-csi2_ch0'\'':0 [1]'
# Configure the media node.
media-ctl -d /dev/media$MEDIADEVICE -V ''\''csi2'\'':0 [fmt:RGB888_1X24/1920x1080 field:none colorspace:srgb]'
media-ctl -d /dev/media$MEDIADEVICE -V ''\''csi2'\'':4 [fmt:RGB888_1X24/1920x1080 field:none colorspace:srgb]'
media-ctl -d /dev/media$MEDIADEVICE -V ''\''tc358743 11-000f'\'':0 [fmt:RGB888_1X24/1920x1080 field:none colorspace:srgb]'
#Set the output format.
v4l2-ctl -v width=1920,height=1080,pixelformat=RGB3
# test frames
v4l2-ctl --stream-mmap=3 --stream-count=10 --stream-to=test.yuv
Finally, execute the script in the terminal using bash testC7xx.sh
. The output should look like this:
pi@raspberrypi:~/Desktop $ bash testC7xx.sh
Active width: 1920
Active height: 1080
Total width: 2200
Total height: 1125
Frame format: progressive
Polarities: -vsync -hsync
Pixelclock: 148500000 Hz (60.00 frames per second)
Horizontal frontporch: 0
Horizontal sync: 280
Horizontal backporch: 0
Vertical frontporch: 0
Vertical sync: 45
Vertical backporch: 0
Standards:
Flags:
BT timings set
<<<<<<<<<<
If you have installed the Raspberry Pi desktop version, you can use ffplay
to directly play the YUV file:
ffplay -f rawvideo -video_size 1920x1080 -pixel_format bgr24 test.yuv
On a Windows computer, you can use software like 7yuv to view the .yuv
file. For tutorials with an input format of 1920x1080, select BGR888
in the top-right corner of 7yuv and set the resolution to 1920x1080 to view the captured frames.