RK3399 Legacy Multimedia Framework


JMCC
 Share

17 17

Recommended Posts

vor 6 Stunden schrieb jernej:

I was speaking about SoC capabilities with first part ... about passthrough on mainline

Thank you for that info.

 

So I setup an sdcard with armbian mainline (Armbian_21.02.3_Rockpi-4a_buster_current_5.10.21_xfce_desktop) and had audio out of the box :)

Then I compared Armbian with LE nightly - same movie (pursuit at the end of bourne IV), that had many frame losses on armbian but smooth audio. LE on the other side had perfect video decoding but audio with frequent drop outs.

 

So I like LE for video playback, but I love the idea from this multimedia assembly that I could choose between kodi and desktop at login time. Selection in top menu bar is suboptimal, as my screensize is optimized for movies, so the topbar menu is off screen. I would prefer a menu in the center of the screen like those from boot managers.

 

Is there a way to get dualboot with LE and armbian - or at least a general way to boot from usb (without sdcard!) ?

Link to post
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

8 hours ago, tony013 said:

How can I setup HDMI audio output in armbian?

Kodi will use the system Pulseaudio config. You can use Pulseaudio Volume Control on the desktop session, and the settings will stick for Kodi.

Link to post
Share on other sites

vor 20 Stunden schrieb JMCC:

You can use Pulseaudio Volume Control on the desktop session, and the settings will stick for Kodi.

Well, I was confused, as it does not have a HDMI option. Only internal audio with multichannel ...

... but after all, it seems to work.

So ...

 

Thank you very much for your extremely appreciated work. Looks like all my wishes have been fulfilled:
- launches from emmc
- fan is temperature controlled (and thus almost inaudible)
- video with multichannel audio seems to work
- I can switch between kodi and desktop
- on top of that the small box works as NAS

 

would it be possible, to change selection between kodi and desktop based on the user, who logs into the system?

Link to post
Share on other sites

I did some more advanced tests and I have to correct my judgment.
The sound of armbian cannot keep up with LE!


While LE's multichannel sound is bright and clear and gives a good impression of space, armbian's same movie sounds like it's coming out of a watering can. Dull and without spatial resolution.

All speakers are addressed but it just doesn't sound.

I have not found any other settings how to further adjust the sound.

 

Guess I need a multi-boot solution after all.

Link to post
Share on other sites

36 minutes ago, tony013 said:

I did some more advanced tests and I have to correct my judgment.
The sound of armbian cannot keep up with LE!


While LE's multichannel sound is bright and clear and gives a good impression of space, armbian's same movie sounds like it's coming out of a watering can. Dull and without spatial resolution.

All speakers are addressed but it just doesn't sound.

I have not found any other settings how to further adjust the sound.

 

Guess I need a multi-boot solution after all.

Well, it is a well known problem, that audio in Linux sucks in general, not only Armbian. There are equalizer apps for Pulse audio, but you need to tweak it manually (there was a good one in Python 2 with excellent presets, but it probably won't work in modern distros).

 

The good news is that, according to your findings, LE has already done the work of getting a good equalizer preset for your device. You only need to copy the Pulseaudio config from LE  to your Armbian installation. And if you also want to make a PR, it is very welcome ;)

Link to post
Share on other sites

vor 16 Stunden schrieb JMCC:

You only need to copy the Pulseaudio config from LE  to your Armbian installation. And if you also want to make a PR, it is very welcome

Hey ;)

you overestimate my skills. I have no idea about system development - and whatever I do in that context, I had to learn bit by bit. I tried to compile armbian on my linux box, but I wasn't successful.

 

So what I can do, is testing and sending feedback.

Link to post
Share on other sites

On 5/8/2021 at 6:15 PM, JMCC said:

We cannot help you if you don't provide more information, like "armbianmonitor -u" and kodi logs.

Gladly; will respond tomorrow after some much needed sleep with logs.

 

Quote

a more versatile option that maintains all the possibilities of a full-featured Linux desktop.

This is precisely why i chose armbian over libreelec; there is more information on troubleshooting, etc. as well here. Walled-garden approach over at libreelec makes it more confusing for me (and given they dont target my board specifically, makes me fear uboot issues)

 

Quote

