Wolfson Audio Card for Raspberry Pi

Just ordered a Wolfson Audio Card for Raspberry Pi via RaspberryStore. I asked them about this audio interface at their stand during the NLLGG meeting where I did a presentation about doing real-time audio with the RPi and they told me they would ship it as soon as it would become available. They kept their word so I’m hoping to mount this buddy on my RPi this very week. Hopefully it will be an improvement and allow me to achieve low latencies with a more stable RPi so that I can use it in more critical environments (think live on stage). It has a mic in so I can probably set up the RPi with the Wolfson card quite easily as a guitar pedal. Just a pot after the line output, stick it in a Hammond case, put guitarix on it and rock on.

Wolfson Audio Card for Raspberry Pi
Wolfson Audio Card for Raspberry Pi

Wolfson Audio Card for Raspberry Pi

48 thoughts on “Wolfson Audio Card for Raspberry Pi

  1. Would really love to hear what latencies you get out of this thing…

    I’ve been a little surprised by the poor latencies I observed with the pi so far.

  2. Will do. I’m now testing with amsynth and so far the Wolfson does a nice job. I can run jackd with -p64 -n2 but I get quite some xruns. With -p128 -n3 it seems to cope well. Before I can test guitarix I need to do some soldering and haven’t found time to do so yet. The Wolfson comes with a 4-pole TRRS 3.5″ jack so I have to solder a converter to female jack (edit: it’s actually a TRS connector so have to figure out how to hook up a mic).

    Compiling the kernel with the Wolfson drivers was a no-brainer and it booted straight away so that’s a big plus.

  3. Hi Jeremy,

    uname -a gives me
    Linux raspberrypi 3.12.13-rt21+ #1 PREEMPT RT Thu Mar 27 16:58:09 CET 2014 armv6l GNU/Linux

    this time a litte bit of work had to be done to get the wolfson working with that k-version, but it works:-)

    The only thing that doesn’t work is the alsa midi stuff. When I try to start qjckctl over ssh
    alsa says:
    ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: Keine Berechtigung
    If I try to load the module manually with “sudo modprobe snd_seq” I get:
    ERROR: could not insert ‘snd_seq’: Exec format error

    I’ll try to get it working and post the results here, if that’s o.k. for you.

  4. Hi again,

    It works like a charme now! Just messed up with the wrong firmware and libs dir. Midi and all the other stuff is running :-))

    Next thing to do is to get it running with 3.13

  5. Hi,
    until now I got the 3.12 based kernel running together with the wolfson card. In 3.14 a lot of things have changed. At the time of writing this I got the rt-patches for 3.14 cleanly applied to the rpi-kernel. Getting the Wolfson kernel modules running is not quite easy, because they have to be adapted to the new sources. With 3.12 it wasn’t a big deal. Maybe 3.14 is not so easy. When I get it running I’ll make it available online.

  6. Hi,
    as I guessed it was a little bit tricky to get the 3.14 kernel compiled with the realtime preemption patches and the wolfson kernel drivers. But some minutes ago it DID ;-)) So, now I’ll test a little bit till tomorrow. If everythings fine there will be time enough to make a litte howto and some modified sources availabe on my website. Please be patient and
    Have fun.

  7. Hi,
    Bad news… it does NOT work 🙁 Kernel doesn’t even boot. Only multicolored screen. No more. Because I don`t have a gpio serial adapter I can`t investigate the reason for this. Tomorrow I’ll try the rpi kernel without the Wolfson patches with rt preemptive patchset. Hope that this will bring some better news.

  8. Hello Georg, keep us posted! I’m also very interested in patches/diff for the 3.12 kernel. From what I’ve understood this kernel patched with the RT patchset performs better than the 3.10.25-rt23 kernel I’ve tested. I’ve found the non-RT 3.10 kernel performs better.

  9. Hi Jeremy,
    of course you’ll get these patches. But please be patient for some days, cause I’m sick since the last few days (got the flue). If everything’s right with me I’ll make the patches available some time around Easter. Maybe before, maybe afterwards.

    Today I tried out to get the 3.14 running with rt patches applied … no chance :-[
    Only splash screen. Maybe there’s something wrong with the source tree. I’m checking out the kernel sources for 3.14 again right now and try it again.

  10. Hi,
    surprise, surprise 😉

    uname -a
    Linux raspberrypi 3.14.1-rt1+ #1 PREEMPT RT Fri Apr 18 13:57:13 CEST 2014 armv6l GNU/Linux

    but WITHOUT the Wolfson drivers :-[
    try to patch the sources later and let you know. If it works, I’ll upload the patches immediately.

  11. Steen says:

    Hi, this is good news.
    My main interest is the Wolfson patches for the 3.14.1 kernel – how you managed to do that is impressive.

  12. Hi Steen,

    next weekend there will be more information on how to compile the 3.12 keernel with rt-preemption and wolfson drivers included on my website. Please be patient and

    Have fun.

  13. So let’s say I buy this card, how much work will it take to have it worjing with Raspbian ? Is there any chance support will simply come with the next Raspbian release ? Cheers.

  14. pat says:

    Hi,
    I’m using Georg’s kernel (binary – thanks!) and it’s working nicely!
    Now, I need to use jack2 without X11, but when trying to start it I get:

    jackd -dalsa -dhw:0 -r48000 -p512 -n3
    control device hw:0
    Failed to connect to session bus for device reservation Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
    Failed to acquire device name : Audio0 error : Invalid argument
    Audio device hw:0 cannot be acquired…
    Cannot initialize driver
    JackServer::Open failed with -1
    Failed to open server

    I have the autostatic repo configured, but I don’t know how to replace the raspbian jack with the autostatic jack2 (compiled without dbus I think)?

    Thanks!

  15. pat says:

    ————-UPDATE———–
    using those commands I was able to install jackd2 from autostatic:
    sudo apt-get install libjack-jackd2-0=1.9.8~dfsg.4+20120529git007cdc37-5+fixed1~raspbian1
    sudo apt-get install jackd2=1.9.8~dfsg.4+20120529git007cdc37-5+fixed1~raspbian1

    BUT when starting jackd as shown above, I get this error:
    creating alsa driver … hw:0|hw:0|512|3|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 = 512 frames (10.7 ms), buffer = 3 periods
    ALSA: final selected sample format for playback: 16bit little-endian
    ALSA: use 3 periods for playback
    FATAL: cannot locate cpu MHz in /proc/cpuinfo

    any idea?

  16. Hello Pat,

    3.12 doesn’t work with the JACK packages from my repo because of the missing /proc/cpuinfo entry issue. This was solved with more recent JACK versions so you’d better reinstall the JACK version from the official repositories. If you want to use JACK without X11 why not use Jack1? If you really need Jack2 you can get it running without dbus: http://linuxmusicians.com/viewtopic.php?f=6&t=10477 and start at “Now add the following lines to /etc/dbus-1/system.conf if you want to use JACK without X”.

  17. pat says:

    Hi Jeremy,

    First of all, thank you very much for all the sharing you done so far (I see you everywhere when it’s related to rpi / audio).

    Doing: sudo apt-get remove jackd2 installed jack1 and now it’s working nicely. I can start jack with: jackd -P84 -p8 -t2000 -dalsa -dhw:0 -r48000 -p1024 -n3 -s & BUT I am getting this error from time to time: delay of 221756.000 usecs exceeds estimated spare time of 21274.000; restart …???

    I was wondering if -P70 is better than -P84? I think I have done all I could to lower the latency / glitch (killing unused process, limits.conf, no X11, …).

    Apart from this error and the glitches from time to time, the roundtrip latency is very good, I can get as low as 7ms with -p256 (measure via a loop cable SPDIF in/out and puredata patch).

    Let me know if you have any idea about this error.

  18. pat says:

    I just want to add that no matter what I put in jackd (-r -p -n) I have this error (usecs exceeds estimated spare time of).

  19. Mr_LinDowsMac says:

    Hi! I already tested Wolfson audio with guitarix and rakarrack! The Latency is so low!!

    Now I just want to know how can I use the onboard DMIC? By default JACK uses 2 capture devices and 2 playback. 1 input is the Line IN, but the another one I don’t know what it is. The 2 playback devices are really just one: L and R of the Line out.

  20. Mr_LinDowsMac says:

    Maybe you’re wondering why I want to use DMIC. The answer is this: Vocoder. Rakarrack have a vocoder plugin included that I would like to test.

    By the way, I also compiled & installed two vocoder plugins (One is a LADSPA, and the other one is a LV2 plugin), but none of them is listed by Guitarix.

  21. Hello Pat, do you get the “usecs exceeds estimated spare time of” messages when using PD or also in other situations? And -P84 or -P70 shouldn’t make any real big difference but you might want to check which process is using which rtprio with @ps -eLo pid,cls,rtprio,pri,nice,cmd | grep -i irq@ and @/etc/init.d/rtirq status@.

  22. Mr_LinDowsMac says:

    @hermann Mmmmm…. I don’t have the git version of guitarix… just the packaged version (installed by apt-get)

  23. Hello Mr_LinDowsMac, LADSPA plugins should get detected by the guitarix version that is in my repository. Do you happen to know where it is installed? I could upload the vocoder-ladspa package to my RPI repository if you want. And for using the onboard mic’s, check the documentation, I think it’s just a matter of running the right Wolfson script.

  24. Mr_LinDowsMac says:

    I already run the script for the right use case (Record_from_All.sh), but JACK doesn’t want to start with more than two input channels:

    jackd -P80 -p16 -t2000 -dalsa -dhw:0 -p512 -n2 -r48000 -s -Xseq -i4 &

    JACK server starting in realtime mode with priority 80
    control device hw:0
    control device hw:0
    audio_reservation_init
    Acquire audio card Audio0
    creating alsa driver … hw:0|hw:0|512|2|48000|3|0|nomon|swmeter|soft-mode|32bit
    control device hw:0
    configuring for 48000Hz, period = 512 frames (10.7 ms), buffer = 2 periods
    ALSA: final selected sample format for capture: 32bit integer little-endian
    ALSA: cannot set channel count to 3 for capture
    ALSA: cannot configure capture channel
    Cannot initialize driver
    JackServer::Open failed with -1
    Failed to open server

  25. pat says:

    hi Jeremy,

    I do get the “usecs exceeds” as soon as I start jackd. The kernel:
    Linux raspberrypi 3.12.13-rt21+ #1 PREEMPT RT Thu Mar 27 16:58:09 CET 2014 armv6l GNU/Linux

    IRQ: http://paste.ubuntu.com/7618189/

    I don’t have rtirq in /etc/init.d?

    The “usecs exceeds” show up from time to time causing glitches in the sound. Am I the only one with this behaviour? What kernel / distribution do you use?

    Thanks

  26. pat says:

    If I remove the -s (silent) option of jackd it will crash with:
    alsa_pcm: xrun of at least 0.015 msecs
    alsa_pcm: xrun of at least 0.015 msecs
    ALSA: could not start playback (Cannot allocate memory)
    DRIVER NT: could not run driver cycle
    jack main caught signal 12

  27. Using a lowlatency PREEMPT kernel probably works better than using a realtime PREEMPT-RT kernel on the Raspberry Pi. I haven’t tried 3.12-rt yet but I’m getting the idea that with a RT kernel the RPi is performing worse than with the default lowlatency kernel.

  28. Hi,
    I don’t think so. For me the 3.12 kernel works much better than the default one. The above mentioned error sometimes occurs if the alsa midi stuff doesn’t work. Restart the midi daemon and then restart jackd2.
    Hope it helps.
    Georg

  29. Hi Jeremy,
    everthing o.k. with your website?
    After sending a post there appear several writing mistakes which weren’t visible before pressing the “send” button
    Georg

  30. Hi Georg, the website should be ok but the behavior you report is weird and shouldn’t happen. You’re sure you’re not using some kind of spell checker?
    As for the 3.12-rt kernel, I’ve been asked to participate in a project that involves RPi’s and making music with them so it’s getting time to get that kernel running 🙂

  31. Hi Georg, that’s great news! That makes things a lot easier! How did you create the deb?
    I just got 3.18.7-rt2 running on my new RPi 2 Model B:
    @Linux raspberrypi 3.18.7-rt2-v7 #1 SMP PREEMPT RT Thu Feb 26 21:02:39 CET 2015 armv7l GNU/Linux@

  32. The magic is:

    KBUILD_DEBARCH=armhf ARCH=arm CROSS_COMPILE=${CCPREFIX} make mrproper
    KBUILD_DEBARCH=armhf ARCH=arm CROSS_COMPILE=${CCPREFIX} make bcmrpi_defconfig
    KBUILD_DEBARCH=armhf ARCH=arm CROSS_COMPILE=${CCPREFIX} make xconfig
    KBUILD_DEBARCH=armhf ARCH=arm CROSS_COMPILE=${CCPREFIX} make -j 8 deb-pkg LOCALVERSION=-georg PKGVERSION=1 INITRD=YES

  33. Jeff Sandys says:

    Jeremy, Does the Wolfson audio card really work for you? With what Pi distro? Can you connect a camera with the Wolfson? Can the Alamode board (arduino for Pi) fit above or in between the Wolfson and the Pi? Did you look at the HiFiBerry DAC ?

    I would like to demonstrate the Raspberry Pi running PD-L2ORK at North West Linux Fest at the end of April and I would like to get a sound card that “just works”. Even the little USB cards seem to need some additional tweaking to work right. Your advice is appreciated, reply to my email if you choose.

  34. Hi Jeff,
    hope you don’t mind if I give you some answers here.

    The Wolfson Card runs on the current official raspbian image
    Raspbian
    Debian Wheezy
    Version: February 2015
    Release date: 2015-02-16

    The kernel is
    >uname -a
    Linux raspberrypi 3.12.33-rt47-georg #1 PREEMPT RT Wed Feb 25 08:58:17 CET 2015 armv6l GNU/Linux

    The camera (PiNoir) works fine here.
    I doubt that the Alamode board fits on top of the Wolfson Card. Maybe there is a solution for this, but I don’t know. Maybe just connect a “real” Arduino to the rpi (usb or GPIO)
    Good luck
    Georg

Leave a Reply

Your email address will not be published. Required fields are marked *