• 0

RK3399 Legacy Multimedia Framework


JMCC
 Share

18 18

Question

IT'S FINALLY HERE...

background-business-design-star-internet-concept-1626698-pxhere_com.jpg.719bd6b4d02c30003ba20713d391aede.jpg

THE OFFICIAL ROCKCHIP-LEGACY MULTIMEDIA INTEGRATION

 

After two years of using a separate script to enable the multimedia features in RK3399 Legacy Kernel, the whole framework has been incorporated to the official Armbian packaging system. The choice distro for this integration is Debian Buster (see FAQ at the end of this post about the reasons).

 

I. Installation

  1. Download a Armbian Buster Legacy Desktop image for your board, and install it with the standard Armbian method.
  2. Install the complete multimedia solution with
    sudo apt update && sudo apt upgrade
    
    sudo apt install media-buster-legacy-rk3399 --install-recommends

    The switch "--install-recommends" will add the whole Kodi binary addons collection (retro-gaming cores, music visualizations, screensavers, additional media decoders/encoders, vfs, etc.), plus the GLES-to-OpenGL wrapper "gl4es".

 

II. Features

  1. Accelerated GLES/EGL X desktop: No action needed.
  2. Accelerated Chromium, with WebGL and video display acceleration: No action needed
  3. Desktop video player capable of smooth 4K HEVC-HDRUse the "Rockchip Gst Player" from the Multimedia menu, or choose it with right-click on the media file. Command-line 4K playing is also possible with "gst-play-1.0 --videosink=kmssink".
  4. RKMPP-accelerated MPV: Use normally for standard operation (windowed with mouse-operated GUI). For fullscreen, keyboard-operated mode, use the command line switch "--gpu-context=drm" (this will allow you to play smooth 4K).
            - See instructions below, in the next post, for playing YouTube videos up to 4K with this MPV.

  5. ISP Camera with real-time h.264/1080p HW encoding: Using the Gstreamer Plugin. Check this wiki for instructions on how to use it. Most of it applies to Armbian, except for the selection of ov5647/imx219 camera, which must be done using DT overlays.
  6. OpenCL 1.2 support: It will be fully functional, no further action needed. You can download some tests and examples from this link.
  7. Kodi 18.9 Leia with full RKMPP+GBM acceleration, 4K-HDR capable: You can start it from LightDM menu as your user account: 
    kodi-gbm-info.jpg.271beb6d036378968e74faa1f841dcbd.jpg

    Alternatively, you can also run it as a system service with these command lines:
    sudo systemctl disable lightdm
    sudo systemctl enable kodi-gbm
    sudo reboot
  8. Full collection of Kodi binary add-ons: Includes retrogaming cores, media encoders and decoders, PVR, screensavers, vfs and audio visualizations. They are all installed with the package "kodi-addons-full", but are disabled by default. They need to be enabled individually within the Kodi GUI.
  9. OpenGL 2.1 support through the gl4es wrapper: It is installed with the package "gl4es", with no further action needed.

 

III. Sources

This is the list of the sources used for the packages:

 

IV. FAQ

  • ¿Why did you use Debian Buster as a base for this implementation?
    It was the most appropriate for several reasons. Upstream Rockchip-Linux developers use Debian buster, so the software could be ported with less modifications than if we chose a different distro. Besides, it is a completely stable distro, unlike Bullseye, which is a moving target as of today. It also has Chromium as a package, unlike Focal that uses snap instead. For last, it has a good backports repo, with several libs that would otherwise need to be compiled and maintained if we chose, for example, Focal.
     
  • ¿Why Legacy instead of Mainline?
    This is an implementation based on the vendor's BSP kernel. It has been tested and is reliable, which many people will prefer rather than having a bleeding-edge, less stable implementation. In addition to that, Mainline upstream multimedia support is still a WIP, and lacks many features that are only present on Legacy kernels.
     
  • ¿Will you add new features to this implementation?
    No, this implementation will only receive bug fixes if necessary. From now on, all multimedia work will be focused on Mainline and recent distros (like Focal or Bullseye). All new features will go there.
Link to post
Share on other sites

Recommended Posts

Donate and support the project!

  • 0
04.01.2021 в 12:18, JMCC сказал:

What are the steps you follow in Libreelec to enable that feature?  Can you do the same in our Kodi?

LE uses its own settings management system (including audio), which consists of many different additional components (these are not components of KODI itself). For Armbian + mediascript, you must first set the necessary settings in the system (if the system supports them, not all settings are possible in Armbian) and then switch to KODI. In Armbian, the KODI application is limited in setting different hardware settings, it uses system settings.

Link to post
Share on other sites

  • 0
1 hour ago, balbes150 said:

LE uses its own settings management system

Yes, that was my guess. But I wanted the user to do some homework and check it for himself. I personally don't own any surround audio equipment, so if he cares for the feature, he will need to contribute some effort. Otherwise, I won't care either to implement it.

Link to post
Share on other sites

  • 0
22 hours ago, JMCC said:

I tried to reproduce on my NanoPC-t4, but USB-C DP out does not work out of the box, at least with my adapter. I'll need to debug and fix that before getting into the mali issue.

 

OK, that's unlucky. I bought two and only one worked. Good luck and let me know if I can help in any way.

Link to post
Share on other sites

  • 0
17 hours ago, Dee Cheung said:

My Helios64 have the same issue, I use Google USB Type-C to HDMI Adapter.

Sorry, my USB-C to DP/HDMI converter is broken, and I have no plans to make room in my budget for a new one, at least for now. So I cannot debug or fix this problem.

 

TBH, I am very surprised there is people using the Helios64 as a desktop device, I always considered it a NAS :)

Link to post
Share on other sites

  • 0
1 hour ago, JMCC said:

Sorry, my USB-C to DP/HDMI converter is broken, and I have no plans to make room in my budget for a new one, at least for now. So I cannot debug or fix this problem.

 

TBH, I am very surprised there is people using the Helios64 as a desktop device, I always considered it a NAS :)

Not only as a NAS, but also as a media server.:P

Link to post
Share on other sites

  • 0
On 1/11/2021 at 7:37 PM, JMCC said:

That is my punishment for cheaping out on my mother's laptop gift

 

LOL. If you promise not to test it on that fine laptop your mother has, I'll send you one. PM me your Amazon wish-list with it on, or just send your address (whatever is better for you).

Link to post
Share on other sites

  • 0

Hi guys

 

I have a question. I have a Dietpi installed and installed the MM framework. In my case everything is running fine. Exept Nextflix in Kodi because of the missing Widevine DRM. Or maybe it's just the Mali DRM which should do that job. Is there anybody out there who is using Netflix successfully with the MM framework?

Link to post
Share on other sites

  • 0
10 hours ago, Fnoeoe said:

I have a Dietpi installed

No support for anything other than Armbian 

 

10 hours ago, Fnoeoe said:

the missing Widevine DRM.

Yes, I realized it recently. Only 32-bit userspace will have Widevine DRM. I thought to make Kodi run in a 32-bit docker container, but there is no ETA for that project.

Link to post
Share on other sites

  • 0

I bumped into two issues while using the image on RockPro64.

 

1. HDMI display doesn't work on startup.  Cable has to be plugged after bootup process. Relevant logs:

[   26.831117] [drm:dw_hdmi_rockchip_set_property] *ERROR* failed to set rockchip hdmi connector property
[   26.831146] [drm:dw_hdmi_rockchip_set_property] *ERROR* failed to set rockchip hdmi connector property
[   26.831161] [drm:dw_hdmi_rockchip_set_property] *ERROR* failed to set rockchip hdmi connector property
[   26.831173] [drm:dw_hdmi_rockchip_set_property] *ERROR* failed to set rockchip hdmi connector property
[   26.831186] [drm:dw_hdmi_rockchip_set_property] *ERROR* failed to set rockchip hdmi connector property
[   26.831197] [drm:dw_hdmi_rockchip_set_property] *ERROR* failed to set rockchip hdmi connector property

I haven't encountered this issue while using ayufan images. So I guess it has something to do with Armbian legacy kernel build.

 

2. As my main target is using as mpeg-ts playback devices, obviously I immediately tested playback with some udp multicast stream. One stream played okay, but the other one failed after few minutes with following error:

[  216.494654] ------------[ cut here ]------------
[  216.494671] WARNING: at drivers/gpu/drm/drm_atomic_helper.c:1398
[  216.494675] Modules linked in: af_packet lz4hc lz4hc_compress zlib midgard_kbase rockchip_saradc uio_pdrv_genirq uio lzo zram ip_tables x_tables autofs4

[  216.494717] CPU: 3 PID: 318 Comm: kworker/3:2 Not tainted 4.4.213-rockchip64 #4
[  216.494721] Hardware name: Pine64 RockPro64 (DT)
[  216.494742] Workqueue: events rockchip_drm_atomic_work
[  216.494747] task: ffffffc0ed092a00 task.stack: ffffffc0ec0c0000
[  216.494757] PC is at drm_atomic_helper_commit_hw_done+0x60/0x98
[  216.494763] LR is at rockchip_atomic_commit_complete+0xac/0xf0
[  216.494768] pc : [<ffffff80086a165c>] lr : [<ffffff80086de1f0>] pstate: 20000145
[  216.494771] sp : ffffffc0ec0c3cd0
[  216.494775] x29: ffffffc0ec0c3cd0 x28: 0000000000000000 
[  216.494781] x27: 0000000000000000 x26: 0000000000000000 
[  216.494787] x25: ffffffc0f7f1e9e8 x24: 0000000000000000 
[  216.494792] x23: 0000000000000000 x22: ffffffc0ec568840 
[  216.494798] x21: ffffffc0ed209800 x20: 0000000000000000 
[  216.494803] x19: ffffffc0db50c028 x18: 0000000030d00800 
[  216.494809] x17: 0000000000000000 x16: 0000000000000000 
[  216.494815] x15: 0000000000000000 x14: 0000000000000000 
[  216.494820] x13: 0000000000000000 x12: 0000000000000000 
[  216.494826] x11: 0000000000000000 x10: 0000000000000000 
[  216.494831] x9 : 0000000000000000 x8 : 0000000000000000 
[  216.494837] x7 : 0000000000000000 x6 : ffffffc0db50c1a0 
[  216.494843] x5 : 000000326814cc83 x4 : 0000000000000008 
[  216.494848] x3 : 0000000000000000 x2 : ffffff80086e9000 
[  216.494854] x1 : ffffffc0df6b7680 x0 : ffffffc0ed209600 
[  216.494861] 
               PC: 0xffffff80086a15dc:
[  216.494865] 15dc  17ffffd0 a94153f3 a9425bf5 a94363f7 a9446bf9 a94573fb a8c97bfd d65f03c0
[  216.494880] 15fc  a9bd7bfd 910003fd a90153f3 a9025bf5 52800014 aa0003f5 aa1e03e0 d503201f
[  216.494894] 161c  f94002a0 b944b800 6b14001f 540002ed f9401aa1 937d7e80 f8606821 b4000221
[  216.494908] 163c  f94016a1 f8606836 b40001d6 f94012a1 f8606833 f941fe60 f940ec00 b4000040
[  216.494922] 165c  d4210000 91104273 aa1303e0 9416e0d6 910102c0 97e96bd3 aa1303e0 9416e0fa
[  216.494936] 167c  11000694 17ffffe7 a94153f3 a9425bf5 a8c37bfd d65f03c0 a9b87bfd 910003fd
[  216.494950] 169c  a90153f3 a9025bf5 a90363f7 a9046bf9 a90573fb aa0003f5 12001c20 f0007bba
[  216.494964] 16bc  f0003456 9139235a 9136aed6 b90073e0 aa1e03e0 d503201f 9100a6c0 52800019
[  216.494979] 
               LR: 0xffffff80086de170:
[  216.494984] e170  aa1303e0 f9401696 97ff0df4 aa1303e1 aa1403e0 97ff15bd aa1303e1 aa1403e0
[  216.494998] e190  97ff0c4a aa1403e0 97fff2af 394902c0 34000120 f9411ec0 b50000e0 f9400e80
[  216.495012] e1b0  52800001 940b1856 b140041f 9a9f9000 f9011ec0 f9411ec0 b4000080 2a1803e2
[  216.495026] e1d0  2a1703e1 940b31a8 aa1303e1 52800022 aa1403e0 97ff16a7 aa1303e0 97ff0d04
[  216.495040] e1f0  aa1303e1 aa1403e0 97ff0c95 aa1303e1 aa1403e0 97ff0b49 aa1303e0 97ff0e2d
[  216.495054] e210  aa1303e0 97ffa83f aa1503e0 97ebda7b a94153f3 a9425bf5 a94363f7 a8c47bfd
[  216.495069] e230  d65f03c0 a9b97bfd 910003fd a90153f3 a9025bf5 a90363f7 a9046bf9 a90573fb
[  216.495083] e250  aa0003f5 aa0103f3 aa1e03e0 12001c59 d503201f 52800001 aa1303e0 f94016b8
[  216.495097] 
               SP: 0xffffffc0ec0c3c50:
[  216.495102] 3c50  ec568840 ffffffc0 00000000 00000000 00000000 00000000 f7f1e9e8 ffffffc0
[  216.495116] 3c70  00000000 00000000 00000000 00000000 00000000 00000000 ec0c3cd0 ffffffc0
[  216.495130] 3c90  086de1f0 ffffff80 ec0c3cd0 ffffffc0 086a165c ffffff80 20000145 00000000
[  216.495144] 3cb0  ec0c3d00 ffffffc0 086de1e8 ffffff80 ffffffff ffffffff ebb9e000 ffffffc0
[  216.495158] 3cd0  ec0c3d00 ffffffc0 086de1f0 ffffff80 ed209800 ffffffc0 ebb9e000 ffffffc0
[  216.495172] 3cf0  df6b7e00 ffffffc0 db481c28 ffffffc0 ec0c3d40 ffffffc0 086de9b8 ffffff80
[  216.495186] 3d10  db481d20 ffffffc0 db481d20 ffffffc0 f7f1e9c0 ffffffc0 00000000 00000000
[  216.495200] 3d30  f7f23200 ffffffc0 09598fa8 ffffff80 ec0c3d60 ffffffc0 080ce748 ffffff80
[  216.495216] 
               X0: 0xffffffc0ed209580:
[  216.495220] 9580  db50c710 ffffffc0 db50dc70 ffffffc0 00000000 00000000 00000000 00000000
[  216.495235] 95a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495248] 95c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495262] 95e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495276] 9600  00000000 00000000 ed209640 ffffffc0 00000000 00000000 00000000 00000000
[  216.495290] 9620  ec03ee00 ffffffc0 00000000 00000000 081d4c08 ffffff80 00000000 00000000
[  216.495304] 9640  00000002 00000020 60382b00 0000007f 00000000 00000000 00000000 00000000
[  216.495318] 9660  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495333] 
               X1: 0xffffffc0df6b7600:
[  216.495337] 7600  df761840 ffffffc0 df7c2750 ffffffc0 df7618b8 ffffffc0 df7618b8 ffffffc0
[  216.495351] 7620  00000001 00000000 00000000 00000000 00000000 00000000 07f7da5a 00000000
[  216.495365] 7640  de4efe70 ffffffc0 df7c22d8 ffffffc0 de4efee8 ffffffc0 de4efee8 ffffffc0
[  216.495379] 7660  00000001 00000000 00000000 00000000 ec015960 ffffffc0 00000046 00000000
[  216.495393] 7680  db50c028 ffffffc0 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495408] 76a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495421] 76c0  ec568840 ffffffc0 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495435] 76e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495450] 
               X2: 0xffffff80086e8f80:
[  216.495454] 8f80  6b0500df 54fffde1 39408865 12001c84 d34110a5 6b0400bf 54fffd48 79404465
[  216.495469] 8fa0  d34520a5 6b05009f 17ffffd5 f9400067 b864d8e7 36780067 1ac420c7 2a070042
[  216.495483] 8fc0  11000484 17ffffbd f9400068 b865d908 36080068 1ac520e8 2a080042 110004a5
[  216.495497] 8fe0  17ffffe0 f942ee61 927e24a3 1ac62042 b8636825 0a2200a2 b8236822 17ffffcc
[  216.495511] 9000  a9bc7bfd 910003fd a90153f3 a9025bf5 a90363f7 aa0003f3 aa0103f6 aa1e03e0
[  216.495525] 9020  91188277 d503201f f941fe74 aa1703e0 f940f2d5 9415c263 aa1303e0 97ffe61d
[  216.495539] 9040  aa1303e0 aa1603e1 97fff601 b9422680 34002180 f942e660 f9400800 b9425001
[  216.495554] 9060  34000481 39495c06 721f08df 540001c0 b9446e62 d3410cc3 6b42207f 540003a1
[  216.495569] 
               X6: 0xffffffc0db50c120:
[  216.495573] c120  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495587] c140  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495601] c160  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495615] c180  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495629] c1a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495643] c1c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495657] c1e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495670] c200  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495689] 
               X19: 0xffffffc0db50bfa8:
[  216.495694] bfa8  eb7d1400 ffffffc0 0943a068 ffffff80 00000000 00000000 00000000 00000000
[  216.495708] bfc8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495722] bfe8  00000000 00000000 00000000 00000000 00000000 00000000 eb4e5740 ffffffc0
[  216.495736] c008  eb4e6200 ffffffc0 0870f2e4 ffffff80 08fb32e2 ffffff80 00002a80 00000000
[  216.495750] c028  ebb9e000 ffffffc0 f7f93150 ffffffc0 db512038 ffffffc0 ebb9e4c0 ffffffc0
[  216.495764] c048  00000000 00000000 00120012 dead4ead ffffffff 00000000 ffffffff ffffffff
[  216.495778] c068  db50c068 ffffffc0 db50c068 ffffffc0 ec0cf000 ffffffc0 00000000 00000000
[  216.495792] c088  def2fcb8 ffffffc0 def2fcd8 ffffffc0 db50c778 ffffffc0 00000040 cccccccc
[  216.495808] 
               X21: 0xffffffc0ed209780:
[  216.495812] 9780  e2419900 ffffffc0 e2419700 ffffffc0 00000000 00000000 00000000 00000000
[  216.495826] 97a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495840] 97c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495854] 97e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495868] 9800  ebb9e000 ffffffc0 00000000 00000000 ed209580 ffffffc0 ed209780 ffffffc0
[  216.495882] 9820  df6b7680 ffffffc0 df6b76c0 ffffffc0 df6b7280 ffffffc0 00000002 00000000
[  216.495896] 9840  df6b7f00 ffffffc0 df6b7bc0 ffffffc0 e798bcb8 ffffffc0 00000000 00000000
[  216.495910] 9860  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.495924] 
               X22: 0xffffffc0ec5687c0:
[  216.495929] 87c0  ffffffff 0000003f ffffffff 0000003f ffffffff 0000003f 00000000 00000000
[  216.495943] 87e0  00000000 00000000 de0c5100 ffffffc0 00000000 00000000 00000000 00000000
[  216.495957] 8800  00000000 00000000 00000000 00000000 0943a068 ffffff80 0943a0d8 ffffff80
[  216.495971] 8820  0943bac0 ffffff80 ed2612e8 ffffffc0 080d5a30 ffffff80 00000000 00000000
[  216.495985] 8840  db50c028 ffffffc0 00000002 00000000 7ffffffe 00000000 00020002 dead4ead
[  216.495999] 8860  ffffffff 00000000 ffffffff ffffffff ec568870 ffffffc0 ec568870 ffffffc0
[  216.496013] 8880  00000000 00000000 00010001 dead4ead ffffffff 00000000 ffffffff ffffffff
[  216.496028] 88a0  def2fae0 ffffffc0 def2fae0 ffffffc0 00000000 00000000 00000000 dead4ead
[  216.496043] 
               X25: 0xffffffc0f7f1e968:
[  216.496047] e968  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.496062] e988  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  216.496075] e9a8  00000000 00000000 00000000 00000000 00000000 00000000 06a806a8 dead4ead
[  216.496089] e9c8  ffffffff 00000000 ffffffff ffffffff 00000003 00000000 00000006 00000000
[  216.496103] e9e8  f7f1e9e8 ffffffc0 f7f1e9e8 ffffffc0 00000003 00000002 eb409000 ffffffc0
[  216.496118] ea08  f3191300 ffffffc0 00000000 00000000 f7f1b5c8 ffffffc0 00000800 00000001
[  216.496132] ea28  080cc948 ffffff80 f7f1e9c0 ffffffc0 00100003 ffffffff ffffffff 00000000
[  216.496146] ea48  00000000 00000000 00000000 00000000 00000000 00000000 00000200 dead0000
[  216.496162] 
               X29: 0xffffffc0ec0c3c50:
[  216.496166] 3c50  ec568840 ffffffc0 00000000 00000000 00000000 00000000 f7f1e9e8 ffffffc0
[  216.496180] 3c70  00000000 00000000 00000000 00000000 00000000 00000000 ec0c3cd0 ffffffc0
[  216.496194] 3c90  086de1f0 ffffff80 ec0c3cd0 ffffffc0 086a165c ffffff80 20000145 00000000
[  216.496208] 3cb0  ec0c3d00 ffffffc0 086de1e8 ffffff80 ffffffff ffffffff ebb9e000 ffffffc0
[  216.496222] 3cd0  ec0c3d00 ffffffc0 086de1f0 ffffff80 ed209800 ffffffc0 ebb9e000 ffffffc0
[  216.496236] 3cf0  df6b7e00 ffffffc0 db481c28 ffffffc0 ec0c3d40 ffffffc0 086de9b8 ffffff80
[  216.496251] 3d10  db481d20 ffffffc0 db481d20 ffffffc0 f7f1e9c0 ffffffc0 00000000 00000000
[  216.496265] 3d30  f7f23200 ffffffc0 09598fa8 ffffff80 ec0c3d60 ffffffc0 080ce748 ffffff80

[  216.496283] ---[ end trace 98f3fddab2149696 ]---
[  216.496289] Call trace:
[  216.496295] Exception stack(0xffffffc0ec0c3af0 to 0xffffffc0ec0c3c20)
[  216.496302] 3ae0:                                   ffffffc0db50c028 0000008000000000
[  216.496308] 3b00: ffffffc0ec0c3cd0 ffffff80086a165c 0000000020000145 0000000000000003
[  216.496314] 3b20: ffffffc0ec0c3b40 ffffff800811b430 ffffffc0f7f1ab80 ffffff80093f8b80
[  216.496320] 3b40: ffffffc0ec0c3c40 ffffff80081d4dc8 ffffffc0ec5fa600 ffffffc0db50dc70
[  216.496326] 3b60: ffffff80086e8c5c 0000000000000008 000000000000083c 0000000000000002
[  216.496332] 3b80: ffffffc0f7f1e9e8 0000000000000000 0000000000000000 0000000000000000
[  216.496338] 3ba0: ffffffc0ed209600 ffffffc0df6b7680 ffffff80086e9000 0000000000000000
[  216.496343] 3bc0: 0000000000000008 000000326814cc83 ffffffc0db50c1a0 0000000000000000
[  216.496349] 3be0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  216.496355] 3c00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[  216.496363] [<ffffff80086a165c>] drm_atomic_helper_commit_hw_done+0x60/0x98
[  216.496371] [<ffffff80086de1f0>] rockchip_atomic_commit_complete+0xac/0xf0
[  216.496377] [<ffffff80086de9b8>] rockchip_drm_atomic_work+0x20/0x30
[  216.496387] [<ffffff80080ce748>] process_one_work+0x228/0x364
[  216.496393] [<ffffff80080cf1a0>] worker_thread+0x284/0x390
[  216.496399] [<ffffff80080d4040>] kthread+0xe0/0xf0
[  216.496407] [<ffffff8008082ef0>] ret_from_fork+0x10/0x20

 

Also both streams exhibited similiar behaviour in regard of the quality. There are noticeable white pixels on the displayed characters contours. I've seen this also with ayufan images. 

I wonder if it is my setup issues or other also experience it? 

Link to post
Share on other sites

  • 0
On 2/2/2021 at 5:36 PM, JMCC said:

Can you give us some example stream that is showing this behavior?

 

I don't think I can share the clips from the stream, because these are not FTA broadcasts.

 

Regarding quality I took these photos - https://1drv.ms/u/s!Aged3pqR0ymHpAa9XG3MOtbHBlFL?e=R5vqye . This is the exactly the same clip captured with ffmpeg without any conversions.

First one is with playback from RockPro64, while second from my reference notebook.  As you can see on first photo there are many white dots on the hair line in contratry to completely smooth other. 

Also I partially resolved the issue, because I found out that this kind of artifacts occurs while Mali is upscaling. Broadcast is 1920x1080 whilst my TV panel is native 4k@120Hz. Using drm-mode 1920x1080@50 or 1920x1080@60 fixed it immediately. 

 

Stream that crashed is 20Mbps CBR high quality broadcast, but unfortunately yesterday I wasn't able to reproduce the issue. I will be trying to do so in the meantime. 

 

 

Getting back to my first issue. It is getting weirder. I haven't been able to make X to start with lightdm. When I launched it manually from ssh session (lightdm stopped) everything worked okay.  Any tips? 

 

