Official LE13 Test Images for Amlogic (Kodi-22)

  • I linked the LE wiki article with instructions for creating a custom keymap in post #192. LE does not run the Amlogic vendor kernel that CE/Odroid wikis are written for. If you continue to use the wrong instructions .. /shrug

    And you cannot change permissions on /sys and /proc folders that are owned/managed by the kernel. That's basic Linux sysadmin knowledge. Again, whatever instructions you are following are not for the mainline kernel.

  • And you cannot change permissions on /sys and /proc folders that are owned/managed by the kernel. That's basic Linux sysadmin knowledge. Again, whatever instructions you are following are not for the mainline kernel.

    OK, so why does that "wakeup" file exist, if at all?

  • The wiki article does not describe how to configure IR remote wakeup.

    The IR wake code is hardcoded in the BL301 component of the boot firmware. ISTR that CE uses a custom version of BL301 source with some closed-source companion code to support external configuration. At some point I'll get around to investigating and then replicating something similar but a) done with open sources and mainline u-boot, b) upstreamed so everyone can benefit. I have a rather long to-do list at the moment though.

    OK, so why does that "wakeup" file exist, if at all?

    Because Google AI is crap and suggested modifying the device-tree to add wakeup-source; and thus the kernel now blindly exposes support for something that the hardware does not support being controlled from the kernel (it is hardcoded in BL301).

  • I pushed a set of updated Amlogic images to my test share. Notable changes are:

    • Kodi 22-RC2
    • Linux 7.3.4
    • AV1 stateless hardware decode on S4
    • VC1 stateless hardware decode on GXBB/GXL/GXM/G12A/G12B/SM1 (S4 needs Amlogic firmware and more work)

    Once an LE13 beta ships I plan to revise current DVB support to use a new driver from rozpruwacz and start work on support for SC2 (S905X4) and T7 (A311D2) boards.

  • chewitt It's been quite a while (in the meantime I have been enjoying LE on RPi4 and working great), but this new amvdec is looking great for Amlogic boards. I tested it on the Vero 4K+ with the latest nightly. Only things I noticed were:

    • CMA at 384MiB was not enough to playback 4K, I don't have the device connected to a 4K display but bumping it to 768MiB they played back fine on a 1080p TV (so no HDR).
    • no hardware deinterlacer for GXL, but that's mostly an MPEG2 problem for me and that is being done in CPU.
    • I tested the following codecs with small clips:
      • H.264 1080p60, 1080p and 720p - hardware decode, 0 drops, ~91–94% CPU idle
      • HEVC 1080p - hardware decode, 0 drops
      • VP9 1080p - hardware decode, 0 drops
      • MPEG-2: progressive 1080p, plus live and recorded broadcast (720p and 1080i) - hardware decode
      • VC-1 - hardware decode, but the clip was 30 frames
      • 4K HEVC Main 10 HDR10 - hardware decode, bumped to 768MiB CMA, 10 minute/30 second seek test + 4x FF was smooth. this one is soak testing at 14 minutes in with 60 °C, CPU at 1,512 MHz with no throttling, CMA at 516 MiB, Kodi at 457 MiB, CPU about 94% idle, 0 drops and 0 decoder errors so far.
      • MPEG-4 ASP AVI - software decode

    I didn't test audio pass-through, the TV is stereo.

  • CMA at 384MB hasn't been an issue for me in testing on a native 4K screen downscaling might require more. I'll make a note to have a look into that. MPEG1/MPEG4 is something that will be added once we've finished considering the UAPI required.

    I'd like to improve deinterlacing on older GX boards but the vendor kernel handles the conversion to progressive post-decode in the DRM layer rather than pre-decode as we do with the ffmpeg filter approach used in newer boards (and Allwinner/Rockchip). The GX era IP looks tied to this mode of operation and Amlogic engineer for deinterlace things isn't forthcoming with answers to questions.

  • CMA at 384MB hasn't been an issue for me in testing on a native 4K screen downscaling might require more. I'll make a note to have a look into that. MPEG1/MPEG4 is something that will be added once we've finished considering the UAPI required.

    I'd like to improve deinterlacing on older GX boards but the vendor kernel handles the conversion to progressive post-decode in the DRM layer rather than pre-decode as we do with the ffmpeg filter approach used in newer boards (and Allwinner/Rockchip). The GX era IP looks tied to this mode of operation and Amlogic engineer for deinterlace things isn't forthcoming with answers to questions.

    Yeah that might be the case, both boards (S905D & S905Y2) needed 768MiB (it could live with 640MiB). It looks like there is a meson-di driver which supports the S905Y2, but most of my media is progressive except for the OTA captures from Live TV (which is 1080i or 720p).

    On the S905Y2 board (Radxa Zero), I ran into some issues with aborted frames crashing Kodi, other than that the S905D & S905Y2 ran great. The way I ended up with aborted frames was running a 2160p60 H.264 video on the S905Y2, which only supports 2160p30 so it drops half the frames.

    Here is a patch to apply to your armsoc-9.0.2 branch if you want it (it's just checking for pic->output is NULL, to avoid the null de-reference crash on the next line for aborted frames from amvdec):

  • S905Y2 uses the meson-di driver that I (claudius) wrote recently. This only works on G12A and up. There are hints for mem2mem operations in older SoC databooks, but as Amlogic never used/implented it that way there's no prior art in vendor kernels and the institutional knowledge of how to drive it that way isn't documented and now so long ago that the staff who did it (all in senior positions now) can't remember either. I might see what Fable can achieve by fuzzing the SoC directly, but that's going to burn a ton of tokens when I have other tasks that need them.

    I'll have a look at the ffmpeg patch, thanks.