Digging through posts etc. it appears that there are a number of folks out there that have issues with the digi/digi+ in playing AC3/Dolby Digital 5.1 files on some models of DD/DTS capable amplifiers in pass-through mode.
The HifiBerry programmers say it may be a problem with KODI/XMBC ....
But after digging around I believe its actually the ALSA driver that is the problem.
Even though the HifiBerry itself does not touch the bit stream on the way to the amplifier the HifiBerry driver still tells the ALSA sound system what format types it supports - e.g. S16_LE or S32_LE etc.
Using this script https://lacocina.nl/detect-alsa-output-capabilities on a OSMC installation with HifiBerry enable (confirmed by playing normal DTS and WAV files) this script shows that the HIfiBerry device only supports:
- rates per format =
S16_LE: 32000Hz 44100Hz 48000Hz 88200Hz 96000Hz 176400Hz 192000Hz
S32_LE: 32000Hz 44100Hz 48000Hz 88200Hz 96000Hz 176400Hz 192000Hz
Showing that the HifiBerry driver only supports S16_LE and S32_LE formats - 16/32bit little endian (for endian explanation see: https://en.wikipedia.org/wiki/Endianness )
Thus no matter what one does - the ALSA sound system will change the format of the sample being send to the HifiBerry to S16_LE format.
However pr. ORIGINAL AC3 spec: https://web.archive.org/web/20061231025413/http://www.sparta.lu.se/~bjorn/whitney/references/ac3spec.pdf the format of the AC3 sample is supposed to be big endian like (or left-bit first - see 5.2 and 5.4).
Some amplifies (like str-db930/830) expect the bit stream to arrive in big endian format as pr. specification.
However since ALSA only send in little endian becuase the HifiBerry driver tells it its all that is supported the bit stream arriving at the amp is in little endian format resulting in no sound output.
This is also supported by the comments from usenix on https://discourse.osmc.tv/t/problem-with-usb-dac-on-osmc-rc/2335/2 although not referring to a HifiBerry.
In conclusion - can the HifiBerry team provide a driver that tells ALSA that big endian is supported? I would like to test that and see if that make DD sound play correctly.