Using Jack on Linux

The Linux workstation in the Listening Room is connected to the OpenMixer system through 24 channels of digital audio. This page details the configuration you have to do to make sound work correctly.

Set up the sound card mixer

The audio interface in the Linux workstation (an RME Digiface) has to be properly configured. First start the "hdspconf" utility (in the "Applications" "Sound & Video" menu) and make sure that the card is set to be a slave to the OpenMixer system by clicking on "Autosync":

You can only use the current sampling rate of the OpenMixer system. Then start the "hdspmixer" utility (in the "Applications" "Sound & Video" menu) to initialize the mixer in the sound card:

This will ensure that the mixer is properly routing audio. You only need to do this once since the last reboot of the workstation but since you don't normally know when that happened it is best to always start hdspmixer after you login (you can close it at any time after it has started). Hdspmixer can also help you debug you application as it will show in its meters any audio activity in any channel.

Both hdspmixer and hdspconf can be found in the "Applications" "Sound & Video" menu, and they can be dragged from there to your upper panel so that they are easy to access in the future.

Set up Jack

Start qjackctl (the graphical GUI for the jack sound server). Qjackctl can be found in the "Applications" "Planet CCRMA" "Jack" menu and can be dragged from there to your upper panel so it is easy to access in the future. Press the "Setup" button and make sure that:
  • the "Driver" is set to "alsa"
  • the "Interface" field is set to "hw:0"
  • the "Sample Rate" matches the current sampling rate in OpenMixer (normally 48000Hz)
  • "Periods/Buffer" is 2

You can set the overall latency of the Jack sound server by changing the "Frames/Period" to a lower value (the default is 1024 frames per period). If you are doing realtime control and audio rendering a good lower bound is 128 frames per period which gives an overall latency of 5.33 msec at 48000Hz sampling rate.

Click "Ok" to save your changes. You only need to do this the first time you use Jack. These settings should work on all CCRMA workstations.

Start Jack

Press "Start" in qjackctl and Jack should start with no problems. If there are problems press "Messages", there is usually a clue to what is wrong in the messages that jack prints while it tries to start (for example double check that the sampling rate is the same as that of the OpenMixer system).

Once Jack is up and running press the "Connect" button to look at the Jack clients and all their input and output channels. If no other Jack program is running you should only see a "system" client in both panes, that is the soundcard and should show 26 channels on each pane (24 channels are directly connected to OpenMixer, the other 2 are an SP/DIF interface that is not routed anywhere).

This is the interface you can use to graphically connect clients between them and to/from the soundcard. Some Jack clients autoconnect their ports, some don't. Always check the connections if you are not getting sound from your application.

Getting the best performance from the workstation

To get the best performance from the workstation you should switch the CPU to always run at the highest speed when you are doing audio work (this is optional but recommended specially if you are running at low latency settings).

First add the "CPU Frequency Scaling Monitor" applet to your upper panel. Right click in any free space in the panel and select "Add to Panel". In the dialog select the applet (as shown below), press "Add" and then "Close" the window.

  Once you have the applet click on it and select "Performance". That will fix the speed of the CPU to the highest possible setting.

You are all set!