[Linux] HW Volume control not picking up [Solved]


For a lack of a response in the original topic, a post in the support forum:

To prevent confusion, my dac does not have hardware volume control.
However, I’ve written an application to synchronize a (sortof) dummy
mixer (volume control) with my (any?) amplifier. This volume control can
be added in some ALSA configuration file. This works very well with
MPD, Shairport, upmpdcli (dlna/openhome).

As to my question: as a test I use the ALSA dummy audio driver for
playback (modprobe snd_dummy), it has numerous volume controls. However,
Roon does not give me control of any of them and says “Volume Control
is Fixed”. The “Volume Control Mode” for this device is set to “Use
Device Controls”.

Any ideas why Roon wouldn’t give me control of this dummy driver? As
far as Roon is concerned this is an actual device with actual volume

According according a post in the topic below, RoonBridge (and I assume RoonServer) should pick the first control. So, why doesn’t it work?

Kind regards, Maarten

Since I asked the question and figured it out myself, I might as well answer it (see below). While I don’t think anyone cares for the answer in itself, the reason I needed the answer might interest some. This solution allows me to create a bit-perfect volume control for my hifi-amplifier. All it requires is the Roon Endpoint running on Linux and an amplifier that is actually controllable via RS232/i2c/network.

I posted a bit more information in the Linux forum.

[HOWTO] how to create a bit perfect volume control for your amplifier in Roon – guide

Kind regards, Maarten


Add the following to the audio device in the file: /var/lib/alsa/asound.state

    control.2 {
            iface MIXER
            name 'PCM Playback Switch'
            value true
            comment {
                    access 'read write user'
                    type BOOLEAN
                    count 1
    control.3 {
            iface MIXER
            name 'PCM Playback Volume'
            value 15
            comment {
                    access 'read write user'
                    type INTEGER
                    count 1
                    range '0 - 64'
                    dbmin -6400
                    dbmax 0
                    dbvalue.0 -4900

Then run ‘alsactl restore’