Proof of concept of a headphones sound protector w. Jack & Linux

published Mar 04, 2019 11:20   by admin ( last modified Mar 04, 2019 11:18 )

I am trying to build a headphones audio processor with Linux, and today I got a proof of concept running. It's not running on a Raspberry pi yet, but I tried it on a laptop. An equalizer and a compressor was applied to the signal, and the processed version came out with a barely noticeable delay.

Hardware used

  • An Acer laptop
  • An old Philips USB sound card that came with a pair of headphones many years ago. It has a mic input and a headphone output. A cheap audio interface like Xenyx 302 USB is a worse choice here, since it plays the input sound over the USB mix.

Software used

  • Ubuntu Linux 18.04
  • Ubuntu Studio components including Rakarrack
  • Low latency kernel

Setup and problems

The laptop refused to switch to the USB sound card. The solution was to kill jackd, and start it from the command line. I have no idea how jackd is automatically started by the way. It's not reachable by service or systemctl. Start it up indicating the sound card to be used. I think the problem is that qJackCtl never managed to modify or restart jackd, it just pretended.

Rakarrack, a guitar effects host, is more stable than Jack Rack so I used that.

In qJackCtl, patches would already be correctly set up by Rakarrack.

Modify the rack in Rakarrack to contain an equalizer and a compressor.

The sound of the mic input on the card should now be routed through Rakarrack to the headphones output. At least it did for me.

Next step will be to get this running on a raspberry pi! That means an Arm version of all this.