1

I'm following the instructions here to run jackd on my headless Raspberry Pi 2 Model B. The only difference is that I'm using the standard packaged jackd instead of the autostatic ones mentioned because the autostatic packages are not available for Debian Stretch which is what I'm using.

But when I attempt to run jackd with jackd -P70 -p16 -t2000 -dalsa -dhw:0,0 -p128 -n3 -r44100 -s

I get the following:

jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... 
hw:0,0|hw:0,0|128|3|44100|0|0|nomon|swmeter|soft-mode|32bit
ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to 
playback-only mode
configuring for 44100Hz, period = 128 frames (2.9 ms), buffer = 3 
periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: cannot set period size to 128 frames for playback
ALSA: cannot configure playback channel
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server

My question is how do I get jack to run on my Pi?

Here is my .asoundrc

pcm.!default {
     type hw
     card 0
}

ctl.!default {
     type hw
     card 0
}

So I'm now able to start jack using the following command line

jackd -P70 -p16 -t2000 -dalsa -n3 -r44100 -s

But when I attempt to use csound with csound score.csd I get the following error message:

 *** rtjack: buffer size (-B) is too small

In the csd file I have CsOptions set to

-odac -+rtaudio=jack

Contents of /etc/security/limits.d/audio.conf:

@audio   -  rtprio     95
@audio   -  memlock    unlimited
#@audio   -  nice      -19
  • What do you need jackd for? That article is already ~1 year old, and many many changes to Raspbian has been since... How is your ALSA configured? (.asroundrc) – not2qubit May 9 '18 at 20:12
  • @not2qubit I'm trying to build a real-time sound processor using the Pi. I'm using something called csound, and as i understand it jack has the least latency for sound as compared to ALSA or Pulse. I have updated my answer with the contents of my ~/.asoundrc – arunkumar May 10 '18 at 3:34
  • You are still leaving out very relevant info, like: What is your sound card? (If any) From what port are you trying to get audio? Does all other sound input/output work? You may wanna have a look at my ALSA config post – not2qubit May 10 '18 at 13:35
  • I finally managed to get this to work by dropping the -p128 option from the command line. But now I'm getting other errors about buffer size (-B) being too small. Thanks for the link to your post, it looks quite comprehensive, I'll go through it and see if I can make some sense of all this. – arunkumar May 11 '18 at 9:32
  • 1
    Solved this by changing playback frames to 256. So final command line looks like jackd -P70 -p16 -t2000 -dalsa -p256 -n3 -r44100 -s – arunkumar May 15 '18 at 4:15

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.