element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Cirrus Logic Audio Card working on the Raspberry Pi 2
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 165 replies
  • Subscribers 715 subscribers
  • Views 26916 views
  • Users 0 members are here
  • wolfson
  • raspberry
  • audio
  • pi
  • cirrus
  • raspberry_pi
  • rpi2
  • raspeberry_pi_accessories
  • pi2
Related

Cirrus Logic Audio Card working on the Raspberry Pi 2

e14 Contributor
e14 Contributor over 11 years ago

Hi all!

 

As you might know, Cirrus Logic's main kernel source branch recently switched to 3.18.

My first thought was "Hmm, that means the Cirrus Logic card could finally work on the RPi2..."

I have built a couple of 3.18 kernels for my B+ and RPi2 and I have managed to get both models to produce sound image

 

It's still early days, i.e. there are possibly bugs and glitches to fix, but for those of you who would like to try it out I've made an image file that you can download here:

https://drive.google.com/file/d/0BzIaxMH3N5O1cmJ1bFhMcG1hc0E/view?usp=sharing

The file is a 1.3 GB zip. Uncompressed size is 3.1 GB, so it fits comfortably on a 4 GB card.


The image is based on the standard 2015-02-16-raspbian-wheezy image from the Foundation that you flash to a SD card for a fresh install.

I have only added my kernels and set up the configuration files to get the card going.

It should work on the older B model  with a Wolfson Audio Card too, but I haven't tested that yet.

 

Have fun!

--

Ragnar

  • Sign in to reply
  • Cancel
  • e14 Contributor
    e14 Contributor over 11 years ago in reply to notorious.dds

    Hi Walter!

    Not that I think it matters, but I'm using berryboot for the bootloader.

    I have no experience of Berryboot, but I found this on the PLEX forums,  https://forums.plex.tv/index.php/topic/145555-want-rasplex-on-rpi2-try-the-berryboot-method/

     

    "When a compatible image is booted by BerryBoot, most of its kernel routines and drivers are replaced by those supplied by BerryBoot, which is necessary for these images to use the virtual filesystems needed to allow multiple images to coexist on the same card. But this also means that it is the drivers and kernel of BerryBoot which determine the hardware compatibility, as the system calls of the installed image are handled by the BerryBoot kernel and drivers, even if the installed image was compiled for other hardware."

     

    And, from Berryboot's own pages, http://www.berryterminal.com/doku.php/berryboot/adding_custom_distributions

     

    "Most Raspberry Pi operating system images are disk images containing two partitions. A FAT partition with the boot loader and kernel files, and a second ext4 partition with everything else. We are interested in the second partition...

    ... We are excluding /lib/modules from the image, because the kernel modules shipped with Berryboot are used instead..."

     

    It looks like Berryboot substitutes its own kernel and drivers.

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 11 years ago in reply to e14 Contributor

    Hi Sherry!

    I get no sound at all to left speaker out.

    Since the headset works and you do get sound from one speaker, I would suggest you start by looking at the speakers' physical connections. Loose wires, dirty connectors...that sort of stuff..

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • hiassoft
    hiassoft over 11 years ago in reply to e14 Contributor

    Sherry McCray wrote:

    I am getting sound using my Raspberry Pi 2 on the headset but I am only getting sound output to my loud speakers via right speaker out--I get no sound at all to left speaker out.  What may I have done wrong?

    This is really strange, a bad connection would have been my best guess, too.

     

    But I noticed a similar issue on my OpenELEC builds when using SPDIF, occasionally I only got sound on the right channel. This happens only from time to time and is hard to reproduce. After a reboot everything's fine again. Not sure what's going wrong here.

     

    I also noticed another issue with the new kernel 3.18 driver, /proc/interrupts reports a lot of bad IRQs (Err: at the end is continuously counting up). This didn't happen with the previous 3.12 driver. I noticed that on 3.12 "arizona" was registered for IRQ 27, now on 3.18 it's registered to IRQ 0 - and none of these ever triggered. My guess is that both things aren't correct and request_threaded_irq(arizona->irq...) and free_irq(arizona->irq) in arizona-irq.c might need to be guarded with a "if (arizona->irq)". Or maybe it's something else and the IRQs haven't been configured properly at all, I don't know.

     

    Another thing I noticed on my OpenELEC builds: sometimes the card wasn't detected after a reboot and dmesg contained "arizona spi0.1: Unknown device ID: 0" instead of "arizona spi0.1: WM5102 revision C". This seemed to occur more often if the kernel is compiled without CONFIG_PREEMPT but is very hard to reproduce. So far I've only seen it on my OpenELEC builds but not on raspbian with a defconfig kernel. Again: not sure what's going on here.

     

    so long,

     

    Hias

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • notorious.dds
    notorious.dds over 11 years ago in reply to e14 Contributor

    It looks like Berryboot substitutes its own kernel and drivers.

    --

    Ragnar

     

    Ragnar, thank you so much for your efforts and helpful replies.  Upon reading your response, I did some playing around with Berryboot and discovered that although berryboot allows you to multiboot your RPi, the way that it achieves this by running each OS directly from the img file.  Any changes you make are saved in separate folder - much like when you live boot and OS on a USB stick with persistence.  At any rate, this was never going to permit updating the kernel used to boot Raspbian.  I've sinced used your img file with the updated kernel and all is well.  THANK YOU!

     

    One thing I did notice is that the default Broadcom sound card was commented out of the /etc/modules file.  Was that a setting you made or the result of something I did?  I've since removed the comment from the line in the /etc/modules file.  Is that an issue?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 11 years ago in reply to notorious.dds

    One thing I did notice is that the default Broadcom sound card was commented out of the /etc/modules file. Was that a setting you made or the result of something I did?

    I actually anticipated that someone would ask that very question image

     

    I did it on purpose. I commented out the Broadcomm sound card to make sure that the Wolfson/Cirrus card is the only visible card.

    During the last year, I have seen a lot of questions about how to select the Wolfson/Cirrus card in various applications.

    If there is only one card, many player and recording applications will have a much easier time finding it, since it becomes the default card.

     

    Feel free to remove the comment to enable the Broadcomm sound card. They will happily co-exist.

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 11 years ago in reply to e14 Contributor

    Hi Ragnar,

     

    I finally had a moment to go back and check all of my connections and it turned out that it was the connection between the pi and the audio card.  I double checked the plastic screws connecting the boards and that was the problem--the plastic screws were just a tiny bit off track and that made the all the difference!!! 

     

    Once again, thank you very much for your response and all your efforts putting this together!!! 

     

    Best,

    Sherry

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 11 years ago

    Hi Ragnar!

     

    First of all, thank you for your work about the new cirrus modules and kernel, with your help now i able to use
    my B+ raspberry with the Cirrus Wolfson card on raspbian with Michael Gorven's Kodi build !!

    XBMC for Raspberry Pi | Michael Gorven - cocooncrash

     

    My current setup (for those who might had a problem with it) is:
    Kodi 14.0~git20141203.35b4f38-1: Helix 14.0 RC 2

    raspbian 3.18.7

    Hexxeh rpi firmware commit 46c2653d49570e14a28afad9e56677081e7a2409

    kernel_CL.img comment in config.txt

    My only problem is with the framerate, i think there is a bug someware -i don't know is which part,im not

    familiar with linux in that level.The detailed problem is: when i playing a flac file with kodi, and its coded in

    24bit/48kHzor some other than normal 44.1kHz format, the sound is just like out of tune, just like slippage of a turntable. belt.

    This probalby a framerate problem, but it wont get better when i change the framerate in Kodi to 48,192 or whatever.

     

    So, which log can be helpful to you or someone to find out the problems root?

     

    Thanks!
    Viktor

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 11 years ago in reply to e14 Contributor

    Yes, probably a bug or that Cirrus haven't updated all their code to 3.18 yet. I have noticed that a couple of things that were present in their 3.10 and 3.12 kernels are missing in 3.18.

    Your problem might be the same as this: http://www.element14.com/community/thread/42186/l/issues-with-samplerates-below-441khz

    I have built a kernel with the patch provided by hiassoft and I'll upload it for you to try when I get home from work today.

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 11 years ago in reply to e14 Contributor

    Hi,

     

    I missed this thread. Thank you, i will try it.


    Thx!

    Viktor

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 11 years ago in reply to e14 Contributor

    I have uploaded a pair of kernels with the FLL patch included, as deb packages.

     

    For the RPi2 :

    Download link: https://drive.google.com/uc?export=download&id=0BzIaxMH3N5O1S1JyTkJ4Z090cHc

    File name is linux-image-3.18.9-v7cludlmmapfll_3.18.9-v7cludlmmapfll-4_armhf.deb

    md5sum: b168d2d736974f1f681fdefa9e246909

    Install with

    sudo dpkg -i linux-image-3.18.9-v7cludlmmapfll_3.18.9-v7cludlmmapfll-4_armhf.deb

     

    Change /boot/config.txt to contain
    kernel=vmlinuz-3.18.9-v7cludlmmapfll

     

     

    For all other models:

    Download link: https://drive.google.com/uc?export=download&id=0BzIaxMH3N5O1OGNpYl8wRVhqbU0

    File name is linux-image-3.18.9cludlmmapfll_3.18.9cludlmmapfll-3_armhf.deb

    MD5sum: b7947af7cbeb34d2d0324c6896aedf67

    Install with

    sudo dpkg -i linux-image-3.18.9cludlmmapfll_3.18.9cludlmmapfll-3_armhf.deb


    Change /boot/config.txt to contain

    kernel=vmlinuz-3.18.9cludlmmapfll

     

    Please report back if this fixes your issue or not.

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube