Archive

Posts Tagged ‘amlogic’
Orange Pi Development Boards

LibreELEC 7.0 Ported to Amlogic S905 TV Boxes & ODROID-C2 Board

July 18th, 2016 37 comments

Most TV boxes are now sold pre-loaded with Android, but there’s still a fair amount of people who only want to play videos in their box, or only run Kodi, so they may prefer a Linux experience. Some companies provide ready-to-use solution such as ARNU Box Mach 10 64-bit Pure Linux, but in some cases it’s also possible to side-load OpenELEC or LibreELEC, with the main advantage being that it is usually quite cheaper at the cost of being a bit more complicated.

LibreELEC_AmlogicThanks to a comment by Sabai, I discovered LibreELEC 7.0.0 had been (unofficially) ported to Amlogic S905 TV boxes, and tested one devices such as NEXBOX A95X (S905), WeTek Hub, Beelink S905 Mini MXIII, MXQ Pro 4K, and others. If you own an ODROID-C2 board, you can load another LibreELEC 7.0.0 image.

If you are unsure whether your Android TV box is supported, you should first try the SD card method by copying  aml_autoscript, kernel.img,  SYSTEM and 2 md5 files to the root of the SD card, and enter recovery. This is all explained in details in the forum post linked above, and this will not affect your Android installation nor data.

If you’re happy with the results, and don’t plan to use Android anymore, you can flash LibreELEC to the NAND/eMMC flash. The procedure is the same as the SD card method, except the files are different, and you’ll have to copy aml_autoscript, factory_update_param.aml and an update zip file containing LibreELEC firmware to the SD card.

The developers have already fixed many bugs, but at the time of writing there are still a few known issues for the TV box version:

  • Reboot and poweroff may take a long time or don’t work at all when using Broadcom WiFi
  • No multichannel PCM audio
  • Jerky playback of some 29.97fps videos and some Live TV channels
  • CEC is still a bit buggy

There are also some unsupported features such as SSV6051 WiFi, front LED/segment displays, and built-in DVB tuners.

You can report other bugs on LibreELEC forums. If you’ve tried it on your own Amlogic S905 TV boxes, it might be nice to report success or failure in comments too.

Amlogic S912(-H) TV Box Boards Are Starting to Show Up

June 28th, 2016 20 comments

Amlogic S912 is one of the most expected processor this year for TV box users, and while there’s still a few months development needed before devices based on the new platform go on sale, some boards have started to surface on the Internet.

Click to Enlarge

Click to Enlarge

The first board named S912_MBX_REF_Q02_V01 is shown above, and has the following specifications:

  • SoC – Amlogic S912 or S912-H octo core ARM Cortex A53 processor @ 2.0GHz  with ARM Mali-820MP3 @ 750MHz+
  • System Memory – 2GB  (Optional 1GB)
  • Storage – 16GB eMMC flash (Optional 8GB) + micro SD slot
  • Video Output – HDMI 2.0 and AV ports
  • Audio Output – HDMI, AV, and optical S/PDIF
  • Connectivity – Gigabit Ethernet, WiFi 802.11 b/g/n/ac + Bluetooth 4.0
  • Misc – IR receiver, recovery push button (behind AV jack)

As a reminder the -H suffix means Dolby and DTS licenses are paid for, so audio down-mixing will work in all apps.

Click to Enlarge

Click to Enlarge

The second board is called S92-V01, will likely found its way into MXQ S92 or similarly named products, and specifications are quite similar except the AV is gone, and it features one extra USB port. Both boards also appear to provide easy access to the serial port.

Does Amlogic S905X Support USB 3.0?

June 24th, 2016 12 comments

Despite Amlogic roadmap claiming none of the upcoming Amlogic TV box SoCs will support USB 3.0, I’ve been informed that Amlogic S905X might already support USB 3.0. So I had a check with NEXBOX A5 TV box.

USB_3.0_LogoFirst we can see dwc3 (DesignWare USB3) module is loaded:

then this happens when I connect a USB 3.0 hard drive or flash drive:

The important point here is xhci, which stands for “eXtensible Host Controller Interface” and supports USB 1.x to USB 3.x devices.

The next step is to check performance, but since S905X is running Android 6.0, I went through permission issues with both A1SD bench and Disk Speed apps, so I reverted to using dd to read a large file to /dev/null.

Result with USB 3.0 hard drive:

