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 26921 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 e14 Contributor

    Hi Ragnar!

     

    Thank you for uploading, last night i installed the patch and changed the kernel comment.
    After that the system booted succesfully with a new kernel, and im playing with some 24bit-192khz flacs,
    its seems ok, but it would be better if i have a test file. If you could generate some sine wave

    files with different samplerates and bit depth i will try it with a freq. analiser at the end of the amp. chain.

     

    Or do you have a better idea for easy testing?

     

    If there is a terminal command or software to generate the sine waves, i will generate it on my own, with a little help.

     

    Thanks a lot!

     

    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 forget that, i test it with a timer, 20seconds of playing (kodi showing the elapsed play time) it seems really 20seconds
    measured by the timer on my phone. It will be more precise if i measure the whole track play time, i know, but it was really
    late..:)

     

    Viktor

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

    If there is a terminal command or software to generate the sine waves, i will generate it on my own, with a little help.

    You can do this with sox (just do an "apt-get install sox" if you don't have it installed).

     

    For example: stereo 16-bit WAV at 44.1kHz samplerate with a 10 second 440Hz tone at -3dB:

    sox -n -c 2 -r 44100 -b 16 440-cd.wav synth 10 sin 440 gain -3

     

    Change the -r and -b options for different samplerates / bits per sample.

     

    so long,

     

    Hias

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

    Hi,

     

    Ok, thanks, i will reply if i have any news.

     

    Viktor

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

    Hi!

    Good news, it seems perfect:)
    I was generated 3samples
    44100 16
    48000 24
    96000 24

    these are the regular formats for high quality coded flacs from the russians:)pl

     

    Installed freq analizer on my phone and it tells 441Hz for the 440Hz sample, so i think
    its okay, anyway i not recognized the wa-wa thing after i installed the patch.

     

    If i have some time i will make some test with the old config just for sure.

     

    Thanks!!

     

    Viktor

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

    I've build a RT kernel using the Cirrus kernel git repo and I'm getting this Unknown device ID message too:

    [    4.886573] bcm2708_spi 3f204000.spi: master is unqueued, this is deprecated
    [    4.986252] arizona spi0.1: Unknown device ID: 0
    [    5.034386] bcm2708_spi 3f204000.spi: SPI Controller at 0x3f204000 (irq 80)
    [    5.047637] bcm2708_i2c_init_pinmode(1,2)
    [    5.053591] bcm2708_i2c_init_pinmode(1,3)
    [    5.276372] bcm2708_i2c 3f804000.i2c: BSC1 Controller at 0x3f804000 (irq 79) (baudrate 100000)
    [    5.586988] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [    5.909683] systemd-journald[104]: Received request to flush runtime journal from PID 1
    [    6.271667] snd-rpi-wsp sound: ASoC: CODEC DAI wm5102-aif1 not registered
    [    6.280661] snd-rpi-wsp sound: Failed to register card: -517
    [    6.288491] platform sound: Driver snd-rpi-wsp requests probe deferral

    So I guess I'm missing something. ragnar.jensen how did you build the kernel? Apparently you used make deb-pkg but doesn't the kernel need to be run through mkknlimg? Care to share a recipe so others can build their own kernels too? Thanks in advance!

    • 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, I use mkknlimg to put the device-tree "tail" on the kernel file.

    "make deb-pkg" uses the compressed kernel zImage, so I just rename it and then have mkknlimg create a new zImage from it, with the tail added.

    make menuconfig
    make -j8
    make -j8 modules
    pushd arch/arm/boot/
    mv zImage zImage.org
    mkknlimg zImage.org zImage
    rm zImage.org
    popd
    KBUILD_DEBARCH=armhf make deb-pkg

    --

    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

    Awesome! Thanks! Now I've got a nice deb package of my RPi kernel. And I got it to work, needed to add CONFIG_REGULATOR=y and then CONFIG_REGULATOR_FIXED_VOLTAGE=m  and CONFIG_REGULATOR_ARIZONA=m.

    root@rpi-jessie:~# uname -a
    Linux rpi-jessie 3.18.9-rt5-v7-cirrus #1 SMP PREEMPT RT Thu Apr 16 20:50:14 CEST 2015 armv7l GNU/Linux
    root@rpi-jessie:~# cat /proc/asound/cards
     0 [sndrpiwsp      ]: snd_rpi_wsp - snd_rpi_wsp
                          snd_rpi_wsp

    As you can see I'm using plain Debian, from what I've understood that should perform a bit better than Raspbian. And I'm cross-compiling so I had to adapt the steps a bit.

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

    Hi Ahmed,

    If you use HDMI to your Onkyo receiver,  you do not need to follow any of the CLAC specific setups, nor the card.

    I recommend you look at ready to run image for Kodi, : Xbian. It allowed me to use HDMI sound output withouth too much work

    If you want a headless music player look at TUTORIAL: Installing Squeezelite player on Raspbian | Squeezing a Raspberry Pi

    if you read gerrelts tutorials you will be able to set the output of Squeezelite to the 1) Standard Raspi Analogue port ( fair but not hifi ) 2) HDMI ( but not together with Kodi running )

    or the CLAC as discussed in this forum. Hint:  SL_SOUNDCARD="sysdefault:CARD=sndrpiwsp" in /usr/local/bin/squeezelite_settings.sh

     

    I might experiment on Xbian and this Raspi 2B CLAC kernel later. But for me Kodi is not the preferred Audio renderer.

    Regards Marcel

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

    Marcel:

    I did not like the sound out of the box on the HDMI and Onkyo, but I have not done any kind of optimization either.  The sound was kind of boomy and did not have any body to it  I will look at your suggestion for another RPI2 iplmementation, that I will do for another Denon AVR-X2000.  I am not advanced user of Linux, so I had issues using Kodi, when I do remote desktop using XRDP.  So my current setup is MPD/MediaPlayer/BubbleUpnp on RPI2, BubbleUPnP on Notes 2 and then SPDIF connection from CLAC to Onkyo.  The sound is richer.  It still is lacking compared to my 2.1 audiophile setup that I have using a win2012r2/AO/Foorbar2k -> Cambridge Audio Dac Magic Plus -> Adcom.  But I think Raspberry PI can be further improved as I get to learn more from you advanced folks.  Thanks for your note.

     

    Ahmed

    • 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