-

C792: Difference between revisions

From Geekworm Wiki
Jump to navigation Jump to search
Rita (talk | contribs)
Replace <comments/> with <comment-streams />
 
(46 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{GD Template Impl}}
{{GD Template Impl}}
[[File:C792-IMG-9541.jpg|thumb|right|C792]]
[[File:C792-IMG-9541.jpg|thumb|right|C792 front view]]
[[File:C792-IMG-9542.jpg|thumb|right|C792]]
[[File:C792-IMG-9542.jpg|thumb|right|C792 rear view]]
[[File: C792-Packing-List.jpg|500px]]
[[File:C792-IMG-9541-size.jpg|thumb|right|C792]]
==Overview==
[[File:C792-IMG-9541-interface.jpg|thumb|right|C792]]
The C792 is an HDMI to CSI-2 converter module with HDMI loop out that supports I2S audio output.
[[File:C792-IMG-9541-Application.jpg|thumb|right|C792]]
<span class="tb_red">'''Important Notice'''</span>
*This product is designed for advanced Raspberry Pi users and may <span class="tb_red">not be suitable for beginners.</span>
*The Raspberry Pi 5 lacks hardware-accelerated H.264 encoding, resulting in lower image capture performance than the Pi 4B and high CPU usage at 1080p
*For stable operation, we strongly recommend <span class="tb_red">powering the module separately via the 5V power port.</span>


The HDMI input supports up to 4K 60Hz, and the HDMI loop out screen is consistent with the HDMI input screen.


CSI-2 output support up to 1080p 60Hz (4K screen will be automatically scaled to 1080p, the refresh rate remains unchanged).
==Overview==
The C792 is an HDMI-to-MIPI CSI-2 converter module <font color=red>with HDMI loop out</font> and I2S audio output support.
:'''HDMI Input:''' Supports up to 4K@60Hz, and the HDMI loop-out outputs the same content synchronously as the input.
:'''CSI-2 Output:''' Supports up to 1080p@60Hz (4K input is automatically downscaled to 1080p while keeping the refresh rate).


==Hardware Parameters==
==Working Principle==
* Model: C792
The module's hardware architecture consists of the GSV2001 and TC358743: The GSV2001 handles HDMI signal splitting (one channel for loop‑out display, the other to the TC358743 for processing), and the TC358743 performs HDMI‑to‑CSI‑2 conversion.
* Compatible with Raspberry Pi 5B/4B//3B/Zero/CM5/CM4
* HDMI input: supports up to 1080P60Hz on Raspberry Pi (Only when use with CM4 /CM5/ Pi 5B)
* HDMI to CSI-2 bridge chip:Toshiba TC358743XBG
* 2 CSI-2 channels & clock (Pi 4B/3B and Pi Zero only support 2 lan, max 1080P1080p50Hz, and  Pi CM4 /CM5/ 5B can support 4 lan, max 1080P1080p60Hz)
* The CSI-2 interface, with 15 pin FPC seat, spacing 1.0 mm, is located on the front of the C792 module.
* The CSI-2 interface, with 22 pin FPC seat, spacing 0.5 mm, is located on the back of the C792 module.
* Size: 56 x 56 mm
* Power supply:5V
* Weight: 25g


Important note:
'''HDMI Loop‑out'''
:<span class="tb_red">*When a monitor is connected:</span> The HDMI source detects the physical display.
:<span class="tb_red">*When '''NO''' monitor is connected:</span> The source detects a virtual display (EDID) emulated by the TC358743.


The hardware programme is GSV2001+TC358743, in which GSV2001 realizes HDMI one-part-two function and TC358743 realizes HDMI to CSI-2 function.
'''CSI‑2 Interface'''
:<span class="tb_red">*15‑pin:</span> 2 data lanes, for Raspberry Pi Zero / 3B / 4B, up to 1080p@50Hz
:<span class="tb_red">*22‑pin:</span> 4 data lanes, for Raspberry Pi CM4 / CM5 / 5B, up to 1080p@60Hz


In order to ensure the stability of the module, it is strongly recommended that the module be powered through the 5V power supply interface.
{{HDMI to CSI}}


When the ‘HDMI Loop Out’ is connected to the monitor, the HDMI source detects the monitor connected to the ‘HDMI Loop Out’; when the ‘HDMI Loop Out’ is not connected to the monitor, the HDMI source detects the monitor connected to the TC358743. When ‘HDMI Loop Out’ is not connected to a monitor, the HDMI source detects the monitor emulated by the TC358743.
==Hardware Parameters==
*'''Model:''' C792
*'''Compatible with:''' Raspberry Pi 5B/4B/3B/Zero/CM5/CM4
*'''HDMI input:''' Raspberry Pi hardware is mainly divided into two series, supporting a maximum of either 1080P@60Hz or 1080P@50Hz
:<span class="tb_red">*Up to 1080P@60Hz:</span> CM3, CM4, Pi 5B
:<span class="tb_red">*Up to 1080P@50Hz:</span> Zero, Zero 2, Pi 3B, Pi 4B, etc.
*'''Size:''' 56 x 56 mm
*'''Power supply:''' 5V
*'''Weight:''' 25g


==Packing List==
==Packing List==


* 1 x C790 HDMI to CSI-2 Module
* 1 x C792 HDMI to CSI-2 Module
* 1 x 5V power cable  
* 1 x 5V power cable  
* 1 x 15cm Length FPC 15pin 1.0mm cable (for Pi 4B / 3B / Pi Zero)
* 1 x 15cm Length FPC 15pin 1.0mm cable (for Pi 4B / 3B / Pi Zero)
Line 39: Line 48:
[[File:C792-IMG-9541-Packing list.jpg|500px]]
[[File:C792-IMG-9541-Packing list.jpg|500px]]


==User Manual==
==User Manual - C792 / C790 / C779 Software Demo==
<!-- 可以参考bli的说明
<!-- 可以参考bli的说明
https://wiki.blicube.com/blikvm/zh/hdmi-csi-i2s/#demo  
https://wiki.blicube.com/blikvm/zh/hdmi-csi-i2s/#demo  
-->
-->
{{C792-Software}}
----
Here are a few tutorials:
* Similar Products Guide: [[X1300 Software]]
* Tutorial from customers: [https://github.com/geekworm-com/RPi5_hdmi_in_card RPi5_hdmi_in_card]
* '''Due to the absence of hardware encoding on the Pi 5B, the software usage instructions for Pi platforms are currently divided into two sections: Pi 5B configuration and configuration for other Pi platforms.'''
* '''Due to the absence of hardware encoding on the Pi 5B, the software usage instructions for Pi platforms are currently divided into two sections: Pi 5B configuration and configuration for other Pi platforms.'''
* <span style="color:red">'''Pi 5B platforms HDMI to CSI module test demo reference: '''</span> [[CSI Manual on Pi 5]]
* <span style="color:red">'''Pi 5B platforms HDMI to CSI module test demo reference: '''</span> [[CSI Manual on Pi 5]]
* Refer to: https://wiki.blicube.com/blikvm/zh/C792/
* Possible software problems: [https://github.com/raspberrypi/firmware/issues/1915 ISP freezes with new firmware] and [https://github.com/raspberrypi/firmware/issues/1904 Raspberry Pi 5 firmware ignores and responds with incorrect frame buffer pixel depth information]
<!--Add review function! -->
* Also refer to: https://wiki.blicube.com/blikvm/en/C792/
<comments />
 
<!--Please choose the  -->
<!--Remove other categories, just keep the appropriate categories -->


[[Category:Product Manual]]
[[Category:Product Manual]]
[[Category:Raspberry pi]]
[[Category:Raspberry pi]]


==FAQ==
<!-- ==FAQ==
<!-- 这里提供了一个Q&A的模板,增加Q&A时按照下面的格式写就可以了 -->
这里提供了一个Q&A的模板,增加Q&A时按照下面的格式写就可以了 -->
<!-- 这是注释
 
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
<div style="font-weight:bold;line-height:1.0;">
<div style="font-weight:bold;line-height:1.0;">
Line 65: Line 77:
</div>
</div>
</div>
</div>
-->


<!--Add review function! -->
<!--Add review function! -->
<comments />
<comment-streams id="main" />


<!--Please choose the  -->
<!--Please choose the  -->

Latest revision as of 10:12, 27 May 2026

C792 front view
C792 rear view
C792
C792
C792

Important Notice

  • This product is designed for advanced Raspberry Pi users and may not be suitable for beginners.
  • The Raspberry Pi 5 lacks hardware-accelerated H.264 encoding, resulting in lower image capture performance than the Pi 4B and high CPU usage at 1080p
  • For stable operation, we strongly recommend powering the module separately via the 5V power port.


Overview

The C792 is an HDMI-to-MIPI CSI-2 converter module with HDMI loop out and I2S audio output support.

HDMI Input: Supports up to 4K@60Hz, and the HDMI loop-out outputs the same content synchronously as the input.
CSI-2 Output: Supports up to 1080p@60Hz (4K input is automatically downscaled to 1080p while keeping the refresh rate).

Working Principle

The module's hardware architecture consists of the GSV2001 and TC358743: The GSV2001 handles HDMI signal splitting (one channel for loop‑out display, the other to the TC358743 for processing), and the TC358743 performs HDMI‑to‑CSI‑2 conversion.

HDMI Loop‑out

*When a monitor is connected: The HDMI source detects the physical display.
*When NO monitor is connected: The source detects a virtual display (EDID) emulated by the TC358743.

CSI‑2 Interface

*15‑pin: 2 data lanes, for Raspberry Pi Zero / 3B / 4B, up to 1080p@50Hz
*22‑pin: 4 data lanes, for Raspberry Pi CM4 / CM5 / 5B, up to 1080p@60Hz

Geekworm HDMI to CSI Module Series:

Convert HDMI signal acquisition into CSI signal and I2S audio signal. The maximum capture resolution depends on the HDMI to CSI converter board as well as the Raspberry Pi hardware.


Raspberry Pi hardware are primarily divided into two series, one supporting a maximum of 1080P@60Hz and the other supporting a maximum of 1080P50Hz.

  • Raspberry Pi versions that support up to 1080P60Hz: CM3, CM4, Pi 5B
  • Raspberry Pi versions that support up to 1080P50Hz: zero, zero2, Pi3B, Pi4B, etc.
Picture Model Description Max Input Resolution Matching Case I2S Audio HDMI Capture Chip PCB Dimension CSI-2 Connector Supported SOC
C790 HDMI to CSI-2 1080p@60fps None Yes
with 1 x I2S cable (15cm length)
Toshiba TC358743XBG 30 x 45 mm
  • 15-PIN FPC (pitch 1.0 mm) on the front of C790
  • 22-PIN FPC (pitch 0.5 mm) on the rear of C790
Pi 5B / 4B / 3B+ / 3B / 3A+ / Zero / Zero W/ Zero 2W / CM3 / CM4
C792 HDMI to CSI-2 with HDMI OUT loop
  • 1080P@60Hz for Pi 5B, CM4, CM3,
  • 1080P@50Hz for zero, zero2, Pi3B, Pi4B
None Yes
with 1 x I2S cable (15cm length)
Toshiba TC358743XBG 56 x 56 mm
  • 15-PIN FPC (pitch 1.0 mm) on the front of C792
  • 22-PIN FPC (pitch 0.5 mm) on the rear of C792
Pi 5B / 4B / 3B+ / 3B / Zero / Zero W/ Zero 2W / CM3 / CM4
X630 HDMI to CSI-2 1080p@50fps X630-C1 Yes, but I2S wiring or the X1300-A2 accessory board is necessary Toshiba TC358743XBG 30 x 42.4 mm 15-PIN FPC (pitch 1.0 mm) 4B / 3B+ / 3B / 3A+ / Zero W / Zero 2W
X1300 HDMI RX to MIPI CSI-2-TX 1080p@60fps X1300-C1 Yes, but I2S wiring or the X1300-A2 accessory board is necessary Toshiba TC358743XBG 30 x 37.5 mm 22-PIN FPC (pitch 0.5 mm) Pi 5B / CM4 IO
X1301 HDMI RX to MIPI CSI-2-TX HDMI loop output 1080p@60fps X1301-C1 Yes Toshiba TC358743XBG 57 x 85.5 mm 22-PIN FPC (pitch 0.5 mm) Pi 5B / 4B / 3B / 3B+ / 3A+ / CM4 IO
C779 HDMI to CSI-2 1080p@50fps None NO Toshiba TC358743XBG 35 x 50 mm 15-PIN FPC (pitch 1.0 mm) Pi 5B / 4B / 3B+ / 3B / 3A+ / Zero / Zero W/ Zero 2W
X1300-A2 I2S audio accessory board for X630 / X1300 1080p@60fps None This is a I2S audio accessory board - 57 x 65 mm -
  • work with X1300 HDMI to CSI-2 for Raspberry Pi 5B, CM4 IO board
  • work with X630 HDMI to CSI-2 for Raspberry Pi 4B, 3B+ and 3B

Hardware Parameters

  • Model: C792
  • Compatible with: Raspberry Pi 5B/4B/3B/Zero/CM5/CM4
  • HDMI input: Raspberry Pi hardware is mainly divided into two series, supporting a maximum of either 1080P@60Hz or 1080P@50Hz
*Up to 1080P@60Hz: CM3, CM4, Pi 5B
*Up to 1080P@50Hz: Zero, Zero 2, Pi 3B, Pi 4B, etc.
  • Size: 56 x 56 mm
  • Power supply: 5V
  • Weight: 25g

Packing List

  • 1 x C792 HDMI to CSI-2 Module
  • 1 x 5V power cable
  • 1 x 15cm Length FPC 15pin 1.0mm cable (for Pi 4B / 3B / Pi Zero)
  • 1 x 15cm Length FPC 22pin 0.5mm cable (for Pi 5B / CM5 / CM4)
  • 1 x I2S cable

User Manual - C792 / C790 / C779 Software Demo

  • This guide also applies to C790 and C779.
  • This guide depends on the version of the official Raspberry Pi OS you are using; instructions vary by OS version.
  • Please contact us if you encounter any issues during use.


Preparation

For kernel driver usage, ensure your system is updated. As the 5.4 kernel included key changes, these guidelines are valid for kernel 5.4 and newer releases. Verify your kernel version with uname -a; if it is below 5.4, fix this before continuing.

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l GNU/Linux

1. Update and upgrade your Raspberry Pi system (time required varies by country/region).

sudo apt-get update
sudo apt-get upgrade

2. Enable the camera module (enabled by default on Raspberry Pi Bullseye OS).

sudo raspi-config
sudo reboot

3. Go to Interface Options, select Camera and enable it. Select Finish, then reboot your Raspberry Pi. (Reboot is required!)



As the Raspberry Pi 5 lacks hardware encoding support, the software instructions for Raspberry Pi platforms are currently split into two sections:

  • For other Raspberry Pi platforms (Pi Zero, Zero 2, Pi 3B, Pi 4B…)
  • For Pi 5 & CM5

Demo for All Raspberry Pi Models Except Pi 5 & CM5

The HDMI to CSI Module Example for Pi 4B, Pi 3B, Pi Zero 2, Pi Zero…

[STEP1]

  • Edit the /boot/firmware/config.txt file (sudo privileges required):
sudo nano /boot/firmware/config.txt


[STEP2]

  • Add the line:
dtoverlay=tc358743
  • Add the line if your shield support audio like C790 or C792:
dtoverlay=tc358743-audio
  • Add the line only if: your device (e.g., C790/C792) supports a 22-pin connector with all 4 lanes connected, and the compute module has the CAM1 interface with all 4 lanes connected:
dtoverlay=tc358743,4lane=1


[STEP3]

  • Use the following command to check the amount of memory allocated to the CMA heap:
dmesg | grep cma
  • The first line should look like:
pi@raspberrypi:~ $ dmesg | grep cma
[0.000000] cma: Reserved 256 MiB at 0x000000001ec00000
  • If the reported CMA allocated memory is less than 96MB, edit the /boot/cmdline.txt file and add the following at the start of the line (do not add a newline character):
cma=96M


[STEP4]

  • Reboot the device. If everything works properly, you should see the /dev/video0 device, and running the following command will show it is provided by Unicam:
v4l2-ctl --list-devices


[STEP5]

  • After connecting all cables, power on the Raspberry Pi and enter the commands below:
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
NOTE: This driver gives full control to the user or the user's applications. By default, no EDID (Extended Display Identification Data) is loaded in the chip, so it cannot inform the HDMI source of the supported resolutions.
  • Several EDID editors are available on the market. You need to first create an edid.txt file (you can use the command nano edid.txt to create and edit the file), then copy the content below into the edid.txt file:
00ffffffffffff005262888800888888
1c150103800000780aEE91A3544C9926
0F505400000001010101010101010101
010101010101011d007251d01e206e28
5500c48e2100001e8c0ad08a20e02d10
103e9600138e2100001e000000fc0054
6f73686962612d4832430a20000000FD
003b3d0f2e0f1e0a2020202020200100
020321434e041303021211012021a23c
3d3e1f2309070766030c00300080E300
7F8c0ad08a20e02d10103e9600c48e21
0000188c0ad08a20e02d10103e960013
8e210000188c0aa01451f01600267c43
00138e21000098000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
  • After the edid.txt file is created, execute the command v4l2-ctl --set-edid=file=edid.txt --fix-edid-checksums in the terminal, and you will see output similar to the following:
    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


[STEP6]

  • Detect the presence of HDMI signal input at present via 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: 
  • Use the command v4l2-ctl --set-dv-bt-timings query to make the driver automatically set the video timing parameters (such as resolution and frame rate) based on the current HDMI input signal, ensuring the capture card correctly recognizes and processes the current HDMI signal.


The chip supports two formats — BGR3 (default) and UYVY. BGR3 is 24bpp, while UYVY is YUV4:2:2 16bpp.
On the standard two CSI-2 lanes, the data rate allows BGR3 to support up to 1080p30, whereas UYVY can support up to 1080p50.


  • Use the following command to select UYVY (however, your application may override this setting):
v4l2-ctl -v pixelformat=UYVY


[STEP7]

  • Check if the audio driver/sound card is available for 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 the audio card number for the TC358743XBG is 1. This number may vary.


[STEP8]

  • Install the GStreamer tools:
sudo apt install gstreamer1.0-tools
  • Check the 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: Command-line arguments may vary across different versions, which can be confusing.

[Application Example — Using 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 version is 1.8 or higher, you can try the following test command. Additionally, alsasrc device=hw:1 refers to the sound card for TC358743; you can check this with the command arecord -l.

# Command to record 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.

# Example command to record video without audio (C779 does not 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 stop the recording.

Important Note: We recommend you set the above framerate parameter to the actual frame rate of your HDMI signal. You can get this value from the output of the command v4l2-ctl --query-dv-timings.

thumb 600px

For the HDMI device mentioned above, since the frame rate is 60, we set the framerate parameter to 60, as shown in the following command:

  • Record 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 video and audio (if your module supports audio):
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: The "1" in alsasrc device=hw:1 is the sound card number, and you must change it to the correct one. (Check the sound card number with the arecord -l command)

Demo for Raspberry Pi 5 & CM5

NOTICE

*The following tests were performed using the CAM1 channel at an input resolution of 1080P@60Hz.
*Due to the lack of dedicated hardware encoding on Raspberry Pi 5, the image capture performance of Raspberry Pi 5 + C790 is generally lower than that of Raspberry Pi 4B.


Pi5 Platform HDMI-to-CSI Module Test Reference

  • Raspberry Pi image used: 2025-05-13-raspios-bookworm-arm64-full.img.xz
  • 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


[STEP1]

Add the following two lines to the /boot/firmware/config.txt file:

dtoverlay=tc358743,4lane=1
dtoverlay=tc358743-audio


[STEP2]

After adding the driver configuration, restart the Raspberry Pi for the changes to take effect. If the configuration is correct, execute the following command in the terminal: ls /dev/video*. The configuration is successful if video devices appear in the output:

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


[STEP3]

First, execute the command nano 1080p60edid in the terminal to create an EDID file for 1080p60Hz. 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


[STEP4]

Execute nano testC7xx.sh in the same directory to create a test script. The content of this file 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


[STEP5]

Execute bash testC7xx.sh directly in the terminal; the output is as follows:

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 play YUV files directly.
ffplay -f rawvideo -video_size 1920x1080 -pixel_format bgr24 test.yuv 
  • On a Windows PC, you can use tools such as 7yuv to view .yuv files.
  • For the 1920×1080 input format tutorial, select BGR888 in the top-right corner of 7yuv and set the resolution to 1920×1080 to view the two captured frames.

FAQ

Q1: Question 1

A: Place the answer here.

<comments />



Here are a few tutorials: