1 22 23 24 25 26 Next 389 Replies Latest reply on Aug 4, 2020 3:16 AM by nonsensus Go to original post
      • 375. Re: New reworked driver for Wolfson/Cirrus Logic audio card
        hiassoft

        The output you got from speaker-test are the symptoms of a missing clock. My guess is the software side is fine and you probably have some kind of hardware issue.

         

        Check carefully that you don't have a short or missing connection (eg ripped out via when removing the pogo pins) somewhere. According to the schematic PCM_CLK runs through R70 (probably one of the resistors next to the pogo connector pads). If you have a short a continuity checker should tell you, if you ripped out the via you should see the PCM clock signal on R70 and can pick it up from there.

         

        so long,

         

        Hias

        • 376. Re: New reworked driver for Wolfson/Cirrus Logic audio card
          candjhorn

          Hi Hias, Some progress! Sure enough when I checked there was no connection between R70 and the pogo pad. Incidentally R70 took a bit of finding, but it is right beside the pogo pads. I bypassed the pad and connected R70 directly to the header pin and got PCM clock and data! Running the speaker test I could see the data being routed to left and right outputs sequentially, and the screen report confirmed that. However, frustratingly there is still no audio! I'm plugged into the green connector and have run Reset_paths and Playback_to_Lineout. One thing I have noticed is that the 4th connection, the one to pin 38 on the header remains at zero, but I'm guessing that is probably the data line from the Wolfson to the Pi and so will not have data unless I am reading from the line input. Can you confirm that?

           

          So I now appear to be sending data OK to the card but still no audio.

           

          Chris

          • 377. Re: New reworked driver for Wolfson/Cirrus Logic audio card
            hiassoft

            PCM_DIN (pin 38) will only be driven when you record audio, so this is normal.

             

            PCM_DOUT runs through R67, check if you have a connection from the pogo pad to it, if not feed in PCM_DOUT on R67.

             

            so long,

             

            Hias

            • 378. Re: New reworked driver for Wolfson/Cirrus Logic audio card
              candjhorn

              Hi Hais, Obvious really! If one pad was broken others probably were as well. Sure enough no connection between the data pad and the resistor, and I checked the data in to Pi and that was broken too! I've now bypassed all the pads to the resistors and the audio out is now working fine. I haven't yet checked the audio in but I'm pretty sure that will also now be OK. Clearly I have been a bit ham fisted with removing the pogo pins (which is disappointing as electronics has been my profession and hobby for over 50 years!)

               

              Thanks very much for all your help.

               

              Chris

              • 379. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                richardash1981

                I'm struggling to get a Cirrus Audio card to work with a Raspberry Pi 3B (not plus). Both are a year or two old, but had not been used at all before today.

                I have installed Raspbian, and then used raspi-update to get the latest kernel and firmware (4.19.32+).

                The dtoverlay and/etc/modprobe.d/cirrus.conf files have been set up as per https://www.horus.com/~hias/cirrus-driver.html#configuration

                 

                The board gets power (green and red LEDs light up) on boot, and stays that way - the red LED never goes out.

                 

                Dmesg says (picking relevant entries):

                [5.517171] snd-rpi-cirrus soc:sound: ASoC: CPU DAI (null) not registered - will retry
                [5.543355] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry
                [5.823218] wm8804 1-003b: Linked as a consumer to regulator.3
                [5.825136] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry
                [5.826727] wm8804 1-003b: revision E
                [5.827655] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry
                [5.837083] arizona spi0.1: Failed to get mclk1: -2
                [5.837107] arizona spi0.1: Failed to get mclk2: -2
                [5.837783] LDO1: supplied by RPi-Cirrus 1v8
                [5.838493] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry
                [5.838721] arizona spi0.1: Linked as a consumer to regulator.1
                [5.839190] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
                [5.840129] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry
                [5.842155] arizona spi0.1: Unknown device ID: 0
                [6.140670] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry

                 

                The commands listed on the web page for troubleshooting don't work right, because "paste" on this image is from coreutils, and just outputs the input data to the terminal again ... I assume you wanted content onto some sort of pastebin like service.

                cat /boot/config.txt | python paste.py add  debian Pastezone

                vcgencmd version  | python paste.py add debian Pastezone

                sudo vcdbg log msg 2>&1 | python paste.py add debian Pastezone

                dmesg | python paste.py add debian Pastezone

                lsmod | python paste.py add debian Pastezone

                 

                aplay -l

                aplay: device_list:270: no soundcards found...

                 

                I have tried removing and re-installing the card on the 40 pin header (nothing changes). If it could be dead hardware (either board), is there anywhere I can check with a scope?

                • 380. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                  hiassoft

                  This line in dmesg is the problematic one:

                  [5.842155] arizona spi0.1: Unknown device ID: 0

                   

                  It means the kernel couldn't detect the WM5102 chip (or the WM5102 didn't respond). I've very rarely seen such messages after a reboot, after another reboot the WM5102 was detected fine (as "WM5102 revision C").

                   

                  If you always get this line it could well be that the board is broken. If you have access to a RPi1 or RPi2 it may be worth testing with the old, official Raspbian image from the "Software download" link (IIRC the image won't work on RPi3). If this image can't detect the chip either then the hardware is very certainly broken.

                   

                  PS: thanks for mentioning the "paste" command, I've corrected the instructions on my website to use "pastebinit" instead.

                   

                  so long,

                   

                  Hias

                  • 381. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                    richardash1981

                    I should be able to borrow a Pi2 board from another project (the original Model A I have to hand is 26 pin so won't fit!). I'll try that with the download image and see what happens.

                    • 382. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                      richardash1981

                      Finally got the Pi 2B hardware out and connected to the Cirrus Logic card. Using the same image as before on the Pi 3, dmesg is the same:

                      [6.416080] snd-rpi-cirrus soc:sound: ASoC: CPU DAI (null) not registered -

                      will retry

                      [6.418304] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not

                      registered - will retry

                      [6.628765] random: crng init done
                      [6.628788] random: 7 urandom warning(s) missed due to ratelimiting
                      [6.809709] wm8804 1-003b: revision E
                      [6.810566] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not

                      registered - will retry

                      [6.833968] arizona spi0.1: Failed to get mclk1: -2
                      [6.834018] arizona spi0.1: Failed to get mclk2: -2
                      [6.834760] LDO1: supplied by RPi-Cirrus 1v8
                      [6.835722] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not

                      registered - will retry

                      [6.842573] arizona spi0.1: Unknown device ID: 0

                       

                      Green and red LEDs on the board remain lit after booting up, so swapping the Pi board has not changed anything.

                      Next step, back up the card and rewrite it with the image from Farnell Element14.

                       

                      However when I tried to boot the image in the Pi 2 I just got the rainbow screen, nothing else. I suspect that this means the firmware is too old to boot Pi 2 hardware. The config.txt on the card indicates that it is a pre-device tree kernel. Not sure if that matters to firmware or not.

                      After much messing, I proved the card was valid by booting it on an original Pi 1 Model A (but with a 26-pin header the Cirrus Logic card will not fit). Booted there I upgraded the raspberrypi-bootloader package only (hoping this would give me newer firmware). It did give me 2016 firmware in place of 2014 (allowing a Pi 2 to boot in principal), but it also overwrote the custom patch kernel from Farnell. So although after that the kernel would boot on the Pi 2B, there were no drivers loaded and no hardware detection. I tried copying the kernel.img file (only) back onto the card from the original, but that combination did not even give me the rainbow screen, just no HDMI output!

                       

                      I think this is reaching the "give up" point, because I was only trying to rescue the Farnell image in order to decide if the fault was in the Pi or the Audio Card. Given that the Audio Card does not work on two Pis (3B and 2B) which are otherwise thought to be working, it very much points to the Cirrus card. This is also supported by the fact that I have used the Pi 3 with an AudioInjector Octo successfully (that card has given me other grief, but that is a different story, the communications with the Pi work fine), so it seems unlikely that the Pi's SPI port is broken.

                      • 383. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                        psyj

                        Hi Matthias,

                         

                        A long time since I have visited this thread ..... my sound card is still working wonderfully, though the latest encarnartion uses a male/female ribbon cable to connect a pi4 to the Wolfson card ..... just teased out the relevant wires to get compatibility. Oh and a relay switched attenuator.

                         

                        Going to pi4 has forced me to "Buster" and all works out of the box.  I note that the total number of ALSA parameters for the card has increased by 2, but I have not done a side by side comparison to find what two have been added .... there are, after all well over 400 of them.

                         

                        I have finally settled on how I want to use the equalisation blocks, and here I hit a problem.  The Alsa control seeks 20 words of parameters.  However the hardware for the filter co-efficients requires 19 words ..... If I recall correctly, you took the first two words of gain parameters out from the 21 word block that runs (using EQ1 as an example) from register 3600 to 3620.  I have looked at Wolfson.C and registers.h for clues, but without luck.  looking in ARIZONA_EQ_CONTROL and its stability check suggests that the parameters are in order as the check would seem to verify A and B, but....  

                         

                        LATER

                         

                        Doing

                        amixer -c 1 cget name="EQ1 Coefficients"

                         

                        gives me an ordered list of default settings as per the datasheet, preceeded by a word =0x0000

                        So my question is

                         

                        What is the 20th word?

                         

                         

                        Many thanks

                        • 384. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                          callumore

                          Hello,

                           

                          I am quite new to the Raspberry Pi, I am using it for a project at university.

                           

                          The issue I am having is when I'm using the Cirrus Logic card with my Pi4, I am getting no playback whatsoever. When I click on the volume control in the top right, it comes up saying "No volume control on this device" I have followed the steps on updating the kernel and everything but I must have done something wrong in the steps.

                           

                          I am trying to make the Raspberry Pi become a Reverb Unit to connect to a mixing desk. The first step is to get audio out then be able to record in and hear it at the same time and then eventually program the reverb to happen.

                           

                          Hopefully, this all makes sense. If anyone is able to help it would be gratefully appreciated.

                           

                          Thank you

                           

                          Callum

                          • 385. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                            sabreur

                            I'm not sure if this is the answer to your problem but It worked for me.

                             

                            Run the "Usecast" scripts appropriate for your function.

                            • 386. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                              alweekes

                              Has anyone tried a 24 bit recording from SPDIF?

                               

                              I've been playing with the SPDIF in and can record at any of the supported sample rates at 16 bit (S16_LE) but trying to record at 24 bit (S24_LE) just gets silence or digital noise / static.

                               

                              The spec sheet says the SPDIF in supports 24 bit, any ideas for things to try? I'm recording to an XFS-formatted USB, which prevents any overruns when recording.

                              • 387. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                nonsensus

                                Hello everyone,

                                This thread seems to be the only place on planet earth to find any info about WISCE software controlling WM5502...

                                I have a Cirrus Logic audio card v.A1.01 and Total Phase Aardvark I2C/SPI-adapter.

                                I would like to get access to control registers of 5502 from Wisce, but how is it connected and configured?

                                It seems that when the card is on RasPi, there are some GPIO pins that are pulled up or down to enable certain configurations.

                                 

                                Those configurations are mentioned on schematic pdf of Cirrus card. It should be possible using 2-wire or 4-wire connections with correct wiring...

                                Wisce finds the codec IC (WM8804) connected on Aardvark using I2C, it seems that Wisce can read/write registers also, but no luck on 5502...

                                I think I have gone through any logical configuration possible, with RasPI connected (just for powering up) or "standalone" without Raspi, with external power connected. Tried I2C pins as well as SPI pins (expand header and 40 pin header), but either way, no 5502 available on Wisce...

                                The audio card itself was ok when used as intended with RasPi, audio was playing/recording on when tested so it seems to be ok.

                                 

                                The idea was to use this good old Cirrus card as a development/testing board for basic audio routing/mixing software for WM8281, which is almost the same chip as 5102 and it is configurated very much the same way. I know, the obvious solution is just to go shopping and use actual Cirrus dev board for 8281...

                                 

                                Any help would be highly appreciated, thank you...

                                • 388. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                  psyj

                                  The 5502 chip itself has both I2C and SPI interfaces, but after you start to use one the other is blocked temporarily.

                                   

                                  The cirrus card uses SPI for the 5502 out of the box,  but wiring the I2C interface is not difficult  ....... except of course that the kernel driver will still be using SPI, so you get some pretty odd results if you start talking I2C. Strangely the 8804 always uses I2C.

                                   

                                  If you are not docking the card on a pi, you might want to consider wiring the 5502 to the I2C bus  ..... its connections are available on the expansion header.  In case you do not have it, you can find the schematic at

                                  Wolfson Audio Card Schematic Diagram

                                  • 389. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                    nonsensus

                                    Now, some progress... Finally I got Wisce working! Tried the obvious thing I think someone mentioned before here...

                                    I used OS image available here on element14 and booted RasPi up, with i2C connected on Cirrus expansion pins through Aardvark interface.

                                     

                                    Wisce (Aardvark) recognized 5102 chip right away, as I had 5102 configs readily installed.

                                    There is a nice GUI on the software and you can control almost everything on the fly.

                                    There you have a good view of how this chip works (datasheet has the same info but no interaction and graphics) and try out something if you need to.

                                    Wisce translates the adjustments to register bits and sends them down on i2C line, showing on screen also the actual addresses and bits in hex numbers.

                                    This surely helps out developing anything (software) for WM8281 (or some other modern audio chip) as the main concept and controlling is pretty much the same.

                                     

                                    I had some music from RasPi playing as I tried things out and routed internal mixing through AGC (compressor) to EQ and out to headphones.

                                    Worked out nicely this way, but without RasPi booted up and playing sound, Wisce/Aardvark does not find the 5102 chip on i2C. Only 8804 (codec) chip.

                                    So what goes on between RasPi and Cirrus card to enable i2C connection?

                                    There are probably some GPIO pins pulled up/down (maybe just for a short time for certain configuration) to enable i2C control and maybe some other configuration sequences going on.

                                    This card _should_ be possible to get working "standalone" without RasPi, just with power and i2C wired - just not so easy as it seems...

                                    1 22 23 24 25 26 Next