[Jack-Devel] Jack/USB cycle of USB output Sound device.

Robin Gareus robin at gareus.org
Sat Mar 30 14:14:03 CET 2019


On 3/30/19 4:45 AM, liebrecht at grossmann-venter.com wrote:
> So Jack routes from Alsa and Alsa handles the USB 1818VSl directly.
> 
> Problem:
> If I plug out the 1818vsl (my main sound card) usb plug, then jack
> disconnects although it is not directly handling the usb device but alsa
> is.
> If I reconnect jack does not reconnect, so I have to go then through my
> startup script and restart jack after which it all works again.
> 
> Question
> Is there a daemon available that monitors the usb device 1818vsl in my
> case and then reconnects if the device is unplugged and replugged ?

Yes, dbus-deamon and udevd. For the case at hand dbus is more practical,
because since it can trigger events as the user running jack and you can
also use jack2's dbus interface to change backends. Furthermore jack2
already signals a device errors via dbus.

It is also possible to re-configure jack2 backends and devices on the
fly, and call 'switch-master' to apply the new settings. Have a look at
`jack_control`.

Alas, there is no canned solution to tie this all together in a generic
way. It is however relatively easy to roll your own for a specific system.

The main issue is retaining and mapping connections to physical I/O. The
ports are owned by the jack-driver, and when switching backends or
drivers, the ports are re-created and connections are lost.

That being said, a demo of a prototype from 2010/11:
http://robin.linuxaudio.org/tmp/jackdbus.ogv

I wrote a few scripts and patches back then, but most of that is
meanwhile upstream in jackd2 and direct dbus calls have been superseded
by jack_control. -- I expect it'll be easier to start afresh.

HTH,
robin



More information about the Jackaudio mailing list