[UNOFFICIAL][RK3228/RK3229][box]Libreelec builds

  • Hi @dmladenov,

    for remotes, in libreelec 10 the driver used is the legacy one because it integrates switching off/on. Which you can't do with the mainline driver (you can manage the suspension, but not with which key/remote control to reactivate everything).

    The legacy driver is taken as-is from the 4.4.x kernel and therefore the mapping is not easily modifiable through the official libreelec guide because they reside in the device tree (like android os).

    You can modify as you saw the dts with the scancodes you prefer (the module has a debug mode where you can view them).

    In libreelec 11 I plan to use a mix of opensource drivers/legacy suspension system, but I don't have much time for new developments these days ;(

    I'm sorry

    Michele

  • OMG. Now I need to learn how to compile the whole LibreELEC...

    Is there an easy way to compile only my rk3229-box-v884k.dtb ? Do you have a guide ready for this job from scratch ?

    Or if i make the changes for my remote (ir_keyXX {}...) in rk322x-box.dtsi can you compile it for me ?

  • Please explain what happens specifically (which keys don't work or just if you want to remap them).

    Compiling a dtb is easy (you can find guides on google). But I can also compile it for you.

    I only have 2 or 3 remotes, so if something new comes up that I can include in the build it would help others too.

    Keep in mind that regardless of the driver I will use in libreelec 11, the starting configurations will be that of libreelec 10.

    Thanks

    Michele

  • I am attaching a picture of my remote.

    The buttons outlined in red don't work for me and when I pressed them even the LED does not blink.

    I just want to be able to use them too.

    But I can't deal with the missing button codes.

    I don't know how to debug them in your LE 10 with legacy driver.

    With LibreELEC 9 (knaerzche) with working ir-keytable it was easier to see scancodes but they are absolutely different. I attached rc_keymap file V88.txt for example.

  • @dmladenov try the attached device tree (remove txt extension). I haven't mapped all the keys yet, because the work is a bit tedious :)

    However, the scancodes are identical in both cases (mainline driver vs legacy driver). The only difference is how they are stored (in addition to what I have already explained about the device tree).

    The rockchip driver uses a particular encoding

    - first two bytes are the identification code of the remote control and is stored in little-endian ( in your case cc1d becomes 1dcc )

    - the last byte is the key code and is stored inverted. For example, the power key has code 0x00 which becomes 0xff in rockchip encoding.

    Given this, in the dts source it turns out that your remote control is this one and that the keys you indicated are actually missing.

    Anyway, I hope to return to the mainline driver with libreelec 11.

    When I started I didn't have enough experience to create my own patches and I preferred to create a 99% working system (even at the cost of using legacy code)

    Let me known

    Michele

  • ilmich thanks for the detailed explanations.

    Тhis is the result of the buttons not working before:

    button HOME = KEY_HOME

    button MOUSE = KEY_O

    buttons PREVIOUS, NEXT, 1/A/a - they are not touched as you said

    buttons RED, GREEN, YELLOW, BLUE - something is wrong here. LED flashes but no reactions in Kodi. I installed an Add-on Keymap Editor and it shows the same longer code 16839168 for all four buttons. For comparison, the HOME button is 61622 - only five digits like all other buttons.

    Following your instructions this is what ir_key5 should look like specific to my needs:

    (can you make rk3229-box-v884k.dtb)

  • Hi dmladenov,

    attached the compiled dtb. If it's all ok I'll include in my next build.

    buttons RED, GREEN, YELLOW, BLUE - something is wrong here. LED flashes but no reactions in Kodi. I installed an Add-on Keymap Editor and it shows the same longer code 16839168 for all four buttons. For comparison, the HOME button is 61622 - only five digits like all other buttons.

    mmmm, I checked what I had calculated and it seemed correct. However I don't know the addon you used so I'm not sure how to help you.

  • @ilmich the things are terribly bad :(

    The KEY_XXXX assignment of all problem buttons (RED, GREEN, YELLOW, BLUE, PREVIOUS, NEXT, 1/A/a, MOUSE) are not recognized in Kodi. I'm starting to think they should correspond to keyboard buttons.

    May be the last try: ?(

  • Technically KEY_XXXX are kernel 'keyboard' events.. so you have to bind remote buttons to something that kodi recognizes (for example the 'o' key if you want information about the playback).

    For my remote controls I had to do this (for example with the 'o' key and the 'i' key).

    But I thought the mapping you sent was tested with kodi.

    No problem though, you're helping me make a better build. The only thing is that I can make you a new version maybe tomorrow, if not in the next few days (it's holidays in my country)

    Cheers

    Michele

  • Hi @ilmich

    hallelujah

    Finally all the buttons are working. That was the goal. Now I can customize and precise the actions of each button in Kodi with a Keymap Editor Add-on as I always could with the other LibreELECs, CoreELECs ...

    Thank You very super many hyper mega ultra much @ilmich

  • Hi

    dmladenov I thank you because my build is better with to your contribution. :)

    jaum20 audio passthrough is disabled because

    - spdif output: I have no way to test it.

    - hdmi outputs: I imported some patches taken from the allwinner port (which has more or less the same driver for hdmi output) but it doesn't work, so I disabled it, for now, to focus on something else.

  • Hi

    dmladenov I thank you because my build is better with to your contribution. :)

    jaum20 audio passthrough is disabled because

    - spdif output: I have no way to test it.

    - hdmi outputs: I imported some patches taken from the allwinner port (which has more or less the same driver for hdmi output) but it doesn't work, so I disabled it, for now, to focus on something else.

    Thank you for the response. I need hdmi passthrough, so I am locked to knaerzche’s biild for now :S

  • jaum20 I tried with a DVD (ac3 audio codec) and everything seems to work. The only flaw is that in the passthrough section several hdmi connectors are listed, but only one works (the other doesn't make any sound).

    I still haven't figured out how to best configure the audio devices but let's say it's a marginal problem.

    If you can do some testing too I would be grateful. In any case, I'll release this little update in a few days.

  • I don't know what kind of sorcery knaerzche did, but I can confirm that the build I am using (LibreELEC-RK322x.arm-9.2-devel-20200427213119-b7186bc-rk3228a-mxq4kpro.img.gz) can do audio passthrough. I will make some tests with this build you provided and give you some feedback.

    Thank you for your work

    P.S. Everything working fine! I tested the passthrough with this file. You can find demo videos with ac3 audio files here.

    Again, thank you very much

    Edited 2 times, last by jaum20 (June 7, 2023 at 4:39 PM).