Link to post
Share on other sites

  • 0
2 hours ago, tar.elda said:

Getting back to my first issue

I think that is a different issue, probably not related to the media framework. Do you experience the same behavior on a fresh Armbian install, without the multimedia packages?

 

 

2 hours ago, tar.elda said:

I don't think I can share the clips from the stream

If you find some clip showing the wrong behavior that you can share, please do. Otherwise, we cannot look into the issue. All my clips are playing fine in different screens and resolutions.

 

 

Link to post
Share on other sites

  • 0
4 минуты назад, JMCC сказал:

The meta-package depends on "linux-image-legacy-rockchip64 | linux-image-legacy-rk3399", but it doesn't specify any version.

For P1, a different kernel is used (station-p1) and even when I put the kernel on freeze, it is still replaced with the one in the network reps (but in the network reps it is not correct). This breaks the whole system. IMHO the script should not depend on the kernel, from  trying to install only the version registered in it.

Link to post
Share on other sites

  • 0
1 hour ago, balbes150 said:

IMHO the script should not depend on the kernel

The dependency is there to prevent it from being installed on Current/Dev. That would result in a broken desktop, due to Mali binaries replacing the Mesa libs, but the Mali kernel driver missing.

 

1 hour ago, balbes150 said:

For P1, a different kernel is used (station-p1)

I can add that other kernel as an alternative to the package dependencies. However, the ideal situation would be to merge the changes into some of the existing RK3399 kernels. But we can discuss this on a more appropriate thread.

 

For the time being, I will just add that dependency, that will respond to the immediate need.

Link to post
Share on other sites

  • 0
5 minutes ago, balbes150 said:

I found a solution-changed the patches so that can now use a common core for p1. 

That's great!

 

5 minutes ago, balbes150 said:

You don't need to change anything.

Well, modified packages are already on the process of upload and sync :huh:. Anyway, that will buy us some time until we get everything sorted out into rockchip64, and I can make some later update removing the "station-p1/station-m1" alternative.

Link to post
Share on other sites

  • 0
On 2/4/2021 at 11:46 AM, tar.elda said:

 

Getting back to my first issue. It is getting weirder. I haven't been able to make X to start with lightdm. When I launched it manually from ssh session (lightdm stopped) everything worked okay.  Any tips?

 

I've been having similar issues and in my case, it seems to be related to the specific mode, so that it might have to do, to some extent, with the HDMI cable used.  For me, the default terminal mode is 3840x2160p60, probably because it is the best mode seen as supported by the display, but at this mode the HDMI link can't be established most of the time.  My understanding is that disconnecting and reconnecting the cable forces the driver to retry and sometimes it manages to establish the link and it works.  Setting the mode manually to 3840x2160p30 results in reliable HDMI operation.  You might want to try setting a lower mode, by putting something like the following in "/boot/armbianEnv.txt":

 

Quote

extraargs=video=3840x2160@30

 

