Sound in Linux

I recently bought a Focusrite Scarlett 2i4 to do some audio recording. I decided to buy it because its support for USB Audio. It works on Linux, however there I encountered some initial hiccups.

JACK

For recording purposes it is better to use JACK than the default PulseAudio server. JACK provides much lower latency than the latter, although it is still not very fast. The problem with running JACK and PulseAudio at the same time is that PulseAudio automatically claims all ALSA sound interfaces and due to this JACK cannot start. There are two things that need to be done in order to let them peacefully coexist.

  1. Install JACK support for PulseAudio. In Debian there is a package called pulseaudio-module-jack that allows to send PulseAudio streams via the interface claimed by JACK. PulseAudio is configured to load these modules when available, so no further configuration is necessary.
  2. Use qjackctl to configure the server. Set the interface to your desired interface. It will be claimed and not available to any other sound server anymore.
  3. To start JACK while PulseAudio is running, use the pasuspender tool. It halts PulseAudio for the duration of the command running and resumes afterwards. JACK provides a startup command jack_control start to start the server. Combining the two yields:
pasuspender jack_control start