That’s about 35.6 MB/s, which would be an excellent USB 2.0 transfer rate, but not quite USB 3.0 material, and the drive can achieve around 100MB/s in a Linux computer with USB 3.0 port.

Results with USB 3.0 flash drive:

That’s 21.07 MB/s, which is quite typical for USB 2.0 transfers.

So while a USB 3.0 driver is loaded into memory, those results don’t quite point to much better performance. [Update: After further study, the speed is also limited to 480 Mbps (USB 2.0 speed), see comments below]

4K VP9 Video Playback in Amlogic S905X based NEXBOX A5 Android TV Box

June 7th, 2016 10 comments

I’ve never been able to play 4K VP9 videos smoothly in any Android TV boxes so far. It’s possible in Nvidia Shield Android TV, but the device is relatively expensive, and hard to source in many parts of the world, and NEXBOX A5 is the first Android TV Box I own capable of handling 4K VP9 @ 60 fps thanks to Amlogic S905X processor.
4K_VP9_60fps_Video_Amlogic_S905XSo I tested 3 4K Vp9 video using MoviePlayer app pre-loaded in the device:

  • 4K Hawaii Sunset _ GoPro Hero 4 Black [email protected] – 3840×2160 resolution @ 30 fps; no audio; ~24 Mbps; Downloaded from YouTube with youtube-dl script
  • phfx_4KHD_VP9TestFootage.webm – 3840×2160 resolution @ 25 fps; no audio; ~14 Mbps
  • The.Curvature.of.Earth.4K.60FPS-YT-UceRgEyfSsc.VP9.3840×2160.OPUS.160K.webm – 3840×2160 resolution @ 60 fps; Opus audio; ~30 Mbps

As you’ll see in the video below, the good news is that all three videos could be played relatively smoothly.

The not-so-good news are that the player does not currently support Opus audio (minor issue should should be easily fixable by software), it was not perfectly smooth (although watchable), and the version of Kodi 16.1 inside the device does not support VP9 hardware video decoding just yet.

NEXBOX A5 firmware is actually work in progress, and the company is also waiting for a new version of Amlogic SDK. Google Play Store and related Google services are not installed, so I have not tried 4K videos in YouTube, one of the main reason to get VP9 support. However, I understand that Android TV is required for support for 4K YouTube videos, so only a handful of devices should support it, but who knows maybe there will be workarounds.

Hardkernel Releases Amlogic S905 Datasheet

June 7th, 2016 3 comments

When you design a board and/or write drivers for an SoC it helps a lot to get info about electrical characteristics, memory map, registers’ addresses and values to understand how the hardware works, especially for custom applications, but many silicon vendors only distribute such documents under NDA to their business customers, with exception from companies such as Freescale (now NXP), and Texas Instruments. Hardkernel, the company developing ODROID boards, is also trying to release as much documentation as possible for their board such as Amlogic S805 datasheet for ODROID-C1/C1+ boards, and the Korean company has now released Amlogic S905 processor datasheet as the processor is used in their ODROID-C2 board.

Amlogic_S905_Power_on_sequence

Amlogic S905 Power on Sequence of Different Power Domains

Some of the information available in the datasheet include

  • Memory map
  • Power domain
  • CPU and GPU sub-system
  • Clock & Reset Unit
  • System Boot
  • General Purpose Input/Output (GPIO)
  • Interrupt Controller
  • Direct Memory Access Controller (DMAC)
  • Timers
  • Crypto
  • Etc…

ODROID-C2 was launched at the very end of February, so it took about 3 months for Hardkernel to get the green light from Amlogic to release the datasheet. I hope in the future I can write news starting with “Amlogic releases…” instead of letting their customers release their documentation for them…

Thanks to Nobe for the tip.

Amlogic S912 Processor Specifications

April 6th, 2016 20 comments

Amlogic plans to launch at least three new processors for OTT boxes and set-top boxes this year: Amlogic S905X, Amlogic S912, and Amlogic S905D.  We already knew Amlogic S905 specifications, but I’ve recently received a document with some more details about Amlogic S912 revealing Mali-T820 GPU, a lack of USB 3.0 support, but still some interesting features such as HDMI 2.0a, 4K VP9, 10-bit H.265, Gigabit Ethernet Mac, and so on.

Click to Enlarge

Click to Enlarge

