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 New reworked driver for Wolfson/Cirrus Logic audio card
  • 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 390 replies
  • Subscribers 767 subscribers
  • Views 50281 views
  • Users 0 members are here
  • raspberry_pi
  • raspeberry_pi_accessories
Related

New reworked driver for Wolfson/Cirrus Logic audio card

hiassoft
hiassoft over 9 years ago

I've been working on a driver rework, mainly to get rid of the requirement to carry around a bunch of patches to upstream driver code, and also to fix some outstanding issues and introduce some new features.

 

Most issues have been ironed out so here's the first public release.

 

Edit: the driver has been included in official RPi kernels. Just run sudo rpi-update to install it.

You still have to install the mixer scripts and add the /etc/modprobe.d file. See my website for details

RPi Linux driver for Wolfson / Cirrus Logic Audio Card

 

Source: https://github.com/HiassofT/rpi-linux/tree/cirrus-ng-4.9.0

Precompiled kernel: http://www.horus.com/~hias/tmp/cirrus/cirrus-ng-linux-4.9.0.tgz

New mixer scripts: http://www.horus.com/~hias/tmp/cirrus/cirrus-ng-scripts.tgz

 

Important notes:

  • The new driver bases on the rather fresh kernel 4.9.0 which means there's some risk of (yet unknown) issues. Use it at your own risk and please run "rpi-update" to get the latest firmware before installing the new driver.
  • The soundcard name has been changed from "snd_rpi_wsp" to "RPi-Cirrus", also several ALSA controls have been removed and new ones were added. This means the old usecase scripts and any custom-made scripts will no longer work. Use the new mixer scripts instead of the old usecase/listen scripts.
  • The new driver supports setting (and receiving) of the S/PDIF channel status bits (aka AES bits). If you add an ALSA card configuration file this means applications like Kodi can do proper AC3/DTS passthrough. A sample card configuration file (plus the mixer scripts) can be found here: https://github.com/HiassofT/rpi-cirrus-config
  • I haven't fully updated the documentation on my website RPi Linux driver for Wolfson / Cirrus Logic Audio Card  yet, will do that during the next weeks/months. But except for the things noted above most stuff should still work as in previous driver versions.

 

Please report back if you tested the driver (either successfully or unsuccessfully), any feedback will help me!

 

so long,

 

Hias

  • Sign in to reply
  • Cancel
Parents
  • kjciszewski
    kjciszewski over 9 years ago

    Thanks for that--I added Reset_paths.sh to my Lbio8.sh script, and the sample rate issue went away.

     

    There still seems to be a lot of white noise (hiss) in the audio that I don't remember from the earlier RPIs, audio cards and drivers, so I'll have to look into that.

     

    The default hw:0 thing was the original ALSA default, as I understand it, going way back. Ragnar Jensen's driver changed that to hw:1, as I recall (that as 3.12.33+, I think).

     

    It's interesting how different driver versions do things like add a minimum sample rate control, but I don't remember seeing that documented anywhere.

     

    I appreciate all of your hard work on this driver rework, without it we'd probably have nothing for RPI 3--the original powers that be didn't keep up very well the the Wolfson and CIrrus audio cards drivers relative to the changing RPI models.

     

    That said, one of the issues with all of this is some kind of documentation of changes and special features--unless I missed that somewhere.

     

    Thanks again.

     

    Have you heard if the Cirrus audio card will continue to be produced?  I saw one suppliers site that said it is no longer manufactured, while another said it would ship once supplies were restocked.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • hiassoft
    hiassoft over 9 years ago in reply to kjciszewski

    Hi Kenneth!

     

    I haven't noticed any noise/hiss issues so far. Try to check the cabling first, if it doesn't help please test with the old 4.4 kernel and see if it makes a difference.

     

    I've added the minimum/maximum samplerate controls to make it easier to interface with S/PDIF DACs and ADCs. And I also added controls to get/set the S/PDIF channel status bits (conforming to the ALSA IEC958 standard) both for transmission and reception, plus a few other read-only controls (all having "IEC958" at the beginning of the name) to check the internal S/PDIF receiver status registers - so users/application can detect if S/PDIF reception is OK.

     

    My plan is to document these new features later on my website, but number one priority for me was to get the new driver out to the public and get some feedback. If something's unclear or you need more info, just ask here!

     

    so long,

     

    Hias

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kjciszewski
    kjciszewski over 9 years ago in reply to hiassoft

    Thanks for taking the time to work on this.

     

    I use 8000 Hz because of an interest voice intercom over IP, something I'm still working on. It's kind of a common sample rate used for digital voice communication. Finding a suitable ethernet interface to use is still a challenge.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • hiassoft
    hiassoft over 9 years ago in reply to kjciszewski

    Hi Kenneth,

     

    could you please test with this kernel http://www.horus.com/~hias/tmp/cirrus/cirrus-ng-linux-4.9.3.tgz

     

    I did some tests here and it looks like I found a fix for the hiss issue when micbias on linein is turned off.

     

    so long,

     

    Hias

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kjciszewski
    kjciszewski over 9 years ago in reply to hiassoft

    So I installed this 4.9.3 on top of 2016-11-25-raspbian-jessie on a new SD card like I did before, made the other changes in your app note, fired it up using Lbio8.sh. and I get a lot of really loud white noise and a series of overruns (at least 122.xxx long).

     

    Should I have installed 4.9.3 over 4.9.0 instead?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kjciszewski
    kjciszewski over 9 years ago in reply to hiassoft

    All this on an RPI 3

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kjciszewski
    kjciszewski over 9 years ago in reply to hiassoft

    Question:

     

     

    In /etc/modprobe.d/cirrus

     

    is the first line supposed to be

     

    softdep arizona-spi pre: Ido1

     

    or

    is the first line supposed to be

     

    softdep arizona-spi pre: ido1

     

    The 4.9.0 version I have working has the latter entry

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • hiassoft
    hiassoft over 9 years ago in reply to kjciszewski

    So I installed this 4.9.3 on top of 2016-11-25-raspbian-jessie on a new SD card like I did before, made the other changes in your app note, fired it up using Lbio8.sh. and I get a lot of really loud white noise and a series of overruns (at least 122.xxx long).

    Thanks for the report, I must have missed that during testing. This issue is caused by a recent change to the RPi I2S driver, I've reported it to the RPi kernel guys https://github.com/raspberrypi/linux/issues/1799

     

    I'm currently building new kernels with the problematic kernel removed and'll post an update when it's finished.

     

    As for the modprobe file, you need to have the following line in it:

    softdep arizona-spi pre: arizona-ldo1

     

    so long,

     

    Hias

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kjciszewski
    kjciszewski over 9 years ago in reply to hiassoft

    I thought it might be something like that.  I did digital audio work back when on DSP56001 by Motorola, and ran into problems with loud white noise.  My problem back then was that the audio data stream came out of synchronization.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • hiassoft
    hiassoft over 9 years ago in reply to kjciszewski

    Kernel build has finished and seems fine on RPi3. Could you please give it a try?

    http://www.horus.com/~hias/tmp/cirrus/cirrus-ng-linux-4.9.4.tgz

     

    That issue was a rather nasty one. Once you ran aplay and arecord separately the parameters had been set up correctly and it worked fine. But arecord | aplay after a fresh boot caused issues. But it was also rather easy to reproduce and spot the cause, thanks a lot for finding it!

     

    so long,

     

    Hias

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kjciszewski
    kjciszewski over 9 years ago in reply to hiassoft

    I tried http://www.horus.com/~hias/tmp/cirrus/cirrus-ng-linux-4.9.4.tgz     on one RPI 3, and it seems to work OK. I used by Lbio8.sh script, ran that several times, rebooted from terminal, powered down and turned back on.  All those conditions seem to work properly.

     

     

    Now a question:  I have several v 4.9.0 SDs that I need to upgrade to 4.9.4.  Can I used tar zxf cirrus-ng-linux-4.9.4 -C /,  or do I have to start over with a clean image of v 4.4.3.4-v7+ then do the tar zxf?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • hiassoft
    hiassoft over 9 years ago in reply to kjciszewski

    Thanks a lot for the feedback, I'm glad this issue is fixed now!

     

    Now a question: I have several v 4.9.0 SDs that I need to upgrade to 4.9.4. Can I used tar zxf cirrus-ng-linux-4.9.4 -C /, or do I have to start over with a clean image of v 4.4.3.4-v7+ then do the tar zxf?

    You can exctract the 4.9.4 drivers over your current installation. This will leave some old modules files in /lib/modules (directories 4.9.0+ and 4.9.0-v7+), which you can safely remove (or just let them sit there, they'll eat up some space but won't do any harm).

     

    so long,

     

    Hias

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • hiassoft
    hiassoft over 9 years ago in reply to kjciszewski

    Thanks a lot for the feedback, I'm glad this issue is fixed now!

     

    Now a question: I have several v 4.9.0 SDs that I need to upgrade to 4.9.4. Can I used tar zxf cirrus-ng-linux-4.9.4 -C /, or do I have to start over with a clean image of v 4.4.3.4-v7+ then do the tar zxf?

    You can exctract the 4.9.4 drivers over your current installation. This will leave some old modules files in /lib/modules (directories 4.9.0+ and 4.9.0-v7+), which you can safely remove (or just let them sit there, they'll eat up some space but won't do any harm).

     

    so long,

     

    Hias

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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