MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.19k stars 350 forks source link

Strange volume levels when replay_gain_handler is specified as "mixer" #1778

Open janui opened 1 year ago

janui commented 1 year ago

The track I am playing: _># metaflac --show-tag=REPLAYGAIN_TRACK_GAIN --show-tag=REPLAYGAIN_ALBUMGAIN "/mnt/MPD/NAS/Music/Paco De Lucía/Fuente Y Caudal/03 Reflejo De Luna (Granaína).flac" REPLAYGAIN_TRACK_GAIN=-1.91 dB REPLAYGAIN_ALBUM_GAIN=-3.86 dB

Expected Behavior

I would expect the volume control to be adjusted by the decibels specified in the gain replay tags.

Actual Behavior

># amixer -c 1 sget "Digital" Simple mixer control 'Digital',0 Capabilities: pvolume pswitch Playback channels: Front Left - Front Right Limits: Playback 0 - 207 Mono: Front Left: Playback 184 [89%] [-11.50dB] [on] Front Right: Playback 184 [89%] [-11.50dB] [on]

Version

># uname -a Linux hifi 6.1.13-1-rpi-ARCH #1 SMP PREEMPT Thu Feb 23 12:17:10 MST 2023 aarch64 GNU/Linux ># mpd -V Music Player Daemon 0.23.12 (0.23.12)

Configuration

Extract of MPD configuration file: ># cat mpd.conf ... replaygain "auto" ... audio_output { name "snd_rpi_hifiberry_dacplus" type "alsa" device "hw:1,0" mixer_control "Digital" mixer_type "hardware" mixer_device "hw:1" replay_gain_handler "mixer" auto_resample "no" auto_format "no" enabled "yes" } ...

Log

The log is not included, MPD is actually working consistently. It just seems that the adjustment is incorrect. When used without the 'replay_gain_handler' the software volume adjustment appears to be correct.

gearhead commented 1 year ago

as Janui mentioned in the closed issue #1785, when we set the replay_gain_handler to mixer and dissimilar file types are played, the volume can go to 100%. This is undesirable.