Amlogic kernel 5.4 on VIM3L

Has anyone managed to get the Amlogic 5.4 kernel from the VIM4 running on the VIM3L? It looks like the hardware support is still in there, just need a DTB

Use case: I am trying to use the HDMI eARC function, but not having much luck, and judging by the kernel 4.9 code it is unfinished in that version. Things look more promising in the 5.4 kernel.

@Darkimmortal There are no plans to upgrade VIM3/VIM3L to the 5.4 kernel.

Had no luck with the kvim3l_linux dtb from 4.9 on 5.4. Gets reasonably far through kernel init (with some errors), but stuck at Run /init as init process. Usb, sd and emmc not working

But the good news: I got it to boot using the dtb sm1_s905d3_ac200 from the amlogic 5.4 tree. USB, SD, emmc all seem to be working :tada:! Next to get HDMI and ethernet working…

Edit: Got eARC on kernel 5.4 partially working (some stability issues and stereo only), will share kernel once I get it fully working (for my use case 7.1 PCM is needed, otherwise might as well just use spdif) and figure out why the board is shutting down at 50 degrees (have to point a fan at it to even keep it running at idle lmao)

Edit 2: Kernel at GitHub - lukefor/linux at vim3l_earc.
Board shutting down was userland issue ( service not desirable on 5.4). Ethernet now working. Display output still broken but don’t think it matters.
Still stuck with stereo audio, but noticed that 5.1 AC3 audio also works. My working theory is that eARC defaults to a failsafe mode matching spdif capability (stereo pcm and compressed 5.1), unless told otherwise via CEC. Could be talking nonsense but impossible to know as HDMI 2.1 spec is not leaked.
Also have to fiddle with the TV to get eARC started (toggling it off/on in the settings and then switching inputs), again probably a CEC message that the TV expects but is not getting.
Got the Linux CEC framework up and running (problems with AOCEC). Next on the agenda is to write a program that implements all the necessary ARC and audio format messages…


So it turns out my assumptions were wrong and the format negotiation is part of the eARC communications channel, not CEC. (Although I was correct that it defaults to a failsafe mode supporting basic stereo formats.) I now have working 7.1 PCM capture over eARC! :tada:
Here is the magic incantation to report 7.1 PCM support (with all sample and bit rates):
amixer cset numid=6,iface=MIXER,name='eARC_RX CDS' 0x01,0x01,0x08,0x23,0x0f,0x7f,0x07,0x83,0x0f,0x40,0x00,0x00
Once this is set, it ‘just works’!


Chapeau, very good job - amazing. I think there are lots of people out there that are interested in your solution (including me :slight_smile: ). I got a Murideo 7G HDMI Analyzer here - so if you like, you could send me an image and I can try to provide some tests for your reference.

Thank you so much for sharing this with us! :heart_eyes:

Successfully recorded audio via eARC from my TV. So happy :partying_face:

Hi @Darkimmortal,

does your port from VIM4 means that eARC works on stock VIM4? I would be very interested in this feature. I’d like to use VIM4 HDMI input to catch sound from eARC and output it using the Tone Board.

@Darkimmortal great work there!

Would you mind sharing the userspace commands you do to get eArc handshake done and audio playback?