I’m using OSMC with Kodi 18.3 on a Raspberry Pi 3 Model B+ and a HiFiBerry Digi+ sound card. I activated AC3 passthrough which is working (I get 5.1 sound), but at least for some files (maybe all files) I get some crackling noise. It seems to be correlated with the intensity of audio output; in quiet scenes, the noise goes away. 2 channel output (either on files with a pure stereo signal or downmixed) works fine (no noise).
I tried different sound settings without any success. Is there anything I can do to trouble shoot and hopefully fix this issue?
Have you tried playing with the settings>system>audio>maintain original audio on downmix? You might also check to make sure the internal volume in Kodi is set to the max (i’m not sure how this would, or wouldn’t impact, but worth a try).
I think I figured it out: my Yamaha RX-V461 receiver was to blame (not sure why I didn’t have problems before as it is probably about 10 years old, but then again I wasn’t using it the last 5 years). There actually exists a firmware update. Unfortunately, Yamaha does not provide it on their website. According to some old posts on the Internet, you can write to the support and they will send it to you (might be slow to respond). However, I found this Polish website that offers the update. (They require registration, but you can probably find working logins on bugmenot.com).
To install the update:
Copy AVRx61_E116.wav onto your OSMC device.
Connect it via S/PDIF to the reveiver.
Unplug the receiver.
Press Power and Speakers A/B/OFF at the same time while plugging the receiver back in. The receiver’s display should show “SPDIF Upgrade”
SSH into the OSMC system
Run aplay -L and find the correct SPDIF device, should probably say something like “Direct hardware device without any conversions”.
Run aplay -D <the device code> AVRX61_E116.wav. In my case (Raspberry PI with HiFiBerry Digi+), the full command was aplay -D hw:CARD=sndrpihifiberry,DEV=0 AVRx61_E116.wav. You should see hexadecimal addresses on the receiver’s display for a few minutes and then “Upgrade OK” should be displayed.