Early community images for H3, H6 and A64

  • While looking for hints I found a DT overlay I hoped I could steal from - sunxi-DT-overlays/gpio-button.dts at master · armbian/sunxi-DT-overlays · GitHub it even maps the button to KEY_POWER, but not sure how to bend it to fit (PL3) and if overlays work in LE.

    Then I hoped to find more hints in this nanopi DTS - linux/sun8i-h3-nanopi.dtsi at 6f0d349d922ba44e4348a17a78ea51b7135965b1 · torvalds/linux · GitHub

    Now I had two examples, which looked very dissimilar to me :-S

    NanoPi DT is the correct example for your case. Note that overlay syntax is a bit special so don't look at it if you are new to this. Some remarks:

    1. Port L and H are special, since they reside on different GPIO peripheral than other ports with lower character. In DT, this special GPIO peripheral is named r_pio.

    2. "<&r_pio 0 3 GPIO_ACTIVE_LOW>" means PL3 pin (port 0 on r_pio is PL)

    3. "r_" prefix means secure in AW documentation. Sometimes they use "s_" prefix with same meaning.

    4. just copy over that NanoPi example, it uses same pin for same purpose. You should just change name where appropriate.

  • On my Orange Pi PC (with LibreELEC 9.0) I can't configure the IR remote!

    I don't have a device /dev/lirc......

    And the modules sunxi_ir_rx and gpio_sunxi are not loaded:

    Code
    MUTV-1:~ # lsmod
    Module                  Size  Used by
    8021q                  24576  0
    mali                  458752  5

    How can I enable onboard IR device?

  • On my Orange Pi PC (with LibreELEC 9.0) I can't configure the IR remote!

    You are probably using old image where IR was not yet fixed. First post has a link to updates which you have to apply.

    I don't have a device /dev/lirc......

    And the modules sunxi_ir_rx and gpio_sunxi are not loaded:

    /dev/lirc is not preferred way. sunxi_ir_rx and gpio_sunxi are from old, 3.4 kernel, mainline uses different drivers. Besides, IR driver is built-in and is not a module in LibreELEC images.

    How can I enable onboard IR device?

    First, update image to latest as I mentioned before and then search for official LibreELEC Infrared Remote wiki page where everything is explained.

  • Hm....

    I updated LibreELEC.

    The device seems to be present:

    But the service was not started:

    Code
    MUTV-1:~ # killall lircd 
    killall: lircd: no process killed

    And the device is not initialized:

    Code
    MUTV-1:~ # irrecord -d /dev/input/event0 /storage/.config/lircd.conf
    Using driver default on device /dev/input/event0
    Could not init hardware (lircd running ? --> close it, check permissions)

    What am I doing wrong?

  • The device is exactly present as /dev/input/event0:

    Code
    MUTV-1:~ # ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event0) with:
        Name: sunxi-ir
        Driver: sunxi-ir, table: rc-empty
        Supported protocols: other rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp 
        Enabled protocols: 
        bus: 25, vendor/product: 0001:0001, version: 0x0100
        Repeat delay = 500 ms, repeat period = 125 ms

    But the irrecord team does not accept this device:

    Code
    irrecord -d /dev/input/event0
    Warning: Running as root.
    Using driver default on device /dev/input/event0
    Could not init hardware (lircd running ? --> close it, check permissions)

    lirccd not loaded!

  • I have read the wiki several times!

    And I killed kodi and lircd before setting up the IR remote:

  • The driver is working, the device is working!

    When I request the hexdamp and press the buttons on the remote, I see:

    Code
    MUTV-1:~ # cat /dev/input/event0 | hexdump
    0000000 0d9b 5c32 589a 0000 0004 0004 bf08 0000
    0000010 0d9b 5c32 589a 0000 0000 0000 0000 0000
    0000020 0d9b 5c32 26ff 0001 0004 0004 bf08 0000
    0000030 0d9b 5c32 26ff 0001 0000 0000 0000 0000
    0000040 0d9b 5c32 f8b2 0005 0004 0004 bf0a 0000
    0000050 0d9b 5c32 f8b2 0005 0000 0000 0000 0000
    0000060 0d9b 5c32 c6d4 0006 0004 0004 bf0a 0000
    0000070 0d9b 5c32 c6d4 0006 0000 0000 0000 0000
    .......

    It seems irrecord doesn't work.....

    And I can not write the codes of the buttons of my remote.


    Update:

    irrecord work with this string:

    Code
    irrecord -n -H devinput -d /dev/input/event0 /storage/.config/lircd.conf

    Edited once, last by dan1234 (January 6, 2019 at 2:59 PM).

  • But why working with lirc? Find the protocol of your remote and use ir-keytable -t, or do it in once as described in the wiki:

    "Then, for each of the protocols (except lirc, which isn't a real protocol) run ir-keytable -p PROTOCOL -t, then press some buttons on your remote.

    If you discovered the correct protocol you should see EV_MSC events together with the scancode of the button. eg:

    Code
    LibreELEC:~ # ir-keytable -p rc-5 -t
    Protocols changed to rc-5
    Testing events. Please, press CTRL-C to abort.
    1503592437.660155: event type EV_MSC(0x04): scancode = 0x101a
    1503592437.660155: event type EV_SYN(0x00).
    1503592437.774129: event type EV_MSC(0x04): scancode = 0x101a
    1503592437.774129: event type EV_SYN(0x00).
    1503592437.921009: event type EV_MSC(0x04): scancode = 0x101a

    If you see no events stop ir-keytable with CTRL-C and try the next protocol from the list."

    And create your own remote. Maybe you there is already a configuration for your remote, check in teh amlogic subforum:

    LE9.0 remote configs ir-keytable Amlogic devices

    If you find it, don't forget to change the rc_maps.cfg and replace the meson-ir with a *

  • 512MB boards can probably boot but won't deliver a good HTPC experience so we have no real-world intention of supporting or encouraging their usage. We intend to discontinue support for similarly under-resourced Raspberry Pi hardware with 512MB in the near future too.

    There are about 10 distros that claim they can run on older pc, even with 256MB ram, and what i noticed about librelec is that it have a very small footprint and that is much to its credit. when idle librelec and kodi consume only half of ram on my Opilite and i didn't noticed particular problems when watching supported video formats.

  • what is the situation of i2s

    It works, otherwise HDMI audio wouldn't work.

    However, if you mean external I2S codec, that doesn't work out of the box. One of the rules of mainline Linux is that don't enable peripherals which are not used by the bare board. This would mean that I2S is not enabled by default on expansion connectors.

    In future, there will be support for overlays as it is done in RaspberryPi case. Currently, you have to edit DT yourself, either by decompiling, editing and compiling existing DTB or creating a kernel patch and building image on your own. Possibly you would also need to enable codec driver in kernel.

  • New updates are uploaded for H3 and A64:

    - rebased on latest LibreELEC master (notably Kodi 18 RC4)

    - A64 analog audio is now supported

    - HDMI CEC fixes added (not necessarily stable)

    - new A64 board is added - OrangePi Win

    - support for AP6212 WIFI (OrangePi Win, BananaPi M2+)

    - USB is now disabled in U-Boot, which is a workaround for times when connected USB device prevents booting.

    NOTE: U-Boot is not updated with image updates linked in first post. U-Boot is board specific, which means that update file would have to be board specific too to also update U-Boot and that is just not feasible with so many supported boards. But you can pull sources and build your own board specific update or even clean image.

  • i experienced significant performance increase on orange pi one with latest update.

    i would love to have a roadmap on how to safely enable i2s over gpio, defined by you or anyone else experienced about this. i am assuming the way to enable i2s is different from openelec version.

    keep up the good work. thanks.

  • Thank you Jernej for your big job.

    Now the system works good for daily using. So it is time to move it to EMMC. In Orange Pi PC Plus should works faster from EMMC. Do you have plan to add script?