Amlogic S912 specifications with highlights in bold showing differences with Amlogic S905X:

  • CPU Sub-system –  Octa core ARM Cortex-A53 CPU up to 2 GHz (DVFS) with two CPU clusters one optimized for high performance (big) and the other for low power (LITTLE)
  • 3D Graphics Processing Unit –ARM Mali-T820MP3 GPU up to 750MHz (DVFS) with 3 shader engines supporting OpenGL ES 1.1/2.03.1, DirectX 11 FL9_3, OpenCL 1.1/1.2 full profile and RenderScript.
  • 2.5D Graphics Processor – Fast bitblt engine with dual inputs and single output, programmable raster operations (ROP) and polyphase scaling filter, etc..
  • Crypto Engine – AES/AES-XTS block cipher with 128/192/256 bits keys, DES/TDES block cipher, hardware crypto key-ladder operation and DVB-CSA for transport stream encryption,  built-in hardware True Random Number Generator (TRNG), CRC and SHA-1/SHA-2/HMAC SHA engine
  • Video/Picture CODEC
  • Video Post-Processing Engine – Dolby Vision, HDR10 and HLG HDR processing, motion adaptive 3D noise reduction filter, advanced motion adaptive edge enhancing de-interlacing engine, 3:2 pull-down support, deblocking filters, etc..
  • Video Output
    • Built-in HDMI 2.0a transmitter including both controller and PHY with 3D, CEC, HDR and HDCP 2.2, [email protected] max resolution output
    • CVBS 480i/576i standard definition output
    • RGB888 TTL interface up to 1920×1080
  • Camera Interface – ITU 601/656 parallel video input with down-scalar, supports camera input as YUV422, RGB565,16bit RGB or JPEG
  • Audio Decoder and Input/Output
    • Supports MP3, AAC, WMA, RM, FLAC, Ogg and programmable with 7.1/5.1 down-mixing
    • I2S audio interface supporting 8-channel (7.1) input and output
    • Built-in serial digital audio SPDIF/IEC958 output and PCM input/output
    • Built-in stereo audio DAC
    • Dual-channel digital microphone PDM input
    • Supports concurrent dual audio stereo channel output with combination of analog+PCM or I2S+PCM
  • Memory and Storage Interface
    • 16/32-bit SDRAM memory interface running up to DDR2400
    • Supports up to 2GB DDR3/4, DDR3L, LPDDR2, LPDDR3 with dual ranks
    • Supports SLC/MLC/TLC NAND Flash with 60-bit ECC
    • SDSC/SDHC/SDXC card and SDIO interface with 1-bit and 4-bit data bus width supporting up to UHS-I SDR104
    • eMMC and MMC card interface with 1/4/8-bit data bus width fully supporting spec version 5.0 HS400
    • Supports serial 1, 2 or 4-bit NOR Flash via SPI interface
    • Built-in 4k bits One-Time-Programming memory for key storage (That must be where DRM / HDCP keys are programmed)
  • Network
    • Integrated IEEE 802.3 10/100/1000M Gigabit Ethernet MAC controller with RGMII interface
    • Integrated 10/100M PHY interface
    • Supports Energy Efficiency Ethernet (EEE) mode
  • Digital Television Interface
    • Transport stream (TS) input interface with built-in demux processor for connecting to external digital TV tuner/demodulator and one output TS interface
    • Built-in PWM, I2C and SPI interfaces to control tuner and demodulator
    • Integrated CI+ port and ISO 7816 smart card controller
  • Integrated I/O Controllers and Interfaces
    • 3x USB 2.0 high-speed USB I/O, 2x USB Host and one USB OTG
    • Multiple UART, I2C and SPI interface with slave select
    • Multiple PWMs
    • Programmable IR remote input/output controllers
    • Built-in 10bit SAR ADC with 2 input channels
    • General Purpose IOs with built-in pull up and pull down
  • System, Peripherals and Misc. Interfaces
    • Integrated general purpose timers, counters, DMA controllers
    • 24 MHz crystal input
    • Embedded debug interface using ICE/JTAG
  • Power Management
    • Multiple external power domains controlled by PMIC, and internal ones controlled by software
    • Multiple sleep modes for CPU, system, DRAM, etc.
    • Multiple internal PLLs for DVFS operation
    • Multi-voltage I/O design for 1.8V and 3.3V
    • Power management auxiliary processor in a dedicated always-on (AO) power domain that can communicate with an external PMIC
  • Security
    • Trustzone based Trusted Execution Environment (TEE)
    • Secured boot, encrypted OTP, encrypted DRAM with memory integrity checker, hardware key ladder and internal control buses and storage
    • Protected memory regions and electric fence data partition
    • Hardware based Trusted Video Path (TVP) , video watermarking and secured contents (requires SecureOS software)
    • Secured IO and secured clock
  • Package – LFBGA 15 x 15 mm, 0.65 ball pitch, RoHS compliant

