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

Fernando Lopez-Lezcano nando at ccrma.Stanford.EDU
Sat Mar 30 22:12:14 CET 2019


On 3/30/19 5:25 AM, Fons Adriaensen wrote:
> On Sat, Mar 30, 2019 at 11:26:24AM +0100, Thomas Brand wrote:
> 
>> I think it's not that simple. If jack looses its backend, there's nothing
>> to connect to, no clock etc. Even if jack can take care of the time where
>> no backend is available, if a new backend is attached, it might have a
>> different SR or different buffersize.
> 
> Actually I think something could be done without too much complexity.
> 
> * When Jack detects that a backend goes away, it switches to a 'dummy'
>    one with the same sample rate, buffer size, and number of channels.
>    Basically this is the same as freewheeling, except that waiting for
>    a timer would be inserted in between cycles.
> 
> * When the backend is available again, there is a single API call
>    that re-initiliases it with the existing parameters. Once this is
>    done, Jack switches back.
> 
> Apart from signalling the events (again similar to freewheeling) this
> could be transparent to clients.

Sounds great to me. I have occasionally made that mistake - unplug 
something while forgetting jack is running and that, worst case, can 
screw the machine up (recoverable but still a pain - jackd2 uses 100% of 
a cpu and everything is very very slow).

Switching back and forth to the dummy driver sounds like a good solution 
to a real problem.

Probably not so easy if/when you switch cards, but well, to recover from 
plug/unplug of the same card it would be worth it.

-- Fernando




More information about the Jackaudio mailing list