Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Using MPD filter plugin to implement software volume control

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
vuitreviejo
Posts: 4
Joined: 2020-07-29 18:03

Using MPD filter plugin to implement software volume control

#1 Post by vuitreviejo »

My music server is a minimal Debian 11 64-bit system with standalone alsa and mpd configured as a user service. Music files are on a system drive. Access mpd with the Sonata client. The alsa output is sent to an external DAC via USB. The DAC has a manual volume control but does not support hardware volume control (the only channel controls are on/off).

Implemented a software volume control as follows.

Blacklisted the motherboard audio chipset driver in /etc/modprobe.d/sound.blacklist.conf
Enabled snd-usb-audio as alsa device 0 in /etc/modprobe.d/alsa-base.conf

Modified /etc/mpd.conf as follows.

audio_output {
type "alsa"
name "dacvol"
device "plug:softvol"
#mixer_device "software"
mixer_control "DAC"
mixer_index "0"
}

Modified user .asoundrc file as follows.

pcm.softvol {
type softvol
slave {
pcm "hw:0,0"
}
control {
name "DAC Playback Volume" <---- this is a literal string, not a user-defined value
card C20
}
}

pcm.!default {
type plug
slave.pcm "softvol"
}

It's simple and works well. Have used the same setup on other systems with earlier versions of Debian, different mobos, chipsets, DACs, codecs, NFS mounts, etc. Sound quality is better than my hearing. Not interested in discussing effect of software volume control on sound quality.

My concern is, the mpd documentation says a filter plug-in can be used to implement software volume control, but provides no further detail. The current mpd version is 0.22.11. Debian 11 provides version 0.22.6-1, however the change logs indicate the filter plugins were in place before the release of version 0.22.6. Can anyone tell me how to use a filter for software volume control or refer me to a post that does?

Post Reply