36 Replies Latest reply on Apr 6, 2017 11:13 PM by bulcan10

    Cirrus Logic Audio Card and Raspberry Pi 3

    boga

      Hi!

       

      Main idea of starting this discussion is that if anyone has a working setup with Raspberry Pi 3 then it would be nice if you could share the image. Or the instructions to get the Cirrus Logic Audio card working with Raspberry Pi 3.

       

      I tried 2 different methods and no luck so far. I must say that I am a hardware guy and do not know too much about programming and linux. Trying to educate myself though.

       

      Here is what I have tried.

       

      1. I downloaded the ready made all-in-one package from element14 Cirrus Logic Audio Card page and installed the image using Win32DiskImager. When I tried to boot the Raspberry Pi 3 was just showing the Rainbow Screen and nothing was happening. Therefore the system was stuck and not booting at all. I did not investigate it further thinking that probably the ready made image doesn't work for RPi3.

       

      2.  The second time I installed the latest Raspbian image. Tested that it was working on RPi 3. Then followed the official instruction on CirrusLogic wiki page https://github.com/CirrusLogic/rpi-linux/wiki/Building-the-code .  I used local build as I don't have Linux installed on my PC (yet!). Thought that maybe these will work for RPi3 also if I compile the kernel in the machine itself.

      Unfortunately no luck. The RPi3 starts to boot but then hangs at a line which says: random: nonblocking pool is initialized. Which can basically mean anything according to my research. Of course I didn't give up so fast. I tried all kinds of different things according to the hints that I found by Googling. But I do not think they are worth mentioning here.

       

      So. I would be really happy if someone who knows more about linux and programming could look into it and share the information if he / she gets Cirrus Logic Audio Card working with RPi3.

      Of course all kind of suggestions about the described situation are also welcome.

       

      All the best

        • Re: Cirrus Logic Audio Card and Raspberry Pi 3
          bulcan10

          Hello Juri,

           

          I experienced the same problem with Pi 3, step 1. I did not try step 2. Even though, I noticed that the Download file on this website has been recently updated, the UI looks different. The Cirrus Logic Audio card and this software works on Pi 1 Model A+ board. I also tested the previous ver of the OS on Pi 2 Model B and also worked great.

           

          Hopefully, the manufacturer will release a new embedded OS that works with Pi 3.

           

          Best

            • Re: Cirrus Logic Audio Card and Raspberry Pi 3
              jayeye

              It works just fine with the Pi3. Just load raspbian jessie, run rpi-update to make sure you have up-to-date firmware, and follow the instructions on how to build your own kernel: https://www.raspberrypi.org/documentation/linux/kernel/building.md 

              The repo with the cirrus drivers is https://github.com/HiassofT/rpi-linux.

              Here is proof that it works:

               

              pi@one:~ $ uname -a
              Linux one 4.4.6-v7+ #1 SMP Wed Apr 13 04:39:03 UTC 2016 armv7l GNU/Linux
              pi@one:~ $ arecord -l
              **** List of CAPTURE Hardware Devices ****
              card 1: sndrpiwsp [snd_rpi_wsp], device 0: WM5102 AiFi wm5102-aif1-0 []
                Subdevices: 1/1
                Subdevice #0: subdevice #0
              pi@one:~ $ aplay -l
              **** List of PLAYBACK Hardware Devices ****
              card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
                Subdevices: 8/8
                Subdevice #0: subdevice #0
                Subdevice #1: subdevice #1
                Subdevice #2: subdevice #2
                Subdevice #3: subdevice #3
                Subdevice #4: subdevice #4
                Subdevice #5: subdevice #5
                Subdevice #6: subdevice #6
                Subdevice #7: subdevice #7
              card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
                Subdevices: 1/1
                Subdevice #0: subdevice #0
              card 1: sndrpiwsp [snd_rpi_wsp], device 0: WM5102 AiFi wm5102-aif1-0 []
                Subdevices: 1/1
                Subdevice #0: subdevice #0

                • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                  alanc002

                  John,

                   

                  Many thanks for this. I'm going to attempt this now on a RPi 3 with 4.1.18-v7+. Although I have a reasonable knowledge of Linux and have successfully built executables from C language sources, I've never compiled a kernel before.

                   

                  You gave a link to the git repository for the Cirrus Logic drivers, however I don't know how to include these in the sources for build. 

                   

                  Any advice, or a step by step walkthrough of the process would be most welcome.

                   

                  Kind regards

                  Alan

                  • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                    ericthegraves

                    Hey John,

                     

                    I'm in the same boat as Alan, trying to get a kernel going. I've tried a few versions of the steps in this thread: Driver fixes and updates to kernel 3.18.16 and 4.0.5  but still can't see the cirrus card after rebooting the pi 3.

                     

                    Any help would be greatly appreciated.

                     

                    Thanks,

                     

                    Eric

                      • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                        alanc002

                        Hi Eric,

                         

                        Glad I'm not alone!

                         

                        Let's try and crack this- I'm sure that if we go at it scientifically and document on here what we do, we should be able to make some progress.

                         

                        I'm working with the NOOBS distro although I don't have a problem with using any other if that's what it takes. That said, reading the thread in your link (thanks for that btw, I'd not seen that one before) people are getting it going with NOOBS using the pre-compiled kernels, once they get the config files correctly configured so it seems that this would be the logical way to go.

                         

                        I don't have a huge amount of time at the moment but will have a go; if I succeed I will happily send you an image!

                         

                         

                        Cheers

                        Alan

                          • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                            ericthegraves

                            Hi Alan!

                             

                            I got my card to show up finally. Hitting the hay for now but check out this entire thread and my posts: Re: Driver fixes and updates to kernel 3.18.16 and 4.0.5

                            it might get you on the right track. I didn't use NOOBS, just imaged an SD card with rasbian jessie 3.18.16 I think, the latest one. Yeah, I think really accurately documenting everything I did to get it to work in layman's terms will help a lot. I will chime in more tomorrow.

                             

                            Cheers,

                             

                            Eric

                              • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                j-e-f-f

                                Hi Eric / Alan,

                                 

                                Following along here.  I'm working through this process as well.  Alan, I've gone the NOOBS way and followed the tutorial on GitHub (https://github.com/CirrusLogic/rpi-linux/wiki/Building-the-code, but my first run hasn't yet been successful.

                                 

                                Eric, congrats on getting the device working!  I see you went with a diff OS version than what NOOBS installs.    I'm now reading through your Driver fixes link, however, the gaps of my knowledge are many, so I'm tagging along and hoping I can piece together a functioning system. 

                                 

                                Happy to post a complete tutorial as well, should I get this working.  Current state of being:

                                 

                                pi@raspberrypi:~/bin/raspberrypi/tools $ arecord -l

                                **** List of CAPTURE Hardware Devices ****

                                 

                                pi@raspberrypi:~/bin/raspberrypi/tools $ aplay -l

                                **** List of PLAYBACK Hardware Devices ****

                                card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]

                                  Subdevices: 8/8

                                  Subdevice #0: subdevice #0

                                  Subdevice #1: subdevice #1

                                  Subdevice #2: subdevice #2

                                  Subdevice #3: subdevice #3

                                  Subdevice #4: subdevice #4

                                  Subdevice #5: subdevice #5

                                  Subdevice #6: subdevice #6

                                  Subdevice #7: subdevice #7

                                card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]

                                  Subdevices: 1/1

                                  Subdevice #0: subdevice #0

                                 

                                Thanks for getting this conversation going.  Very helpful.

                                Jeff

                                  • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                    j-e-f-f

                                    Actually, I think I've got it working by following the instructions here RPi Linux driver for Wolfson / Cirrus Logic Audio Card

                                     

                                    I started at "Pre-compiled kernels' w/ a wget for the latest and seems like we're cooking.

                                     

                                    pi@raspberrypi:~ $ arecord -l

                                    **** List of CAPTURE Hardware Devices ****

                                    card 1: sndrpiwsp [snd_rpi_wsp], device 0: WM5102 AiFi wm5102-aif1-0 []

                                      Subdevices: 1/1

                                      Subdevice #0: subdevice #0

                                    pi@raspberrypi:~ $ aplay -l

                                    **** List of PLAYBACK Hardware Devices ****

                                    card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]

                                      Subdevices: 8/8

                                      Subdevice #0: subdevice #0

                                      Subdevice #1: subdevice #1

                                      Subdevice #2: subdevice #2

                                      Subdevice #3: subdevice #3

                                      Subdevice #4: subdevice #4

                                      Subdevice #5: subdevice #5

                                      Subdevice #6: subdevice #6

                                      Subdevice #7: subdevice #7

                                    card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]

                                      Subdevices: 1/1

                                      Subdevice #0: subdevice #0

                                    card 1: sndrpiwsp [snd_rpi_wsp], device 0: WM5102 AiFi wm5102-aif1-0 []

                                      Subdevices: 1/1

                                      Subdevice #0: subdevice #0

                                    pi@raspberrypi:~ $

                                     

                                     

                                      • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                        alanc002

                                        Jeff that's brilliant!

                                         

                                        Which kernel did you go with- the 4.1.x or the 4.4.x?

                                         

                                        Kind regards

                                        Alan

                                        • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                          alanc002

                                          Okay so where I am now:

                                           

                                          I have the new kernel in and running; uname -a reports 4.1.19-v7+ with the correct date of 11th March 2016

                                          I've added the 2 lines  in /boot/config.txt

                                          I created the module dependencies file /etc/modprobe.d/cirrus.conf with the 3 softdep lines in

                                          I created the directory bin in home/pi and wget'd and extracted the usecase scripts to there

                                           

                                          on reboot,

                                           

                                          I have no audio capture devices and only the default on board play device,

                                          Attempting to run one of the usecase scripts results in:

                                          mixer: Control hw:sndrpiwsp open error: no such device

                                           

                                          I've checked the config file entries and they look okay, I looked in /var/log/syslog and can't see anything there that seems relevant... :/

                                           

                                          any suggestions?

                                           

                                          Kind regards,

                                          Alan

                                            • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                              j-e-f-f

                                              Here are my steps, which were more brute force than specific:

                                              1) wget http://www.horus.com/~hias/tmp/cirrus/cirrus-linux-4.4.6.tgz

                                              2) sudo tar zxf cirrus-linux-4.4.6.tgz -C /

                                              3) Follow Configuration through Setup module dependencies (+ I've updated my GPU firmware was also listed later in the tutorial) from this site:

                                              RPi Linux driver for Wolfson / Cirrus Logic Audio Card 

                                               

                                              Before this, I had started the SD card with the NOOBS installation of Raspbian.

                                                • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                  alanc002

                                                  Working

                                                   

                                                  pi@raspberrypi:~ $ aplay -l

                                                  **** List of PLAYBACK Hardware Devices ****

                                                  card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]

                                                    Subdevices: 8/8

                                                    Subdevice #0: subdevice #0

                                                    Subdevice #1: subdevice #1

                                                    Subdevice #2: subdevice #2

                                                    Subdevice #3: subdevice #3

                                                    Subdevice #4: subdevice #4

                                                    Subdevice #5: subdevice #5

                                                    Subdevice #6: subdevice #6

                                                    Subdevice #7: subdevice #7

                                                  card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]

                                                    Subdevices: 1/1

                                                    Subdevice #0: subdevice #0

                                                  card 1: sndrpiwsp [snd_rpi_wsp], device 0: WM5102 AiFi wm5102-aif1-0 []

                                                    Subdevices: 1/1

                                                    Subdevice #0: subdevice #0

                                                  pi@raspberrypi:~ $ arecord -l

                                                  **** List of CAPTURE Hardware Devices ****

                                                  card 1: sndrpiwsp [snd_rpi_wsp], device 0: WM5102 AiFi wm5102-aif1-0 []

                                                    Subdevices: 1/1

                                                    Subdevice #0: subdevice #0

                                                  pi@raspberrypi:~ $ ^C

                                                  pi@raspberrypi:~ $

                                                   

                                                  I switched to the 4.4.6 kernel, BUT I did discover a typo in one of the config file lines- which just goes to show, however well you think you might already have done it, check and check again. It doesn't help that the text on the Pi graphical UI is a bit hard to read on occasions.

                                                   

                                                   

                                                  Here is my detailed step-by-step procedure.

                                                   

                                                  Pre-requisites: RPi 3 with Cirrus Board installed and connected to network (wifi is fine).  I'm using a Samsung tv as the monitor and Dell USB keyboard and mouse.

                                                   

                                                  Plug in the SD card with the NOOBS distro from Element 14 and boot up the RPi, following the instructions on screen. I didn't need to expand the file system as it was already done.

                                                   

                                                  Getting the kernel and usecase scripts:

                                                   

                                                  In Epiphany browser, download the 4.4.6 kernel from here:

                                                   

                                                  http://www.horus.com/~hias/cirrus-driver.html

                                                   

                                                  And download the usecase scripts from here while you're at it:

                                                   

                                                  http://www.horus.com/~hias/tmp/cirrus/usecase-scripts.tgz

                                                   

                                                  Configuration:

                                                   

                                                  Open the file /boot/config.txt- I use the command line Nano but any file editor that you can open with root privileges will do:

                                                   

                                                  sudo nano /boot/config.txt

                                                   

                                                  I added the lines:

                                                  #This enables the Cirrus Logic driver and adds ALSA plugin support

                                                  dtoverlay=rpi-cirrus-wm5102

                                                  dtoverlay=i2s-mmap

                                                   

                                                  Then hit Ctrl-O and Enter to save, and Ctrl-X to exit Nano

                                                   

                                                  Then create the file /etc/modprobe.d/cirrus.conf:

                                                   

                                                  sudo nano /etc/modprobe.d/cirrus.conf

                                                   

                                                  Enter the lines:

                                                  softdep arizona-spi pre: arizona-ldo1

                                                  softdep spi-bcm2708 pre: fixed

                                                  softdep spi-bcm2835 pre: fixed

                                                   

                                                  And again, Ctrl-O, Enter and then Ctrl-X

                                                   

                                                  Create a bin directory in your home directory:

                                                   

                                                  mkdir bin

                                                   

                                                  Now un-tar the usecase scripts to this, either using the graphical x-archive or command line; it doesn't matter.

                                                  cd to the bin directory and verify the scripts are there.

                                                   

                                                  Kernel installation:

                                                   

                                                  Finally, cd to your Downloads folder and install the kernel:

                                                  sudo tar zxf cirrus-linux-4.4.6.tgz -C /

                                                   

                                                  And now the big moment! Reboot.

                                                   

                                                  Notice the two bright LEDs on the Cirrus Logic card.

                                                  If your driver installation has succeeded, you will see the red LED flash and then go out during the boot up sequence.

                                                  You can further confirm success by typing

                                                   

                                                  aplay -l to list playback devices; you should see two- card 0 which is the onboard one, and card 1 which is the Cirrus

                                                   

                                                  arecord -l to list record (capture) devices. You should see just one- card 1, which is the Cirrus.

                                                   

                                                  Conclusion:

                                                   

                                                  I'm now going to install OpenOB which is the whole reason I'm doing this!

                                                   

                                                  I sincerely hope this helps to get anyone else up and running

                                                  3 of 3 people found this helpful
                                                    • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                      erwincoumans

                                                      This works great, thanks for the description.

                                                       

                                                      Dekrispator is a nice little synthesizer that you may want to try. A precompiled binary for Raspberry Pi is included.

                                                      You can just start it and listen to pretty sounds that randomly change over time. In addition, you can hook up Midi devices:

                                                      Midi keyboard and Midi mixer. Once you hit the first key on the Midi keyboard, the randomizer stops and you keep playing

                                                      with the current sound. I ported the synth from STM32F4 to Linux/Mac/OSX/rPI using STK libraries.

                                                       

                                                      Precompiled binary for rPI (tested on NOOBS/Raspbian with this Wolfson card)

                                                      https://github.com/erwincoumans/StkDekrispatorSynthesizer/raw/master/precompiled/App_Dekrispator_rpi

                                                       

                                                      Source code:

                                                      https://github.com/erwincoumans/StkDekrispatorSynthesizer

                                                      • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                        element144graham

                                                        I wanted to thank you for your guidance. I brought the Cirrus Logic card and followed your instructions and it worked first time with PI3, Noobs and 32 GB HD video class 10 Sandisk. I have now managed to use it like a cassette recorder with HiFi level quality.

                                                         

                                                        Following on from when the install is completed here is some further guidance.

                                                         

                                                        In terminal run the following scripts ( which must be run every time the PI is booted to connect the Cirrus Logic Audio input and output ):-

                                                         

                                                        Record_from_DMIC.sh

                                                         

                                                        Playback_to_Headset.sh

                                                         

                                                        Now the Cirrus Logic card is operational. It works even though the speaker in the top bar shows muted audio. If you start LM Music this also shows the speaker muted with a X but the Cirrus Logic card output to headset is working.

                                                         

                                                        You can download the HD_Audio test tracks provided with the Wolfson card for the old Raspberrypi A and B. They are in the download section on the element 14 website. Before they will play with LXMusic you must install the FLAC plug in. To do the use Add and Remove Software and search for XMMS2.

                                                         

                                                        Select xmms2 – all plugings and install.

                                                         

                                                        Now if you add the tracks to the LXMusic play list, plug in your head phones (black socket) and press play you will hear the music.

                                                         

                                                        Recording is difficult using the terminal commands, but the Cirrus Logic card works like a dream with the Graphic User Interface provided by Audacity. Use Add and Remove Software, search for Audacity and install.

                                                         

                                                        Start Audacity and click on the record button and speak close to the cirrus card on board microphones. The sound wave form will appear in the window. Press stop. Press the play button and your voice will appear in the headphones.

                                                         

                                                        I have managed to record CD quality 44.1KHz, Video quality sound at 48 KHz both at 16 bits. The Pi also works at 24 bits 96 Khz and 196 Khz recording from the on board mics.

                                                         

                                                        The CD and Video was captured from the SPDIF to do this you will need to reset the card in the terminal window.

                                                         

                                                        Reset_paths.sh

                                                         

                                                        SPDIF_record.sh

                                                         

                                                        Playback_to_Headset.sh

                                                         

                                                        I found at Maplins.co.uk an optical to coaxial SPDIF converter (A17NY), you will also need a TOSLINK optical and digital phono cables {75 Ohm Coaxial cable) to make the connection to the Cirrus Logic. Element14 are cheaper for the cables.

                                                         

                                                        In Audacity you can adjust the playback volume with the slider. To adjust the record volume you will need to copy the script and edit the line. For example for copy the Record_from_DMIC.sh to a new file Record_from_DMIC_High.sh and change the lines from 116 to 150 – see below after the edit.

                                                         

                                                        amixer $1 -Dhw:sndrpiwsp cset name='IN2L Digital Volume' 150

                                                        amixer $1 -Dhw:sndrpiwsp cset name='IN2R Digital Volume' 150

                                                         

                                                        Save and run the new script. Now the recorded sound will be louder.

                                                         

                                                        In LXMusic the volume level must also be adjusted by changing the Playback_to_Headset.sh. Copy this and rename the file for low or higher volume. For example for quieter sound change the line from 116 to 85

                                                         

                                                        amixer $1 -Dhw:sndrpiwsp cset name='HPOUT1 Digital Volume' 85

                                                         

                                                        It would be good to implement a digital volume control via the GPIO of the Raspberry pi, but that is for another day. Enjoy your Cirrus Logic card it sounds so nice.

                                                        • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                          dub

                                                          I've done all that, but I only see a bright green LED. I don't think I've seen the other one on yet (let alone flash)

                                                          • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                            xxsaschkoxx

                                                            I managed to get it working on a rpi3b with the 4.4.6 kernel so not the newest one. Buuuuut only if I run the usecase scripts before! On a rpi2b it works without these usecase scripts... Even aplay oder speaker-test dont work without the usecase scripts before. Funniest thing my programm runs different on the rpi2b and rpi3b !! (I want to use the pi with the sound card as a filter and the rpi3b seems to do different things than only filtering on the pi2b it works fine but i get an "alsa: underrun occured" error) Any ideas how to run the sound card without these usecase scripts on the pi3b?

                                                            • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                              ghg001

                                                              Does anyone just have an IMAGE that works they can share?

                                                              • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                moorh

                                                                Hello Alan,

                                                                 

                                                                How are you doing on your OpenOB project?

                                                                 

                                                                Are you using James Harrissons OpenOB 3.2 tutorials?

                                                                 

                                                                I have difficulties to get the redis-server and GStreamer apps.

                                                                Literaly followed the instuctions and  bump into a lot of errors with the RPi3

                                                                 

                                                                I was curious if you got it to work?

                                                                 

                                                                Regards,

                                                                 

                                                                Edwin

                                                • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                  ghg001

                                                  This is maybe an answer for a Linux guru.  It's not an answer for someone wanting to attach a sound card on a Raspberry Pi 3 and have it work. 

                                                   

                                                  Everywhere I go...  I see "hey just REBUILD your own kernel".  Well how about someone posting an image that IS rebuilt and DOES work with the Cirrus Logic sound card.  THAT would be helpful.

                                                • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                  ghg001

                                                  I bought a Raspberry Pi 3, I bought a Cirrus Logic audio card, I downloaded the suggested image, I installed the image on my SD card (Win32DiskImager), installed my SD card and booted the Raspberry Pi and...  and...   freezes before it even boots up.  I've tried various combinations of SD cards, two different Raspberry Pi 3s, different "suggested" images, still freezes - every time - but ONLY with the Cirrus Logic sound card installed while trying to use a Cirrus Logic image..

                                                   

                                                  I see ALL the threads above and I would just like to get this running without all the programming hassles.  I'm not a Linux guru or even well versed.  Is there a new Raspian image that really works with the Cirrus Logic card and the Raspberry Pi 3 or did I just buy a decorative sound card (for the moment)?   Sorry, I'm getting grumpy having to always fix "new" things lately that do not work.

                                                    • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                      royleith

                                                      Hi Greg,

                                                       

                                                      All you need is pointed to in the above thread.

                                                       

                                                      However, here is the unscary version.

                                                       

                                                      Download and install the latest version of Raspbian (there is no point using NOOBS if you are going to end up with Raspbian, anyway). Get it the way you want it (perhaps the 'Task Bar' (aka, Panel) along the bottom and larger text on the desktop). I suggest you add Terminal to the Application Launcher in Panel.

                                                       

                                                      Go to RPi Linux driver for Wolfson / Cirrus Logic Audio Card

                                                      On that site, go to the Precompiled Versions section.

                                                      Download the latest precompiled kernel into your Pi somewhere.

                                                       

                                                      Use the File Manager and browse to the place where you saved it. In File Manager, go to the Tools menu and 'Open Current Folder in Terminal'.

                                                      Copy the installation line from the website and paste it into Terminal. Push enter.

                                                       

                                                      (The line you want is something like; sudo tar zxf cirrus-linux-4.4.14.tgz -C /)

                                                       

                                                      Once the script has done its thing, you need to add a text file and edit another. They are 'system' files and are protected from the likes of users. Type,

                                                      sudo leafpad

                                                      into Terminal and that will launch a version of leafpad that wll let you change system text files and create new ones.

                                                       

                                                      Open /boot/config.txt with the sudo version of leafpad, go to Configuration on the web page and copy and paste the additional line.

                                                      Copy and paste the lines from the web-site into a new file created with the sudo version of leafpad and save it as /etc/modprobe.d/cirrus.conf.

                                                       

                                                      It should all be working after a reboot.

                                                       

                                                      I admit I have yet to do it with my Raspi 3 B because I have been waiting for a new case, but it worked fine for two Raspi 1 Bs.

                                                       

                                                      Look at the website for the scripts. They can get you started.

                                                       

                                                      The card now appears correctly in Preferences/'Audio Device Settings'. However, I wrote a proper mixer and switcher for earlier Raspbians that makes using the card more intuitive.

                                                      Unfortunately, some of the driver cammands have changed. Give me some time and I will update the program and re-publish it. I would like to add the cool hardware

                                                      features like equalisers, gates and filters, but that will take a lot more programming.

                                                       

                                                      In the interim, once you have got to grips with the input and output ports and the labels that the driver gives them, you can use alsamixer (just type alsamixer into Terminal) .

                                                      You can set all the volumes, mutes and connections within this program. You can patch in equalisers, filters and gates as well. Use the downloaded scripts to

                                                      give you a clue on what needs to be set. Use F6 to switch from the Broadcom sound to the card (snd_rpi_wsp).

                                                        • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                          royleith

                                                          As promised, I have updated my mixer program. I can also report that installing the pre-compiled kernel from

                                                          RPi Linux driver for Wolfson / Cirrus Logic Audio Card

                                                          works just fine on my Raspberry Pi 3 B.

                                                           

                                                          This is what the mixer looks like.

                                                          WolfMixer.png

                                                           

                                                          You can get all the files by pointing File Manager to the folder in which you want the files downloaded, going to 'Tools/Open Current Folder ' in Terminal and pasting the following line into Terminal.

                                                           

                                                          git clone https://github.com/royleith/wolfmixer.git

                                                           

                                                          The files will be downloaded into a 'Wolfmixer' sub-folder.

                                                           

                                                          README.txt has all the instructions on where to copy the (Python) programs to, what to do with the desktop files and how to get the programs into the Application Menu and on to the Panel.

                                                           

                                                          When using the Pi 3 with its internal WiFi, the WiFi should be turned off when using BlueTooth to send your Cirrus card output to a BlueTooth player. Included in the files is a GUI program to turn WiFi off and on.

                                                            • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                              cwbeacon

                                                              I want to thank you for all your work getting this to run.  I got it all running on my Raspberry Pi 3 including your mixer.  But then I screwed something up with the mixer.  After a reboot when I try to run the mixer I get the following keyerror:

                                                               

                                                              File "wolfmixer.py", line 419, in <module>

                                                                 lineoutvar.set(statusquopatch(patchname))

                                                              File "wolfmixer.py", line 367, in statusquopatch

                                                                 Rvalue = InputPortsID[para]

                                                              Keyerror: '16'

                                                               

                                                              Thinking I had somehow messed up the python file I pulled down you files again.  Same error.

                                                                • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                  royleith

                                                                  @Mike,

                                                                   

                                                                  The mixer program uses the Python os module to issue command line entries to the program 'amixer'.

                                                                   

                                                                  The first thing the mixer does before setting up the GUI controls is to ask the amixer program for the current settings stored in Raspbian for each control. Python goes through a list of all the control and switch parameters asking for the 'status quo' setting.

                                                                   

                                                                  In your case, the program is asking amixer for the first existing setting in the Python list (lineout) and getting a rude reply.

                                                                   

                                                                  Since you have reloaded the mixer program, the problem is almost certainly due to amixer not giving a sensible reply to the command:

                                                                   

                                                                  amixer -Dhw:sndrpiwsp cget name='HPOUT2L Input 1'

                                                                   

                                                                  If you look at the 'usecase' scripts from Cirrus Logic, you will see that they also use amixer to set up patches and set levels and switches.

                                                                   

                                                                  The mixer command is asking amixer to check the sound device sndrpiwsp (the Cirrus Logic card) and ask for the current setting of the control HPOUT2L Input 1. (Each of the outputs has four input ports. Wolfmixer only uses the first port called Input 1).

                                                                   

                                                                  I suggest the following. Boot the Raspi and type alsamixer into Terminal. This will give you a character-mode control panel for all available audio controls. Use Function key F6 and this will give you a pull-down list of all available audio devices. If you do not see sndrpiwsp listed, then the audio driver is failing to load. I think that this is the actual problem. Check all the lines in config.txt et al to make sure the important lines have not been overwritten and make sure that the driver overlay file is still in the sub-folder.

                                                                   

                                                                  If it does appear in alsamixer, select it and use the cursor keys to move along the hundreds of controls until you find HPOUT2L Input 1 and make a note of what value you see. Please note that Wolfmixer does not display the same control values that you see in alsamixer.

                                                                   

                                                                  Then copy and paste the line,

                                                                   

                                                                  amixer -Dhw:sndrpiwsp cget name='HPOUT2L Input 1'

                                                                   

                                                                  into Terminal and see what is returned. If it does not seem to make sense, then that is what is upsetting wolfmixer.

                                                                   

                                                                   

                                                                    • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                      cwbeacon

                                                                      Thank you for your response.  The Cirrus card is still working and I can use alsamixer to set the audio.   F6 returns the Cirrus card (0  snd_rpi_wso).  I disabled the built in audio on the Pi so I only show the Cirrus card.

                                                                      Looking in alsamixer  for HPOUT2L I find it connected to IN3L which is Line-In.  I hear Line-In audio out the Line-out jack.  I have MPD running so if I start that player and change HPOUT2L to AIF1RX1 I hear the mp3 files playing.  So the card and alsamixer is working.

                                                                       

                                                                      Running the command;  amixer -Dhw:sndrpiwsp cget name='HPOUT2L Input 1'  returns 104 items. The last line reads " : values=16".  That list looks the same as the items I get if I arrow up and down in Alsamixer.

                                                                       

                                                                      I think what I will do is go back to my original clean image and run through the setup again.  I am using the 4.4.14 kernel that I got from the horus.com site for the cirrus card.  Run through the setup again and see if it fails after a fresh install.

                                                                        • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                          royleith

                                                                          @Mike,

                                                                           

                                                                          Hold on before doing anything drastic. amixer is working just fine and so is the driver.  The output you mention starts with,

                                                                           

                                                                          pi@raspberrypi:~ $ amixer -Dhw:sndrpiwsp cget name='HPOUT2L Input 1'

                                                                          numid=421,iface=MIXER,name='HPOUT2L Input 1'

                                                                            ; type=ENUMERATED,access=rw------,values=1,items=104

                                                                            ; Item #0 'None'

                                                                            ; Item #1 'Tone Generator 1'

                                                                            ; Item #2 'Tone Generator 2'

                                                                            ; Item #3 'Haptics'

                                                                           

                                                                           

                                                                          and ends with,

                                                                           

                                                                          ; Item #101 'ISRC3DEC2'

                                                                            ; Item #102 'ISRC3DEC3'

                                                                            ; Item #103 'ISRC3DEC4'

                                                                            : values=16

                                                                           

                                                                          amixer has enumerated (listed) all the possible patches and ends by telling you that patch No. 16 is currently selected. If you look down the list, No. 16 is AIF1RX1; the output from the Raspberry Pi to the sound card. It tells you that the Raspberry Pi is playing via Line Out and that is exactly what you selected in alsamixer (or the usecase script).

                                                                           

                                                                          If you look at the error report from wolfmixer, you will see that it is returning,

                                                                          Keyerror: '16'

                                                                           

                                                                          In other words, it is receiving the InputPortsID, correctly, as 16, but it is not setting the mixer to reflect that value.

                                                                           

                                                                          I ran wolfmixer on my Pi 3 and selected 'Play' as the input to Line Out (aka, AIF1RX1 connected to HPOUT2L Input 1) and got the same amixer result that you did.

                                                                           

                                                                          I see that you disabled the Pi audio. This is the only difference that I can see between your Pi 3 and my Pi 3 and two Pi 1s. Did you do that with  /etc/asound.conf containing,

                                                                           

                                                                          pcm.!default {
                                                                          type hw card 0
                                                                          }
                                                                          ctl.!default {
                                                                          type hw card 0
                                                                          }

                                                                           

                                                                          Let me know what you did to disable on-board sound and I will see what effect it has on the wolfmixer code.

                                                                          • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                            royleith

                                                                            Mike,

                                                                             

                                                                            Something else you might like to do:

                                                                             

                                                                            Choose Preferences/Audio Device Settings in the Main Menu and select the snd_rpi_wsp device if it is not already selected. Click on 'Select Controls' and you will be able to add faders, input selectors and switches to the panel. You might need to do a bit of head-scratching to work out which controls you actually need, but it should result in a workable mixer. Output volume from the Pi has to be set in the audio application.

                                                                             

                                                                            I have not done it, myself, but you should be able to set up Record controls in addition to Playback controls. However, programs like the excellent Audacity are able to do most of what you want within the program itself.

                                                                              • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                                cwbeacon

                                                                                No, I disabled the on-board audio in /boot/config.txt

                                                                                Commented out the last two lines:

                                                                                # Enable audio (loads snd_bcm2835)
                                                                                #dtparam=audio=on
                                                                                #enable_uart=1

                                                                                 

                                                                                I put the lines back the way they were so both cards show up in alsamixer again.  Rebooted, but no change.

                                                                                  • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                                    royleith

                                                                                    Hi Mike,

                                                                                     

                                                                                    I don't think the enable_uart has much bearing.

                                                                                     

                                                                                    Here is my config.txt. Try booting with it (it forces HDMI 1080p).

                                                                                     

                                                                                    # For more options and information see

                                                                                    # http://www.raspberrypi.org/documentation/configuration/config-txt.md

                                                                                    # Some settings may impact device functionality. See link above for details

                                                                                     

                                                                                     

                                                                                    # uncomment if you get no picture on HDMI for a default "safe" mode

                                                                                    #hdmi_safe=1

                                                                                     

                                                                                     

                                                                                    # uncomment this if your display has a black border of unused pixels visible

                                                                                    # and your display can output without overscan

                                                                                    disable_overscan=1

                                                                                     

                                                                                     

                                                                                    # uncomment the following to adjust overscan. Use positive numbers if console

                                                                                    # goes off screen, and negative if there is too much border

                                                                                    #overscan_left=16

                                                                                    #overscan_right=16

                                                                                    #overscan_top=16

                                                                                    #overscan_bottom=16

                                                                                     

                                                                                     

                                                                                    # uncomment to force a console size. By default it will be display's size minus

                                                                                    # overscan.

                                                                                    #framebuffer_width=1280

                                                                                    #framebuffer_height=720

                                                                                     

                                                                                     

                                                                                    # uncomment if hdmi display is not detected and composite is being output

                                                                                    #hdmi_force_hotplug=1

                                                                                     

                                                                                     

                                                                                    # uncomment to force a specific HDMI mode (this will force VGA)

                                                                                    #hdmi_group=1

                                                                                    #hdmi_mode=1

                                                                                     

                                                                                     

                                                                                    # uncomment to force a HDMI mode rather than DVI. This can make audio work in

                                                                                    # DMT (computer monitor) modes

                                                                                    #hdmi_drive=2

                                                                                     

                                                                                     

                                                                                    # uncomment to increase signal to HDMI, if you have interference, blanking, or

                                                                                    # no display

                                                                                    config_hdmi_boost=4

                                                                                     

                                                                                     

                                                                                    # uncomment for composite PAL

                                                                                    #sdtv_mode=2

                                                                                     

                                                                                     

                                                                                    #uncomment to overclock the arm. 700 MHz is the default.

                                                                                    #arm_freq=800

                                                                                     

                                                                                     

                                                                                    # Uncomment some or all of these to enable the optional hardware interfaces

                                                                                    #dtparam=i2c_arm=on

                                                                                    #dtparam=i2s=on

                                                                                    #dtparam=spi=on

                                                                                     

                                                                                     

                                                                                    # Uncomment this to enable the lirc-rpi module

                                                                                    #dtoverlay=lirc-rpi

                                                                                    dtoverlay=rpi-cirrus-wm5102

                                                                                    dtoverlay=i2s-mmap

                                                                                     

                                                                                     

                                                                                     

                                                                                     

                                                                                    # Additional overlays and parameters are documented /boot/overlays/README

                                                                                     

                                                                                     

                                                                                    # Enable audio (loads snd_bcm2835)

                                                                                    dtparam=audio=on

                                                                                    If that does not work, download wolfmixer from github again and navigate to the download folder, open a Terminal in the folder and see if,

                                                                                     

                                                                                    python wolfmixer.py

                                                                                     

                                                                                    works. Please remember, if you are clicking on the launch icon for wolfmixer it always runs  python /home/pi/Programs/Wolfmixer/wolfmixer.py and not the replacement you download.

                                                                                     

                                                                                    I'm sure that this is something simple. It does seem to be wolfmixer that is failing and not the rest of the system.

                                                                                      • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                                        cwbeacon

                                                                                        I got the same results.  In the process of working on this I must have deleted or installed something that is causing the conflict.  I should go back to the clean o/s image and repeat the steps and see if, or where, it fails.

                                                                                         

                                                                                        I noticed today in the Element 14 store that they list the Cirrus Logic Audio Card as discontinued.  That is unfortunate if it is true.  That was a nice card that fit on the Raspberry Pi.  I have heard there are USB audio cards that work with the Pi.

                                                                                          • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                                            royleith

                                                                                            Hi Mike,

                                                                                             

                                                                                            Sorry for the delay in replying. My phone line is down and now I know the disadvantages of internet controlled central heating!

                                                                                             

                                                                                            It looks like you will have to go back and start from scratch. I suggest that you do not disable any audio features in case that causes the problem. Right-clicking on the loudspeaker allows you to use HDMI, on-board analogue, the Cirrus card, BlueTooth or USB audio.

                                                                                             

                                                                                            Any Raspi will work with a mains-powered USB audio device. I have used an Alesis Multimixer which is an 8-Channel mixer with a stereo USB connection to a computer and supports phantom powered condenser microphones, line inputs and instrument inputs.

                                                                                             

                                                                                            Only my Raspi 3 B works with the USB-powered Focusrite Scarlet 2i4 interface which supports MIDI, phantom powered microphones, line inputs and instrument inputs. It is strictly a two-channel device.

                                                                                             

                                                                                            The problem with 'non-professional' USB audio interfaces is the failure to support Line In. The ones I have tried only support the recording of a mono, electret microphone or, at best, two of them.

                                                                                             

                                                                                            I managed to take my Wolfson card (the Cirrus Logic predecessor) in a Raspi B V1 to a pub and connect it to a mobile phone charger battery. I used it to record speech with Audacity via one of the two on-board microphones, edit it with Audacity and burn it as multiple mp3 files on an audio CD. The 15.6" HDMI HD monitor, DVD burner, Raspi and everything else were all run off of the charger.

                                                                        • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                          wetzelberry

                                                                          I also tested the previous ver of the OS on Pi 2 Model B and also worked great.

                                                                          Hi, Thihomir,

                                                                           

                                                                          I'm surprised that you could connect the cirrus audio card with an Pi 2 Model B - I had no luck, although trying different OS-Variations.

                                                                           

                                                                          I have an Raspberry Pi 2 Model B Ver. 1.1 - and the descriptions für the cirrus card (at elements 14) mention only the "B +" for a successful work. I want to use the RPi as media center with Kodi (LibreElec) including records from my old vinyl discs via Pre-Amplifier (output Cinch L + R). The cirrus card seemed to be the ideal partner. Or is it really necessary to change over to Pi 3?

                                                                           

                                                                          Could you please tell me your system configuration which worked on Pi 2?

                                                                           

                                                                          Thanks,

                                                                          Andreas

                                                                            • Re: Cirrus Logic Audio Card and Raspberry Pi 3
                                                                              bulcan10

                                                                              Hello Andreas,

                                                                               

                                                                              yes, the card worked really well with Pi 2 , which I borrowed from a friend for the test and it works with Pi 1 A+ (256MB), but the software posted on Element14 website, does not work on Pi 3.

                                                                              I tried this audio card with external speakers, with A+ and the power output 2x1.4W, it works really well. Note: you need an external power supply 5V/4A though.

                                                                               

                                                                              Have to tried with Pi 3?