S905x support, what is needed?


  • I confirm that 008 version of kszaq works perfectly from SD on my MINIM8S II (8GB ROM with 2GB RAM) . It has hevc 10bit hardware acceleration, something i was trying to fix long time as the initial firmware doesn't support it although S905X supports it. Wifi works, everything works, even the remote control works quite well. The remote control can even turn the device off and on.
    The only thing I can't make it work is audio via Optical toslink output. On settings i see 2 hdmi and 1 Bluetooth outputs. I've tried them but couldn't make the Spdif work. I haven't tried passthrough. If it works i can get audio via my tv's toslink.
    Also CEC i think worked but now it's dead.
    Thanks a lot kszaq for the good work. I hope you can fix also toslink and CEC. :)

    I also own a Mini M8S II (2G/8G, I loan it to my friend last Friday to test with his new 4K TV though). Optical output or SPDIF has been working from the very early days. Once you select HDMI audio output on System Settings menu, audio will output through SPDIF at the same time. Of course, I only connect the optical output to my AV receiver. You said 'I can get audio via my tv's toslink', it might be some misunderstanding. TV's toslink is only for optical audio output, not for audio input, at least in North America. TV Audio input always comes from HDMI, and then output the audio signal to your AV receiver via toslink.

    For 'passthrough', it means your Mini M8S II will not process (or doing any conversion) on the audio track(s) and pass it out to your AV receiver through HDMI or SPDIF.

    As for CEC, I found it works flawlessly (except suspend) with all my TVs since 005 or even before that (2 Toshiba, 1 Panansonic and 1 LG). Usually you need to turn this feature of your TV on first, then it will recognize how many devices connected to the TV are using CEC.


  • I also own a Mini M8S II (2G/8G, I loan it to my friend last Friday to test with his new 4K TV though). Optical output or SPDIF has been working from the very early days. Once you select HDMI audio output on System Settings menu, audio will output through SPDIF at the same time. Of course, I only connect the optical output to my AV receiver. You said 'I can get audio via my tv's toslink', it might be some misunderstanding. TV's toslink is only for optical audio output, not for audio input, at least in North America. TV Audio input always comes from HDMI, and then output the audio signal to your AV receiver via toslink.

    For 'passthrough', it means your Mini M8S II will not process (or doing any conversion) on the audio track(s) and pass it out to your AV receiver through HDMI or SPDIF.

    As for CEC, I found it works flawlessly (except suspend) with all my TVs since 005 or even before that (2 Toshiba, 1 Panansonic and 1 LG). Usually you need to turn this feature of your TV on first, then it will recognize how many devices connected to the TV are using CEC.

    Yes, I made a mistake regarding the SPDIF passthrough. I meant i wanted to send DTS audio from M8SII to my tv via HDMI and from my tv via toslink to my AV receiver. But i realize that to do it, my tv should support SPDIF passthrough probably.
    Also now the optical output of M8SII sends sound to my AV receiver successfully. So I suppose there was a problem with my cable or my toslink switch or something. I confirm toslink output works.
    I also tried to change my HDMI cable and now I have CEC working.
    I'm sorry for posting without having tested thoroughly first. :)
    So i think pretty much everything is ok with Libreelec and my box.

  • Hello again...

    Yesterday i tested a second brand new out-of-the-box Mini M8S II Android TV box...

    I did the following procedure:

    1) Downloaded latest development LibreELEC version LibreELEC-S905.aarch64-7.0-devel-20161024175728-r23406-g57856b7.img.gz ...

    2) Used Rufus to "burn" it on an external SD Card 16GB...

    3) Copied file dtb.img to SD Card which is the renamed device tree file gxl_p212_2g.dtb...

    4) Started TV box by pressing the recovery button underneath...

    5) Started LibreELEC from SD Card...

    6) I connected to TV box with SSH and executed command "installtointernal" to install in NAND...

    7) TV box restarted, i ejected SD Card...

    8) Setup LibreELEC and Kodi...

    9) I installed no Addons except BSPlayer subtiltles and added Sources from my NAS for Music, Movies and TV Shows...

    10) I played an episode 720p, AC3, MKV from NAS and paused at the middle of the episode...

    11) I went to bed without closing TV box, only TV and amplifier...

    12) I woke up, opened TV and TV box was frozen... I had to unplug power cord...

    Is there anyone who can reproduce this issue?

    Best regards...

  • May I raise the issue of BT.2020 support. I somehow have a feeling that we are too easily getting over trying to properly activate full 4K support these s905x boxes have...I have tested Libreelec in terms of BT.2020 support and it doesn't work...the box does not signal BT.2020 colorspace to the UHD TV while it does so in Android via Deep Color option (a misnomer actually, Deep Color doesn't have much to do directly with BT.2020 but it gets it activated)...

    I'm in a way being very insisting on this because BT.2020 is THE standard for 4K video, both broadcast or UHD Bluray, and here we are, owning true 4K boxes but we don't get the right colors (we get dull greenishly discolored excuse for a picture)...

    there also seems to be trouble with HDR support in both Android and Libreelec in the way that HDR is not converted properly for SDR TVs, but since I don't have a HDR TV, I can't tell with certainty whether it's broken or the option is really not meant for HDR->SDR conversion and actually works correctly when connected to a HDR TV...

    kszaq: please can you try looking into this or explain why we can't have it, I can help as much as I can with whatever I know about this matter in color science terms and termonology, but I have no programming knowledge...

    Cheers

    Edited once, last by mytbyte (November 21, 2016 at 9:21 PM).

  • mytbyte Can you precisely describe what does work in Android and doesn't in LibreELEC? I can look into Android source and try to provide a fix/workaround but I'm not able to implement anything that does not work in Android regarding to HDR or UHD - no equipment to test.

  • kszaq: there is an option (switch) in Android 6.0 screen resolution settings called Deep Color that activates 10-bit output but also BT.2020 wide color gamut support. Without BT.2020 support, 10-bit UHD video looks pale and green because colorspace of UHD video as per standard is wider than usual TV colorspace (rec.709)...so, a UHD TV needs to know that incoming HDMI video is in BT.2020 colorspace and it's up to the TV box to signal that by activating the Deep Color feature...

    Hope this clears it up...I suppose you need to tackle into android source to locate the deep color option...

    A very late P.S. :D - HDR is broken, as described above, in Android as well, so I would concentrate on BT.2020 Deep Color support first, that is more important...

    Sent from my GM 5 Plus d using Tapatalk

    Edited once, last by mytbyte (November 22, 2016 at 8:09 PM).

  • Hi everyone. Pretty new to ARM development. Some years ago I made a TV box on my Raspberry PI, installing Armbian, the old XBMC release and TVHeadend as backend for DVB-T USB dongle. It was hard but everything is working since a couple of years.
    Now I decided to buy a new box, more powerful than a Raspberry. I found a tv box named T95X equipped with S905X Amlogic Soc, 2GB NAND / 8GB RAM.
    It was very cheap (35 Euro) and it was the only one the producer assured to be rooted and fully open with accessible recovery image and able to boot from SD. It is so.
    I tried some other tv boxes but no one was so open.
    My goal was to to reproduce the setup I made with Raspberry, but suddenly I understud I lack in booting process knowledge to go on.
    Googling to understand something more, I found this forum and this thread. BANG! It is the most advanced one. I'm really impressed about the hard good work done by developers to build LE distro for this SoC.
    Everything is working booting the last image from SD in my box, and now I'm planning to flash it to NAND.
    Just a couple of question, if I can ask:
    1) I made a backup (via TWRP) of my stock partitions (boot, system, data). If I would like to restore the box to Android after flashing LE to NAND, will TWRP be able to restore the factory partitioning? Or TWRP assumes to find partitions already made (I do not have a .img of the whole stock NAND)?
    2) How is it possible to dump the whole NAND? I know this is off-topic but please, does anyone have a link to some method?
    3) Most important. Do LE developers considered as new feature including TVHeadend in the distro? This because in many country live TV internet streaming (IP TV) is not performed by TV companies. In my opinion this will be a good idea to have a complete TV box equipped with LE.

    Many thanks and ... I will post further test result on the T95X with LE to add this box to the LE's compatibility list.
    Regards
    g

    Edited once, last by Virtex (November 30, 2016 at 9:27 PM).


  • 1) If I made a backup (via TWRP) of my stock partitions (boot, system, data) will TWRP will be able to restore that partitioning after flashing the NAND with LE? Or TWRP assumes to find the partitions already made (I do not have a .img of the whole stock NAND)


    If you flash stock Android image prior to restoring your backup, it should work. Restoring full factory image is important as you also need Android-build-specific device tree.


    2) How is it possible to dump the whole NAND? I know this is off-topic but please, does anyone have a link to some method?


    There's no way I'm aware of.


    3) Most important. Do LE developers considered as new feature including TVHeadend in the distro?


    You can install TVHeadend as an addon. It's available from official LE repository.

    You should keep in mind that because of an older kernel version that we have to use for Amlogic devices much less DVB tuners are supported compared to RPi builds.

  • Ooops ... Sorry for question n.3 I didn't realized TVHeadend IS actually available as plugin in LE. Great!!! I'll try with my DVB-T dongle.
    Question 1) and 2) still remain.
    Thanks.

  • Ok. Here my result after some days testing LE on T95X box, if anyone can be interested.
    Almost everything seems to work.
    0) SD boot OK (first run achieved with toothpick method: factory uboot in my device has env settings telling to try load aml_script from SD or USB when forced in recovery mode)
    1) Wired eth OK
    2) Wireless OK
    3) USB OK
    4) TV dongle (Realtek RTL2832) OK
    5) Built-In Bluetooth KO <------
    6) Bluetooth dongle OK
    7) USB HDD performaces ---> Not yet checked. Caused reboot due to undervoltage when connected directly to box's USB ports. Too much current drained from HDD. Need an external powered USB hub
    8) TVHeadend service add-on OK (web interface accessible from other PC in the LAN, TV tuner listed in Adapters list)
    9) HW acceleration h.264@1080p OK

    So, exciting results except for Bluetooth. Any notice about bluetooth devices in dmesg when booting.
    Activating Bluetooth service from GUI, here my loaded kernel modules:

    # lsmod
    Module Size Used by
    bnep 11076 2
    bluetooth 243164 5 bnep
    6lowpan_iphc 5895 1 bluetooth
    8723bs 1688630 0
    cfg80211 359903 1 8723bs
    8021q 18309 0
    dwc3 18093 0
    wifi_dummy 806 0
    mali 238555 5
    aml_nftl_dev 82924 0

    Does anyone can help me to solve the issue?
    I suspect my BT device is'nt recognized at kernel level. Maybe the dtb.img is missing something for this board? How ca I extract factory device tree from my box?
    Thanks.
    g
    [hr]


    If you flash stock Android image prior to restoring your backup, it should work. Restoring full factory image is important as you also need Android-build-specific device tree.


    There's no way I'm aware of.


    You can install TVHeadend as an addon. It's available from official LE repository.

    You should keep in mind that because of an older kernel version that we have to use for Amlogic devices much less DVB tuners are supported compared to RPi builds.

    Thanks for reply. No I do not have factory Android image for my box. I'll try to get it from somewhere before flashing LE to NAND
    About dumping whole NAND, I'll try with serial connection to the box, to see if I can interrupt uBoot and use nandump or mmc built-in commands.
    I'll post news if any. Thanks

    Edited once, last by Virtex (December 2, 2016 at 6:49 PM).

  • Some news for T95X. I succeded extracting dtb from my Android stock firmware. Gzipped image attached to this post.
    I removed the header to convert the compiled dtb to readable dts. It seems to me there are differences from the dts extracted from the LE distro I'm running. Bluetooth section seem also to be different.
    I made a copy of the original android stock dtb to the SD card replacing the dtb.img file of LE. The box no longer boots.
    Am I missing something? Am I too newbie to perform such kind of manipulations?

    Thanks.
    giuiliano

  • Virtex To run my builds you should always use device tree from the ones provided in download folder. Bluetooth issue most likely isn't related to device tree but my crystal ball refuses to work without logs. ;)


  • Virtex To run my builds you should always use device tree from the ones provided in download folder. Bluetooth issue most likely isn't related to device tree but my crystal ball refuses to work without logs. ;)

    OK, let's help your crystal ball :) Attached my dmesg at boot time, attached my dts. Here below modules loaded at boot:

    # lsmod
    Module Size Used by
    8723bs 1688630 0
    cfg80211 359903 1 8723bs
    8021q 18309 0
    dwc3 18093 0
    wifi_dummy 806 0
    mali 238555 5
    aml_nftl_dev 82924 0


    If any other log or configuration file or any test can help, please let me know. Thanks in advance.
    giuliano