1. IntroductionFunction

: Input one HDMI signal and output the same HDMI signal. This HDMI signal is retimed and the audio signal is decoded. It can output S/PDIF and LINE OUTApplication: HDMI extender, HDMI retimer, HDMI audio separator, etc.
Background of the problem:
At extremely high data transmission rates like HDMI, the signal quality will significantly decrease with the increase of PCB or cable length. The transmission distance of HDMI data cable with nearly lossless image quality is within 15 meters, and the longest cannot exceed 30 meters. Cables over 30 meters will suffer serious signal loss. For example, if you use a 20-meter HDMI cable to output from the computer to the monitor, it is very susceptible to interference in the process. If there is an interference source in the middle of the HDMI cable, it will cause picture jitter and loss. The 10-meter HDMI cable has relatively less interference (the interference degree increases exponentially with the length of the HDMI cable), and if you add an HDMI retimer in the middle of 10 meters and then another 10 meters to the monitor, the signal quality will be much better.
HDMI retiming buffer is used as automatic equalization and clock retiming of HDMI high-speed signal, making the picture clear and stable, not susceptible to interference, and reducing jitter and signal delay caused by long-distance transmission.
It is similar to the redstone repeater in the game of Minecraft. It acts as a signal relay. Principle: Use MS9331 for HDMI retiming and separate I2S and S/PDIF audio. The I2S signal is transferred to CS4344 for LINE OUT, and MS8005 is used as IIC to control MS9331.
Block diagram:


The following is the introduction of MS9331 chip:
MS9331 is an HDMI signal retiming chip with a signal rate of up to 3Gbps, and supports I2S and S/PDIF output. At 3Gbps rate, MS9331 can support HDMI signals with resolutions of 4KX2K@30Hz and 4KX2K (YCbCr420)@60Hz. It can also support 10/12/16-bit color depth. The clock and data recovery function of the HDMI input can adapt to cables of different lengths and qualities, so that the TMDS signal transmitted at high speed always has the best function. The HDMI output has a signal pre-emphasis function and can support long-line output. MS9331 integrates internal EDID RAM and HDCP KEY RAM.
In WIN10, the audio output device is MS-HDMI-RX. The audio output

supports the following formats (for optical fiber).



Regarding the color difference of N cards
, there will be color difference when using N cards to connect to the screen output on the computer. This is a problem with N card recognition. The display will be white. Currently, GTX960 RTX4070ti has this problem.
The solution is as follows:
1. Open the NV control panel
2. Under the [Change Resolution] item on the control panel, select the corresponding MS-RX display and pull down to the bottom

3. Change the output dynamic range to full, and then apply it
2. The circuit attention point

is mainly the input end here. The working process is: after HDMI is inserted, the voltage is divided to 3.3V through HDMI5V_IN. After the HDMIRXDET pin is detected, the MS9331 communicates with the input device to obtain EDID. After the communication is completed, the MS9331 will send a high-level signal from HDMIRXHPD back to the input device, indicating that the MS9331 is ready and can transmit data.
The HDMIRXHPD pin outputs only 0.7V, so two NPN tubes are needed for amplification. Note that the 3904 tube must be used here, and do not use other NPN transistors, otherwise the amplification parameters need to be readjusted. The HDMI part adopts 100 ohm impedance, and the board thickness is 1.0mm

for free. 3. Chip purchase: MS9331 is controlled by IIC. As usual, the specification and register table of MS chips are not available. However, like the previous MS9332 and MS9334, Ma Yun has matching ICs for MS8005 for sale on the Internet, so you can use the ready-made ones without programming. https://item.taobao.com/item.htm?spm=a1z09.2.0.0.5f152e8dYHRKFr&id=691533336994&_u=hqavhl8b1f1 4. The acrylic shell is drawn using SolidWorks, and there are dxf and dwg screws that can be ordered directly : M3X6+6: 4 pcs M3X14+3: 4 pcs M3 copper hexagonal nut: 4 pcs cross thin head machine screw M3x6: 4 pcs Acrylic thickness of 3mm is not imported into the LiChuang panel project, because the LiChuang panel is more expensive, you can take it to Taobao, the price is about 25 (LiChuang does not have 3mm, even 2mm costs 30 and does not include shipping) 5. Summary MS9331 does not generate too much heat when in use, and you can add a heat sink depending on the situation. Recommended level of project: Hardware beginner ~ entry-level project cost: The main control chip will be more expensive by about 15, and the total cost below 20 is acceptable. The shell is about 25 yuan. Finally - I am not optimistic about the current use of switches (sad) and have joined the switch army (a mess). Left: Fiber 4 in 1 out switch: https://oshwhub.com/aknice/guang-xian-4-jin-1-chu-qie-huan-qi Middle and upper: High-speed USB3.0 sharer 4 in 4 out selection HUB + switch: https://oshwhub.com/aknice/vl822-ch484m-si-jin-si-chu-usb3-0-hub There is a USB2 version: USB HUB switch 4 in 4 out: https://oshwhub.com/Aknice/e3a68120fa8d49ff8bc50ad21d57ec9d Middle and lower: This project. Originally it was a 1 in 2 out and then VGA to audio out audio and output HDMI: HDMI in HDMI + VGA + analog audio out converter: https://oshwhub.com/aknice/ms9332-ms8005-demo Based on: HDMI to VGA: https://oshwhub.com/Aknice/79fa85e6986e4af98d808872469bf327 Can also be used 1 in 4 out: https://oshwhub.com/aknice/hdmi-1-jin-4-chu-tong-ping-qi Top right: HDMI 5 in 1 out switcher: https://oshwhub.com/Aknice/83d25e9c5f9240499dfcd01eeaa45b82 There is also HDMI 3-input 1-output switch: https://oshwhub.com/Aknice/1dfda80b41104751846aecc99dd9e055






Lower right: Lossless audio 4-to-1 switcher: https://oshwhub.com/aknice/yin-pin-4-qie-1-qie-huan-qi-bu-gong-di
The entire block diagram is easy for everyone to understand.

Currently, all output devices can actually enter HDMI, and then perform audio conversion through this project. In the past, DVD players used optical fiber, computers used AUX, and game consoles used the previous MS9332 to transfer VGA analog audio and then use AUX, resulting in the audio side using both AUX and optical fiber, which would be troublesome to switch on the audio side.
Now if all go through HDMI, you only need to operate HDMI5 in and 1 out to achieve audio switching, and the output can be through AUX or optical fiber, and these two switches do not need to be switched.
It seems that a lot of switch, HDMI, and distributor related projects have been done above, so if I have time, I will make a super KVM to make the wires less messy.