User Tools

Site Tools


info:linux_sound

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
info:linux_sound [2013/08/17 15:37] – created moritzinfo:linux_sound [2013/08/17 15:49] (current) – [JACK] qjackctl moritz
Line 1: Line 1:
 ====== Sound in Linux ====== ====== Sound in Linux ======
  
-I recently bought a Focusrite [[http://global.focusrite.com/usb-audio-interfaces/scarlett-2i4 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.+I recently bought a Focusrite [[http://global.focusrite.com/usb-audio-interfaces/scarlett-2i4|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. 
 + 
 +  * Scarlett 2i4 only shows up as an input device: Initially, the device would only appear as having two input channels but no output channels. Although I did not figure out the cause of this problem it went away after attaching it several times. Also starting Audacity helped, but that might be coincidence. 
 +  * I can record fine using JACK using the following settings: 48kHz, 512 buffer size, 2 buffers. Any smaller buffer value crashes JACK at starting, higher sampling rates cause xruns. 
 + 
 +===== 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. 
 + 
 +  - 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. 
 +  - 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. 
 +  - 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 
 + 
info/linux_sound.1376746661.txt.gz · Last modified: 2013/08/17 15:37 by moritz

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki