3

I have firewire mixing console and I wrote an udev rule which calls a script to set up the whole audio chain (alsa -> pulseaudio -> jackd -> firewire) as soon an the console is switched on.

Now I noticed that, while jackd gets started, it dies a few seconds later. I captured its output an it contained an error message. For testing I faked the udev event via udevadm trigger and everything worked fine.

This made me believe, that it just takes some time between the the moment the (real) udev event fires and when the device is actually ready. My faked udev event did not suffer from this problem, because the console was switched on and /dev/fw1 was present and ready all the time.

Indeed, adding a sleep 2 to my script solved the problem, but I am not happy with this solution. It looks fragile, because under heavy load I might need three or four seconds. And beeing too generous with sleep my pile up a lot of unnecessary latencies.

So - is there any way to know when a device is actually ready?

4
  • poll its status before starting jackd? – sendmoreinfo May 1 '13 at 8:12
  • Brand/model for mix console? – Runium May 1 '13 at 9:15
  • It's a Phonic Helixboard 18 Firewire MKII. @sendmoreinfo how can I pool the status of a device (from a script) – Martin Drautzburg May 1 '13 at 10:24
  • sorry, no idea. – sendmoreinfo May 1 '13 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.