Posts by makruiten

    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

    I'd like to set the PCM volume to 0dB and set that same value as the upper limit. Right now the upper limit is 4dB. The thing is: I use Spotify Connect Web, and I want to be able to control the volume with it, without risking to clip the signal. Here is what I tried:

    Code
    amixer sset 'PCM' 0dB
    alsactl -f /storage/.config/sound.conf store


    Then I opened the sound.conf file and edited the range and dbmax. However, it seems to ignore the sound.conf altogether. It boots with the volume at -1.31dB and the maximum is still 4dB. This surprises me, as I successfully used this method on another Libreelec installation with a HiFiBerry sound card to set the analogue mixer to -6dB, and it is persistent across reboots. Any ideas?