passthrough on RK 4.4 kernel uses custom approach. Kodi would need adjustments to use it.

Any information on this? - Mainline has some better cpu performance, but GPU side of things with panfrost is not well integrated. My testing using kodi on non-legacy builds of armbian and even attempts at archlinux(arm), have shown me that VPU(VideoDecoder) seems to be a mess on the oss side of things, so proprietary drivers seem to be the only way to a functional experience.

Passthrough is absolutely a must though, and im desperate to solve my audio nightmares. I have some experience with Pulseaudio, but not enough to resolve any of this.

Link to post
Share on other sites

On 5/9/2021 at 2:45 PM, tony013 said:

There's only internal audio and I don't know, where that should be connected ...

Mine has labeling issues, the hdmi output is 3rd down on the list, in my case. if you look at output of aplay -l it will list hdmi, but it gets labled as internal/fallback

Link to post
Share on other sites

21 minutes ago, EndlessEden said:

Mainline has some better cpu performance

No, it is the opposite. In legacy you can overclock to 2.0/1.5Ghz (like mainline), or to 2.2/1.7Ghz (extreme, needs active cooling). You only need to activate the corresponding overlay in armbian-config

Link to post
Share on other sites

4 hours ago, EndlessEden said:
Quote

passthrough on RK 4.4 kernel uses custom approach. Kodi would need adjustments to use it.

Any information on this? - Mainline has some better cpu performance, but GPU side of things with panfrost is not well integrated. My testing using kodi on non-legacy builds of armbian and even attempts at archlinux(arm), have shown me that VPU(VideoDecoder) seems to be a mess on the oss side of things, so proprietary drivers seem to be the only way to a functional experience.

I wouldn't say mess, just work in progress - with 5.13, MPEG2, VP8 and H264 will be all stable (no need to patch anything), with HEVC and VP9 being in development (most or all supported features reachable with out of tree patches).

 

Anyway, regarding passthrough - I can give you only a hint from source, since I don't have any intention of running BSP RK kernel: https://github.com/rockchip-linux/kernel/blob/develop-4.4/sound/soc/codecs/hdmi-codec.c#L126 You can set this with amixer - 0 means PCM, 1 means NLPCM and 2 means HBR NLPCM. I have no idea how to properly use it.

Link to post
Share on other sites

On 5/11/2021 at 8:40 PM, JMCC said:

No, it is the opposite. In legacy you can overclock to 2.0/1.5Ghz (like mainline), or to 2.2/1.7Ghz (extreme, needs active cooling). You only need to activate the corresponding overlay in armbian-config

Maybe on your hardware :( sadly I get better performance on mainline. While I can oc to 2.0ghz+(I have active cooling), the cpu locks up on any intensive workload. - while it is possible this is power delivery related. It seems unlikely.

Link to post
Share on other sites

10 hours ago, EndlessEden said:

while it is possible this is power delivery related. It seems unlikely.

With what model is this? I'm running the NanoPi M4V2 stable at 1.7Ghz/2.19Ghz. I'm doing benchmarks now on it. At first I had a crash. I was powering a big 5V fan with USB + mac OC. My PSU can only deliver 2.5A.

So I switched it with a 3A PSU and power the big fan with seperate PSU and haven't had a crash in + 24 hours.

I am running Bionic legacy. Buster has too many issue's for me. (kdenlive, no adblock, blender)

Link to post
Share on other sites

10 hours ago, EndlessEden said:

while it is possible this is power delivery related. It seems unlikely.

I've just seen it go up to 3.06A. Here a picture of it at 2.77A. Fan running at 5V, NVMe and keyboard and mouse plugged in.
500696601_M4V2Voltage.thumb.jpg.10b7947f13c17bc813cc19f88017d1e0.jpg

Now if it is healthy for the board running at 3A I don't know. But with the right PSU it can run stable at these clocks.

Link to post
Share on other sites

Quite some drop at the output of the measuring device already. That increases until the voltage reaches the board and gets through all circuits. Maybe if handy try a PSU that delivers something like 5.3 volts OOB to further increase stability.

Link to post
Share on other sites

14 hours ago, NicoD said:

I've just seen it go up to 3.06A. Here a picture of it at 2.77A. Fan running at 5V, NVMe and keyboard and mouse plugged in.
500696601_M4V2Voltage.thumb.jpg.10b7947f13c17bc813cc19f88017d1e0.jpg

Now if it is healthy for the board running at 3A I don't know. But with the right PSU it can run stable at these clocks.

 

such a useless discussion

 

was the 3.06 at 4.87 or 4.82 ;)

 

and where is the 5v

how is you chain to the power grid .

 

and by the looks of it it is powered through a usb hub with powered devices throuh selfmade pcb,s what is the losses of that . and great start of the chain of power you think ?

 

u=ixr

i=u/r

 what is the cos

what is the foam layer of the beer from the board ?

https://www.dc.systems/dcwiki/power-quality-a-typical-ac-problem

https://www.youtube.com/watch?v=pKXPqApOYfk

https://www.youtube.com/watch?v=wopmEyZKnYo

how is your power supply build you see you got multiple choices to get a 5v on all the opi runs 

 

and the opi is delivering power to the ssd,oled,tft, pcie wifi , fan

and still hapily compiling gentoo with distcc no pump

 

overclocking isnt just stable power.

where was your chiplet on the wafer ?

how is the power chain on the board for example the power of the ram on the opi is shared with the rest of the 1.8v rail while other boards have a seperate regulator for that .

 

and does the cpu run from the 5v source directly so you can undervolt it for example .

 

and how is your cooling ?

 

 

https://github.com/warpme/minimyth2

and even mythtv is still alive

 

and it is another way to run your board as mediabox .

 

how is mainline going almost everything is out of staging or will be soon ?

 

 

 

 

 

 

 

 

 

IMG_20210514_113923.jpg

IMG_20210514_113952.jpg

Link to post
Share on other sites

In my case, powering is not a problem since my NanoPCT4 uses 12v barrel jack. However, I didn't have issues either with the Rockpi4b powered with a 40w usb-c PD source. But I must acknowledge that my tests on that board were not so extensive.

Link to post
Share on other sites

34 minutes ago, thc013 said:

such a useless discussion

 

was the 3.06 at 4.87 or 4.82 ;)

 

and where is the 5v

how is you chain to the power grid .

 

and by the looks of it it is powered through a usb hub with powered devices throuh selfmade pcb,s what is the losses of that . and great start of the chain of power you think ?

 

Sure voltage drop since I'm going thru a voltage meter and multiple cables. Isn't that normal? At least my PSU can supply it.
The self made pcb is just a usb port to power my big 5V fan. What's wrong with that? It is seperate from the sbc.
All I wanted to show is that it consumes up to 3A at 1.7-2.18. 
If you want to know it all.

Blender NicoD render
--------------------
Blender 1.7/2.18       18m14s      1094s                 100%
Blender 1.5/2          19m57s      1197s       +103s    +109.4%
Blender 1.4/1.8        21m57s      1317s       +223s    +120.3%

7-zip decompression
-------------------
Small core A53   1.42Ghz     1247
                 1.51Ghz     1319 
                 1.61Ghz     1391
                 1.70Ghz     1468
Big core A72     1.8Ghz      1817
                 1.99Ghz     1992 
                 2.09Ghz     2078
                 2.18Ghz     2166
                 
Temperatures
------------
OC 1.7/2.18 With big fan
idle           30c
maxed          73c
OC 1.5/2 with big fan 
idle           30c
maxed          61c
No-OC 1.4/1.8 with big fan
idle           30c
maxed          53c

Power consumption
-----------------
Base clock 1.4/1.8          1.5A
OC         1.5/2            2A (peak at 2.2A)
OC         1.7/2.18         2.5A (with fan + keyboard/mouse it peaked at 3A)

I was only trying to inform. No reason to be a wiseass.

Link to post
Share on other sites

ow iam not a little 

 

it is just a very old law

they call it the law of ohm

if i got 3 amp at 4.8v or i get 3amp at 5v makes a difference off 0.2v what should the R do ?

 

"voltage drop since I'm going thru a voltage meter" realy ?

https://www.dummies.com/programming/electronics/how-to-measure-voltage-on-an-electronic-circuit/

and to inform you 4.8v indicates that you power-supply can't supply 5.0v under load

 

 

