Volume limit for PCM mixer is too high (RPi 3)

  • I'm using LibreELEC on a Raspberry Pi 3 and I noticed that if I install the Spotify Connect Web add-on using the HDMI as the audio output, a mixer appears with the name PCM. According to the add-on maintainer, this mixer is already present in LibreELEC and is not created by the add-on. I noticed that the volume limit on that mixer is 4dB and there is some pretty bad distortion going on due to clipping if the volume is set at that level. In the past, the HiFiBerry soundcard had a similar issue with its Digital mixer, but that's fixed now, with the upper limit at 0dB. I would argue that it's best for the PCM mixer to be capped at 0dB too. Is that possible? Anyone that uses this add-on can control the volume directly through any Spotify app and it's extremely easy to set the volume too high.

    Code
    $ amixer
    Simple mixer control 'PCM',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined
      Playback channels: Mono
      Limits: Playback -10239 - 400
      Mono: Playback 400 [100%] [4.00dB] [on]
    Code
    $ amixer cget numid=1
    numid=1,iface=MIXER,name='PCM Playback Volume'
      ; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0
      : values=400
      | dBscale-min=-102.39dB,step=0.01dB,mute=1