I've ported the original Wolfson/Cirrus driver from Raspberry Pi kernel 3.18 over to newer kernel versions and fixed various bugs:
For a detailled history of my changes please have a look at the Changelog.txt
Original driver code from Cirrus Logic: https://github.com/CirrusLogic/rpi-linux
Repository with my changes:
Currently maintained tree: cirrus-4.4.y
Just clone one of my trees and follow the
official RPi kernel compilation instructions.
When you do a
make bcmrpi_defconfig or a
make bcm2709_defconfig the Cirrus driver will be enabled automatically.
If you don't want to or can't compile from source yourself download one of the precompiled kernels below. To install them use the following command (replace 4.4.14 with the actual version you've downloaded):
sudo tar zxf cirrus-linux-4.4.14.tgz -C /
Note: the tarball contains kernels and modules for both the RPi / Wolfson Audio Card and RPi2 / Cirrus Logic Audio Card.
Important notes if you update from kernel 4.1.y:
|Download from archive||Read Changelog.txt for details|
Add the following line to
/boot/config.txt to enable
the Cirrus Logic card driver
If you want MMAP support (eg for Alsa plugins) add this line as well:
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
softdep arizona-spi pre: arizona-ldo1 softdep spi-bcm2708 pre: fixed softdep spi-bcm2835 pre: fixed
Instead of doing the "git clone" as described in the
you can just download
and extract it for example in
wget http://www.horus.com/~hias/tmp/cirrus/usecase-scripts.tgz mkdir bin cd bin tar zxf ../usecase-scripts.tgz
Note: You have to start the appropriate scripts before you can use the card. For example:
./Reset_paths.sh -q ./Playback_to_Lineout.sh -q ./SPDIF_playback.sh -q ./Record_from_lineIn.sh -q
On Raspbian the RPi on-board audio device
enabled by default. When you run
aplay -l you'll see
two cards, the Cirrus card
sndrpiwsp and the on-board
If you don't need on-board audio you can disable it by removing
(or commenting out) the
dtparam=audio=on line from
If you don't want to disable snd-bcm2835 or if you also have an USB audio device connected you might notice that the card numbers under which the drivers register will change. Sometimes the Cirrus card will card 0, sometimes on-board audio. The card number depends on which driver is registered first, which is purely random.
You can manually assign fixed card (slot/index) numbers using
slot option of the
snd module. For
example, if you want the Cirrus card always to be the first and
on-board audio the second one, add the following line to your
options snd slots=snd-soc-rpi-wsp,snd-bcm2835
Note: you need to use kernel 4.1.19 or newer, slot numbering doesn't work in earlier versions.
From time to time Raspbian will update the kernel+GPU firmeware package.
If you do an
apt-get upgrade the Cirrus kernel will be
replaced with the official Raspbian kernel and the sound card no longer
You can prevent Raspbian kernel updates by putting the
raspberrypi-kernel packages on hold:
sudo apt-mark hold raspberrypi-bootloader raspberrypi-kernel
Note: this will also disable GPU firmware updates.
Sometimes new kernel versions require an updated GPU firmware to work properly (or even boot at all).
To update the GPU firmware but not the kernel install the
rpi-update package and then update the GPU firmware
with this command:
sudo SKIP_KERNEL=1 rpi-update
If something doesn't work as expected please post your questions in this thread on the element14 site.
In order to track down problems follow the steps below and include the URLs to the paste files in your post:
Add the following line to
enable devicetree debugging, then reboot your RPi.
/boot/config.txt file, the
GPU firmware version, GPU firmware and linux kernel logs
and the outputs of
The easiest way to do this is by using the
command which is included in Raspbian. Enter the following
commands and include the URLs that are output on the
terminal in your post:
paste /boot/config.txt vcgencmd version | paste sudo vcdbg log msg 2>&1 | paste dmesg | paste lsmod | paste aplay -l | paste