RFC: A way to put jack into ACPI sleep and back again
-----BEGIN PGP SIGNED MESSAGE-----
I'm looking for a way to put jackd to sleep, so that I can put my laptop to sleep, and then wake up jackd again after the laptop is back from sleep.
Currently, if I use normal ACPI suspend mode, jackd loses control of its bladder upon resuming, because too much time has elapsed. It (quite rightly) watchdog's out and bollixes all my audio apps. Probably the right behavior for a desktop, however, this is annoying on a laptop.
What if I used the JACK freewheeling API calls to throw jackd into freewheeling mode, from one of the /etc/acpi/suspend.d scripts? Then, used another JACK freewheeling API call to kick it back out of freewheeling mode from /etc/acpi/resume.d after the machine comes back to life and is once again runnning stably with RT after resuming?
I could probably write a quick C program to do this, if someone can point me to the correct API calls, and give me some informed opinion as to whether this would work or if I'd just be wasting time trying.