Posts by jernej

    MrVee

    I suggest you start from GitHub - jernejsk/LibreELEC.tv: Just enough OS for KODI

    1. Add A20 specific subfolder here: https://github.com/jernejsk/libreelec.tv/tree/hw_dec_ffmpeg/projects/allwinner/devices Check H3 subfolder what it has to contain. You can just copy H3 folder as a starting point and check every file what needs to be changed. You have to definitely remove all Linux patches and add A20 specific ones. You have to add patches from Paul Kocialkowski where he added support for YUV (kernel/git/next/linux-next.git - The linux-next integration testing tree - everything from 2018-11-27 and newer) and support for DRM format modifiers (patches are somewhere on some mailing list, probably dri-devel). Remove all U-Boot patches.

    2. Enable A20 specific drivers in kernel config: linux.arm.conf

    3. Add boards to U-Boot helper script: LibreELEC.tv/uboot_helper at hw_dec_ffmpeg · jernejsk/LibreELEC.tv · GitHub

    4. Extend FFmpeg support for using modifiers in V4L2 request codec. But if you come to this point, ping me and me and others could assist you.

    After that, there are various small tasks, but most important one - hw video playback, will be already done.

    In general, make bootable image first (points 1 - 3). However, to do that, you don't need any Linux patches, so that should be really easy.

    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.

    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.

    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.

    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.

    jack82

    1. CEC is supposed to turn off TV when Kodi is turned off

    2. Addons are not my responsibility. There is newer version of Enigma2 (pvr.vuplus) addon in source form. You can compile it yourself if you think it will help.

    3. I'll disable USB in U-Boot. That should also speed up boot.

    4. H265 decoding is not perfect, that's known. 10 bit is NOT supported at all by hardware. Nothing I can't do about it.

    5. Is this passthrough by any chance? It's not currently supported.

    It's not meant to be everyday driver. Old OpenELEC is currently better, but hopefully not for long. As I said 1000 times before, 10 bit can't be supported except by software decoding.

    dan1234

    I don't know if wake-on-lan is actually supported in the driver or not. Anyway, once OrangePi PC or any other supported board for that matter is turned off, there is no way to turn it on except to do a power cycle. Power button is connected to ordinary GPIO pin on SoC, which just give a signal that it was pressed. If CPU is powered down, nobody will process this signal.

    This could be solved only with monitor firmware on auxiliary AR100 core, which is exactly what is done by Allwinner provided solution. However, that firmware is unusable with mainline kernel. There is an effort to create suitable replacement which works with mainline (crust-firmware), but it's not ready yet and currently supports only 64-bit SoCs.

    There might be a way to have similar capability with current software. If power button is defined as a wake up source in DT, suspend could be used instead of shutdown. But this needs some work.

    I believe this has something to do with the clock generator logic.

    In other words, pixel clock support. So IMO it should work, but don't take my word until it gets tested.

    I found one problem with wifi. In lib/firmware/brcm symbolic link brcmfcmac-sdio.txt shows to wrong file. Before change link to brcmfcmac-sdio.AP6212.txt wifi works perfect.

    Yeah, wifi is not priority ATM. Do you see any issues with items listed as supported in first post? Can I mark BananaPi M2P as supported?

    Some hardware is not capable of smooth playback of video with fractional frame rate like 23.976Hz. For example, all pre-Haswell Intel GPUs play 23.976Hz video at 24.000Hz and you get a repeated frame every 40 seconds. AMLogic also had this issue (but AFAIK it was fixed with some kernel patches).

    I was wondering if Allwinner hardware is capable of properly displaying 23.976 fps video.

    I guess monitor has to support it, fractional frame rate has to be whitelisted and resolution switching at start of playback has to be enabled to actually see if this is the issue or not?

    Do you know what is actually the reason why some hardware supports it or not? I imagine it has to do which pixel clocks are supported. If that is the case then there is a good chance it will work. I specially took care that as much pixel clocks are supported as possible with Allwinner DW HDMI driver.

    Sorry that I can't be more helpful. Currently I don't have appropriate monitor at hand to test it.