HDMI-IN
The Neardi-3588 has an HDMI-IN port, which can be developed to implement the HDMI IN function through the HDMI RX module.
Supported platforms: Android, Linux platforms
Supports up to 4K@60fps resolution
Supports hot-plugging for HDMI IN, as well as recording functionality
Supports configurable EDID, HDCP1.4/HDCP2.3, and CEC
Using HDMI-IN on Android
The default version includes HDMI-IN functionality. Burn the Neardi-3588 firmware from Baidu Netdisk For the burning method, please refer to the chapter 《 Upgrading Firmware with a Type-C Cable》一章。
After burning, open the system HDMI IN application to verify functionality.
The source code path for HDMIIN APK:
rkCamera2: SDK/packages/apps/rkCamera2
Using HDMI-IN on Linux
The default node for Neardi-3588 HDMI-IN is /dev/video40
。
Execute the following command:
export GST_VIDEO_CONVERT_USE_RGA=1
gst-launch-1.0 v4l2src device=/dev/video40 ! kmssink plane-id=54 -v
The plane-id is obtained through the following command:
cat /sys/kernel/debug/dri/0/state | grep plane
Obtain the plane-id with the following command:
neardi@LPA3588:~$ gst-launch-1.0 v4l2src device=/dev/video40 ! kmssink plane-id=54 -v
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 1920
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 1080
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)NV24, width=(int)1920, height=(int)1080, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = video/x-raw, format=(string)NV24, width=(int)1920, height=(int)1080, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:18.453012117
Setting pipeline to NULL ...
Freeing pipeline ...
FAQ
How to obtain device information
neardi@LPA3588:~$ v4l2-ctl -d /dev/video40 -V -D
Driver Info:
Driver name : rk_hdmirx
Card type : rk_hdmirx
Bus info : fdee0000.hdmirx-controller
Driver version : 5.10.110
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Format Video Capture Multiplanar:
Width/Height : 1920/1080
Pixel Format : 'NV24' (Y/CbCr 4:4:4)
Field : None
Number of planes : 1
Flags : premultiplied-alpha, 0x000000fe
Colorspace : SMPTE 170M
Transfer Function : Unknown (0x000000b8)
YCbCr/HSV Encoding: Unknown (0x000000ff)
Quantization : Default
Plane 0 :
Bytes per Line : 1920
Size Image : 6220800
HDMI-IN not displaying
Verify with v4l2-ctl
image capture
Scenario one:
v4l2-ctl -d /dev/video40 --set-fmt-video=width=1920,height=1080,pixelformat=BGR3 --stream-mmap=3 --stream-skip=3 --stream-to=/tmp/1920x1080-hdmiin.out --stream-count=1 --stream-poll >/dev/null
<<<<
If it returns <<<<
,it indicates that the hardware and HDMI cable are normal. Then check the topology structure and Format.
Check the Format:
v4l2-ctl -d 0 -V
Scenario two:
neardi@LPA3588:~$ v4l2-ctl -d /dev/video40 --set-fmt-video=width=1920,height=1080,pixelformat=BGR3 --stream-mmap=3 --stream-skip=3 --stream-to=/tmp/1920x1080-hdmiin.out --stream-count=1 --stream-poll >/dev/null
select timeout
If it returns select timeout
,check whether the HDMIIN cable is firmly plugged in or try a different cable.
How to debug audio
You can record the input audio using the tinycap
command.
Check the sound card devices
neardi@LPA3588:~$ cat /proc/asound/card*
cat: /proc/asound/card0: Is a directory
cat: /proc/asound/card1: Is a directory
cat: /proc/asound/card2: Is a directory
0 [rockchipes8388 ]: rockchip_es8388 - rockchip,es8388
rockchip,es8388
1 [rockchiphdmiin ]: rockchip_hdmiin - rockchip,hdmiin
rockchip,hdmiin
2 [rockchiphdmi0 ]: rockchip-hdmi0 - rockchip-hdmi0
rockchip-hdmi0
The sound card number for hdminrx is 1
,You can run the following command to record and play audio when there is audio input on HDMI-IN.
Record audio
neardi@LPA3588:~$ tinycap /sdcard/test.wav -D 1 -d 0