element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Or 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Cirrus Logic Audio Card working on the Raspberry Pi 2
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Raspberry Pi requires membership for participation - click to join
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 560 subscribers
  • Views 11090 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

Former Member
Former Member over 8 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
  • Former Member
    Former Member over 8 years ago

    For good measure, I've put together a tar archive of the 3.18 kernels with Cirrus Logic drivers, that can be installed on top of an existing Raspbian 3.18 installation.

    Download the archive file kernel_3_18_9_W_CL.tgz from here: https://drive.google.com/file/d/0BzIaxMH3N5O1S1FfSGpqYjEwaVk/view?usp=sharing

     

    To install:
    Become root: sudo -s
    Go to root directory: cd /
    Untar the archive: tar xvzf /path/to/where/you/saved/kernel_3_18_9_W_CL.tgz
    Add these lines

    dtparam=spi=on
    dtparam=i2c_arm=on
    dtoverlay=rpi-cirrus-wm5102-overlay

    to the file /boot/config.txt

    On a RPi2B, also add

    kernel=kernel7_CL.img

    or, on all others, add

    kernel=kernel_CL.img

    to /boot/config.txt

     

    Put these lines into /etc/modprobe.d/raspi-blacklist.conf  (create the file if it doesn't exist.)

    softdep arizona-spi pre: arizona-ldo1
    softdep spi-bcm2708 pre: fixed

    Reboot.

     

    If it doesn't work, you can revert to your original kernel by just removing the "kernel=kernel_CL.img" line from /boot/config.txt

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to Former Member

    Ragnar:

    Thank you so much for putting this together.  I am up and running with the new kernel.  I am no luck however with the sound and I am putting that on my setup for now.  I have a local install of kodi on RPI2 to be controlled by BubbleUPnp android app, as well a as rpi2 install of BubbleUPnp, which allows to designate kodi as an openhome rendered and then drive the sound to the Onkyo Amp.  This setup worked only with HDMI before.  I am using the Sound configuration on Raspberry Pi with ALSA | Stephen C Phillips to troubleshoot, why I am not getting any sound. 

    Ahmed

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to Former Member

    I know nothing about Kodi image

    Have you run any of the "Playback.." scripts to select which output(s) the card should use?

     

    I've noticed there's an experimental build of OpenELEC for the RPi2/Cirrus. Maybe some clues in there...

    http://www.horus.com/~hias/tmp/openelec-wolfson/

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to Former Member

    I have not run the play back scripts.  Thanks for pointing those out.  I think I need to go simple and use the 3.5 mm audio out instead of the digital out and work backwards.  I wish I did not have have to use kodi either.  I just needed a simple media player. I started looking at mpd and somehow ended up with kodi!  Kodi has an audio output area which I need to check again.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago

    Ragnar:

    i try to install your archive "kernel_3_18_9_W_CL.tgz" on a fresh 2015-02-16-raspbian-wheezy and no sound from the CL card. The card doesn't seem to be recognized by alsa...

     

    pi@pi ~ $ amixer
    Simple mixer control 'Master',0
      Capabilities: pvolume pswitch pswitch-joined penum
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 65536
      Mono:
      Front Left: Playback 45220 [69%] [on]
      Front Right: Playback 45220 [69%] [on]
    Simple mixer control 'Capture',0
      Capabilities: cvolume cswitch cswitch-joined penum
      Capture channels: Front Left - Front Right
      Limits: Capture 0 - 65536
      Front Left: Capture 65536 [100%] [on]
      Front Right: Capture 65536 [100%] [on]
    pi@pi ~ $
    do i have forgotten something?
    (From your image, it works like a charm image Thanks!!!)
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to Former Member

    It looks like you have another sound card installed, possibly it has taken the position as the default card.

    what does "aplay -l", "aplay -L" and "cat /proc/asound/cards" say?

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to Former Member

    pi@raspberrypi ~ $ aplay -l
    **** Liste des Périphériques Matériels PLAYBACK ****
    carte 0: sndrpiwsp [snd_rpi_wsp], périphérique 0: WM5102 AiFi wm5102-aif1-0 []
      Sous-périphériques: 1/1
      Sous-périphérique #0: subdevice #0
    carte 1: ALSA [bcm2835 ALSA], périphérique 0: bcm2835 ALSA [bcm2835 ALSA]
      Sous-périphériques: 8/8
      Sous-périphérique #0: subdevice #0
      Sous-périphérique #1: subdevice #1
      Sous-périphérique #2: subdevice #2
      Sous-périphérique #3: subdevice #3
      Sous-périphérique #4: subdevice #4
      Sous-périphérique #5: subdevice #5
      Sous-périphérique #6: subdevice #6
      Sous-périphérique #7: subdevice #7
    carte 1: ALSA [bcm2835 ALSA], périphérique 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
      Sous-périphériques: 1/1
      Sous-périphérique #0: subdevice #0
    pi@raspberrypi ~ $ aplay -L
    null
        Discard all samples (playback) or generate zero samples (capture)
    default:CARD=sndrpiwsp
        snd_rpi_wsp, 
        Default Audio Device
    sysdefault:CARD=sndrpiwsp
        snd_rpi_wsp, 
        Default Audio Device
    default:CARD=ALSA
        bcm2835 ALSA, bcm2835 ALSA
        Default Audio Device
    sysdefault:CARD=ALSA
        bcm2835 ALSA, bcm2835 ALSA
        Default Audio Device
    pi@raspberrypi ~ $ cat /proc/asound/cards
     0 [sndrpiwsp      ]: snd_rpi_wsp - snd_rpi_wsp
                          snd_rpi_wsp
     1 [ALSA           ]: bcm2835 - bcm2835 ALSA
                          bcm2835 ALSA
    pi@raspberrypi ~ $

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago

    I've compared your image and a fresh install of raspbian + your archive.

    The only difference i found, was for the name of the kernel.

    in your (working) image there is no "kernel=kernel7_CL.img" in your /boot/config.txt (or commented) => so the kernel7.img is loaded.

    So i tried to rename the kernel7_CL.img into kernel7.img (saving the original before) => youpi! I don't know why, but it works now ! image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to Former Member

    Excellent image

     

    kernel7.img from the image is the same file as kernel7_CL.img in the tar archive.

    As you noticed that is the file a RPi2 will pick if you don't explicitly choose another one in /boot/config.txt.

    Maybe you missed the step on editing /boot/config.txt?

    On a RPi2B, also add
      kernel=kernel7_CL.img 

    or, on all others, add
      kernel=kernel_CL.img 

    to /boot/config.txt
     

     

    Anyway, you got it working and thats great!

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to Former Member

    the config.txt was edited like in your 2nd post...

    Strange, but it seems that the "kernel=..." in the "config.txt" is ignored for the rpi2 (or i become crazy! image)

    I will make an another try to be sure.

    One more time, Thanks for your work!

    • 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 © 2023 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.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube