I have the same problem as described here with my hifiberry digi-plus (with Raspberry 3):
I am able to play DTS files via playthrough (optical).
When I try play dolby digital 5.1 files I don't hear any sound from my receiver Kenwood
If I play the same files via my pc which is also connected via optical spdif both audio formats (DTS and Dolby Digital 5.1) work perfectly.
I made all the settings shown on the hifiberry website.
I tried openelec, libreelec and osmsc - always the same (above) described symptoms.
DTS passthrough working, but not Dolby 5.1