Since a month now I am running Ubuntu 18.04 on my media center PC. I found that streaming encoded 5.1 audio to my old receiver caused loud noise and only ALSA would work correctly.
Yesterday I saw the release notes for pulseaudio 12.0 which said:
When using passthrough for compressed audio, set the "non-audio" bit
When playing compressed audio through S/PDIF or HDMI, it should be indicated that the data is not normal uncompressed audio, otherwise the receiver might play some horrible noise. It seems that PulseAudio never set the "non-audio" bit properly. There hasn't been any complaints about this until recently, so apparently receivers generally detect compressed audio pretty well even without the "non-audio" bit being set, but in any case, now PulseAudio does set that bit.
This sounds like it will fix my problem with pulseaudio and I don't need to switch back and forth to ALSA all the time.
However when I do apt search pulseaudio I see the latest version is 11.1 and is installed. I there a ppa from where I can get 12.0 or even better 12.2 ? I can't find any recent information on this when searching google.