jackaudio / jack1

jack1 codebase
Other
250 stars 71 forks source link

Possibility of Jackd sink disconnection/re-connection from command line? #100

Closed kiwi-ed closed 3 years ago

kiwi-ed commented 3 years ago

Hi,

Currently I'm using jack2 to connect and disconnect from various Linux music applications on a headless Server. The command line tool I use is "connect" and works well. Like 'connect' I also need at times to simply disconnect and reconnect the ALSA hw:x sink from the jackd server freeing up the sound card, is this possible?

Similar to this redirect; if I start jackd with -d dummy then my sound card is free. When I want to connect the jack server to my sound card I can use alsa_out and 'connect' / 'disconnect' apps to direct the music connections. It's a bit long winded though..

So ultimately I would like to see my sound card disconnected when the jackd server is not being used - however it's done.

Thanks.

kiwi-ed commented 3 years ago

Accidentally closed, reopening.

kmatheussen commented 3 years ago

So ultimately I would like to see my sound card disconnected when the jackd server is not being used - however it's done.

Not clear to me what the question is. Are you asking if you, for instance, can switch driver from Alsa/hw:0 to dummy, without restarting jack?

kiwi-ed commented 3 years ago

Basically yes. With my system Jack hogs the only alsa pcm while running. There is one other application that demands direct connection to my sound-card ( ROON ) and at variable rates so when that's running I need jack to be 'hands-off' the sound-card. So either a swap from hw:0 to dummy ( and visa-versa) or disconnect/reconnect hw:0 whilst not restarting jack.

Edit: Would toggling 'jack_control ds alsa' and 'jack_control ds dummy' do the job?

Really appreciate any help on this.

kiwi-ed commented 3 years ago

To answer this question on Jack2 if the driver is swapped from alsa to dummy.