That means Amlogic S905X and S912 have the exact same video playback capabilities, although S912 will also support Dolby Vision HDR standard. The main differences are the eight Cortex A53 cores clocked at 2.0 GHz (instead of 4x A53 @ 1.5 GHz), and the more power ful Mali-T820MP3 GPU, as well as support for LCD panel (e.g. for tablets) thanks to an extra RGB interface. Finally S912 has three USB interfaces, instead of just two for S905X.

Amlogic 2016 roadmap shows S905X is scheduled for Q1 2016, and S912 for Q2 2016,  but it’s likely we need to add one or two more quarters before we get any Android 6.0 devices based on the new processors.

Linux 4.5 Released – Main Changes, ARM and MIPS Architectures

March 15th, 2016 1 comment

Linus Torvalds released Linux Kernel 4.5 on Sunday:

So this is later on a Sunday than my usual schedule, because I just couldn’t make up my mind whether I should do another rc8 or not, and kept just waffling about it. In the end, I obviously decided not to,but it could have gone either way.

We did have one nasty regression that got fixed yesterday, and the networking pull early in the week was larger than I would have wished for. But the block  layer should be all good now, and David went through all his networking commits an extra time just to make me feel comfy about it, so in the end I didn’t see any point to making the release cycle any longer than usual.

And on the whole, everything here is pretty small. The diffstat looks a bit larger for an xfs fix, because that fix has three cleanup refactoring patches that precedes it. And there’s a access type pattern fix in the sound layer that generated lots of noise, but is all very simple in the end.

In addition to the above, there’s random small fixes all over-shortlog appended for people who want to skim the details as usual.

Go test, and obviously with 4.5 released, I’ll start the merge window for 4.6.

Linux 4.4 added support for a faster and leaner loop device, 3D support in virtual GPU driver, TCP improvements, various file systems improvements for BTRFS, EXT-4, CIFS, XFS etc… Some notable changes made to Linux 4.5 include:

  • Copy offloading with new copy_file_range(2) system call – Performance improvements on local file systems are marginal, but for networked file systems such as NFS, you could copy a file internally on a server drive without transferring file data over the network.
  • Experimental PowerPlay for amdgpu driver
  • Btrfs free space handling scalability improvements – New, experimental way of representing the free space cache that takes less work overall to update on each commit and fixes the scalability issues for large drives (30TB+). It can be enabled with -o space_cache=v2 mount option, and you can revert to the one method with -o clear_cache,space_cache=v1.
  • Support for GCC’s Undefined Behavior Sanitizer (-fsanitize=undefined) UBSAN (Undefined Behaviour SANitizer) is a debugging tool available since GCC 4.9. It inserts instrumentation code during compilation that will perform checks at runtime before operations that could cause undefined behaviors. Linux 4.5 supports compiling the kernel with the Undefined Behavior Sanitizer enabled.
  • Next gen media controller whose “goal is to improve the media controller to allow proper support for other types of Video4Linux devices (radio and TV ones) and to extend the media controller functionality to allow it to be used by other subsystems like DVB, ALSA and IIO”. See lkml for details

