Import jackdbus packaging docs from jackaudio wiki

This commit is contained in:
Nedko Arnaudov 2023-05-27 18:30:08 +03:00
commit 17d8dccf96
2 changed files with 59 additions and 0 deletions

42
JACK-DBus-packaging.md Normal file
View File

@ -0,0 +1,42 @@
There are three scenarios (use cases) for JACK, related to D-Bus, from users point of view:
* Classic JACK only
* D-Bus only JACK
* D-Bus JACK and Classic JACK mixture
*All these scenarios don't affect interaction of normal JACK programs (ardour, hydrogen, etc) with JACK server.*
Apart from D-Bus only functionality availability, they affect JACK server auto-launching and thus overall user experience. If more than one scenario is supposed to be available for user, typically package "flavors" are used.
## Scenario 1: Classic JACK only
Server auto-launching is implemented as fork+exec (starting new process) of jackd executable - the classic JACK server launcher.
* Pros:
* This is the classic environment most current JACK users are aware of.
* Cons:
* User is blind about what happens with JACK server execution if it auto-started rather than manually started.
* No JACK D-Bus only control/monitor applications can be used.
* No audio card negotiation with PulseAudio.
## Scenario 2: D-Bus only JACK
Server auto-launching is implemented as D-Bus call that auto-activates JACK D-Bus service, in case it is not already started, and starts the JACK server. Correct interaction with PulseAudio is done using a D-Bus based audio card "acquire/release" mechanism. When JACK server starts, it asks this D-Bus service to acquire the audio card and PulseAudio will unconditionally release it. When JACK server stops, it releases the audio card that can be grabbed again by PulseAudio.
* Pros:
* JACK D-Bus aware control/monitor applications can be used, resulting in much better [Linux] end-user (especially desktop) experience.
* Audio card negotiation with PulseAudio.
* Cons:
* This is not the classic environment most current JACK users are aware of.
* If D-Bus session bus gets misconfigured/non-functional, user is not able to use JACK server before fixing it.
## Scenario 3: D-Bus JACK and Classic JACK mixture
Both D-Bus launcher (jackdbus executable) and classic launcher (jackd executable) are installed. Server auto-launching is implemented as fork+exec (starting new process) of jackd executable - the classic JACK server launcher. Audio card negotiation with PulseAudio in implemented in jackdbus only.
* Pros:
* If D-Bus session bus gets misconfigured/non-functional, user is able to fallback to jackd, with its pros and cons.
* User can start the JACK server both through jackdbus and jackd (and thus through qjackctl too).
* Audio card negotiation with PulseAudio if and only if jackdbus is used.
* Cons:
* non-dbus aware tools (like qjackctl) or auto-launching will start jackd, associated with:
* User is blind about what happens with JACK server execution if jackd is autolaunched.
* No JACK D-Bus aware control/monitor applications can be used. They will claim JACK server is not started (cannot be contacted) even when JACK server is actually running and normal JACK applications are connected and probably using it.
* PulseAudio will not know whether JACK server is running
* jackd and jackdbus will use different storage for JACK server configuration. jackd will be typically started through the ~/.jackdrc *script* or qjackctl. jackdbus reads and stores settings in ~/.config/jack/conf.xml

View File

@ -0,0 +1,17 @@
* "jack server frontend" - virtual package provided by "jackd" and "jackdbus" packages
* "jack server (library)" - package containing libjackserver.so at least. Maybe also: essential tools, drivers, inprocess clients.
* "jackd" - package containing jackd binary. This package depends on "jack server (library)"
* "jackdbus" - package containing jackdbus binary and jack_control script. This package depends on "jack server (library)"
* "jack client library" - package containing libjack.so
* "jack client library dev" - package containging headers and pkgconfig file for libjack.so
* "jack server library dev" - package containging headers and pkgconfig file for libjackserver.so
"jack client library" and "jack server (library") packages should be version coupled because they use internal IPC protocol that is not guaranteed to be compatible between versions.
All different releases of JACK should be considered internally incompatible - that is, it should never be considered possible to mix versions of the JACK server with other versions of the JACK library/ies, drivers or internal clients. Packaging should ensure that no packages associated with different releases of JACK are ever installed simultaneously. Especially, having two versions of libjack.so installed simultaneously, often causes JACK programs using one libjack version not being able to operate with JACK server of other version.
* app that uses jack as only audio interfaces, (jack_keyboard for example), depends on "jack client library" package and on the "jack server frontend" virtual package
* app that uses jack as alternative (not the only) audio interface, (mplayer for exmaple), depends on "jack client library" and suggests "jack server frontend" virtual package
* ardour depends on "jack client library" and depends on "jackd" package, because it can start jack server through jackd binary.
* qjackctl depends on "jack client library" and depends on "jack server frontend" package, because it can start jack server through either jackd or jackdbus binary.
* laditools depend on "jackdbus" only