If this results in getting a signal during kernel boot-up, which is then lost once lightdm starts, you'll need to also set a lower mode for X.  That said, I've also tried a libreelec image, which seemed to work every time (although I didn't boot it up more than a couple of times), so this may well also be related in part to the kernel, or the configuration used in Armbian.

 

Apart from that, I'm also having a hard time getting Armbian and the RK3399 Legacy Multimedia Framework to work for 4K HDR video on a Rock Pi 4B.  It seems to work fine for all other modes but a couple of 10-bit HDR HEVC videos I've tried either result in choppy reproduction where a few seconds of video are displayed, after which the image freezes while sound continues, or playback is smooth but with incorrect colors.  In each case, the display switches to the correct resolution and refresh rate, but it does not switch to HDR mode.

 

I add a grepped version of dmesg below, showing seemingly relevant messages, including several error messages which might, or might not be normal:

 

[    0.000000] rockchip_clk_register_frac_branch: could not find dclk_vop0_frac as parent of dclk_vop0, rate changes may not work
[    0.000000] rockchip_clk_register_frac_branch: could not find dclk_vop1_frac as parent of dclk_vop1, rate changes may not work
[    1.472998] iommu: Adding device ff650000.vpu_service to group 0
[    1.473203] iommu: Adding device ff8f0000.vop to group 2
[    1.473300] iommu: Adding device ff900000.vop to group 3
[    2.464585] rk-vcodec ff650000.vpu_service: Looking up vcodec-supply from device tree
[    2.464599] rk-vcodec ff650000.vpu_service: Looking up vcodec-supply property in node /vpu_service@ff650000 failed
[    2.464624] rk-vcodec ff650000.vpu_service: no regulator for vcodec
[    2.465017] rk-vcodec ff650000.vpu_service: probe device
[    2.465333] rk-vcodec ff650000.vpu_service: drm allocator with mmu enabled
[    2.466106] rk-vcodec ff650000.vpu_service: could not find power_model node
[    2.466117] rk-vcodec ff650000.vpu_service: init success
[    2.466503] rk-vcodec ff660000.rkvdec: Looking up vcodec-supply from device tree
[    2.466517] rk-vcodec ff660000.rkvdec: Looking up vcodec-supply property in node /rkvdec@ff660000 failed
[    2.466536] rk-vcodec ff660000.rkvdec: no regulator for vcodec
[    2.467085] rk-vcodec ff660000.rkvdec: probe device
[    2.467321] rk-vcodec ff660000.rkvdec: drm allocator with mmu enabled
[    2.467740] rk-vcodec ff660000.rkvdec: could not find power_model node
[    2.467748] rk-vcodec ff660000.rkvdec: init success
[    2.479429] rockchip-vop ff900000.vop: missing rockchip,grf property
[    2.479705] rockchip-drm display-subsystem: bound ff900000.vop (ops 0xffffff8008d47290)
[    2.479749] rockchip-vop ff8f0000.vop: missing rockchip,grf property
[    2.479939] rockchip-drm display-subsystem: bound ff8f0000.vop (ops 0xffffff8008d47290)
[    2.480204] i2c i2c-9: of_i2c: modalias failure on /hdmi@ff940000/ports
[    2.480219] dwhdmi-rockchip ff940000.hdmi: registered DesignWare HDMI I2C bus driver
[    2.480325] dwhdmi-rockchip ff940000.hdmi: Detected HDMI TX controller v2.11a with HDCP (DWC HDMI 2.0 TX PHY)
[    2.481023] rockchip-drm display-subsystem: bound ff940000.hdmi (ops 0xffffff8008d3bbc0)
[    3.315328] rockchip-vop ff900000.vop: [drm:vop_crtc_enable] Update mode to 3840x2160p30, type: 11
[    4.140435] vcca1v8_hdmi: 1800 mV 
[    4.146203] vcca0v9_hdmi: 900 mV 
[    4.829054] of_get_named_gpiod_flags: can't parse 'simple-audio-card,hp-det-gpio' property of node '/hdmi-codec[0]'
[    4.829078] of_get_named_gpiod_flags: can't parse 'simple-audio-card,mic-det-gpio' property of node '/hdmi-codec[0]'
[    4.830099] asoc-simple-card hdmi-codec: i2s-hifi <-> ff8a0000.i2s mapping ok
[    4.880580] rockchip-pm-domain ff310000.power-management:power-controller: Looking up pd_vopl-supply from device tree
[    4.880592] rockchip-pm-domain ff310000.power-management:power-controller: Looking up pd_vopl-supply property in node /power-management@ff310000/power-controller failed
[    4.880729] rockchip-pm-domain ff310000.power-management:power-controller: Looking up pd_vcodec-supply from device tree
[    4.880740] rockchip-pm-domain ff310000.power-management:power-controller: Looking up pd_vcodec-supply property in node /power-management@ff310000/power-controller failed
[    4.881811]   #1: HDMI-CODEC
[   35.614277] rockchip-pm-domain ff310000.power-management:power-controller: Looking up pd_vopb-supply from device tree
[   35.614291] rockchip-pm-domain ff310000.power-management:power-controller: Looking up pd_vopb-supply property in node /power-management@ff310000/power-controller failed
[   35.614398] rockchip-vop ff900000.vop: [drm:vop_crtc_enable] Update mode to 1920x1080p60, type: 11
[   95.708357] rk_vcodec: vpu_service_ioctl:1890: error: unknown vpu service ioctl cmd 40086c01
[   95.848892] rockchip-vop ff900000.vop: [drm:vop_crtc_enable] Update mode to 3840x2160p24, type: 11
[   95.879288] dwhdmi-rockchip ff940000.hdmi: Rate 296703000 missing; compute N dynamically
[  105.693585] rockchip-vop ff900000.vop: [drm:vop_crtc_enable] Update mode to 1920x1080p60, type: 11
[  178.595257] rockchip-vop ff900000.vop: [drm:vop_crtc_enable] Update mode to 3840x2160p24, type: 11
[  178.626142] dwhdmi-rockchip ff940000.hdmi: Rate 296703000 missing; compute N dynamically
[  178.955692] rk-vcodec ff660000.rkvdec: resetting...
[  178.955762] rk-vcodec ff660000.rkvdec: reset done
[  178.955768] rk-vcodec ff660000.rkvdec: reset done
[  180.476956] rk-vcodec ff660000.rkvdec: resetting...
[  180.477023] rk-vcodec ff660000.rkvdec: reset done
[  180.477029] rk-vcodec ff660000.rkvdec: reset done

...

[  273.326954] rk-vcodec ff660000.rkvdec: resetting...
[  273.327025] rk-vcodec ff660000.rkvdec: reset done
[  273.327031] rk-vcodec ff660000.rkvdec: reset done
[  274.327763] rk-vcodec ff660000.rkvdec: resetting...
[  274.327832] rk-vcodec ff660000.rkvdec: reset done
[  274.327838] rk-vcodec ff660000.rkvdec: reset done
[  275.902475] rockchip-vop ff900000.vop: [drm:vop_crtc_enable] Update mode to 1920x1080p60, type: 11

 

My terminal video mode is "3840x2160p30", while the interface in kodi-gbm is set to "1920x1080p60".  The shown messages are taken after booting up and playing two separated HDR videos, the first playing smoothly in false color, while the second plays back intermittently in correct (albeit SDR) color.  You can use the mode update messages as markers to figure out what happens when.

 

Note that on the exact same hardware (including the HDMI cable) a libreelec image seems to work correctly, at least to the extent that it switches the display to HDR mode and shows a correct-looking picture.  I've tried comparing the device trees used in libreelec and Armbian for clues as to what might be missing and, although there are some differences, I didn't manage to get anywhere.  Any pointers on what to try or where to look next would be welcome.

Link to post
Share on other sites

  • 0
On 2/5/2021 at 11:20 PM, JMCC said:

Probably some Kernel patches being used in LibreELEC. I am not sure whether they updated to mainline yet, or are still using legacy, check that out too.

 

The image I tried, which is still current, as far as I can see, uses 4.4.154, so they don't seem to have switched to mainline yet.  As far as I can see though all components necessary for video playback are SoC-specific.  Since I understand that the Legacy Multimedia Framework does support HDR playback on the RK3399, but, as it turns out, not on the Rock Pi 4B, I'd expect the reason to be something specific to the configuration of that board.  If some specific patch was necessary for the VOP, HDMI, or DRM drivers say, wouldn't that prevent playback on all RK3399-based machines?

 

That's why I was looking at the .dts files specific to the Rock Pi 4B, comparing with other RK3399 boards and with the libreelec versions.  Do you by any chance see any error messages in my kernel logs that aren't there in your case, to use as clues to direct my search?  Or perhaps any messages that seem to be missing?  Compared to the libreelec logs, the main differences are the lines about the various supply properties that failed to be looked up, which are there in my logs but not in libreelec and also output like the following, which is there in libreelec, seemingly after every mode change, but missing for me:

 

[   86.448357] dwhdmi-rockchip ff940000.hdmi: HDMI infoframe: Auxiliary Video Information (AVI), version 2, length 13
[   86.448384] dwhdmi-rockchip ff940000.hdmi:     colorspace: YCbCr 4:2:2
[   86.448401] dwhdmi-rockchip ff940000.hdmi:     scan mode: Underscan
[   86.448418] dwhdmi-rockchip ff940000.hdmi:     colorimetry: Extended
[   86.448433] dwhdmi-rockchip ff940000.hdmi:     picture aspect: No Data
[   86.448448] dwhdmi-rockchip ff940000.hdmi:     active aspect: Same as Picture
[   86.448462] dwhdmi-rockchip ff940000.hdmi:     itc: IT Content
[   86.448476] dwhdmi-rockchip ff940000.hdmi:     extended colorimetry: BT.2020
[   86.448490] dwhdmi-rockchip ff940000.hdmi:     quantization range: Limited
[   86.448505] dwhdmi-rockchip ff940000.hdmi:     nups: Unknown Non-uniform Scaling
[   86.448519] dwhdmi-rockchip ff940000.hdmi:     video code: 0
[   86.448534] dwhdmi-rockchip ff940000.hdmi:     ycc quantization range: Limited
[   86.448548] dwhdmi-rockchip ff940000.hdmi:     hdmi content type: Graphics
[   86.448562] dwhdmi-rockchip ff940000.hdmi:     pixel repeat: 0
[   86.448578] dwhdmi-rockchip ff940000.hdmi:     bar top 0, bottom 0, left 0, right 0
[   86.448608] dwhdmi-rockchip ff940000.hdmi: HDMI infoframe: Vendor, version 1, length 5
[   86.448623] dwhdmi-rockchip ff940000.hdmi:     HDMI VIC: 3
[   86.448649] dwhdmi-rockchip ff940000.hdmi: HDMI infoframe: Dynamic Range and Mastering, version 1, length 26
[   86.448664] dwhdmi-rockchip ff940000.hdmi: length: 26
[   86.448677] dwhdmi-rockchip ff940000.hdmi: eotf: 2
[   86.448692] dwhdmi-rockchip ff940000.hdmi: x[0]: 34000
[   86.448706] dwhdmi-rockchip ff940000.hdmi: y[0]: 16000
[   86.448720] dwhdmi-rockchip ff940000.hdmi: x[1]: 13250
[   86.448734] dwhdmi-rockchip ff940000.hdmi: y[1]: 34500
[   86.448747] dwhdmi-rockchip ff940000.hdmi: x[2]: 7500
[   86.448761] dwhdmi-rockchip ff940000.hdmi: y[2]: 3000
[   86.448774] dwhdmi-rockchip ff940000.hdmi: white point x: 15635
[   86.448788] dwhdmi-rockchip ff940000.hdmi: white point y: 16450
[   86.448802] dwhdmi-rockchip ff940000.hdmi: max_mastering_display_luminance: 4000
[   86.448817] dwhdmi-rockchip ff940000.hdmi: min_mastering_display_luminance: 50
[   86.448830] dwhdmi-rockchip ff940000.hdmi: max_cll: 457
[   86.448844] dwhdmi-rockchip ff940000.hdmi: max_fall: 179

 

Since this mentions HDR mastering specs, it seems to be highly relevant, but I can't figure out why I'm not receiving this infoframes (or if perhaps I'm receiving them, but they aren't printed out).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

18 18