Some new features and improvements specific to the ARM architecture:

  • Allwinner:
    • Allwinner A80 support – IR receiver driver, NMI controller,PRCM driver, R_PIO support, and RSB driver
    • Allwinner H3 SoC support – H3 USB PHY clocks
    • A10/A20 Video Engine clocks
    • MIC1 capture for sun4i codec
    • Audio codec enabled on various boards
    • Added board – Orange Pi Plus
  • Rockchip:
    • Crypto module and io-domain driver enabled in multi_v7_defconfig
    • Tweaks for RK3368 SoC and eval board
    • Added Rockchip RK3228 SoC and eval board
    • New RK3228 subdriver in pinctrl
    • SPI driver fix
    • Added support for RK3399 in thermal driver
    • RK3036: Added SMP support, emac support
    • Expose USB PHY PLLs
  • Amlogic
    • Device tree changes – Add watchdog node to meson8b, add status LED for ODROID-C1
    • Watchdog timer modifications
  • Samsung
    • eMMC/SDIO minor fixes usage of bindings on Snow and Peach chromebooks.
    • Remove FIMD from Odroid XU3-family because on XU3 it cannot be used yet and on XU3-Lite and XU4 it is not supported.
    • Remove deprecated since June 2013 samsung,exynos5-hdmi.
    • Add support for Pseudo Random Generator on Exynos4 (Trats2 for now). This depends on new SSS clock.
    • Add rotator nodes for Exynos4 and Exynos5.
    • Switch DWC3_1 on Odroid XU3 and XU3-Lite to peripheral mode because  now it cannot be used as OTG.
    • Cleanup the G2D usage on Exynos4 and add it to a proper domain in case of Exynos4210.
    • Put MDMA1 in proper domain on Exynos4210 as well.
    • Minor cleanups
  • Qualcomm
    • New pinctrl subdrivers for Qualcomm MSM8996, PM8994,  PM8994 MPP support
    • Added Qualcomm PCIe controller driver
    • Qualcomm ARM64:  Add fixed rate oscillators to dts, fixup PMIC alias and properties, change 8916-MTP compatible to be compliant with new scheme, fix 8×16 UART pinctrl configuration, add SMEM, RPM/SMD, and PM8916 support on MSM8916
  • ARM SoC multiplatform code – “This branch is the culmination of 5 years of effort to bring the ARMv6 and ARMv7 platforms together such that they can all be enabled and boot the same kernel”
  • ARM64 – hugetlb: add support for PTE contiguous bit; perf: add support for Cortex-A72;
  • Other new hardware or SoCs – Sigma Designs ARM Cortex-A9 Tango4 “Secure Media Processor” platforms (SMP8756, SMP8758, and SMP8759), TI-based DM3730 from LogicPD (Torpedo), Cosmic+ M4 (nommu) initial support (Freescale Vybrid), Veyron-mickey (ASUS Chromebit), BCM2836 and Raspberry Pi 2 B.

MIPS changes:

  • Add support for PIC32MZDA platform
  • bcm963xx: Add Broadcom BCM963xx board nvram data structure
  • dts: Add initial DTS for the PIC32MZDA Starter Kit
  • math-emu: Add IEEE Std 754-2008 ABS.fmt and NEG.fmt emulation
  • math-emu: Add IEEE Std 754-2008 NaN encoding emulation
  • math-emu: Add IEEE Std 754 conformance mode selection
  • pci: Add MT7620a PCIE driver
  • ralink: add MT7621 support
  • zboot: Add support for serial debug using the PROM

If you want to get the full details, I’ve generated Linux 4.5 Changelog with comments only (12.2MB) using git log v4.4..v4.5 --stat, but it’s probably a better idea to simply check out Linux 4.5 changelog on kernelnewbies.org.

SPMC 16.1.1 (Kodi 16.1 Android’s Fork) Adds Bluray 3D ISO Playback, HD Audio Pass-through, and Other Improvements

March 14th, 2016 38 comments

You may remember SPMC (Semper Media Center), a fork of Kodi/XBMC, was released a few years ago to fix some issues with Rockchip processors that would not make it to Kodi mainline code. Koying, the project’s developer, has now forked Kodi 16.1 to add some bug fixes and experimental features, and released SPMC 16.1.1.

SPMC_16.1

Changelog compared to Kodi 16.1:

  • Based on Kodi 16.1
  • HD Audio pass-through (Nvidia Shield AndroidTV + some Amlogic devices such as Minix U1 & Wetek Core at least)
  • Autostart at boot (xbmc.autostart=true in xbmc_env.properties)
  • GUI size setting (Allows 4K GUI on Nvidia Shield)
  • Only give codec priority to Mediacodec (Surface) for 4K
  • Only stop video on minimize for Mediacodec (Surface)
  • “System” screensaver to enable daydream; all other screensavers disable daydream
  • Get removable storage names from system
  • Basic Bluray 3D iso playback (experimental; amlogic)
  • Android TV recommendations and voice search (experimental)
  • SSL enabled MySql
  • Stop video playback when screen goes off
  • Setting to force SMB v1 (might solve windows connection issues)
  • The ever good ol’ “Import All” option
  • “Back” = Stop in fullscreen video

Bear in mind that Koying’s main hardware platform is Nvidia Shield Android TV box, so this particular device is most likely to get the best support, but Amlogic devices and Amazon Fire TV could also get some love.

You can try SPMC 16.1.1 on any Android 4.2 and greater devices by downloading the apk for ARM or x86 on SPMC website, and soon on Google Play. The source code can be found on github, which Koying also uses as a bug tracker.

Thank you  Harley!