I do not have the latest testbuild installed, but please hear me out.
I noticed that the PCM mixer for the HDMI output has an upper volume limit of +4dB (as seen in amixer). Kodi itself is somehow limited to a safe -1.31dB, but add-ons that talk to the mixer directly, will set the volume to +4dB at the 100% level (Spotify Connect Web for instance). This will cause some pretty bad distortion due to clipping.
With my HiFiBerry, I could just store the amixer settings and edit them and my edits would be persistent across reboots, but somehow this won't work for the PCM mixer. I saved it, edited the range and dbmax, set the volume at 0dB, but to no avail. It just boots at -1.31dB and with an upper limit of +4dB. I
asked around on the LibreElec forum, but nobody was able to help me.
So this is why I'm asking here. Isn't it better to just limit the mixer to 0dB at the OS level for everyone? The same is done for the HiFiBerry sound card's Digital mixer, which is limited to 0dB, level 207, in software (instead of level 255). I think the use case for +4dB is very limited and Kodi itself is limited to -1.31dB anyway. In most cases it will just cause bad distortion and a lot of users will not understand why that is happening.
Edit: It was not clear that I'm talking about the HDMI sound output.