and it is not that panfrost or the codecs are a mess they are just come clear every day even that i know can get a little grip on it .

and if you read the posts of EndlessEden you see he is missing the connection between kernel and ffmpeg.

and he can remove from dts

rockchip,defaultmode = <16>; /* CEA 1920x1080@60Hz */

and this

hdmi {

 /delete-node/ hdmi-i2c-xfer;

 };

it is useless

 

it will become a lot more clear for him if he compiles ffmpeg with the libreelec patches on his armbian build from source instead of the armbian normal ffmpeg

otherwise you get ffmpeg calling the wrong codec paths

and also integrate some of the libreelec patches to the armbian kernel

otherwise ffmpeg cant let the kernel know to switch to other vpu state

kodi doesnt matter much as long as the drmprime patches are included

and these didnt change lateley

 

 

and if he does that he can come to same kernel level as librele or armbian normal 5.10.34 or are we 35 already

above 5.10 to 5.11 and 5.12 take a look at minimyth2 sources

not realy much different with patches it has a other layout how he comes to the same result .

or even my sensei has a libre for alwinner on 5.12

 

and me i just on 5.12 gentoo system with armbian-librelelec-minimyth2 mixed together 

and instead of 40 mousepointers when i move the mouse or green screen or v4l2 errors in gbm

i now have only no picture on hdr ,sound works and kodi says it is using the correct codec didnt check with v4l utils yet  

can watch tv again and play most of my series and movies.

and in 5.10 everything works.

 

and why overclock

even the codec core get underclocked to be smoother  ;)

 

 

 

 

 

 

 

 

Link to post
Share on other sites

2 hours ago, JMCC said:

which may have a lethal impact on global warming :lol:

That we can't have. Certainly not now people run videocards of +300W mining us into instinction.
I might show it in a video, but warning not to do this at home when you value your board and data.
 

 

2 hours ago, thc013 said:

"voltage drop since I'm going thru a voltage meter" realy ?

 

Yes. More connections, more resistance. And I had to use a bad cable since I couldn't plug the USB-c part of my meter in the SBC. So USBa->USB-c cable instead of my better usb-c->usb-c. = voltage drop
What do you care about 0.2V drop. It ain't a raspberry pi. The M4V2 even can run down to 4V without crashing and maxing out the cpu. RPi can't do that at 4.9V.
 

Link to post
Share on other sites

vor 17 Stunden schrieb JMCC:

If you do, we'll get hundreds of people running their RK3399 boards at 2.2 GHz,

serious question: what is the benefit of overclocking regarding home-cinema? Do the unsupported formats play smooth? I won't use blender or 7zip at that moviebox.

 

@JMCC I worked out a driver for pentasata hat of rockpi, which runs at LE. Works so far.

Now I wanted to use the same stuff at armbian legacy, which I currently use as nas - but the gpio pins don't work as with LE.

From radxa wiki the pin numbering scheme is for kernel 4.4 - but gpio-pins don't work with kernel 4.4 but do work with kernel 5.10.30 (LE).

Any idea, how I could use the gpio at your legacy multimedia system?

 

Link to post
Share on other sites

4 hours ago, tony013 said:

serious question: what is the benefit of overclocking regarding home-cinema? Do the unsupported formats play smooth? I won't use blender or 7zip at that moviebox.

It gives a bit snappier feeling browsing. And it makes playing HQ videos a bit smoother. For example at 1.4/1.8 you can't play 1440p LTT videos on youtube. With 1.5/2 it plays decent. At max overclock it plays as it should.

So the difference isn't that big. But with things that it has a little problems, it might work well overclocked.

I use a lot of DOSBox on my M4V2. For that it is a great boost clocking the big cores to 2.19Ghz. Pentium games now run smoothly vs 1.8Ghz. I don't bother with the small cores. Those 1.5Ghz. And for normal use I set big cores to 2Ghz.
It is just nice to be able to go a bit higher when needed.

 

Would be awesome if this is possible on mainline for TwisterOS Armbian. Would improve PPSSPP towards running perfect.

Link to post
Share on other sites

5 hours ago, tony013 said:

what is the benefit of overclocking regarding home-cinema?

