LibreELEC and Hi-Res audio files / digital optical passthrough

  • Hello everyone!

    I have a question regarding LibreELEC, I have searched and read informations about this aspect but it's still unclear for me. I'm sorry if this subject was discussed in another topic, I didn't found it ...:|

    If I buy an Android TV Box which supports LibreELEC installation, it is possible to passthrough high resolution audio files over digital audio (optical or coaxial) output? Can the device, with LibreELEC, output bit-perfect 16-bit/44.1KHz, 24-bit/88.2KHz, 24-bit/96KHz and 24-bit/192KHz audio files (FLAC and WAV), without resampling?

    I have a pretty large hi-res audio library and it's very important for me to be sure this is possible as I have an external standalone DAC who handles the audio conversion.

    Thank you!

  • Kodi supports rates up to 384KHz but that requires specialist DAC hardware and most devices will stick to the official S/PDIF specification limits that stop at 24/192Khz. It is hardware dependent, but I would be surprised if Android box hardware didn't support them. The alsa drivers in the Amlogic kernel could be an entirely different issue, but the hardware itself should be fine ;)

  • I know the hardware supports hi-res audio over S/PDIF up to 24-bit/192KHz, which is enough for me. My question mark is about the software.

    I have read an user report saying even the most recent Kodi version is upsampling FLAC 16-bit/44.1KHz > 16-bit/48KHz and downsampling 24-bit/96KHz > 16-bit/96KHz and 24-bit/192KHz > 16-bit/192KHz.

    Kodi Forum: Hi-res audio playback

    And I've also read somewhere that LibreELEC doesn't resample Hi-Res audio over S/PDIF but I'm not 100% sure about this, that's why I've asked here. This issue it's software related ...

    In this topic someone was saying he managed to output (with LibreELEC) 44.1KHz up to 384KHz but using the USB output. I need to do this (up to 24-bit/192KHz) over digital optical output. And he doesn't mention anything about bit depth, so it's pretty unclear to me.

    LibreELEC forum: [SOLVED] Audio output device - 192Khz to 384Khz sampling rates

    LibreELEC (Krypton) 8.2.0 changelog says "Fix Kodi to support 352KHz and 384KHz audio over S/PDIF" but I assume this is for USB output, as digital optical is limited to 192KHz. It's unclear for me what is the situation when using digital optical (or coaxial) output ...

    Changes since LibreELEC 8.0.2 include: LibreELEC (Krypton) 8.2.0 RELEASE – LibreELEC

    Edited 4 times, last by racko (November 14, 2017 at 8:11 AM).

  • I have read an user report saying even the most recent Kodi version is upsampling FLAC 16-bit/44.1KHz > 16-bit/48KHz and downsampling 24-bit/96KHz > 16-bit/96KHz and 24-bit/192KHz > 16-bit/192KHz.

    I think that some or all of this statement is wrong.

    Whenever I play content from 44.1kHz sampled sources it is played out a 44.1k. When I play from a 48k source it is played out at 48k. In my case I use the music player in Kodi to play DTS streams ripped from DTS CDs (44.1) and from DTS soundtracks ripped from DVDs (48k) and both are decoded by my AV receiver accurately. It can only play these if they are bit-perfect. They would not be if there was any sample-rate conversion taking place (you'd just get noise, the same as if you play them with Kodi's volume set to anything other than 100%)

    Editing my post - For clarification, I am using PC hardware. I suppose some other devices might have restricted hardware and drivers that include sample rate conversion? I have no idea about that.

    Edited 2 times, last by S80_UK: Added content (November 16, 2017 at 3:58 PM).

  • For clarification, I am using PC hardware. I suppose some other devices might have restricted hardware and drivers that include sample rate conversion? I have no idea about that.

    That's why you don't have any issues. :) As I said in my opening post, I was talking about LibreELEC running on Android TV boxes. As far as I know, Android OS is resampling everything at 16-bit/48KHz but LibreELEC for Android TV boxes is running on a different Linux based OS, not Android.

    In meantime, I've bought a Minix Neo U1. Here are the results ...

    Running Kodi Krypton (Google Play version) on Minix Android OS, 16-bit/44.1KHz audio files are upsampled to 16-bit/48KHz and all hi-res audio files are downsampled to 16-bit/48KHz over S/PDIF digital optical output (TOSLINK).

    Running LibreELEC from SD card, all audio files - 16-bit/44.1KHz, 16-bit/48KHz, 24-bit/88.2KHz and 24-bit/96KHz - aren't resampled over S/PDIF digital optical output (TOSLINK).

    The only problem is 24-bit/192KHz audio files aren't played, no sound at all over S/PDIF digital optical output. I don't know why, I don't know if it's hardware or software related. As far as I know TOSLINK is capable to output up to 24-bit/192KHz. I'm still looking to identify the problem ...

  • The only problem is 24-bit/192KHz audio files aren't played, no sound at all over S/PDIF digital optical output. I don't know why, I don't know if it's hardware or software related. As far as I know TOSLINK is capable to output up to 24-bit/192KHz. I'm still looking to identify the problem ...

    Solved. Now I have audio streaming over optical digital out up to 24-bit/192KHz.

  • Sure, sorry ...

    It seems that audio capabilities are software limited because of the presence of analog audio chip in Minix Neo U1 and the way of how kernel driver is implemented.

    Running LibreELEC from microSD card, I replaced the U1 device tree (dtb.img) gxbb_p200_2G_minix_neo_u1.dtb with this generic version gxbb_p200_2G_1Gbit_OTG_Port.dtb which bypasses the analog audio chip and omits analog audio in output path.

    Amlogic S905 Device Trees: Index of /s905/8.2/device_trees/S905

    As a result, I lost analog audio on Minix Neo U1 (mic input and headphones output are not working anymore) but I have full capabilities over optical digital (TOSlink) output.

    And with the new device tree RTC (Real Time Clock) is not working also.

    It's important to mention this workaround worked for my Minix Neo U1, I don't know for other boxes. And another thing is other boxes with the same Amlogic S905 don't have this problem:
    [8.0.2e] LibreELEC 8.0 for S905/S905X

    Running Kodi (Google Play version), all audio files are resampled to 16-bit/48KHz over optical digital (TOSlink) output.

  • Hello. I have all settings in KODI to pass-through and video DTS, Dolby or AC3 passes thrugh as raw without any problem. I am unable to change volume in KODI, which is correct.

    However, when I play music, whatever stream I choose - be it FLAC, WMA, WAV, MP3, I can always change volume of the stream in KODI. What that means that the stream is not sent to digital output unaltered, but it is passing throug mixer, where it is altered and probably even resampled.

    Can you please advise how to pass-thru WAV, WMA or FLAC music? Thank you

  • If you set your volume to 100% and use samplerates that are supported by your AVR then the samples won't be altered.

    Resampling only occurs when you try to play back a file in a not-supported samplerate (eg 192kHz if your AVR only supports 32-96kHz).

    so long,

    Hias

  • OK, so if I have 16bit FLAC 44.1kHz and I set volume to 100%, then the digital output at USB or HDMI is the same as original WAV used to create FLAC? Can you confirm please? I thought that KODI always resamples to 48kHz... (music, not the audio from video)