Mi Box 3 Int (mdz-16-ab) - Fix for broken DTS/AC3 SPDIF passthrough after FW 2175 and later

by vnenov

The last Oreo firmware, which still had the Sound -> Sound Output -> Always option to force AC3/DTS passthrough via SPDIF was 2175. Since then the options are PCM and Auto. When using Auto via SPDIF, DTS/AC3 is not properly passed through, so you hear no sound in Plex, Kodi, MrMC, etc. Apparently it works via HDMI and a newer receiver, which I have not tested and it is not my case.

Here is how I fixed the issue and the fix persists after restarting the Mi box. Afterwards, you should not change the Sound Output options in the Settings or reset to defaults as this will undo the fix. If you have done it, you have to repeat the steps.

First you need to connect a laptop to your Mi Box via USB cable and enable USB debug in Developers options. Install Xiaomi ADB USB drivers on the laptop first. Then in command prompt type:

adb devices

You should see your Mibox device listed here. To make future changes easier enable adb over wifi enter:

adb kill-server

adb tcpip 5555

Disconnect the USB cable and from a PC on the same network with the platform tools installed enter:

adb connect <Mi box IP>:5555

adb devices, now should show you the connected Mi box. Note, that you can run the commands below while using the USB cable connection as well. The WiFi ADB connection is just to make future changes easy. It took me an hour to find A to A USB cable at home :)

The fix is to change the settings in the global table to force passthrough over SPDIF.

adb shell settings put global digital_sound 1

adb shell settings put global encoded_surround_output 2

This should set the passthrough settings to Always. This will not work for DD+, but works for DTS/AC3. I have converted my DD+ files to AC3.

More technical details about the encoded_surround_output parameter:

encoded_surround_output=0 (AUTO)

* The surround sound formats AC3, DTS or IEC61937 are

* available for use if they are detected.

* This is the default mode.

* Note that AUTO is equivalent to ALWAYS for Android TVs and other

* devices that have an S/PDIF output. This is because S/PDIF

* is unidirectional and the TV cannot know if a decoder is

* connected. So it assumes they are always available.

encoded_surround_output=1 (PCM)

* AC3, DTS or IEC61937 are NEVER available, even if they

* are detected by the hardware. Those formats will not be

* reported.

* An example use case would be an AVR reports that it is capable of

* surround sound decoding but is broken. If NEVER is chosen

* then apps must use PCM output instead of encoded output.

encoded_surround_output=2 (ALWAYS)

* AC3, DTS or IEC61937 are ALWAYS available, even if they

* are not detected by the hardware. Those formats will be

* reported as part of the HDMI output capability. Applications

* are then free to use either PCM or encoded output.

* An example use case would be a when TV was connected over

* TOS-link to an AVR. But the TV could not see it because TOS-link

* is unidirectional.

Let's hope Xiaomi will add the option back, meanwhile this is a working workaround. Hopefully it was a helpful post.

glassbase86

Enabling USB debugging automatically enables wifi adb

Bodycount9

Or you can buy this from Amazon:

https://www.amazon.com/gp/product/B074HHSJVN/

and skip all the programming. works great. I have no issues with AC3 and DTS audio now.

lukasnmd

Netflix and Google Movies still doesnt work, for obvious reasons, although they show 5.1 sound icon.

DD+ isnt available through toslink, as pointed many times.

Nevertheless This is good for someone who has hdmi capable receiver but for some reason isnt detected as such by mibox.

Works on Oreo 2396.

asher_pa

Hi,

I got F\W OPR6.170623.013.2396 (int_mdz16ab).

my SPDIF also not work with DTS, just try your command, but it still not work (Tested with Netflix & Kodi)

Do you have another idea?

TNX

AlonB_01

Hey

I really glad I found your fix. I was struggling this for a long time without a solution.

I have encountered two problems while following your instructions because of my (not so rare I guess) setup.

My setup is that: Mi box 3 ->HDMI -> tv and also Mibox 3->Spdif->Sony BDV E280, instead of being connected through wifi ,I use USB-LAN Adapter.

It seems that:

  1. When USB-debugging enabled, I can't have the lan connection at it seems that the debug takes over. So My question is, will the fix will work after I disable the usb debugging?

  1. I can't find A to A USB cable in order to connect my laptop to the mi box. Perhaps there is another way to enable adb over wifi/lan? maybe by accusesing mibox's adb (I can connect usb keyboard to the mi-box) .
mercalik

Hello there. Can we continuously activate the dolby atmos with the same process? And also can we make the 4K resolution option appear in the box image settings?

BiggussDikkuss

Nice info for Android audio hacking.

PS the new FireTV Stick 4K has proper Dolby Audio support and easily downmixes Netflix, Prime - DD+ audio into DD only audio to support older audio receivers.

They are $35 this upcoming Black Friday.