Sending volume to external USB-DAC after DAC turns off/on

I am using the latest Volumio 2, on a Raspberry Pi 3B+.
I have an external DAC (NAD D 1050 USB DAC).
Connected via USB to the Pi.
I used Hardware Volume Control. The NAD D 1050 supports this.
Works great.

After use, I keep my Raspberry Pi running.
But I turn off my amplifier(s) and DAC.
So whenever I want to listen to music, I first turn of my amps and DAC.
Then open the Volumio GUI on my pc/tablet/phone, and play a song.
The Volumio GUI shows the volume to be at the level that I last used.
But the DAC has just booted/started. And doesn’t know anymore the last volume used.
The DAC plays the song at 100% volume.
When I touch the volume control on the Volumio GUI, the DAC immediately starts playing at the correct volume.

This is no big deal. But it is slightly irritating.
I would think this wouldn’t be too hard to fix.
I can envision a number of different ways to fix this.

  1. When a new song starts, check the time at which the last song ended.
    If this is longer than a certain period of time (say 1 minute), send the USB-command to set the
    volume first, before playing the song.

  2. Every time a new song starts playing, send the USB-command to set the volume.
    This might be overkill. But I would expect the USB-command to be cheap. And sending
    it often makes hardware volume control slightly more robust.

  3. Keep track when connectivity with the external DAC over USB is lost and gained.
    Every time Volumio (re)gains connectivity with the DAC, send the USB-command to set the volume.

Hope this helps.
Thanks in advance.

Gryz.

Thanks for Volumio.
I’ve only been using it since a few months. But I love it already.
I got a Pi with Volumio in my living room.
And quickly bought another one for my bedroom.
I also installed a system at my sister’s house.
I got a suspicion that when more of my friends will see Volumio at my house, more of them will want a Volumio system too. :slight_smile: