User avatar
billb
Posts: 177
Joined: Wed Sep 19, 2012 10:27 pm

Re: Rassberry Pi and Jack audio

Tue Nov 06, 2012 10:33 pm

I was just using default settings and getting the memory allocation error. I haven't tried the method you've posted above, but it was getting rather late and I wasn't sure if that was exactly what I needed. If you think this might all work I'll give it another try and make note of the details. Everything seems to be in place (qjackctl installed, guitarix installed) except I couldn't get jack going properly.

jannis
Posts: 56
Joined: Tue Jan 17, 2012 3:48 pm

Re: Rassberry Pi and Jack audio

Wed Nov 07, 2012 9:12 am

If you mean the error with "mmap" in the output: This is due to the RPi's ALSA-driver and can be worked around using the method I described earlier.

Erwin
Posts: 10
Joined: Fri Jul 13, 2012 12:49 pm

Re: Rassberry Pi and Jack audio

Wed Nov 07, 2012 9:39 am

If you install jack from the raspbian repositories it will not work. The only way I can get jack and qjackctl to work is by compiling it manually. Then it works without problems with a external usb audio card.

I tested this with a Creative Extigy and could playback without problems.
Due to a usb bug on the PI record still has some plops but this is not related to jack.

jannis
Posts: 56
Joined: Tue Jan 17, 2012 3:48 pm

Re: Rassberry Pi and Jack audio

Wed Nov 07, 2012 10:02 am

Ah right, forgot about the USB-"sound card" thing. O
Assuming you want to have sound input via your "USB sound card" and sound output via the RPi's analog audio jack:
Configure jack to use your USB sound card as primary backend (via ALSA). Then use alsa_out as I posted earlier to get the sound to the RPi's analog output. jack can only use one soundcard as primary device so you really need to use alsa_out here, no matter what errors you get when running jack in default configuration.

TonyRogers
Posts: 2
Joined: Sat Dec 24, 2011 10:50 am

Re: Rassberry Pi and Jack audio

Wed Nov 28, 2012 10:13 am

There's a binary that works for me (version 1.9.8). Well it doesn't crash. I'm still setting it up. http://sam.aaron.name/2012/11/02/superc ... on-pi.html

bwims
Posts: 1
Joined: Sun Jan 29, 2012 10:45 am

Re: Rassberry Pi and Jack audio

Wed Nov 28, 2012 3:11 pm

Hi,

as you seem to have done this, could you give me, as a Debian noob, the command line for getting the extigy drivers?

Thanks!

Brian Williams

Erwin
Posts: 10
Joined: Fri Jul 13, 2012 12:49 pm

Re: Rassberry Pi and Jack audio

Wed Nov 28, 2012 7:25 pm

Hello,

I did not install any additional drivers for the Extigy.
It can be used with the generic usb audio driver.
I also bought a 10 euro usb audio card wich seems to be working better then the Extigy.
It's a usb audio card with a CM6206 chip.

Erwin

moony
Posts: 32
Joined: Sat Sep 08, 2012 5:28 pm

Re: Rassberry Pi and Jack audio

Thu Dec 27, 2012 7:34 pm

I tried TonyRogers binary but get:

Code: Select all

[email protected] ~ $ jackd -d dummy
jackdmp 1.9.8
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2011 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 10
Bus-Zugriffsfehler
same bus error. With "-d alsa" it tells me, there was no such driver.


As superuser (sudo -s), I get:

Code: Select all

[email protected]:/home/pi# jackd -d dummy
jackdmp 1.9.8
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2011 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 10
Cannot lock down 82246176 byte memory area (Cannot allocate memory)
Bus-Zugriffsfehler

Are there more files, that need to be updated? Any others succeed with that 1.9.8 jackd binary?

moony
Posts: 32
Joined: Sat Sep 08, 2012 5:28 pm

Re: Rassberry Pi and Jack audio

Sat Dec 29, 2012 2:53 pm

what makes probably a difference: I've got a realtime patched kernel, compiled by my self. Is there a special kernel feature jackd needs?

Erwin
Posts: 10
Joined: Fri Jul 13, 2012 12:49 pm

Re: Rassberry Pi and Jack audio

Sat Dec 29, 2012 7:44 pm

I compile Jack from source, this is the only way I can get it to work.

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: Rassberry Pi and Jack audio

Tue Jan 01, 2013 10:39 pm

To get Jack2 working on your Rpi with an external USB audio interface:

Code: Select all

wget http://jack-audio.10948.n7.nabble.com/attachment/15962/0/jack2_armel.diff
apt-get source jackd2
cd jackd2-1.9.8~dfsg.4+20120529git007cdc37
patch -p1 -i ../jack2_armel.diff
dpkg-source --commit
dpkg-buildpackage -rfakeroot -uc -b
cd ..
sudo dpkg -i libjack-jackd2-0_1.9.8~dfsg.4+20120529git007cdc37-5_armhf.deb jackd2_1.9.8~dfsg.4+20120529git007cdc37-5_armhf.deb
Now add the following lines to /etc/dbus-1/system.conf:

Code: Select all

  <policy user="pi">
       <allow own="org.freedesktop.ReserveDevice1.Audio0"/>
       <allow own="org.freedesktop.ReserveDevice1.Audio1"/>
  </policy>
And restart dbus:

Code: Select all

sudo service dbus restart
Then remount /dev/shm:

Code: Select all

sudo mount -o remount,size=128M /dev/shm
And if you're on a headless RPi:

Code: Select all

export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
Now you can fire up JACK but not in full-duplex, only capture or playback, so use -C or -P. This is probably because the ethernet adapter is also on the same usb bus. Maybe disabling it allows JACK to run in duplex mode, haven't tried it yet.

Jeremy
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: Rassberry Pi and Jack audio

Wed Jan 02, 2013 11:01 pm

I now see this has been posted before with a similar patch: http://www.raspberrypi.org/phpBB3/viewt ... 38&t=26019

It also explains a bit why things are going wrong. Also more info on a recent thread on the JACK mailinglist: http://jack-audio.10948.n7.nabble.com/J ... 15962.html
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

moony
Posts: 32
Joined: Sat Sep 08, 2012 5:28 pm

Re: Rassberry Pi and Jack audio

Thu Jan 17, 2013 8:32 pm

I tried to apply the patch, for that git commit, but it failed with "Hunk #1 FAILED at 33.". Does anyone have a working binary of jackd for me I could try?

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: Rassberry Pi and Jack audio

Sun Jan 20, 2013 8:26 pm

moony wrote:I tried to apply the patch, for that git commit, but it failed with "Hunk #1 FAILED at 33.".
Which git commit? And how did you apply the patch?
moony wrote:Does anyone have a working binary of jackd for me I could try?
http://downloads.autostatic.com/rpi/jackd2
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

User avatar
theoB610
Posts: 233
Joined: Sat Jan 05, 2013 12:40 pm
Location: Devon

Re: Rassberry Pi and Jack audio

Thu Jan 31, 2013 5:37 pm

How do you get the 1.9.8 version from another source?
Apparently /usr/portage does not exist.

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: Rassberry Pi and Jack audio

Thu Jan 31, 2013 9:12 pm

moony wrote:what makes probably a difference: I've got a realtime patched kernel, compiled by my self.
I'm trying to build one myself but can't get it to boot. Care to share your .config? Thanks in advance :)

Jeremy
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: Rassberry Pi and Jack audio

Thu Jan 31, 2013 9:14 pm

theoB610 wrote:How do you get the 1.9.8 version from another source?
Apparently /usr/portage does not exist.
It should also work with a newer version of JACK, the patch is quite easy to adapt to a newer version. I wouldn't be surprised if the current would apply cleanly to a newer version.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

User avatar
theoB610
Posts: 233
Joined: Sat Jan 05, 2013 12:40 pm
Location: Devon

Re: Rassberry Pi and Jack audio

Fri Feb 01, 2013 10:36 am

Cool. And how do you apply the patch?

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: Rassberry Pi and Jack audio

Fri Feb 01, 2013 11:05 am

Code: Select all

wget http://jack-audio.10948.n7.nabble.com/attachment/15962/0/jack2_armel.diff
cd /jackd2-source-dir
patch -p1 -i ../jack2_armel.diff
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

User avatar
theoB610
Posts: 233
Joined: Sat Jan 05, 2013 12:40 pm
Location: Devon

Re: Rassberry Pi and Jack audio

Fri Feb 01, 2013 5:13 pm

Autostatic:

Code: Select all

[email protected] ~ $ cd /jackd2-source-dir
bash: cd: /jackd2-source-dir: No such file or directory
[email protected] ~ $ patch -p1 -i ../jack2_armel.diff
patch: **** Can't open patch file ../jack2_armel.diff : No such file or directory
What's happening? This is on jackdmp 1.9.9
When I try to run jannis' fix it stops after

Code: Select all

JACK server starting in non-realtime mode

EDIT:
Just ran with -v (verbose), and it froze after

Code: Select all

Jack: JackDriver::ClientNotify ref = 1 driver = freewheel name = freewheel notify = 18
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 5
with the second line of this repeating over until I get bored and kill it with Ctrl-C.
Any way of getting round this?

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: Rassberry Pi and Jack audio

Fri Feb 01, 2013 7:05 pm

theoB610 wrote:Autostatic:

Code: Select all

[email protected] ~ $ cd /jackd2-source-dir
bash: cd: /jackd2-source-dir: No such file or directory
[email protected] ~ $ patch -p1 -i ../jack2_armel.diff
patch: **** Can't open patch file ../jack2_armel.diff : No such file or directory
What's happening? This is on jackdmp 1.9.9
Where did you download and untar the source of JACK 1.9.9? Or did you get it from git? You have to cd into the source directory and then apply the patch that has to be one directory higher. You could also put the patch inside the JACK source directory but then you have to run:

Code: Select all

patch -p1 -i jack2_armel.diff
I'd also advide to dry run the patch first to check if it applies cleanly:

Code: Select all

patch --dry-run -p1 -i /path/to/your/jack2_armel.diff
theoB610 wrote:When I try to run jannis' fix it stops after

Code: Select all

JACK server starting in non-realtime mode
EDIT:
Just ran with -v (verbose), and it froze after

Code: Select all

Jack: JackDriver::ClientNotify ref = 1 driver = freewheel name = freewheel notify = 18
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 5
with the second line of this repeating over until I get bored and kill it with Ctrl-C.
Any way of getting round this?
The line repeating means JACK is running. Or does it really freeze? Can you connect anything to JACK?
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

User avatar
theoB610
Posts: 233
Joined: Sat Jan 05, 2013 12:40 pm
Location: Devon

Re: Rassberry Pi and Jack audio

Fri Feb 01, 2013 7:52 pm

Ok I totally got the wrong end of the stick with that :lol: :oops:
Does running jannis' command give a gui?

User avatar
AutoStatic
Posts: 326
Joined: Tue Jan 01, 2013 10:27 pm
Contact: Website

Re: Rassberry Pi and Jack audio

Fri Feb 01, 2013 8:04 pm

theoB610 wrote:Does running jannis' command give a gui?
No, alsa_in and alsa_out are CLI utilities. Same goes for the JACK daemon, that doesn't have a GUI either. Well, it has some GUI frontends (QjackCtl, Patchage) but those are not officially part of the JACK project.
RPi and real-time, low-latency audio: http://wiki.linuxaudio.org/wiki/raspberrypi
RPi audio repository: http://rpi.autostatic.com/
RPi and audio blog: https://autostatic.com/tag/raspberrypi/

User avatar
theoB610
Posts: 233
Joined: Sat Jan 05, 2013 12:40 pm
Location: Devon

Re: Rassberry Pi and Jack audio

Fri Feb 01, 2013 10:26 pm

In that case it was probably working. Oops.
So how do I connect my stuff etc? Do I have to go back to Qjackctl?

moony
Posts: 32
Joined: Sat Sep 08, 2012 5:28 pm

Re: Rassberry Pi and Jack audio

Sun Feb 03, 2013 1:01 am

@AutoStatic: jack2 git commit:95a1162d6aecc91882e4d8b01ba7fb12f6d29d1c

with the binary packages, you've posted, I get also errors.

As normal user: "jackd -r -d dummy" or "jackd -r -d alsa" I get "bus error".
Same commands with sudo: "Cannot lock down 82278944 byte memory area (Cannot allocate memory)" for both.

Return to “Other projects”