This post covers using an optical digital audio (SPDIF) cable with your DroiX from the T8 range.
The exact steps depend on which Android version is installed on your device:
Lollipop (T8-S Plus & T8 Mini)
KitKat (T8 & T8-S)
If I’ve got an HDMI lead and an optical lead in at the same time, this settings allows the TOSLINK digital audio out (optical lead) to work in general.
Once Settings have been configured for either version of Android:
Within the Android app from YouTube, audio is produced from my amp. In Kodi, using default settings with SPDIF passthrough set, 5.1 (AAC encoded, Looper rip from Navi-X) worked, however I couldn’t tell about DD encoding as my hardware predates that. A few people have mentioned in the forum the importance of needing to set Number of Channels: to 2.0 in Kodi’s System area, then System again and Audio Output. Please click “Reset above settings to default” first, then double check channels is (confusingly) set to 2.0
https://DroidBOXForums.com has current advice regarding surround sound AV equipment and Kodi.