Tanix TX2 RK3229 MPD DAC Hi Res Audio Bitperfect

  • I would like to explain my project for connect my Android box Tanix TX2 based on chip RK3229 with an amplifier DAC Sabaj A4 trough an optic cable.

    Android box Tanix TX2 e ampli-DAC Sabaj A5 Sabaj10

    The goal is use the Tanix TX2 like a server MPD for playing music in lossless Hi Res Audio.

    Android box Tanix TX2 e ampli-DAC Sabaj A5 Sabaj-10

    the technical specifications of the audio part of the RK3229 chip are:

    • I2S0/I2S1 with 8ch: supports up to 8 channels (8xTX or 8xRX). Audio resolution from 16bits to 32bits. Sample rate up to 192KHz
    • I2S2/PCM with 2ch: Up to 2 channels (2xTX and 2xRX). Audio resolution from 16bits to 32bits. Sample rate up to 192KHz
    • SPDIF: Support two 16-bit audio data store together in one 32-bit wide location.
    • Audio Codec: 24bit DAC. Support Line-out. Support Mono, Stereo, 5.1 HiFi channel performance. Sampling rate of 8kHz/12kHz/16kHz/24kHz/32kHz/44.1KHz/48KHz/96KHz

    Following this guide [unoffical] LE-9.2/9.80-Images for RK3229/RK3228

    I wrote the LibreELEC-RK322x.arm-9.2-devel-20200427220638-b7186bc-rk3229-tx2 image to my SD card.

    I inserted the SD card into the TX2, hold down the reset button and turned the box on.

    Through the KODI GUI I installed the MPD plugin and activated SSH.

    Then I disabled KODI to auto start


    Code
    systemctl mask kodi

    The configuration of Alsa and MPD started, based on the many guides on Bitperfect and various configurations.

    identified the optical output on the sound card

    Configured like default

    Code
    LibreELEC:~ # more .config/asound.conf
    defaults.ctl.card 2
    defaults.pcm.card 2

    Configured the MPD server

    With the current configuration MPD, automatically, if necessary with respect to the sampling of digital files, does UPSCALING with respect to the required output sampling (I created several outputs and I can change it).

    The configuration that made me suffer the most was lowering the CPU usage since UPSCALING with the default 96KHz 24bit 2ch converter was going over 100%.

    So I saw that everyone suggested using SOXR. I discovered that Kodi on LibreELEC had already been compiled with SOXR and it was enough to insert the correct string in the MPD.conf file.

    Code
    samplerate_converter "soxr very high"

    Now with the SOXR converter the 192KHz 32bit 2ch playback does not exceed 30% resources.

    The potential of this configuration is to be able to put my Hi Res music on an HDD and to be able to control the playback from my mobile phone connected to the same Wi-Fi network. So the source is not the mobile phone, but it only tells the MPD server which track to play and which audio output to use.

    I use the M.A.L.P. App on my mobile phone to do this.

    Android box Tanix TX2 e ampli-DAC Sabaj A5 Screen11

    Android box Tanix TX2 e ampli-DAC Sabaj A5 Screen10

    IMHO the result is very good :) i can play my music at 192Khz 32bit :love:

    Android box Tanix TX2 e ampli-DAC Sabaj A5 Img_2022

    Many thanks to ilmich for the support ;)

    Edited once, last by lukeluke1979 (March 31, 2022 at 2:38 PM).

  • Through the KODI GUI I installed the MPD plugin and activated SSH.

    Then I disabled KODI to auto start

    I'm confused. You run a KODI plugin without KODI? How does that work then?

    By looking at LE, I've managed to improve/enable audio for Rock64 (RK3328) on Debian('s kernel), so that I could run mpd. But recently sound broke ... again. (and also have a related issue, which I may post about on this forum)

    My LE device (another Rock64) continues to run flawlessly, so maybe I could use an entirely different approach.