Method to create two audio routings from Pulseaudio to JACK audio system for use with IDJC.
Tested on Arch, Debian and Ubuntu based ditributions, should be useable in most other versions of Linux. Not recommended for use with KXStudio because of conflicts with KX default settings
Names of folders and scripts is not critical, as long as names and locations in later setup match
JACK Packages - jack2, qjackctl, patchage
Pulseaudio packages - pulseaudio, pulseaudio-jack, pavucontrol
Must have Pulseaudio v6.0 or greater for multiple jack sinks/sources
Ubuntu rebuild of Pulseaudio shows a different version number
Version can be checked in Terminal:
Pulseaudio mixer pavucontrol is essential to select audio routing.
Panel controls on many desktop environments do not show sound routing options.
D-Bus deals with all the changes between Pulseaudio and JACK automatically
If D-Bus is problematic, there are some additional commands needed to start JACK server,
Older versions of QjackCtl setup will be linked at end of this article
Disabling jackdbus module allows for script loading of sinks/sources in QjackCtl start script.
Script enables use of clearer names for sinks/sources
Create user configuration for Pulseaudio, copied from original at /etc/pulse:
cp /etc/pulse/default.pa ~/.config/pulse/default.pa
Open this file to edit configuration in a text editor
Find the lines shown below for jackdbus module and add '#' to deactivate:### Automatically connect sink and source if JACK server is present
All of the following can be done graphically using a file manager and text editor
To make files executable, right click file and go to 'Properties' then 'Permissions' tab.
Tickbox 'Allow this file to run as a program' is checked to make file executable
Make a new folder 'JACKscripts' in home folder using Terminal and move nto folder
mkdir JACKscripts && cd JACKscripts
Create script file and make it executable
echo '#!/bin/bash' > jack_start.sh && chmod 700 jack_start.sh
the jack_start.sh script is as follows:#!/bin/bash
Setup Qjackctl start option commands and the script link as shown in diagram:
Interface: select your sound device for Jack use
Frames/Period: 1024 is safe working value for most sound devices.
Value can be reduced to lower delay latency, but risks more x-run errors.
May also be increased to reduce x-run errors, but with more latency.
Sample Rate: 48000Hz is native Jack rate, but 44100Hz may work better on some hardware
Periods/Buffer: Usually 2 is fine for built-in sound devices,
It is suggested this should be changed to 3 for USB devices
Execute script after Startup: This is where to link to script made earlier
Execute script on Shutdown: Close patchage before stopping JACK server
Patchage will send error alerts if still open when JACK server is stopped
Command can be omitted if patchage is not used during normal workflow.
Execute script after Shutdown: Close any remaining JACK applications
Display tab of setup is not shown as there are no required changes
Enable D-Bus Interface and Enable JACK D-Bus Interface should be enabled
D-Bus is needed to control switching of audio hardware between JACK and Pulseaudio
When QjackCtl is started with this setup, Jack input and output ports will be loaded with default connections as shown below:
Pulseaudio will start having all audio sent to default sink aux_in, including VOIP calls.
In pavucontrol Pulseaudio mixer, locate the VOIP application in playback and change sink connection to 'voip_in'
Pulseaudio will store the changed sink setting and connect correctly in future
This is default started state for JACK
Next page will deal with creating automated process of loading IDJC with all connections