If you use HW accelerated decoding (e.g. Kodi from our multimedia integration), you won't notice any difference in most cases. The only probable case is 1080p 10-bit VP9, since RK3399 does not support HW decoding for 10-bit VP9. I say 1080p, because 4K will be out of its league, even overclocked.

 

However, I recommend using the 2.2GHz OPP only for short, single-threaded bursts, like web browsing, productivity or server tasks. For long and intensive multi-threaded tasks, such as video encoding, rendering, computing, etc., I recommend to stick with 2.0GHz, to avoid burning your board too soon.

 

5 hours ago, tony013 said:

Any idea, how I could use the gpio at your legacy multimedia system?

Does it work with Raxda image? If so, check if it is necessary to use some HW overlay, and see if that overlay is also present in Armbian, so you can activate it. If it is not there, we can add it.

Link to post
Share on other sites

vor 11 Minuten schrieb JMCC:

Does it work with Raxda image?

Sorry, but no - of cause not! Radxa only supports its own debian (linaro) and ubuntu - but on ubuntu the driver does not install and for so, it does not work. On debian only fancontrol works ...

 

I wouldn't do such grunt work, if I could have avoid it.

I never wrote a single line in python and I didn't want that. But as python is the only language, that works on LE, I had to jump in the mud ...

LE does not support overlays for rockchips, so have to change dtb manually.

Anyway - pwm works on armbian with overlay on LE with manual editing of dtb ...

... but gpio works on LE without touching dtb, so I thought, it should/could? work the same way on armbian too.

Gpio-entries of sysfs behave the same way, as in LE - the problem (my problem): pin-number in armbian seems to be different.

Link to post
Share on other sites

Ah I forgot - with testing I used armbian with display again and a very very annoying point is, that it is impossible to change firefox to start with an empty page.

I accept that advertising is necessary, but this is really going too far. Makes me abandon armbian altogether, even though I liked using it.
Nah, so that's not possible at all!

Link to post
Share on other sites

16 hours ago, tony013 said:

Ah I forgot - with testing I used armbian with display again and a very very annoying point is, that it is impossible to change firefox to start with an empty page.

I accept that advertising is necessary, but this is really going too far. Makes me abandon armbian altogether, even though I liked using it.
Nah, so that's not possible at all!

afaik, Thats a Firefox "Feature"(Firefox Home Content) not armbian exclusive. only older builds of firefox allow you to switch your "home page", and "about:blank" was treated like a incorrect URL in some versions too. - This is Firefox doing this for advertiser funds. Mozilla is financially in trouble, as they dont get enough donations to operate anymore, and are on the brink of collapse.

Link to post
Share on other sites

vor 6 Stunden schrieb EndlessEden:

Thats a Firefox "Feature"(Firefox Home Content) not armbian exclusive. only older builds of firefox allow you to switch your "home page", and "about:blank" was treated like a incorrect URL

I'm new to armbian, but not new to linux. I use linux for several years now and I'm talking about this legacy framework, which means, its old stuff too. I never ever had a linux, where I could not reset homepage to blank.

... and even the most recent TwisterOS allows that.

So its hard for me to believe, that the armbian behaviour is not by intention.

 

I am firmly convinced that friendship, affection and esteem cannot be created through coercion. These values exist only voluntarily or not at all.

 

I wasn't convinced, that TwisterOS is worth a try. Bad webpage, extremly slow download, feature list attractive for playground kiddies, but not for old man ...

... but this behaviour with forced firefox homepage made me try it anyway - and what should I say: lot of crap flooded the disk, but things that I estimate are quite better, than with armbian. So may be, I stay with it.

Well LE is unbeaten anyway, so still researching for multiboot support ...

Link to post
Share on other sites

@JMCC could you please explain me, how cody is startet, or what needs to be done to start kodi?

 

After changing rockpi model, twisterOS does not boot anymore. Not even from a freshly prepared sdcard. So I had to step back to armbian legacy.

Things work, but as I already wrote, top menu is outside of my screen.

Therefore I would like to select between desktop and kodi by using different users or something like that.

 

Could you please shine me a light for that way?

 

Or would it be possible to start kody right from desktop, like twisterOS is doing it?

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
Reply to this topic...

×   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

17 17