The hantro g1 support for rk3568 is already merged in linux-next: https://patchwork.kernel.org/project/linux-rockchip/patch/20220214212955.1178947-1-piotr.oniszczuk@gmail.com/. And armbian has this patch applied in edge kernel 5.18. And my armbian image also supports it: https://github.com/amazingfate/armbian-rock3a-images/. I use my armbian jammy gnome image to test kodi.
Video hardware decode is only support in kodi gbm mode now, but still not working out of box because of 2 reasons:
1, mesa is compiled with swrast support, so kodi gbm will start in software rendering, which doesn’t support gpu rendering. I’ve confirmed that mesa has nothing to do with kodi hardware acceleration.
2, kodi from debian is build with -DAPP_RENDER_SYSTEM=gl
, but we need gles instead.
So I’ve rebuild mesa without swrast and kodi with gles render system. After install missing font packages fonts-noto-core fonts-roboto-hinted fonts-noto-mono
, I can start kodi gbm by running command kodi-standalone --windowing=gbm
. At first my screen is black with no video input
, replugging the HDMI would help showing the kodi window.
In Settings -> Player -> Videos, enable Allow using DRM PRIME decoder
and Allow hardware acceleration with DRM PRIME
, you can now play h264 video up to 1080p@60fps with hardware decode. I can play bbb_sunflower_1080p_60fps_normal.mp4 with cpu load less than 40%.
Here is the mesa kodi and ffmpeg debs I’ve built for armbian jammy: https://drive.google.com/drive/folders/1Qq7bALtY02He3jPM1gLuX1hz2vrLYXTl?usp=sharing. You can use apt to install on your armbian jammy, for example:
sudo apt install ./kodi_19.4+dfsg1-2_arm64.deb ./kodi-bin_19.4+dfsg1-2_arm64.deb ./kodi-data_19.4+dfsg1-2_all.deb --reinstall
sudo apt install ./ffmpeg_4.4.1-3ubuntu9_arm64.deb ./libavcodec-dev_4.4.1-3ubuntu9_arm64.deb ./libavcodec58_4.4.1-3ubuntu9_arm64.deb ./libavdevice-dev_4.4.1-3ubuntu9_arm64.deb ./libavdevice58_4.4.1-3ubuntu9_arm64.deb ./libavfilter-dev_4.4.1-3ubuntu9_arm64.deb ./libavfilter7_4.4.1-3ubuntu9_arm64.deb ./libavformat-dev_4.4.1-3ubuntu9_arm64.deb ./libavformat58_4.4.1-3ubuntu9_arm64.deb ./libavutil-dev_4.4.1-3ubuntu9_arm64.deb ./libavutil56_4.4.1-3ubuntu9_arm64.deb ./libpostproc-dev_4.4.1-3ubuntu9_arm64.deb ./libpostproc55_4.4.1-3ubuntu9_arm64.deb ./libswresample-dev_4.4.1-3ubuntu9_arm64.deb ./libswresample3_4.4.1-3ubuntu9_arm64.deb ./libswscale-dev_4.4.1-3ubuntu9_arm64.deb ./libswscale5_4.4.1-3ubuntu9_arm64.deb --reinstall
Update: wayland also support hardware decode, setting the same options as gbm above will make it.