JACK audio connection kit jackd daemon fails to start on RaspberryPi
Asked Answered
M

3

6

I am running Raspberry Pi image 2012-07-15-wheezy-raspbian.zip and I have a CMedia 108 USB audio adapter installed RPi.

Trying to start jackd using built in audio

jackd -r -d alsa -d hw:0

fails to start

JACK compiled with System V SHM support.
loading driver ..
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: mmap-based access is not possible for the playback stream of this audio interface
ALSA: cannot configure playback channel
cannot load driver module alsa 

Using usb audio

jackd -r -d alsa -d hw:1  

immediately exits, instead of running in background.

JACK compiled with System V SHM support. 
loading driver .. 
creating alsa driver ... hw:1|hw:1|1024|2|48000|0|0|nomon|swmeter|-|32bit 
control device hw:1 
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods 
ALSA: final selected sample format for capture: 16bit little-endian 
ALSA: use 2 periods for capture 
ALSA: final selected sample format for playback: 16bit little-endian 
ALSA: use 2 periods for playback  

Any ideas?

Maddock answered 27/8, 2012 at 15:30 Comment(0)
S
8

The onboard sound card doesn't work directly with JACK, but a USB sound card like the C-Media should work. You will need a patched version of JACK though: http://wiki.linuxaudio.org/wiki/raspberrypi The JACK packages in the official Raspbian repositories do not work because they use packed structs which will yield a bus error when starting JACK.

After having installed JACK from the repository try starting JACK like this:

jackd -P84 -p32 -t2000 -d alsa -dhw:Device -p 128 -n 3 -r 48000 -s

This will run JACK with a system latency below 10ms. For me this works well with my $2 C-Media sound card.

Sennight answered 25/3, 2013 at 22:0 Comment(0)
F
1

actually rpi doesn't support jack because the driver is not good enough

the problem is that the alsa driver for the rpi lacks functionality ( mmap support) required by jack.

Fiery answered 6/12, 2012 at 7:39 Comment(0)
N
0

This problem is now solved. The solution is to add "dtoverlay=i2s-mmap" to your /boot/config.txt Also make sure you use jackd2 not jackd1 as the later still has a memory alignment issue which gives BUS ERROR.

This is a summary of the solution, taken from here

Natatorial answered 19/9, 2016 at 19:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.