Hi everyone,
It would be nice to have the possibility to automatically suspend the usb power after some timeout with no interaction/playback. Background is that some or maybe most USB DACs do not suspend themselves and stay on all the time, that means that e.g. a display stays on which can be distracting and maybe hurt the lifetime of the DAC.
For a RPi this can be achieved with uhubctl but it disables all USB Ports, this is however a RPi problem and can be worked around with adding an external USB hub.
I have scripted this myself but I had to use the mpd events which is technically a little too late for the reactivation use case. Meaning that mpd fails to open the device and I have to press play again to make it work.
So the proposed feature would be either:
A generic Hook System: Hook support for different events (playstate, library update, settings changed, etc.)
Add some setting to call a script/binary when a defined event happens before calling mpd. Maybe add some environment variables with information about the specific event when calling the script/binary.
or
USB suspend: Automatically cut power to a defined USB port after some idle time
Add a setting to suspend an USB hub/port with a configurable timeout. At least for RPi there needs to be a warning that all USB ports will be deactivated (e.g. keyboards/mice, wifi dongle, etc. would also be deactivated).
It would be nice to have the possibility to automatically suspend the usb power after some timeout with no interaction/playback. Background is that some or maybe most USB DACs do not suspend themselves and stay on all the time, that means that e.g. a display stays on which can be distracting and maybe hurt the lifetime of the DAC.
For a RPi this can be achieved with uhubctl but it disables all USB Ports, this is however a RPi problem and can be worked around with adding an external USB hub.
I have scripted this myself but I had to use the mpd events which is technically a little too late for the reactivation use case. Meaning that mpd fails to open the device and I have to press play again to make it work.
So the proposed feature would be either:
A generic Hook System: Hook support for different events (playstate, library update, settings changed, etc.)
Add some setting to call a script/binary when a defined event happens before calling mpd. Maybe add some environment variables with information about the specific event when calling the script/binary.
or
USB suspend: Automatically cut power to a defined USB port after some idle time
Add a setting to suspend an USB hub/port with a configurable timeout. At least for RPi there needs to be a warning that all USB ports will be deactivated (e.g. keyboards/mice, wifi dongle, etc. would also be deactivated).