Connecting the Wolfson Sound Card to the Raspberry Pi3

I’m quite a fan of the Wolfson (later Cirrus) sound cards for the Raspberry Pi – they offer great value for money compared to some of the competition.

Most of the audio cards available for Pi’s offer a DAC only option, with maybe one or two outputs (e.g. Line Out / SPDIF or Headphones).

The Wolfson card offers a DAC and an ADC, SPDIF In and Out, Line In, Line Out, Headphones Out, two on-board stereo Digital Microphones and a 2W Class D amplifier for driving loudspeakers.

I also happen to think it sounds rather good, in particular I like it’s headphone driving capabilities.

The DAC has a 113dB dynamic range, which is much better than CD and the ADC has a 96dB dynamic range. The best HiFi DAC’s can achieve 122dB but the price difference between these and the Wolfson card are significant! The board can exploit 24bit HD audio up to 192kHz sample rate and it also features some very advanced and very complex DSP and mixing capabilities, if you need it.

It’s also worth noting that when Hifi World tested the card with an external DAC, the Wolfson board was capable of utilising the full 121dB dynamic range of a Chord 2Qute external DAC, so as the basis for an upgradeable music streamer, it’s great.

There are two versions of the card, the earlier Wolfson-branded board is only compatible with Raspberry Pis which feature the P5 pads, which can be found on Revision 2 Raspberry Pis onwards.

Wolfson Card Top View

Wolfson Card Top View (click to enlarge)

The board uses some ingenious sprung pogo pins to connect to the P5 connector on the Raspberry Pi, eliminating the need to solder a connector to the board: –

Wolfson Card Bottom View

Wolfson Card Bottom View (click to enlarge)

The newer board was branded Cirrus (after Cirrus bought Wolfson) but this has since been discontinued leaving us without a board that is compatible with the Raspberry Pi3 – until now!

Cirrus Card

Cirrus Card (click to enlarge)

The problem with the board is that the drivers haven’t been part of the Raspberry Pi kernel and hence it requires hacks and patches to make it work, which is ultimately frustrating. Some of the music-related distros (e.g. Max2Play) have the options to enable it but it’s always been a bit messy.

Recently though 

It’s awesome and can be installed in most cases by just updating the Pi kernel with the following command

sudo rpi-update
Update Pi Kernel

There’s an excellent thread on the Element14 website and one of the most interesting elements I spotted is that the earlier Wolfson card can be made to work with the newer Raspberry Pi 3, when using the new driver.

At the time of writing Farnell / Element 14 had >1300 of the Wolfson cards in stock at a cost of £18.76 each, which I think is a bit of a steal.

All of the details necessary to make it work are in the thread above, but to save some digging (and to preserve the information for posterity) I thought I’d document the modifications required. Note that these mods require some soldering and there is a risk of damage to the board, so proceed at your own risk – there are some ingenious methods within the thread above that those less confident with a soldering iron may find easier, although you can’t entirely eliminate the soldering element.

Firstly, the sprung pogo pins require removing or cutting short. These pins are quite difficult to unsolder and it’s important that you do not damage any tracks in the process. I found that carefully cutting away sections of the plastic that support the pins (under the PCB), then removing them one-by-one was easiest and least risky. Pins 7 and 8 connect to the ground plane and require the most heat to remove them.

Remove pogo pins

Remove pogo pins (click to enlarge)

Next there is a resistor (R39) we need to remove from the underneath of the PCB, this disconnects Pin 12 of the GPIO connector (which we are going to wire to the I2S clock from P5) from Pin 5 of the WM8804 high performance S/PDIF transceiver (CSB) pin.

From Matthias “During reset pin 5 of the WM8804 is used as in input to select the I2C address – so you need to have it connected to the pullup (R30). Afterwards it’s an output so if you leave it connected to P1 header pin 12 it’d clash with the I2S clock.”

R39 is here (shown still fitted in this image): –

Remove R39

Remove R39 (click to enlarge)

Finally, we need to attach some wires to P5, which we then wire across to the Raspberry Pi3’s GPIO connector. One of the links can be made permanent on the Wolfson card, but the other three will need wiring to pins 35, 38 and 40 of the GPIO. If you don’t want the ability to easily disconnect the board, you could solder directly to the Raspberry Pi GPIO pins, but some jumper wires with suitable push on terminals might be better.

The connections required are described here, using the names on the Wolfson Card Schematics.

Connections required

Connections required (click to enlarge)

You can use any colour wire you want (electrons are colour blind), I’ve used what I had laying around and the wiring for the above connections is shown here: –


Wiring (click to enlarge)

Be aware that there are some high-frequency signals on these wires, so ideally the wires need to be as short as practical and I would route them close to the board, near the GPIO connector to keep them away from sensitive audio circuitry. In my case I ran them under the PCB: –

Mod Bottom View

Mod Bottom View (click to enlarge)

Mod Top View

Mod Top View (click to enlarge)

I’ve attached this to a Raspbery Pi3, with the official 7″ touchscreen, which all looks rather tidy, you will see some Kapton tape I’ve added over the USB port connector bodies; the Wolfson card sits in contact with these so to ensure that nothing gets shorted out it seemed a sensible idea: –

Assembled to Raspberry Pi3 + Touch Display

Assembled to Raspberry Pi3 + Touch Display (click to enlarge)

Assembled to Raspberry Pi and Touch Display

