HEnquist / camilladsp

A flexible cross-platform IIR and FIR engine for crossovers, room correction etc.
https://henquist.github.io/
GNU General Public License v3.0
505 stars 48 forks source link

Question: Best practice to power off USB-Audio-Interface? #309

Closed mike811 closed 6 months ago

mike811 commented 6 months ago

Hello,

would like to shut off external power supply of my audio interface when Camilladsp exits running mode (silence_timeout e.g.). Can I simply turn it off and back on some time later and Camilla will recognize it via Alsa and continue to work normally?

Edit: My final goal will be to Suspend to RAM with external USB-Audio power supply off and to resume by some wakup signal (WOL or PC power button). It would be nice if Camilladsp could trigger some bash script when silence_timeout kicks in.

Regards Michael

HEnquist commented 6 months ago

If you turn the DAC off, then CamillaDSP will log an error and exit. You can add a udev rule to start it again when you turn it back on, see here: https://github.com/HEnquist/camilladsp-config?tab=readme-ov-file#step-5-optionalfor-usb-dac-add-udev-rule-to-start-service-when-dac-is-connected

I don't think CamillaDSP should be executing any scripts by itself. But you can write a simple python script to watch for when CamillaDSP goes in paused state, and then run a bash script when it does.

mike811 commented 6 months ago

Hello Henrik,

thanks for your hints. Found some script in this issue that could be reused: https://github.com/HEnquist/camilladsp/issues/160