Assembled to Raspberry Pi3 and Touch Display (click to enlarge)

To enable the driver, follow the instructions here on Matthias’s site.

I’ve copied them below just for backup / posterity: –

Configuration for kernel 4.9

Enable the driver

Add the following line to /boot/config.txt to enable the Cirrus Logic card driver


Note: MMAP support is already enabled by default in kernel 4.9, you no longer need to add the i2s-mmap overlay.

Setup module dependencies

The cirrus driver requires some manually defined module dependencies, if you fail to add them the driver won’t load properly.

Create a file /etc/modprobe.d/cirrus.conf with the following content:

softdep arizona-spi pre: arizona-ldo1

Download and install “usecase” mixer scripts

Download cirrus-ng-scripts.tgz and extract it for example in /home/pi/bin.

mkdir bin
cd bin
tar zxf ../cirrus-ng-scripts.tgz

Note: If you had installed the older usecase scripts for kernel 4.4 you need to remove them.

You have to start the appropriate scripts before you can use the card. For example:


All that remains is to do some mechanical modifications to the case to make it fit. The headphone socket will fit through the side of the case (once a suitable hole is drilled), but the Line In, Line Out and SPDIF In and Out will get in the way and protrude beyond the rear of the case

I’ll probably desolder them from the board and relocate them to elsewhere on the case.

Case Modifications Required

Case Modifications Required (click to enlarge)

A quick bit of bodging and it fits, I’ve just removed the SPDIF connectors as I don’t use them, the Line in and Line Out I’ve left as is, so they can be used. I just need to modify the back cover that fits on the unit now.

Case Modification

Case Modification (click to enlarge)

This entry was posted in Engineering, Linux, Music, Streaming. Bookmark the permalink.

12 Responses to Connecting the Wolfson Sound Card to the Raspberry Pi3

  1. Hervé says:

    Problem…, i have all made like you said. In the order of your tutorial :

    give me :
    amixer: Control hw0: open error: Invalid argument
    (many times the same line, repeated again and again)

    aplay -l give me :
    aplay: device list:277: control open (0): invalid argument

    I was setup before with 4.4, and during my C++ test, all worked perfectly, playing with sine waves…. and without knowing why, sound stopped… and the aplay -l command has stop working…

    So i try

    mkdir bin
    cd bin
    sudo tar zxf ../cirrus-ng-linux-4.9.4.tgz -C /

    with :
    sudo nano /boot/config.txt

    i learn :
    [ 3.913997] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered
    [ 3.924215] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered

    But that didn’t help me, so… please help !! I spend all the day and the night on this, and i still can’t find why nor a solution …

  2. Graham Agnew says:

    Awesome tutorial. I have gotten this to work with Volumio ( I had to upgrade my tools and skills to be able to complete this, but it gave me a good excuse to get back into electronics (after 30 years – it was all through-hole back then!).

    • webmaster says:

      IThe single most frustrating thing about getting older is my eyesight worsening, which makes surface mount work challenging and working under a microscope isn’t an easy skill! Well done on your success with Volumio.

  3. Richard Beattie says:

    Thought I’d post something here in case anyone is an atrocious solder like me and would rather not risk breaking their board (or in my case had previously broken their board).

    If you get a stacking header (for example you can place the Wolfson Card on this so that the Pogo Pins just dangle instead of touching the board.

    You can then solder wires directly onto the P5 Pad on the Wolfson on the top without removing the Pogo Pins and then just attach the other ends to the correct positions. If you cut pin 12 on the stacking header and run a wire directly from PCM_CLK to the cut pin then you don’t have to touch the resistor.

    I have just done this now and it worked! Some of the connections could be stronger however they can easily be gone back to.


    • webmaster says:

      Good solution! It’s always a little risk hacking at a board like this, even when you are confident. Your solution is an elegant one.

    • Michel says:

      I Me thinks you would need a 2*13 pins not a 2*20 pins for this!
      Ordered a 2*13 and will try

    • Raz says:

      do you mean cut pin 12 on the wolfson (so it would not get into the raspi3?)

      I suck at soldering I wish there was a card hat adapter i could put between the wolfson and raspi3

      • Andrew says:

        Are you asking if you could cut the GPIO pin 12 as an alternative to removing R39? If so the answer is no, that wouldn’t work, you need GPIO pin 12 for the I2S clock connection.

  4. Lynn |Woods says:

    I have done all the mods…very useful information.
    I am not use to linux and stuck on

    The cirrus driver requires some manually defined module dependencies, if you fail to add them the driver won’t load properly.

    Create a file /etc/modprobe.d/cirrus.conf with the following content:

    softdep arizona-spi pre: arizona-ldo1

    How do I do this and where does it go?

    Please help

  5. Stuart Naylor says:

    Just wondering does all go well with the newer 4.19 kernel?

    Also did anyone ever find the dsp micro code for AEC as I think the loopback loops back to an empty channel.
    Would be so amzing if AEC would work.

  6. Birla Cosmin says:

    i follow your instruction and the wolfson board works great. The setup is :
    raspberry pi3 + wolfson card + lcd 2004 (i2c – for displaing artist/melody and time etc) + spotfy + pioneer sx 750 and Q acustics speakers.
    Pff, the sound in great… it is sommethig …
    Now i look a case model for raspberry and wolfson, but, i don”t find any… do you have somme prototipe for a 3d printer?

    sorry for my english, i am not native

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.