1 2 3 Previous 382 Replies Latest reply on Apr 27, 2019 4:36 PM by richardash1981

    New reworked driver for Wolfson/Cirrus Logic audio card

    hiassoft

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

       

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

       

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

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

      RPi Linux driver for Wolfson / Cirrus Logic Audio Card

       

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

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

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

       

      Important notes:

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

       

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

       

      so long,

       

      Hias

        • 1. Re: New reworked driver for Wolfson/Cirrus Logic audio card
          mskyaxl

          Thanks for updating this! I'll try it today and come back with a feedback.

           

          [edit]

          I just saw  that this is for kernel 4.9.  rpi-update will just update to 4.4.38. Should I try installing it on this version?

           

          [edit2]

          I'm back with some feedback.

           

          At first I've tried to compile from source but for some reasons the sound card was not shown although the compilation was successful. I did not try the second time as it takes a loooot of time. What I did instead was to use your binaries directly and it worked meaning that I had audio on output.

           

           

          I've notices that in  dmesg I get some errors:

           

           

           

          [    2.450796] systemd[1]: Starting Encrypted Volumes.
          [    2.491344] usb 1-1.4: New USB device found, idVendor=046d, idProduct=c52e
          [    2.491355] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
          [    2.491362] usb 1-1.4: Product: USB Receiver
          [    2.491369] usb 1-1.4: Manufacturer: Logitech
          [    2.513696] input: Logitech USB Receiver as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:046D:C52E.0001/input/input0
          [    2.576217] hid-generic 0003:046D:C52E.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-3f980000.usb-1.4/input0
          [    2.583759] input: Logitech USB Receiver as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.1/0003:046D:C52E.0002/input/input1
          [    2.646054] hid-generic 0003:046D:C52E.0002: input,hiddev0,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-3f980000.usb-1.4/input1
          [    3.319367] systemd-udevd[143]: starting version 215
          [    3.702546] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
          [    3.854333] arizona spi0.1: Failed to get mclk1: -2
          [    3.854351] arizona spi0.1: Failed to get mclk2: -2
          [    3.854826] LDO1: supplied by RPi-Cirrus 1v8
          [    3.864272] arizona spi0.1: WM5102 revision C
          [    3.890200] Adding alias for supply MICVDD,(null) -> MICVDD,spi0.1
          [    3.890723] Adding alias for supply MICVDD,(null) -> MICVDD,spi0.1
          [    3.890730] Adding alias for supply DBVDD2,(null) -> DBVDD2,spi0.1
          [    3.890736] Adding alias for supply DBVDD3,(null) -> DBVDD3,spi0.1
          [    3.890743] Adding alias for supply CPVDD,(null) -> CPVDD,spi0.1
          [    3.890749] Adding alias for supply SPKVDDL,(null) -> SPKVDDL,spi0.1
          [    3.890755] Adding alias for supply SPKVDDR,(null) -> SPKVDDR,spi0.1
          [    3.908398] MICVDD: supplied by RPi-Cirrus 1v8
          [    3.913997] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered
          [    3.924215] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered
          [    3.929051] wm8804 1-003b: revision E
          [    3.930445] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered
          [    4.090662] snd-rpi-cirrus soc:sound: wm5102-aif1 <-> 3f203000.i2s mapping ok
          [    4.124437] usbcore: registered new interface driver brcmfmac
          [    4.250137] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
          [    4.280279] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
          [    4.321667] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code (0x30 0x30)
          [    4.498695] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code (0x30 0x30)
          [    4.765902] systemd-journald[141]: Received request to flush runtime journal from PID 1
          [    5.403864] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
          [    5.403874] brcmfmac: power management disabled
          [    6.048178] uart-pl011 3f201000.serial: no DMA platform data
          [    6.311183] Adding 102396k swap on /var/swap.  Priority:-1 extents:2 across:217084k SSFS
          [    6.636395] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
          [    8.120974] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
          [   10.458792] Bluetooth: Core ver 2.22
          [   10.458918] NET: Registered protocol family 31
          [   10.458924] Bluetooth: HCI device and connection manager initialized
          [   10.460116] Bluetooth: HCI socket layer initialized
          [   10.460140] Bluetooth: L2CAP socket layer initialized
          [   10.460185] Bluetooth: SCO socket layer initialized
          [   10.468484] Bluetooth: HCI UART driver ver 2.3
          [   10.468498] Bluetooth: HCI UART protocol H4 registered
          [   10.468503] Bluetooth: HCI UART protocol Three-wire (H5) registered
          [   10.468707] Bluetooth: HCI UART protocol Broadcom registered
          [   10.666681] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
          [   10.666690] Bluetooth: BNEP filters: protocol multicast
          [   10.666708] Bluetooth: BNEP socket layer initialized
          [   39.934339] random: crng init done
          [ 2744.08356/5] bcm2835-i2s 3f203000.i2s: I2S SYNC error!

          do you know why?

           

          Another thing I would like to "route" from line in to line out is this possible using the "usecase" scripts?

           

          If you want I can try again the compilation if you want to be sure that this works on a different machine.

           

          Thanks!

           

          [edit3]

          I've just found how to route.

           

          sudo ./Cirrus_listen.sh line line

          3 of 3 people found this helpful
          • 2. Re: New reworked driver for Wolfson/Cirrus Logic audio card
            hiassoft

            Hi Alex, thanks a lot for your feedback!

             

            I just saw that this is for kernel 4.9. rpi-update will just update to 4.4.38. Should I try installing it on this version?

            Yes, this is fine. The reason for running rpi-update is to get a recent gpu firmware version.

            At first I've tried to compile from source but for some reasons the sound card was not shown although the compilation was successful. I did not try the second time as it takes a loooot of time. What I did instead was to use your binaries directly and it worked meaning that I had audio on output.

            It's hard to tell what went wrong but my guess would be missing to install the dtb and dtbo files and/or modules. If you still have the compiled tree you could try reinstalling it, it should work just fine.

            I've notices that in dmesg I get some errors:

            [ 3.913997] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered
            [ 3.924215] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered

            You can ignore these, they come from the kernel deferred probing mechanism. It just means that bcm2835-i2s hadn't been loaded/initialized by the time the kernel tried to load/init the sound card driver.

            sudo ./Cirrus_listen.sh line line

            BTW: you can omit "sudo", running the alsa mixer scripts should work fine as a normal user.

             

            so long,

             

            Hias

            2 of 2 people found this helpful
            • 3. Re: New reworked driver for Wolfson/Cirrus Logic audio card
              mskyaxl

              Thanks Hias for the reply,

               

              I have another questions as I am quite new to alsa.

              I get sound only when I test it via command line using for example

               

              mplayer -volume 100 file.flac

               

              I've tried some things like running rpi3 with pixel, emulationstation(retropie) and kodi but have some issues as I do not have sound.

              I've disabled the default sound card.

               

              I think it has something to do with the mixer and I think I have to update

              /etc/asound.conf

               

              but I don't know whith what. amixer is returning a lot of entries.

               

              Do you know how to "fix" this?

               

              Thanks!

              2 of 2 people found this helpful
              • 4. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                hiassoft

                Usually you shouldn't have to change /etc/asound.conf or ~/.asoundrc.

                 

                Could you post the output of

                aplay -l
                

                 

                BTW: in case of kodi make sure you select the RPi-Cirrus card in audio settings, default usually is to play back via HDMI only. Also make sure you have MMAL video acceleration enabled - OMX can't output to ALSA.

                 

                so long,

                 

                Hias

                3 of 3 people found this helpful
                • 5. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                  mskyaxl

                  aplay -l returns

                   

                  **** List of PLAYBACK Hardware Devices ****
                  card 0: RPiCirrus [RPi-Cirrus], device 0: WM5102 AiFi wm5102-aif1-0 []
                    Subdevices: 1/1
                    Subdevice #0: subdevice #0
                  

                   

                   

                  BTW: in case of kodi make sure you select the RPi-Cirrus card in audio settings, default usually is to play back via HDMI only. Also make sure you have MMAL video acceleration enabled - OMX can't output to ALSA.

                  You are right about kodi, I remember I did this last time with the previous driver and it worked I do not have it yet installed yet.

                   

                  I had raspbian lite installed with retropie and I got issues like

                   

                  VolumeControl::init() - Failed to find mixer elements!
                  

                   

                  and as far as I understood emulation station assumes that the default alsa mixer is PCM, that's why I was thinking that /etc/asound.conf has to be updated. Somehow I have to point out which is the right mixer.

                   

                  Having this I said that I should first get the normal raspbian working so I've flashed raspbian lite again and it worked from command line as shown below and afterwards I tried it also on full raspbian with the new pixel desktop and again the volume control is not working and trying to play anything from GUI fails, for example Chronium crashes. I tried to figure out which is the correct mixer but I get a long list.

                   

                  In general I would like to be able to route from line in to line out as I want have a vinyl player connected to it. I want to use it as my main media player(most probably kodi) and optional I would like to play around with retropie.

                  3 of 3 people found this helpful
                  • 6. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                    kevin1313

                    Hias,

                     

                    Thanks for the comment about ALSA not working with OMX! My card was working 2 days ago but I didn't know it while using OMX to test. But now my RPi2 is updated to Jessie and the audio card is working!!!

                     

                    Also thanks for ALL the work you have done on the updates!

                     

                    Thanks,

                    Kevin

                    3 of 3 people found this helpful
                    • 7. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                      hiassoft

                      Chromium crashing with kernel 4.9 is a known issue and should be fixed in a future chromium update. Read more about it (and a workaround for the issue) here in the official 4.9 kernel thread:

                      https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=167934

                       

                      I did a quick test on the current Jessie release (with pixel desktop) and VLC played fine, chromium started with --no-sandbox was also able to play a youtube video.

                       

                      The main control for the lineout volume would be "HPOUT2 Digital". Make sure you don't set it to more than 50% or you'll get clipping (that control can also be used to boost very low volume signals). As an alternative you can change your ~/.asoundrc and use the softvol plugin to create a sofware "PCM" mixer control - but note that this'll affect only the PCM output from the RPi, not any other signals (like linein) that you mixed into the lineout signal:

                      pcm.!default {
                          type            softvol
                          slave.pcm       "plughw:RPiCirrus"
                          control.name    "PCM"
                          control.card    RPiCirrus
                      }
                      

                       

                      I'm not sure about the issues you've seen with retropie/emulationstation. I'm using emulationstation on LibreELEC (from the gamestarter addon) and it worked fine out of the box (only had to disable onboard sound which was automatically enabled by the addon), didn't see any issues about non-existent mixers.

                       

                      so long,

                       

                      Hias

                      5 of 5 people found this helpful
                      • 8. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                        hiassoft

                        The problem with retropie is that it cannot detect the platform, this is a general retropie issue with kernel 4.9: https://github.com/RetroPie/RetroPie-Setup/issues/1809

                         

                        As a workaround you could trying to add

                        __platform="rpi3"
                        

                        (or whatever plaform you are running it on) to /home/pi/RetroPie-Setup/retropie_packages.sh or wait for retropie to resolve the issue.

                         

                        so long,

                         

                        Hias

                        3 of 3 people found this helpful
                        • 9. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                          mskyaxl

                          Yes, I know and fixed that some days ago. Thanks for the reply!

                           

                          I've been reading these days all kinds of wikies and forums about the audio layer of linux(alsa, sdl, omx, etc etc - and it seems that the things are not standardized at all). I think that now my issue lies in the way the application uses the sound card.

                           

                          Currently:

                          -Kodi seems to be working fine

                          -Pixel desktop...I don't know yet(maybe it is using OMX?), anyway currently I'm not really interested in using it.

                          -Retropie(emulationstation to be more precise) seems to output sound while "browsing" the settings but it stops when I enter in a "rom" but it seems not to be a problem of this driver but some configuration I have to do [see later edit]

                           

                          Thanks for the big contribution and I'll get back if I manage to solve some of these problems!

                           

                          [later edit]

                          I saw afterwards the first post. The error in emulationstation is gone now after doing what you suggested. although I think I will switch to your setup as I think I want more to have kodi as main and to launch emulationstation from kodi than the other way around.

                           

                          Thanks again!

                          3 of 3 people found this helpful
                          • 10. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                            hiassoft

                            FYI: Yesterday I released a new LibreELEC build which also uses this new driver:

                            https://forum.libreelec.tv/thread-3387.html

                             

                            As for Linux audio layers, actually it's quite simple:

                             

                            OMX is RPi specific and IIRC only used by Kodi and the standalone omxplayer application. I interfaces directly with the RPi GPU and can do video decoding and audio output.

                             

                            All other Linux applications either use ALSA directly or indirectly via some libraries (like SDL) or audio servers (like PulseAudio or Jack).

                             

                            Personally I'm not a big fan of these audio servers (Pulse has been a real PITA to configure and caused more problems than it solved for me) so unless you really need to use Pulse Audio (eg to connect a bluetooth headset or to be able to quickly switch between HDMI audio and integrated speakers on a laptop) better not install it and stick to pure ALSA. Raspbian ships with ALSA only and fortunately doesn't have Pulse enabled

                             

                            so long,

                             

                            Hias

                            5 of 5 people found this helpful
                            • 11. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                              mskyaxl

                              Thanks, its working fine but what I find really annoying is that I cannot use apt-get to install packages.

                               

                              Happy new year!

                               

                              Alex

                              1 of 1 people found this helpful
                              • 12. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                phxang

                                Thank you Hias for detailed instructions. I did all exactly and sound appeared.

                                But I have problem. Sound goes only from single source.

                                Raspberry Pi 3, Raspbian Jessie, compiled 4.9.0 kernel without any config changes.

                                1 of 1 people found this helpful
                                • 13. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                  phxang

                                  PulseAudio helped me to solve some problems. But I still can't listen from mpd and other applications together. I think something in mpd config, but I can't discover it.

                                  1 of 1 people found this helpful
                                  • 16. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                    hiassoft

                                    Hi Andrey!

                                    Can I boost DMIC sensitivity?

                                    Yes. You can change "IN2L Digital Volume" and "IN2R Digital Volume". By default these are set to 116 which is -6dB. Setting these to 128 would be 0dB (each step is 0.5dB). You can also set them to more than 128 - just try different values and see what works best.

                                     

                                    BTW: The purpose of the "usecase" mixer scripts is to give you a quick start, usually you'll have to tweak the settings (boost/attenuate signals, add/remove filters, use different routing etc). Remembering which input/output corresponds to which mixer can be hard, therefore I created a bunch of helper functions and definitions in rpi-cirrus-functions.sh to simplify that. Feel free to change that to your needs, modify it or use it in your own scripts.

                                     

                                    For example, the "Record_from_DMIC.sh" script calls the "record_from_dmic" function in rpi-cirrus-functions.sh. It looks like that:

                                    # args: [ VOLUME [ DIGITAL_VOLUME ] ]
                                    record_from_dmic() {
                                            reset_dmic_in
                                            reset_filter
                                            reset_rpi_in
                                    
                                            # default input gain 0dB and digital gain -6dB
                                            setup_dmic_in "${1:-0}" "${2:-116}"
                                    
                                            # route input through high pass filter to remove DC
                                            setup_high_pass_filter $dmic_in_signals
                                            set_mixer $rpi_in_signals $filter_signals
                                    }
                                    
                                    

                                     

                                    You can pass 2 additional arguments to that function, volume (which should be 0 when using DMIC) and the digital volume (eg 128). If these are not set, the default values 0 and 116 will be used when calling setup_dmic_in.

                                     

                                    If you want you can also remove the high-pass filter, drop the "set_high_pass_filter" line and change the set_mixer call below to "set_mixer $rpi_in_signals $dmic_in_signals" - then DMIC won't be routed through the high-pass filter but sent directly to the RPi audio input.

                                     

                                    If you want to mix multiple (analog) inputs into your output signal have a look at what "Cirrus_listen.sh" does, eg in the case of listening to DMIC on line-out:

                                     

                                    First it configures the DMIC input, like the record function:

                                    setup_dmic_in 0 116
                                    

                                    Then it sets the lineout volume to the default (128 means 0dB)

                                    mixer "${line_out} Digital Volume" 128
                                    

                                    and routes the input signal (in this case "$dmic_in_signals) to the specified input of the line-out mixer (default is 2):

                                    set_mixer $line_out_signals $dmic_in_signals 32 2
                                    

                                     

                                    Each mixer block inside the WM5102 has 4 inputs, the "Playback" scripts/functions use the first one, the listen scripts by default the second one, so if you like you can add 2 more signals (eg line-in and headset-in) to the remaining 2 mixer inputs.

                                     

                                    The "32" in the set_mixer call specifies the volume of the input. 32 is 0dB. Change it to your needs, for example to boost dmic-in or attenuate line-in.

                                     

                                    so long,

                                     

                                    Hias

                                    4 of 4 people found this helpful
                                    • 17. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                      kevin1313

                                      Has anyone reported issues with wifi connectivity/throughput with the 4.9.0 kernel? I am losing wifi ability to get to internet, remote into the RPi2 from a laptop, and lose streaming from minidlna server about every 5-30 minutes. It doesn't actually disconnect me from the router but it doesn't seem to let me access anything until I disconnect wifi and re-connect.

                                       

                                      I am running a Rasp Pi2 with the latest Jessie installed. I updated to Jessie before trying to compile the 4.9.0 kernel. The kernel update worked as the audio card was working, but shortly afterward I noticed the loss of wifi. I have read on internet about wifi connectivity issues with RPi and Jessie but with 12 hours to days between losing wifi. I am not getting that long of a span.

                                       

                                      I am still fairly new to the Rasp Pi/Linux. So this is most likely something I have messed up, but I was curious if anyone else had seen an issue with wifi?

                                       

                                      But after trying to isolate which software may be causing the issue by removing them, I finally went back to an image I had just before updating to 4.9.0 kernel. Wifi does not seem to be acting up.

                                       

                                      Thanks,

                                      Kevin

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

                                        Hi Kevin!

                                         

                                        I can't comment on the WIFI issues, I'm only using wired network with the RPi 3 here.

                                         

                                        But if you are having problems with kernel 4.9 it would be best to switch to the official RPi firmware (just to be sure), test with that and then report issues/regressions in the RPi kernel 4.9 thread https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=167934 - if there's some regression it'll hopefully be fixed soon and then I can pick up the fix in my Cirrus builds.

                                         

                                        If the issues are only present in my builds but not in the official RPi kernel please post about it here.

                                         

                                        To switch from the Cirrus kernel to the official one run the following 2 commands (the first one forces rpi-update to "forget" about the currently installed kernel, overwriting the kernel with the Cirrus build doesn't play nice with rpi-update and it may think the latest version is already installed - if /boot/.firmware_revision is removed it'll start from scratch and get the latest official revision)

                                        sudo rm /boot/.firmware_revision
                                        sudo BRANCH=next rpi-update
                                        

                                         

                                        Once you are finished with testing you can just reinstall the Cirrus kernel (re-run the sudo tar zxf ... command).

                                         

                                        so long,

                                         

                                        Hias

                                        1 of 1 people found this helpful
                                        • 19. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                          kevin1313

                                          So use the pre-compiled kernels? I have been compiling them but that takes a little over 3 hours.

                                           

                                          That was a quick response! Thanks.

                                           

                                          I will let you know how things go.

                                           

                                          Kevin

                                          • 20. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                            kevin1313

                                            Well when I went back to the official kernel, the wifi issue went away as far as I can tell but of course the audio card no longer works either. It will be hard for me to explain the issues I see when using the new 4.9 kernel. I used iperf to try to get a measurement for wifi speed. But it didn't seem to change. The speed test was showing the speed to stay about the same even when it was bogging down on my screen when remote accessing the RPi2 with RealVNC. My best test is watching a movie using minidlna on RPi2 to play to Roku stick's media player. Sometimes the movie will start playing normally but then the media server loses connection after 10 minutes or so. The time it lasts varies from just a few minutes to half hour or so. Most recently the server isn't disconnecting but the movie has to buffer(which it normally never did) every couple of minutes which leads me to believe the transfer rate over wifi is low, but the iperf test seemed to show that it was still about the same(800MBs/sec, I think).

                                             

                                            Would you recommend using one of the previous versions of your kernel? Do you think that would possibly get me a more stable wifi connection?

                                             

                                            Thanks,

                                            Kevin

                                            1 of 1 people found this helpful
                                            • 21. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                              hiassoft

                                              Hi Kevin!

                                               

                                              One thing you could try is using my kernel, but disable the Cirrus overlay in config.txt and check if this helps. It's best to completely power down the RPi and unplug power before you test (so the card is completely in cold state). With such a configuration the kernel should behave exactly the same as the official 4.9 kernel.

                                               

                                              You could also try a 4.4 series kernel with the cirrus drivers, but you'll have to compile it from source, the latest precompiled 4.4 kernel I've uploaded to my website is already about half a year old and there might have been wifi fixes in the meantime - the latest 4.4 cirrus source on github is a little bit newer.

                                               

                                              Also test with the official 4.4 kernel and see if that works.

                                               

                                              I have to add that I currently have no idea what could be causing wifi issues in my cirrus tree - it only adds the sound card driver, the rest of the kernel and config is completely identical.

                                               

                                              Intermittent WIFI issues can be a real PITA to track down and it's rather easy to follow a wrong path. So best concentrate on trying to replicate the issues with the official kernel, doing exactly the same things you did as with the cirrus kernel (eg streaming video, outputting to HDMI instead of the cirrus card).

                                               

                                              so long,

                                               

                                              Hias

                                              1 of 1 people found this helpful
                                              • 22. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                kjciszewski

                                                So I'm confused.  I looked at your website RPi Linux driver for Wolfson / Cirrus Logic Audio Card   which said to use one of the precompiled kernals, I downloaded cirrus-linux-4.4.14.tgz, ran sudo tar zxf cirrus-linux-4.4.14.tgz -C / and got an error saying the file could not be opened.  The file was downloaded into "Downloads".  I tried it from Downloads, and got no errors.  I made the other reconfiguration changes you mentioned, and restarted, but Alsamixer doesn't recognize the Cirrus Card. 

                                                • 23. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                  phxang

                                                  1. Download https://github.com/HiassofT/rpi-linux

                                                  2. unpack

                                                  3. open terminal and cd into folder

                                                  4. enter next commands to configure kernel

                                                      a) if you have RPi1:

                                                            KERNEL=kernel

                                                            make bcmrpi_defconfig

                                                      b) if you have RPi2/3

                                                            KERNEL=kernel7

                                                            make bcm2709_defconfig

                                                  5. compile by entering commands:

                                                  make -j4 zImage modules dtbs

                                                  sudo make modules_install

                                                  sudo cp arch/arm/boot/dts/*.dtb /boot/

                                                  sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/

                                                  sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/

                                                  sudo scripts/mkknlimg arch/arm/boot/zImage /boot/$KERNEL.img

                                                  Note: On a Raspberry Pi 2/3, the -j4 flag splits the work between all four cores, speeding up compilation significantly. If you have 1 core do not input -j4. After commands make -j4 zImage modules dtbs it takes long time to compile.

                                                  6. Reboot.

                                                  7. Download https://www.element14.com/community/external-link.jspa?url=http%3A%2F%2Fwww.horus.com%2F%7Ehias%2Ftmp%2Fcirrus%2Fcirrus-…

                                                  8. Extract mixer scripts and from terminal:

                                                  ./Reset_paths.sh -q

                                                  ./Playback_to_Lineout.sh -q

                                                  ./Record_from_DMIC.sh -q

                                                  In that case audio output from GREEN jack. Audio input from two microphones from card.

                                                  9. Disable RPi on-board audio device snd-bcm2835

                                                  disable it by removing (or commenting out) the dtparam=audio=on line from /boot/config.txt.

                                                  #dtparam=audio=on

                                                  10. Future updates without loss of sound:

                                                  sudo apt-mark hold raspberrypi-bootloader raspberrypi-kernel

                                                  11. And when you need update GPU firmare: sudo SKIP_KERNEL=1 rpi-update

                                                  12. Start Chromium with --no-sandbox option, like: chromium-browser --no-sandbox.

                                                  13. Set up PulseAudio to prevent difficult questions.

                                                  1 of 1 people found this helpful
                                                  • 24. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                    hiassoft

                                                    So I'm confused. I looked at your website RPi Linux driver for Wolfson / Cirrus Logic Audio Card which said to use one of the precompiled kernals, I downloaded cirrus-linux-4.4.14.tgz, ran sudo tar zxf cirrus-linux-4.4.14.tgz -C / and got an error saying the file could not be opened. The file was downloaded into "Downloads". I tried it from Downloads, and got no errors. I made the other reconfiguration changes you mentioned, and restarted, but Alsamixer doesn't recognize the Cirrus Card.

                                                    This thread is about the new driver based on kernel 4.9 - please download the cirrus-ng-linux-4.9.0.tgz either from my website or from the first post of this thread.

                                                     

                                                    If you have problems please read the troubleshooting section on my website and post your logs and config files.

                                                    RPi Linux driver for Wolfson / Cirrus Logic Audio Card Troubleshooting

                                                     

                                                    so long,

                                                     

                                                    Hias

                                                    1 of 1 people found this helpful
                                                    • 25. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                      moorh

                                                      Hello Everybody,

                                                       

                                                       

                                                      I'm a Rpi and Linux newbee and interested in OpenOB with Rpi 3 and Cirrus.

                                                       

                                                       

                                                      After two days of strugling i finally managed to see the Rpi-Cirrus card in the system running:

                                                      4.9.0-v7+ #1 SMP Sun Dec 18 11:15:40 CET 2016 armv7l GNU/Linux

                                                       

                                                       

                                                      pi@raspberrypi:~ $ arecord -l

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

                                                      card 0: RPiCirrus [RPi-Cirrus], 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: RPiCirrus [RPi-Cirrus], device 0: WM5102 AiFi wm5102-aif1-0 []

                                                        Subdevices: 1/1

                                                        Subdevice #0: subdevice #0

                                                       

                                                       

                                                      The onboard audio output is commented out in the boot config /boot/config.txt:

                                                      # Enable audio (loads snd_bcm2835)

                                                      #dtparam=audio=on

                                                       

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

                                                      dtoverlay=rpi-cirrus-wm5102

                                                      dtoverlay=i2s-mmap

                                                       

                                                       

                                                      However, when i play a mp3 i hear audio on onboard headphone output !

                                                       

                                                      pi@raspberrypi:~/Downloads $ omxplayer Kiesza.mp3

                                                      Audio codec mp3 channels 2 samplerate 44100 bitspersample 16

                                                      Subtitle count: 0, state: off, index: 1, delay: 0

                                                       

                                                      I pasteded the new usecase scripts in /home/pi/bin and run them like i can (double click,execute) but no change.

                                                       

                                                       

                                                      I did create the file: /etc/modprobe.d/cirrus.conf with:

                                                      softdep arizona-spi pre: arizona-ldo1

                                                      softdep spi-bcm2708 pre: fixed

                                                      softdep spi-bcm2835 pre: fixed

                                                       

                                                       

                                                       

                                                      What am i missing here?

                                                      Learned alot the last couple of day's but now i could use some help if possible...

                                                       

                                                       

                                                      Regards,

                                                       

                                                      Edwin

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

                                                        Hi Edwin!

                                                        However, when i play a mp3 i hear audio on onboard headphone output !

                                                         

                                                        pi@raspberrypi:~/Downloads $ omxplayer Kiesza.mp3

                                                        You need to use a different player which uses ALSA for audio output like vlc, mplayer mpg321, aplay, etc.

                                                         

                                                        omxplayer uses direct output to RPi HDMI or analog out via the RPi videocore GPU so it won't work.

                                                         

                                                        so long,

                                                         

                                                        Hias

                                                        3 of 3 people found this helpful
                                                        • 27. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                          moorh

                                                          Thanks, i did not realise that.

                                                           

                                                          mplayer http://onair.coastlinefm.nl:80/

                                                           

                                                          Plays an audio stream to the Cirrus Line output, sounding great!

                                                           

                                                          Edwin

                                                          • 28. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                            lappen

                                                            Hey,

                                                            thanks for the short set of commands but my rasp 3 fail at

                                                             

                                                            make -j4 zImage modules dtbs

                                                             

                                                            DTCO    arch/arm/boot/dts/overlays/midi-uart0.dtbo
                                                            arch/arm/boot/dts/overlays/midi-uart0-overlay.dts:4:39: fatal error: dt-bindings/clock/bcm2835.h: Datei oder Verzeichnis nicht gefunden
                                                            #include <dt-bindings/clock/bcm2835.h>
                                                            

                                                             

                                                            Have someone a hint?

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

                                                              thanks for the short set of commands but my rasp 3 fail at

                                                               

                                                              make -j4 zImage modules dtbs

                                                               

                                                              1. DTCOarch/arm/boot/dts/overlays/midi-uart0.dtbo
                                                              2. arch/arm/boot/dts/overlays/midi-uart0-overlay.dts:4:39:fatalerror:dt-bindings/clock/bcm2835.h:DateioderVerzeichnisnichtgefunden
                                                              3. #include<dt-bindings/clock/bcm2835.h>

                                                               

                                                              Have someone a hint?

                                                              Better don't use the ZIP download from github, this is known to cause problems. If you want to compile from source use git clone

                                                              git clone --depth 1 https://github.com/HiassofT/rpi-linux
                                                              

                                                               

                                                              Just tested this on RPi3 and "make bcm2709_defconfig", "make dtbs" worked fine.

                                                               

                                                              so long,

                                                               

                                                              Hias

                                                              1 of 1 people found this helpful
                                                              • 30. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                lappen

                                                                Thanks for the fast reply.

                                                                Now it compile, but the Reboot fail. Is there a chance to find the Problem or I have to set OSMC new?

                                                                 

                                                                Edit:

                                                                So I try to install the driver several times with OSMC 12.2016 and cirrus driver 4.9.0 and 4.4.14.

                                                                Everytime the same. After a reboot OSMC surface can't start. Over SSH I have connection the Kernel is refresht to 4.9.0 and aplay -l say the driver is installed. I think the file system is corrupted because I can't do sudo apt-get update or install something after install cirrus driver. I found the system is in read only mode and boot is corrupted.

                                                                So I try:

                                                                fsck -y /boot

                                                                but no improvement. Have Some a Idea what I do wrong at installation?

                                                                • 31. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                  kjciszewski

                                                                  OK, I got the never driver running using the 4.9.0 kernal on an RPI 3 with a Cirrus Audio card.

                                                                   

                                                                  I have script Lbio8.sh that runs a loop through--

                                                                   

                                                                  ./Playback_to_Lineout.sh

                                                                   

                                                                  ./Record_from_Linein.sh

                                                                   

                                                                  arecord -Dhw:1 -r 8000 -c 2 -f S32_LE | aplay -Dhw:1 -r 8000 -c 2 -f S32_LE

                                                                   

                                                                   

                                                                  when I run it I get

                                                                   

                                                                  pi@raspberrypi:~/cirrus $ ./Lbio8.sh

                                                                  Recording WAVE 'stdin' : Signed 32 bit Little Endian, Rate 8000 Hz, Stereo

                                                                  Warning: rate is not accurate (requested = 8000Hz, got = 32000Hz)

                                                                           please, try the plug plugin

                                                                  Playing WAVE 'stdin' : Signed 32 bit Little Endian, Rate 32000 Hz, Stereo

                                                                   

                                                                  However, the script works, inputs and outputs the audio.  The audio seems to have a bit of a hiss.

                                                                   

                                                                  This script worked with previous drivers for the first Wolfson Audio Card and also the CIrrus audio card (the second card, with the 40 pin interface), and there was no indication of problems with it recognizing the 8000 Hz sampling rate.

                                                                   

                                                                  Any thoughts?

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

                                                                    Hi Kenneth!

                                                                    pi@raspberrypi:~/cirrus $ ./Lbio8.sh

                                                                    Recording WAVE 'stdin' : Signed 32 bit Little Endian, Rate 8000 Hz, Stereo

                                                                    Warning: rate is not accurate (requested = 8000Hz, got = 32000Hz)

                                                                    please, try the plug plugin

                                                                    Playing WAVE 'stdin' : Signed 32 bit Little Endian, Rate 32000 Hz, Stereo

                                                                    There are 2 things to keep in mind:

                                                                     

                                                                    The reworked driver contains a new control "Min Sample Rate": Reset_paths.sh sets it to "off" (allowing samplerates of 8kHz and above), Playback_to_SPDIF.sh and Record_from_SPDIF.sh set it to "32kHz". The default (if you called neither scripts) is 32kHz so that explains why using 8kHz doesn't work.

                                                                     

                                                                    Just call Reset_paths.sh (and after that the record and playback scripts) or manually change the Min Sample Rate control:

                                                                    amixer cset name="Min Sample Rate" "off"
                                                                    

                                                                    BTW: There's also a "Max Sample Rate" control but none of the config scripts touches that and it defaults to "off". The purpose of these controls is to limit the rates for SPDIF input/output. SPDIF has a minimum limit of 32kHz and some DACs may have an upper limit of 48, 96 or 192 kHz.

                                                                     

                                                                    The other thing is that on recent Raspbian installations there's an .asoundrc file in /home/pi that sets the default device to hw:0. I'm not sure why or when this was added, but it's rather odd - the ALSA default is usually plughw:0 which allows samplerate, format, channel, ... conversion.

                                                                     

                                                                    So, better remove /home/pi/.asoundrc and ALSA should work again as expected.

                                                                     

                                                                    so long,

                                                                     

                                                                    Hias

                                                                    1 of 1 people found this helpful
                                                                    • 33. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                      kjciszewski

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

                                                                       

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

                                                                       

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

                                                                       

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

                                                                       

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

                                                                       

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

                                                                       

                                                                      Thanks again.

                                                                       

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

                                                                      1 of 1 people found this helpful
                                                                      • 34. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                        hiassoft

                                                                        I'm not familiar with OSMC but you could try looking in /var/log/syslog and/or the outputs of "dmesg", "journalctl -a" and "systemctl status" to get some more info what failed.

                                                                         

                                                                        BTW: have you tried using a different SD card? If you see some filesystem corruption it could be caused by a defective card - this is happens quite often, unfortunately.

                                                                         

                                                                        so long,

                                                                         

                                                                        Hias

                                                                        1 of 1 people found this helpful
                                                                        • 35. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                          hiassoft

                                                                          Hi Kenneth!

                                                                           

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

                                                                           

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

                                                                           

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

                                                                           

                                                                          so long,

                                                                           

                                                                          Hias

                                                                          1 of 1 people found this helpful
                                                                          • 36. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                            lappen

                                                                            Thanks Hias for the commands to check.

                                                                            - $ cat /var/log/syslog is empty

                                                                            - $ dmesg is a to long for output but a Interessting Line is :

                                                                            2.126616] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.

                                                                            and

                                                                            2.920504] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.

                                                                            - $ systemctl status say: osmc    State: degraded ...

                                                                            - $ journalctl -a say: no jounal files found

                                                                             

                                                                            After that I found the command: $ systemctl list-units --failed

                                                                            Output:

                                                                            ● systemd-hostnamed.service   loaded failed failed Hostname Service

                                                                            ● systemd-random-seed.service loaded failed failed Load/Save Random Seed

                                                                            ● systemd-update-utmp.service loaded failed failed Update UTMP about System Boot/Shutdown

                                                                             

                                                                            Than I try to restart the Hostname with: $ sudo service systemd-hostnamed.service restart

                                                                            Output:

                                                                            Failed to restart systemd-hostnamed.service.service: Unit systemd-hostnamed.service.service failed to load: No such file or directory.

                                                                             

                                                                            and the status of the service ( $ sudo systemctl status  systemd-hostnamed.service ) say the Problem which we isolate at start:

                                                                             

                                                                            systemd-hostnamed.service - Hostname Service

                                                                               Loaded: loaded (/lib/systemd/system/systemd-hostnamed.service; static)

                                                                               Active: failed (Result: resources)

                                                                                 Docs: man:systemd-hostnamed.service(8)

                                                                                       man:hostname(5)

                                                                                       man:machine-info(5)

                                                                                       http://www.freedesktop.org/wiki/Software/systemd/hostnamed

                                                                             

                                                                            Jan 11 00:03:17 osmc systemd[1]: Starting Hostname Service...

                                                                            Jan 11 00:03:17 osmc systemd[1]: systemd-hostnamed.service failed to run 'start' task: Read-only file system

                                                                            Jan 11 00:03:17 osmc systemd[1]: Failed to start Hostname Service.

                                                                            Jan 11 00:03:17 osmc systemd[1]: Unit systemd-hostnamed.service entered failed state.

                                                                             

                                                                            The Filesystem is read only mounted. So I try allready a second sd card but with the same result.

                                                                            How can I prevent that the card mounted with read only?

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

                                                                              Jan 11 00:03:17 osmc systemd[1]: Starting Hostname Service...

                                                                              Jan 11 00:03:17 osmc systemd[1]: systemd-hostnamed.service failed to run 'start' task: Read-only file system

                                                                              Jan 11 00:03:17 osmc systemd[1]: Failed to start Hostname Service.

                                                                              Jan 11 00:03:17 osmc systemd[1]: Unit systemd-hostnamed.service entered failed state.

                                                                               

                                                                              The Filesystem is read only mounted. So I try allready a second sd card but with the same result.

                                                                              How can I prevent that the card mounted with read only?

                                                                              I had a quick look at the OSMC sources and it looks like it uses a custom kernel build with an initramfs to setup stuff immediately after boot.

                                                                              https://github.com/osmc/osmc/tree/master/package/kernel-osmc

                                                                               

                                                                              So simply swapping out the kernel won't work, you'd have to build your own kernel with the same setup like OSMC needs (initramfs etc), eg by adapting the OSMC kernel build to use the sources from my github repo.

                                                                               

                                                                              so long,

                                                                               

                                                                              Hias

                                                                              1 of 1 people found this helpful
                                                                              • 38. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                lappen

                                                                                Thanks for look in.

                                                                                How I have to do this. Must I bring the source code of osmc and yours together and compile it or can I Install osmc and modify yours with favorite osmc settings to recompile it. Sorry for the questions but rpi and kernel compilition is new for me.

                                                                                Thanks for the support.

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

                                                                                  How I have to do this. Must I bring the source code of osmc and yours together and compile it or can I Install osmc and modify yours with favorite osmc settings to recompile it. Sorry for the questions but rpi and kernel compilition is new for me.

                                                                                  Thanks for the support.

                                                                                  It depends. If the initrd is stored as a separate file and the kernel matches the configuration of OSMC's kernel it may be as simple as unpacking the initrd, replacing the kernel modules inside that with the updated ones from the precompiled kernel, repacking the initrd and copying it to /boot - similar to what I tested with volumio:

                                                                                  Re: Driver fixes and updates to kernel 3.18.16 and 4.0.5

                                                                                   

                                                                                  If the initrd/initramfs is included in the kernel image or if OSMC needs some special kernel configs/patches it'll be a lot more complicated. Then you need to have a closer look at the OSMC build system, probably change a bunch of files/settings and recompile the kernel. If you never did this before this can be quite challenging and you'd better ask on the OSMC forums about the build system details.

                                                                                   

                                                                                  Or you can just use LibreELEC instead of OSMC, my LibreELEC builds work out of the box with the cirrus card

                                                                                  https://forum.libreelec.tv/thread-3387.html

                                                                                   

                                                                                  so long,

                                                                                   

                                                                                  Hias

                                                                                  1 of 1 people found this helpful
                                                                                  • 40. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                    kjciszewski

                                                                                    I have a Raspberry PI 2, so I ran version 3.18.9-v7+ using my Lbio8.sh script, and compared that to running version v.9.0-v7+ (your new driver) on the RP 2.  The there is virtually no "hiss" noise out of 3.18.9-v7+, while there is considerable noise coming out of V.9.0-v7+.

                                                                                     

                                                                                    It may be that there was some audio compensation/.filtering in the earlier version that cut back on the "hiss" noise--the WM5102 has a lot capabilities like filtering that might have been involved.  I'm not sure.  However, the difference is noticeable as soon as the Lbio8.sh script is loaded and the screen tells us that both the record and play functions are running.  With V.9.0-v7+, when the Lbio8.sh script is started, the noise occurs immediately, and when the Lbio8.sh script is killed,  the noise goes away.  Running version 3.18.9-v7+ does not produce the same level of noise.  This noise is loud enough to be audible even with a signal being input and looped through (I use a pocket music player that plays music files from a memory card)--I start the script, wait and listen to the output noise level, then start playing a music file.

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

                                                                                      I have a Raspberry PI 2, so I ran version 3.18.9-v7+ using my Lbio8.sh script, and compared that to running version v.9.0-v7+ (your new driver) on the RP 2. The there is virtually no "hiss" noise out of 3.18.9-v7+, while there is considerable noise coming out of V.9.0-v7+.

                                                                                       

                                                                                      It may be that there was some audio compensation/.filtering in the earlier version that cut back on the "hiss" noise--the WM5102 has a lot capabilities like filtering that might have been involved. I'm not sure. However, the difference is noticeable as soon as the Lbio8.sh script is loaded and the screen tells us that both the record and play functions are running. With V.9.0-v7+, when the Lbio8.sh script is started, the noise occurs immediately, and when the Lbio8.sh script is killed, the noise goes away. Running version 3.18.9-v7+ does not produce the same level of noise. This noise is loud enough to be audible even with a signal being input and looped through (I use a pocket music player that plays music files from a memory card)--I start the script, wait and listen to the output noise level, then start playing a music file.

                                                                                      Could you please post the Lbio8.sh script? Also post how you configure the card, i.e. which Playback/Listen scripts you are running. BTW: when setting up the card it's a good idea to run Reset_paths first.

                                                                                       

                                                                                      Which inputs and outputs are you using?

                                                                                       

                                                                                      so long,

                                                                                       

                                                                                      Hias

                                                                                      • 42. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                        kjciszewski

                                                                                        I'm using the line in (pink) and line out (green) jacks on the CIrrus Logic audio card.

                                                                                         

                                                                                        ----> Lbio8.sh for v.4.9.0-v7+ is

                                                                                         

                                                                                        ./Reset_paths.sh

                                                                                         

                                                                                        ./Playback_to_Lineout.sh

                                                                                         

                                                                                        ./Record_from_Linein.sh

                                                                                         

                                                                                        arecord -Dhw:1 -r 8000 -c 2 -f S32_LE | aplay -Dhw:1 -r 8000 -c 2 -f S32_LE

                                                                                         

                                                                                        ----> Lbio8.sh for version 3.18.9-v7+ is

                                                                                         

                                                                                        ./Playback_to_Lineout.sh

                                                                                         

                                                                                        ./Record_from_Linein.sh

                                                                                         

                                                                                        arecord -Dhw:1 -r 8000 -c 2 -f S32_LE | aplay -Dhw:1 -r 8000 -c 2 -f S32_LE

                                                                                         

                                                                                        No one said it was necessary to reset paths with the earlier driver.  I have done that in the past manually at times, but never noticed any difference.

                                                                                         

                                                                                        The playback/listen scripts for v.4.9.0-v7+ are the new ones you provided.

                                                                                         

                                                                                        The playback/listen scripts for version 3.18.9-v7+  are

                                                                                         

                                                                                        ----->  Record_from_Linein.sh

                                                                                         

                                                                                        #!/bin/bash

                                                                                         

                                                                                        # $1 added to support 1st line argument. i.e. "./Record_from_linein.sh -q" will stop all the control information being displayed on screen

                                                                                         

                                                                                        #Record from onboard Line Input to AP

                                                                                        # +8dB input PGA gain

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='IN3L Volume' 8

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='IN3R Volume' 8

                                                                                         

                                                                                        # better THD in normal mode vs lower noise floor in high performance

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='IN3 High Performance Switch' on

                                                                                        # Configure the input path for 0dB Gain,  HPF with a low cut off for DC removal

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='IN3L Digital Volume' 128

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='IN3R Digital Volume' 128

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='LHPF1 Input 1' IN3L

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='LHPF2 Input 1' IN3R

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='LHPF1 Mode' High-pass

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='LHPF2 Mode' High-pass

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='LHPF1 Coefficients' 240,3

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='LHPF2 Coefficients' 240,3

                                                                                        # Configure the Audio Interface and volume 0dB

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='AIF1TX1 Input 1' LHPF1

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='AIF1TX1 Input 1 Volume' 32

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='AIF1TX2 Input 1' LHPF2

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='AIF1TX2 Input 1 Volume' 32

                                                                                         

                                                                                         

                                                                                        # The following command should be used to test

                                                                                        # arecord -Dhw:sndrpiwsp -r 44100 -c 2 -f S32_LE <file>

                                                                                         

                                                                                        ----->  Playback_to_Lineout.sh

                                                                                         

                                                                                        #!/bin/bash

                                                                                         

                                                                                        # $1 added to support 1st line argument. i.e. "./Playback_to_Lineout.sh -q" will stop all the control information being displayed on screen

                                                                                         

                                                                                        #Playback from AP to Line Output, default gain 0dB

                                                                                         

                                                                                        # Clear the HPOUT2 Input 1 and 2  mixers. This will ensure no previous paths are connected to the HPOUT2.

                                                                                        # This doesn't include Inputs 3 and 4.

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='HPOUT2L Input 1' None

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='HPOUT2R Input 1' None

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='HPOUT2L Input 2' None

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='HPOUT2R Input 2' None

                                                                                        # Setup HPOUT2 input path and volume

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='HPOUT2L Input 1' AIF1RX1

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='HPOUT2L Input 1 Volume' 32

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='HPOUT2R Input 1' AIF1RX2

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='HPOUT2R Input 1 Volume' 32

                                                                                        # Unmute HPOUT2 Output

                                                                                        amixer $1 -Dhw:sndrpiwsp cset name='HPOUT2 Digital Switch' on

                                                                                         

                                                                                         

                                                                                        # The following command can be used to test

                                                                                        # aplay -Dhw:sndrpiwsp -r 44100 -c 2 -f S32_LE <file>

                                                                                        1 of 1 people found this helpful
                                                                                        • 43. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                          hiassoft

                                                                                          Hi Kenneth,

                                                                                           

                                                                                          thanks a lot for the info! I could reproduce the issue, it looks like it comes from the micbias disable fix (the original driver was buggy in this respect and had micbias always enabled on line-in). I think I might have a solution but need to run some more tests first.

                                                                                           

                                                                                          As a workaround could you try using "Record_from_Linein_Micbias.sh" instead of "Record_from_Linein.sh" and see if the noise disappears? That'll setup the card as with the original drivers/mixer scripts.

                                                                                           

                                                                                          BTW: When you want to monitor a signal from an input it'd be better to use a samplerate of 44100 instead of 8000, that improves quality a lot. You could also use the listen script "Cirrus_listen.sh line line", that'll route line-in to line-out inside of the chip (no need for arecord | aplay) - in that case the driver will use whatever samplerate has last been used (default after powerup is 44100 Hz).

                                                                                           

                                                                                          Ah, and always using Reset_paths.sh is not strictly necessary, but it's a good thing to do before testing so the card is in a known state and I have a chance to reproduce issues - there are tons of stuff that could be set wrong and cause all kinds of problems.

                                                                                           

                                                                                          so long,

                                                                                           

                                                                                          Hias

                                                                                          1 of 1 people found this helpful
                                                                                          • 44. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                            kjciszewski

                                                                                            Thanks for taking the time to work on this.

                                                                                             

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

                                                                                            • 45. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                              lappen

                                                                                              Hey, thanks for the reply.

                                                                                              I have OpenElec already run without Problems but I want a little more functionality so I try OSMC. I think reconfigure the Kernel exceed my time quota at the moment. Thanks for the support.

                                                                                               

                                                                                              Regards

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

                                                                                                Hi Kenneth,

                                                                                                 

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

                                                                                                 

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

                                                                                                 

                                                                                                so long,

                                                                                                 

                                                                                                Hias

                                                                                                • 47. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                  kjciszewski

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

                                                                                                   

                                                                                                  Should I have installed 4.9.3 over 4.9.0 instead?

                                                                                                  • 49. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                    kjciszewski

                                                                                                    Question:

                                                                                                     

                                                                                                     

                                                                                                    In /etc/modprobe.d/cirrus

                                                                                                     

                                                                                                    is the first line supposed to be

                                                                                                     

                                                                                                    softdep arizona-spi pre: Ido1

                                                                                                     

                                                                                                    or

                                                                                                    is the first line supposed to be

                                                                                                     

                                                                                                    softdep arizona-spi pre: ido1

                                                                                                     

                                                                                                    The 4.9.0 version I have working has the latter entry

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

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

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

                                                                                                       

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

                                                                                                       

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

                                                                                                      softdep arizona-spi pre: arizona-ldo1
                                                                                                      

                                                                                                       

                                                                                                      so long,

                                                                                                       

                                                                                                      Hias

                                                                                                      1 of 1 people found this helpful
                                                                                                      • 51. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                        kjciszewski

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

                                                                                                        1 of 1 people found this helpful
                                                                                                        • 52. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                          hiassoft

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

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

                                                                                                           

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

                                                                                                           

                                                                                                          so long,

                                                                                                           

                                                                                                          Hias

                                                                                                          1 of 1 people found this helpful
                                                                                                          • 53. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                            kjciszewski

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

                                                                                                             

                                                                                                             

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

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

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

                                                                                                               

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

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

                                                                                                               

                                                                                                              so long,

                                                                                                               

                                                                                                              Hias

                                                                                                              1 of 1 people found this helpful
                                                                                                              • 55. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                hiassoft

                                                                                                                If you are using kernel 4.9.0 please update to the new 4.9.4 version:

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

                                                                                                                 

                                                                                                                There was a bug that caused noise on LineIn which is now fixed.

                                                                                                                 

                                                                                                                so long,

                                                                                                                 

                                                                                                                Hias

                                                                                                                1 of 1 people found this helpful
                                                                                                                • 56. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                  gerbrand

                                                                                                                  About the organisation in the new rpi-functions.sh

                                                                                                                   

                                                                                                                  two functions are defined but not used:

                                                                                                                  reset_rpi_out() and reset_spdif_in()

                                                                                                                   

                                                                                                                  in reset_rpi_cirrus()

                                                                                                                  reset_rpi_in is organised under #reset output mixers and filters

                                                                                                                   

                                                                                                                  under #reset input signals I would expect reset_spdif_in because of symmetry, not based on my understanding...

                                                                                                                  • 57. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                    gerbrand

                                                                                                                    When Record_from_Linein.sh is executed, for each channel 2 mixers are set, for example IN3L and IN3L digital.

                                                                                                                    How do these values work together, where can I learn more about this subject?

                                                                                                                     

                                                                                                                     

                                                                                                                    Should I expect a usable signal from an cheap microphone for PC?

                                                                                                                    There is some cracking when the plug is moved.

                                                                                                                    The signal remains of very low level.

                                                                                                                    The same microphone on a PC is producing a nice waveform in Audacity.

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

                                                                                                                      Hi Gert!

                                                                                                                      About the organisation in the new rpi-functions.sh

                                                                                                                       

                                                                                                                      two functions are defined but not used:

                                                                                                                      reset_rpi_out() and reset_spdif_in()

                                                                                                                      Good catch! These functions are useless (the digital inputs to the wm5102 don't have any controls), looks like I added them by mistake. I've removed them now.

                                                                                                                       

                                                                                                                      As for infos about the mixers: have a look at the datasheet https://www.cirrus.com/cn/pubs/proDatasheet/WM5102_v4.2.pdf

                                                                                                                       

                                                                                                                      Page 44 contains an overview how the (analog) input blocks work. Basically you have one analog volume control (this is eg IN3L Volume), before the ADC, and one digital volume control after the ADC (eg IN3L Digital Volume), before the digital signal is put onto the internal switching matrix.

                                                                                                                       

                                                                                                                      It's best to try setting the digital control to 0db (value 128) and use the analog control to tune the input volume. On the DMIC inputs there's no analog control so you have to use the digital one. Better use the digital control only to attenuate the signal - if you use it to bosst the signal any (sampling-) noise present on the signal will be amplified as well.

                                                                                                                       

                                                                                                                      The filters and output mixers are explained in the digital core section (starting at page 58). Basically each mixer stage consists of 4 selectable inputs (eg HPOUT1 Input 1-4), each with a volume control (eg HPOUT1 Input 1 Volume). Adjust the volume controls when mixing 2 or more signals together (eg RPi sound out together with line-in).

                                                                                                                       

                                                                                                                      The output stage is explained in the output signal path section (starting at page 153). Each (analog) output has another digital volume control (eg HPOUT1 Digital Volume), bevore the DAC, plus an enable/mute switch (eg HPOUT1 Digital Switch). Use these to control the volume of the outputs.

                                                                                                                       

                                                                                                                      As for your microphone problem: try increasing the analog input gain (IN3L/R Volume if using line-in, or IN1R if using headset in).

                                                                                                                       

                                                                                                                      It could also be that the microphone requires a bias voltage (so that the soundcard powers the microphone), if you connected it to line-in try running Record_from_Linein_Micbias.sh or change the "Line Input Micbias" control from off to on.

                                                                                                                       

                                                                                                                      The headset input has micbias always enabled, but double-check that the pinout of your microphone connector matches the one on the headset jack (there are several incompatible TRRS "standards").

                                                                                                                       

                                                                                                                      so long,

                                                                                                                       

                                                                                                                      Hias

                                                                                                                      1 of 1 people found this helpful
                                                                                                                      • 59. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                        register25

                                                                                                                        Hi guys. Great insight here. But there's another issue I am facing currently. I always could get the audio to be output from the Headset out despite keying in the command Playback_to_Headset.sh. Is there any help on this?

                                                                                                                        • 60. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                          kjciszewski

                                                                                                                          OK, the 4.9.4 driver works well.

                                                                                                                           

                                                                                                                          I ran into a problem trying to install libasound2-dev on 4.9.4--->

                                                                                                                           

                                                                                                                          pi@raspberrypi:/ $ sudo apt-get install libasound2-dev

                                                                                                                          Reading package lists... Done

                                                                                                                          Building dependency tree

                                                                                                                          Reading state information... Done

                                                                                                                          Suggested packages:

                                                                                                                            libasound2-doc

                                                                                                                          The following NEW packages will be installed:

                                                                                                                            libasound2-dev

                                                                                                                          0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

                                                                                                                          Need to get 95.5 kB of archives.

                                                                                                                          After this operation, 445 kB of additional disk space will be used.

                                                                                                                          Err http://archive.raspberrypi.org/debian/ jessie/main libasound2-dev armhf 1.0.28-1+rpi1

                                                                                                                            Could not resolve 'archive.raspberrypi.org'

                                                                                                                          E: Failed to fetch http://archive.raspberrypi.org/debian/pool/main/a/alsa-lib/libasound2-dev_1.0.28-1+rpi1_armhf.deb Could not resolve 'archive.raspberrypi.org'


                                                                                                                          E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

                                                                                                                           

                                                                                                                          Do how does one do this?  It appears that libasound2-dev for RPI1 was targeted, and I think there is an libasound2-dev for RPI2.

                                                                                                                          • 61. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                            nhellwege

                                                                                                                            Hi,

                                                                                                                             

                                                                                                                            I am still using the original wolfson audio card on a Pi-1-A. With the 4.9. Kernel I am able to get audio from the headset jack, but I just cannot get the Speaker Output to work. Has anyone had success getting them to work?

                                                                                                                             

                                                                                                                            BTW: There is a typo in the usecase scripts for Kernel 4.9. in Playback_to_Speakers.sh:

                                                                                                                             

                                                                                                                            'playback_to_speaker'

                                                                                                                             

                                                                                                                            needs to be changed into

                                                                                                                             

                                                                                                                            'playback_to_speakers'

                                                                                                                             

                                                                                                                            Thx

                                                                                                                             

                                                                                                                            EDIT: Nevermind, my external power supply was dead. I tested i just before and it worked and it broke the second i plugged it in. New power supply and erything works like a charm, thanks a lot!

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

                                                                                                                              Hi Nico!

                                                                                                                              BTW: There is a typo in the usecase scripts for Kernel 4.9. in Playback_to_Speakers.sh:

                                                                                                                               

                                                                                                                              'playback_to_speaker'

                                                                                                                               

                                                                                                                              needs to be changed into

                                                                                                                               

                                                                                                                              'playback_to_speakers'

                                                                                                                              Thanks a lot for the info! I've uploaded a fixed version.

                                                                                                                               

                                                                                                                              so long,

                                                                                                                               

                                                                                                                              Hias

                                                                                                                              1 of 1 people found this helpful
                                                                                                                              • 63. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                hiassoft

                                                                                                                                Hi guys. Great insight here. But there's another issue I am facing currently. I always could get the audio to be output from the Headset out despite keying in the command Playback_to_Headset.sh. Is there any help on this?

                                                                                                                                Not quite sure if you understand you correctly, do you mean after a reboot the sound settings are lost? Usually they should be autmatically stored on shutdown and restored on startup.

                                                                                                                                 

                                                                                                                                Check the status of the alsa-store and alsa-restore services. They should look like this:

                                                                                                                                root@raspberrypi:~# systemctl status alsa-store
                                                                                                                                ● alsa-store.service - Store Sound Card State
                                                                                                                                   Loaded: loaded (/lib/systemd/system/alsa-store.service; static)
                                                                                                                                   Active: inactive (dead)
                                                                                                                                root@raspberrypi:~# systemctl status alsa-restore
                                                                                                                                ● alsa-restore.service - Restore Sound Card State
                                                                                                                                   Loaded: loaded (/lib/systemd/system/alsa-restore.service; static)
                                                                                                                                   Active: inactive (dead) since Thu 2017-01-26 19:09:25 CET; 40s ago
                                                                                                                                  Process: 352 ExecStart=/usr/sbin/alsactl -E HOME=/var/run/alsa restore (code=exited, status=0/SUCCESS)
                                                                                                                                 Main PID: 352 (code=exited, status=0/SUCCESS)
                                                                                                                                
                                                                                                                                Jan 26 19:09:21 raspberrypi systemd[1]: Starting Restore Sound Card State...
                                                                                                                                Jan 26 19:09:25 raspberrypi systemd[1]: Started Restore Sound Card State.
                                                                                                                                

                                                                                                                                 

                                                                                                                                If they are masked (disabled) the output will look like this:

                                                                                                                                root@raspberrypi:~# systemctl status alsa-store
                                                                                                                                ● alsa-store.service
                                                                                                                                   Loaded: masked (/dev/null)
                                                                                                                                   Active: inactive (dead)
                                                                                                                                

                                                                                                                                 

                                                                                                                                In the latter case you have to unmask the services so that the mixer settings are preserved across reboots:

                                                                                                                                root@raspberrypi:~# systemctl unmask alsa-store alsa-restore alsa-state
                                                                                                                                

                                                                                                                                 

                                                                                                                                so long,

                                                                                                                                 

                                                                                                                                Hias

                                                                                                                                1 of 1 people found this helpful
                                                                                                                                • 64. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                  hiassoft

                                                                                                                                  Err http://archive.raspberrypi.org/debian/ jessie/main libasound2-dev armhf 1.0.28-1+rpi1

                                                                                                                                  Could not resolve 'archive.raspberrypi.org'

                                                                                                                                  E: Failed to fetch http://archive.raspberrypi.org/debian/pool/main/a/alsa-lib/libasound2-dev_1.0.28-1+rpi1_armhf.deb Could not resolve 'archive.raspberrypi.org'


                                                                                                                                  E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

                                                                                                                                   

                                                                                                                                  Do how does one do this? It appears that libasound2-dev for RPI1 was targeted, and I think there is an libasound2-dev for RPI2.

                                                                                                                                  The message "Could not resolve 'archive.raspberrypi.org'" points to a network error - try it again, it could have been a temporary server error or some issue with your internet provider, router etc.

                                                                                                                                   

                                                                                                                                  Before installing a package you should always run "apt-get update". The current version of libasound2-dev is 1.0.28-1+rpi2 (not 1.0.28-1+rpi1 as shown in your output).

                                                                                                                                   

                                                                                                                                  And: the rpi1/2 at the end has nothing to do with the RPi version. Raspbian doesn't ship different packages for RPI1/2/3 - the "rpiX" at the end just indicates that the package has been changed by Raspbian (compared to the original Debian Jessie version, which currently is 1.0.28-1), and on each change the number will be incremented.

                                                                                                                                   

                                                                                                                                  so long,

                                                                                                                                   

                                                                                                                                  Hias

                                                                                                                                  1 of 1 people found this helpful
                                                                                                                                  • 65. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                    kjciszewski

                                                                                                                                    I found libasound2-dev 1.0.28-1+rpi2--can I just download it, say into a Downloads or archives folder and then sudo install it?

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

                                                                                                                                      I found libasound2-dev 1.0.28-1+rpi2--can I just download it, say into a Downloads or archives folder and then sudo install it?

                                                                                                                                      You can manually install .debs with dpkg -i if you know what you are doing. But then you have to take care about installing/updating package dependencies yourself. Better stick to apt-get update / apt-get upgrade.

                                                                                                                                       

                                                                                                                                      Can you connect to http://archive.raspberrypi.org/ with a webbrowser? Does http://www.raspberrypi.org/ work? Do other sites work?http://archive.raspberrypi.org/

                                                                                                                                       

                                                                                                                                      so long,

                                                                                                                                       

                                                                                                                                      Hias

                                                                                                                                      1 of 1 people found this helpful
                                                                                                                                      • 67. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                        kjciszewski

                                                                                                                                        OK, I found my problem.  It had to do with trying to give the RPI 3 a static IP address.

                                                                                                                                         

                                                                                                                                        I found the following information that claimed to set a static IP address for RPI 3:

                                                                                                                                         

                                                                                                                                         

                                                                                                                                        RPI 3 Static IP configuration:

                                                                                                                                         

                                                                                                                                         

                                                                                                                                        1. In terminal mode on RPI 3 type:  ifconfig [gives current ip address]

                                                                                                                                         

                                                                                                                                        In terminal mode on RPI 3 type: route –ne [gives current gateway address]

                                                                                                                                         

                                                                                                                                        In terminal mode on RPI 3 type:  sudo nano /etc/dhcpcd.conf

                                                                                                                                         

                                                                                                                                        Add at bottom of file type:

                                                                                                                                         

                                                                                                                                        interface eth0

                                                                                                                                        static ip_address=desired_ip_address

                                                                                                                                         

                                                                                                                                        interface wlan0

                                                                                                                                        static ip_address=desired_ip_address

                                                                                                                                         

                                                                                                                                        static routers=desired_gateway_address

                                                                                                                                         

                                                                                                                                        static domain_name_servers=8.8.8.8.8.8.4.4

                                                                                                                                         

                                                                                                                                         

                                                                                                                                        <ctrl> o

                                                                                                                                        <ctrl> x

                                                                                                                                        sudo reboot

                                                                                                                                         

                                                                                                                                         

                                                                                                                                        Unfortunately, while this gives the RPI 3 a local static IP address of my choosing, it does something to prevent the Chromium Web Browser in Pixel from connecting to the internet.  I tried changing static domain_name_servers=8.8.8.8.8.8.4.4 to static domain_name_servers=99.99.99.53, the DNS my router recognizes, but that didn't help. 

                                                                                                                                         

                                                                                                                                        Any suggestions?

                                                                                                                                        1 of 1 people found this helpful
                                                                                                                                        • 69. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                          register25

                                                                                                                                          Hi thanks for the update. Finally managed to get my previous problem working. However I am still unable to get the audio out from the Headset out, besides keying in the command 'Playback_to_Headset.sh', is there any other things (e.g. the volume control) that I am required to do before I am able to get it to work?

                                                                                                                                          • 70. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                            register25

                                                                                                                                            Also how do I reduce the gain of the output of the Headset out?

                                                                                                                                            • 71. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                              0d0a

                                                                                                                                              Hi , i am looking  for a way to combine Linein and DMIC. This worked for me in the old use-case script files but I do not see a way to do this with the new use-case-ng scripts. Could you shine your light on this?

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

                                                                                                                                                Hi , i am looking for a way to combine Linein and DMIC. This worked for me in the old use-case script files but I do not see a way to do this with the new use-case-ng scripts. Could you shine your light on this?

                                                                                                                                                You can either to this with the helper functions in rpi-cirrus-functions.sh or manually via amixer commands (like before, just change the soundcard name).

                                                                                                                                                 

                                                                                                                                                If you like to test with the helper functions you can simply source the helper file in your current shell and then also use the helper functions on the command line. For example

                                                                                                                                                pi@rpi3:~ $ . bin/rpi-cirrus-functions.sh
                                                                                                                                                pi@rpi3:~ $ record_from_linein
                                                                                                                                                pi@rpi3:~ $ setup_dmic_in 0 116
                                                                                                                                                pi@rpi3:~ $ set_mixer $filter_signals $dmic_in_signals 32 2
                                                                                                                                                

                                                                                                                                                 

                                                                                                                                                This'll first configure for normal linein recording where the line input is sent through a high-pass filter.

                                                                                                                                                 

                                                                                                                                                Then setup the dmic input: 0 is the analog gain (keep this at 0 for dmic), 116 is the digital gain, -6dB.

                                                                                                                                                 

                                                                                                                                                In the third line the DMIC input is mixed together with the line input in the highpass filter. LineIn uses the default first input of the filter, dmic the second input - this is the 2 at the end. The 32 before that is the input gain at the filter which means 0dB.

                                                                                                                                                 

                                                                                                                                                Another possibility would be to drop the filter and mix both signals together in the digital output mixer to the RPi:

                                                                                                                                                pi@rpi3:~ $ record_from_linein
                                                                                                                                                pi@rpi3:~ $ setup_dmic_in 0 116
                                                                                                                                                pi@rpi3:~ $ set_mixer $rpi_in_signals $line_in_signals 32 1
                                                                                                                                                pi@rpi3:~ $ set_mixer $rpi_in_signals $dmic_in_signals 32 2
                                                                                                                                                

                                                                                                                                                 

                                                                                                                                                BTW: if you enter "set -x" you can see the actual mixer commands and helper functions being called.

                                                                                                                                                 

                                                                                                                                                so long,

                                                                                                                                                 

                                                                                                                                                Hias

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

                                                                                                                                                  Also how do I reduce the gain of the output of the Headset out?

                                                                                                                                                  Headset is connected to HPOUT1, the output gain mixers are "HPOUT1 Digital Volume" (128 meaning 0dB) and "HPOUT1 Digital Switch" (mute, on/off).

                                                                                                                                                   

                                                                                                                                                  You can also use the simple mixer control (which combines volume+mute) either change the "HPOUT1 Digital" setting in alsamixer or via amixer sset (instead of amixer cset) eg:

                                                                                                                                                  pi@rpi3:~ $ amixer sset "HPOUT1 Digital" -- -12dB
                                                                                                                                                  Simple mixer control 'HPOUT1 Digital',0
                                                                                                                                                    Capabilities: volume pswitch
                                                                                                                                                    Playback channels: Front Left - Front Right
                                                                                                                                                    Capture channels: Front Left - Front Right
                                                                                                                                                    Limits: 0 - 191
                                                                                                                                                    Front Left: 104 [54%] [-12.00dB] Playback [on]
                                                                                                                                                    Front Right: 104 [54%] [-12.00dB] Playback [on]
                                                                                                                                                  

                                                                                                                                                   

                                                                                                                                                  so long,

                                                                                                                                                   

                                                                                                                                                  Hias

                                                                                                                                                  2 of 2 people found this helpful
                                                                                                                                                  • 74. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                    0d0a

                                                                                                                                                    Hello Matthias,

                                                                                                                                                    thx for your response, I am using the helper function file as you stated in your response with good results!

                                                                                                                                                    i was also looking for the DMIC on/off switch but soon realized I could as well set DMIC to 0,0 when not using the microphone!

                                                                                                                                                     

                                                                                                                                                    thanks for your answer!

                                                                                                                                                    • 76. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                      cirrusaudiofanatic

                                                                                                                                                      Great work. Just one problem when using 4.4 Kernel on Raspi-3. Any script is saying:

                                                                                                                                                      "invalid card number."

                                                                                                                                                       

                                                                                                                                                      which comes from rpi-cirrus-functions.sh:

                                                                                                                                                      amixer -q -c RPiCirrus cset name="$1" "$2"

                                                                                                                                                       

                                                                                                                                                      On my raspi cat /proc/asound/cards:

                                                                                                                                                      0 [sndrpiwsp      ]: snd_rpi_wsp - snd_rpi_wsp

                                                                                                                                                                            snd_rpi_wsp

                                                                                                                                                       

                                                                                                                                                      So i needed to change to:

                                                                                                                                                      amixer -q -c snd_rpi_wsp cset name="$1" "$2"

                                                                                                                                                       

                                                                                                                                                      I don't know why your card is named in another way.

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

                                                                                                                                                        Hi Thomas!

                                                                                                                                                        Great work. Just one problem when using 4.4 Kernel on Raspi-3. Any script is saying:

                                                                                                                                                        "invalid card number."

                                                                                                                                                         

                                                                                                                                                        which comes from rpi-cirrus-functions.sh:

                                                                                                                                                        amixer -q -c RPiCirrus cset name="$1" "$2"

                                                                                                                                                        On kernel 4.4 you have to use the old "usecase" scripts, the new mixer scripts are for the new driver in kernel 4.9 only.

                                                                                                                                                         

                                                                                                                                                        I've reworked some parts of the mixer control structure (removed some of the controls, added several others) so using the wrong set of scripts would probably just spit out a few errors and won't lead to a working setup. This is one of the reasons why I changed the card name, so that it's very obvious when someone uses the wrong scripts.

                                                                                                                                                         

                                                                                                                                                        so long,

                                                                                                                                                         

                                                                                                                                                        Hias

                                                                                                                                                        1 of 1 people found this helpful
                                                                                                                                                        • 78. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                          matof

                                                                                                                                                          Hi,

                                                                                                                                                           

                                                                                                                                                          thanks for great work with driver. I am trying to connect gramophone to line in. Gramophone output has lower signal level so I set bigger gain on line in. But I have problem with equalization of input. Phono records use RIAA (https://en.wikipedia.org/wiki/RIAA_equalization ). Do you think it's possible to set it somehow on Cirrus card?

                                                                                                                                                           

                                                                                                                                                          Don't you know some good manual for Cirrus card? I have only found the pdf with 21 pages here at element14 but that one isn't so helpful. I would like to know how I can use "ex. connection" connector, set balance between left and right speakers output and if it's possible to set some equalization on output (treble, bass)... so some more detailed card description would be great.

                                                                                                                                                          Thanks!

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

                                                                                                                                                            Hias,

                                                                                                                                                             

                                                                                                                                                            Brilliant work, and lots of it!  Well done.

                                                                                                                                                             

                                                                                                                                                            Background

                                                                                                                                                            I am in the process of connecting a Pi3 to a Wolfson card (ie not the Cirrus version).  The objective is Room correction, for which I need to use the EQn functional blocks.  The system works well for a Pi1 +Wolfson and I can set up the EQ parameters using

                                                                                                                                                             

                                                                                                                                                                      amixer -Dhw:0 cget name='EQ1 Coefficeints' nn,nn,nn ....... (nn are the 42 parameters in decimal)

                                                                                                                                                             

                                                                                                                                                            Running the corresponding cget gives (eg)

                                                                                                                                                             

                                                                                                                                                                      amixer -Dhw:0 cget name='EQ1 Coefficeints'

                                                                                                                                                                      numid=39,iface=MIXER,name='EQ1 Coefficeints'

                                                                                                                                                                        ; type=BYTES,access=rw------,values=42

                                                                                                                                                                        :           values=0x62,0x18,0x63,0x00,0x0f,0xc8,0x03,0xfe,0x00,0xe0,0x1e,0xc4,0xf1,0x36,0x04,0x09,0x04,0xcc,0x1c,0x9b,0xf3,0x37,0x04,0x0b,0x0c,0xbb,0x16,0xf8,0xf7,0xd9,0x04,0x0a,0x1f,0x14,0x05,0x8c,0x05,0x63,0x40,0x00,0x0b,0x75

                                                                                                                                                             

                                                                                                                                                            (NB that the mispelling of Coefficeints is intentional, it derives from the Cirrus code I think.  Others intending to use this functionality take note of this error)

                                                                                                                                                             

                                                                                                                                                            Questions

                                                                                                                                                            I have tried looking in your code, but have not found an answer  ...... 

                                                                                                                                                             

                                                                                                                                                            1) Have you corrected the Coefficeints spelling mistake?  Have other modifications you have made disabled this functionality? 

                                                                                                                                                             

                                                                                                                                                            2) Your revised kernels cater for both the Wolfson and the Cirrus card, how is the "difference" detected, or does it not need to?  (My intention is a pin for pin copy for the first 26 pins (except p12) and then the I2S pins as well.)

                                                                                                                                                             

                                                                                                                                                            Thank you for all of your help to this community

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

                                                                                                                                                              thanks for great work with driver. I am trying to connect gramophone to line in. Gramophone output has lower signal level so I set bigger gain on line in. But I have problem with equalization of input. Phono records use RIAA (https://en.wikipedia.org/wiki/RIAA_equalization ). Do you think it's possible to set it somehow on Cirrus card?

                                                                                                                                                              The wm5102 chip has built-in low and highpass filters and a 5-band equalizer. You'd probably be able to get somewhat near the RIAA curve with these but IMO it would be better is to do that in software, eg with audacity.

                                                                                                                                                               

                                                                                                                                                              Since the output level of your record player is quite low noise could be a problem. The best solution is to use a hardware phono preamp, then you don't need to apply de-equalisation in software and noise shouldn't be a problem as well.

                                                                                                                                                               

                                                                                                                                                              Don't you know some good manual for Cirrus card? I have only found the pdf with 21 pages here at element14 but that one isn't so helpful. I would like to know how I can use "ex. connection" connector, set balance between left and right speakers output and if it's possible to set some equalization on output (treble, bass)... so some more detailed card description would be great.

                                                                                                                                                              Have a look a few posts above: https://www.element14.com/community/message/213960/l/re-new-reworked-driver-for-wolfsoncirrus-logic-audio-card#213960

                                                                                                                                                               

                                                                                                                                                              The datasheet is a good starting point and you'll get an impression how the soundchip works.

                                                                                                                                                               

                                                                                                                                                              Internally left and right channels are handled separately, so in the rpi-cirrus-functions.sh helper script I have a function (set_mixer) to set both left and right channels to the same value (as that's usually what you want). If you want to change the balance, lower either the left gain (to move the balance to the right) or the right gain (to move to the left) of the output mixers - for line out that would be "HPOUT2L Input Volume" and "HPOUT2R Input Volume".

                                                                                                                                                               

                                                                                                                                                              To get the parameters for the lo/hi-pass filters and the EQ IIRC you have to use the WISCE software: https://www.cirrus.com/support/wisce/

                                                                                                                                                               

                                                                                                                                                              so long,

                                                                                                                                                               

                                                                                                                                                              Hias

                                                                                                                                                              1 of 1 people found this helpful
                                                                                                                                                              • 81. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                hiassoft

                                                                                                                                                                1) Have you corrected the Coefficeints spelling mistake? Have other modifications you have made disabled this functionality?

                                                                                                                                                                The spelling mistake has been fixed a long time ago (in kernel 3.13) in the upstream driver: https://github.com/torvalds/linux/commit/12850b8d45cb03239ede6df58ad0022aba3f3dc2

                                                                                                                                                                 

                                                                                                                                                                I haven't used the EQ feature before but I noticed that there was another commit that changed the EQ mixer controls (coefficients and mode were merged):

                                                                                                                                                                https://github.com/torvalds/linux/commit/c05d9a8c7f55a901d9e8ec2a5f0730137bbfea4a

                                                                                                                                                                 

                                                                                                                                                                So you probably have to adapt your mixer settings to that change as well. If I understand the change correctly, the first byte is now the mode and bytes 2-20 are the previous 19 coefficient bytes.

                                                                                                                                                                2) Your revised kernels cater for both the Wolfson and the Cirrus card, how is the "difference" detected, or does it not need to? (My intention is a pin for pin copy for the first 26 pins (except p12) and then the I2S pins as well.)

                                                                                                                                                                From the driver side there's no difference between the Wolfson and the Cirrus card. The only difference between these is that on the RPi1 (with 26-pin GPIO connector) some of the GPIO pins are connected to different BCM2835 GPIOs than on the newer 40-ping GPIO models - but all this is handled via the RPi devicetree files, so if you wire up the card correctly it should just work. I wanted to try that myself a while ago but seem to have lost my spare wolfson card somewhere... Please report back if that works!

                                                                                                                                                                 

                                                                                                                                                                so long,

                                                                                                                                                                 

                                                                                                                                                                Hias

                                                                                                                                                                1 of 1 people found this helpful
                                                                                                                                                                • 82. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                  psyj

                                                                                                                                                                  Hias,

                                                                                                                                                                   

                                                                                                                                                                  Great! thanks for the rapid reply.

                                                                                                                                                                   

                                                                                                                                                                  I will start with my current (runeaudio) build and see if I can get the Wolfson to work with the Pi3.  So the advice on the driver and GPIOs is much appreciated.

                                                                                                                                                                   

                                                                                                                                                                  And then move over to your newer kernel.

                                                                                                                                                                   

                                                                                                                                                                  I will keep you (and others) informed  .... though I have another project running in parallel

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

                                                                                                                                                                    Oh,  the EQ settings, I will need to dig about in the newer versions, because 20 bytes is not enough to programme the module.  If you get a chance sometime (see for example the end of the post Wolfson audio paths & how to use EQ and LHPF ), perhaps you could post the result of a

                                                                                                                                                                     

                                                                                                                                                                         

                                                                                                                                                                    amixer -Dhw:0 cget name='EQ1 Coefficients'

                                                                                                                                                                     

                                                                                                                                                                    on your system. Many thanks

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

                                                                                                                                                                      FWIW, I agree with Hias. An analogue pre-amplifier with RIAA correction built in is much better than working on a low level signal in the digital domain.  As to manuals, there is a 334 page full product manual (Wolfson: Datasheet for for WM5102 Audio Hub CODEC with Voice Processor DSP) , with great detail in the Farnell library, but you would not want to start learning there .  For me the most instructive way of exploring the chip was through the WISCE software, which lets you simulate designs very effectively  ..... and as Hias says, if you do decide to do RIAA correction in the 5102, you will have to use the WISCE software to set up the equalisation parameters  ..... nobody seems to know how the parameters set in the 5102 are translated into equalisation curves  ..... to a lesser extent the same is true of bass and treble, but I believe that there are some scripts out there.

                                                                                                                                                                      1 of 1 people found this helpful
                                                                                                                                                                      • 85. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                        matof

                                                                                                                                                                        Thank you both for the answers and tips. I will look at it and try WISCE when I have time.

                                                                                                                                                                        I will also look how I can power up external pre-amplifier from Cirrus card and if it's possible to integrate it somehow through "Ex Connection" pins. But that would take me some time so no further questions for now...

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

                                                                                                                                                                          Oh, the EQ settings, I will need to dig about in the newer versions, because 20 bytes is not enough to programme the module. If you get a chance sometime (see for example the end of the post Wolfson audio paths & how to use EQ and LHPF ), perhaps you could post the result of a

                                                                                                                                                                           

                                                                                                                                                                          amixer -Dhw:0 cget name='EQ1 Coefficients'

                                                                                                                                                                           

                                                                                                                                                                          Looks like didn't look close enough 20 is the number of 16-bit registers, so there are 40 bytes:

                                                                                                                                                                          # amixer cget name="EQ1 Coefficients"
                                                                                                                                                                          numid=36,iface=MIXER,name='EQ1 Coefficients'
                                                                                                                                                                            ; type=BYTES,access=rw------,values=40
                                                                                                                                                                            : values=0x00,0x00,0x0f,0xc8,0x03,0xfe,0x00,0xe0,0x1e,0xc4,0xf1,0x36,0x04,0x09,0x04,0xcc,0x1c,0x9b,0xf3,0x37,0x04,0x0b,0x0c,0xbb,0x16,0xf8,0xf7,0xd9,0x04,0x0a,0x1f,0x14,0x05,0x8c,0x05,0x63,0x40,0x00,0x0b,0x75
                                                                                                                                                                          

                                                                                                                                                                           

                                                                                                                                                                          so long,

                                                                                                                                                                           

                                                                                                                                                                          Hias

                                                                                                                                                                          1 of 1 people found this helpful
                                                                                                                                                                          • 87. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                            psyj

                                                                                                                                                                            Martin,

                                                                                                                                                                             

                                                                                                                                                                            I forgot to mention that there are 4 hi/lo pass filters and 4 EQ filters in the 5102 and it is entirely possible to daisy chain them together.  So I link 2 EQ modules in series.  Sadly this does not give me a 2*5 =10 band paremetric equaliser because you have to use the fifth part of the filter as high pass/cut, so you end up with 8 fully programmable filters plus a couple of independent high pass/cut.  Still that is not too bad for some room correction. Or indeed a reasonable shot at RIAA!

                                                                                                                                                                            For perfection, I have (in the past) rune folve/brutefir for 100% customisable DRC filters (though I have not tried this in conjunction with the Wolfson card). I would love to get access to the DSP module in the 5102, but sadly all knowledge of how to do that seems to have died with the company.  It could have given much more flexible filtering.

                                                                                                                                                                            1 of 1 people found this helpful
                                                                                                                                                                            • 88. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                              psyj

                                                                                                                                                                              Martin,

                                                                                                                                                                               

                                                                                                                                                                              A postscript.  I have had a quick "play" with the WISCE software to see what could be done as to a RIAA curve.  Effectively the WISCE software will limit EQ gain/cut to around 12dB, many (but not all) configurations that exceed this limit generate instability and the software just refuses to give parameters. You could cascade two filters and get 24dB, but stability is questionable.

                                                                                                                                                                               

                                                                                                                                                                              Further, with filtering, your HF will be cut by more than 40dB wrt the LF (the RIAA curve min/max),  that is a lot of loss in signal quality.  Similarly capturing audio with no input correction will give you LF 40db below HF.  So any form of signal processing will be working on 16 bits at very best (the loud bits) and around 12-13bits on the quiet parts of the music (-40db correction skew, -30dB signal level).

                                                                                                                                                                               

                                                                                                                                                                              And if you go the analog pre-amp route, received wisdom is that the power supplies on the pi are noisy, and in any event you will possibly need a split (+/-ve) power rail for the amp. You can do it, but quality might suffer.

                                                                                                                                                                              1 of 1 people found this helpful
                                                                                                                                                                              • 89. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                hiassoft

                                                                                                                                                                                Hi John!

                                                                                                                                                                                I am in the process of connecting a Pi3 to a Wolfson card (ie not the Cirrus version).

                                                                                                                                                                                Just found my spare Wolfson card, desoldered R39 and the P5 pogo pins, wired up the P5 pins to GPIO pins 12, 35, 38, 40 on my RPi2 and it worked fine with the kernel 4.9 driver.

                                                                                                                                                                                 

                                                                                                                                                                                Desoldering the pogo pins was a PITA but the card survived

                                                                                                                                                                                 

                                                                                                                                                                                so long,

                                                                                                                                                                                 

                                                                                                                                                                                Hias

                                                                                                                                                                                2 of 2 people found this helpful
                                                                                                                                                                                • 90. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                  0d0a

                                                                                                                                                                                  Saved to important

                                                                                                                                                                                   

                                                                                                                                                                                  the white rider

                                                                                                                                                                                  (Het leuke van ... is

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

                                                                                                                                                                                    Hias

                                                                                                                                                                                     

                                                                                                                                                                                    Bravo!

                                                                                                                                                                                     

                                                                                                                                                                                    Yes, it was pretty much that I was planning to do (see my previous post).  I have ordered a prototyping piggy back board to intercept the link to pin 12.  Taking out R39 has the same effect, but it is a tiny component!  Did you manage to tack a wire onto the R39 pad so that the 8814 is still connected to GPIO? If so you have better eyes and a steadier hand than me!

                                                                                                                                                                                     

                                                                                                                                                                                    I ordered a desoldering iron specially for the pogo pins, a solder sucker with a soldering iron built round it! Hopefully that will make life easier  ..... though I note that leaving the pogo pins on the wolfson board and insulating the pi board is a less elegant solution.

                                                                                                                                                                                     

                                                                                                                                                                                    But the really important thing is, thank you, it is always much easier to undertake these things when somebody has already proved it possible.

                                                                                                                                                                                     

                                                                                                                                                                                    Can we expect a run on the remaining Farnell stock of boards  now ;-)

                                                                                                                                                                                     

                                                                                                                                                                                    John

                                                                                                                                                                                    1 of 1 people found this helpful
                                                                                                                                                                                    • 92. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                      hiassoft

                                                                                                                                                                                      Did you manage to tack a wire onto the R39 pad so that the 8814 is still connected to GPIO? If so you have better eyes and a steadier hand than me!

                                                                                                                                                                                      I haven't bothered to do that, that GPIO isn't used by the driver, it's configured as an input by the RPi firmware, and there's a pullup (R30) as well. Just removing R39 is enough.

                                                                                                                                                                                       

                                                                                                                                                                                      If you want to solder a wire and hook it up to GPIO pin 33 it'd probably be easiest to do that on R30 - or R30 and the cleared pad of R39.

                                                                                                                                                                                      I ordered a desoldering iron specially for the pogo pins, a solder sucker with a soldering iron built round it! Hopefully that will make life easier ..... though I note that leaving the pogo pins on the wolfson board and insulating the pi board is a less elegant solution.

                                                                                                                                                                                      I used a larger (3mm or so) chisel tip, a lot of solder and heated up all 8 pins at the same time. Pins 7+8 seem to connect to a ground plane and my good old weller WS50 wasn't quite up to it so I had to crank up the temperature to 375°C. Then I was able to gently pry the pogo pins out and after that cleared the holes with a solder sucker.

                                                                                                                                                                                       

                                                                                                                                                                                      As it was already 1 AM I just used some breadboard connector cables, soldered the male end into the P5 holes and plugged the female ends onto the GPIO headers. Of course, being already too tired, I swapped the I2S data in and out pins and got no sound on the first try. But that was easily solved

                                                                                                                                                                                       

                                                                                                                                                                                      Here's a picture of my "Frankenson" audio card:

                                                                                                                                                                                       

                                                                                                                                                                                      Frankenson audio card in RPi2

                                                                                                                                                                                       

                                                                                                                                                                                      so long,

                                                                                                                                                                                       

                                                                                                                                                                                      Hias

                                                                                                                                                                                      1 of 1 people found this helpful
                                                                                                                                                                                      • 93. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                        psyj

                                                                                                                                                                                        Hias,

                                                                                                                                                                                         

                                                                                                                                                                                        Huh! ;-) Your "Frankenson" is of higher quality than most peoples finished product.  (Mine included) I will post my version when I get the prototype board, but thanks for the R39 tip, I had no idea that the pin on the 8814 was not in use.  I am hoping that the prototype board has plated through holes where the pogo pins go (hence making zero modification to either card) .... if not it would be more logical to do a carbon copy of your approach,  And frankly for anybody else reading this, I think your approach is the more sensible one, I have already had poor connection problems with the pogos.

                                                                                                                                                                                        • 94. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                          hystrix

                                                                                                                                                                                          Hi Hias,

                                                                                                                                                                                           

                                                                                                                                                                                          Your work on the Cirrus Logic driver is amazing. I'm going to give the re-worked driver a go, hopefully later today if I can find a spare microSD card.

                                                                                                                                                                                           

                                                                                                                                                                                          My project uses mic bias, and until now I have been using the headphone mic bias, but I have just swapped over to LineIn mic bias (because soldering wires to a 3 pole jack is way easier than those 4 pole jacks!). 

                                                                                                                                                                                           

                                                                                                                                                                                          Your website notes say that there has been a bugfix to the micbias setting on LineIn.  What was the bug?  I'm interested since I haven't noticed any issues with using LineIn mic bias.

                                                                                                                                                                                           

                                                                                                                                                                                          Many thanks, and I'll provide feedback when I try the re-worked driver.

                                                                                                                                                                                           

                                                                                                                                                                                          Hystrix

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

                                                                                                                                                                                            Thanks - but this was just a quick proof-of-concept test.

                                                                                                                                                                                             

                                                                                                                                                                                            The long cables are not quite ideal, they are carrying high frequency digital signals and if they are bent down near to the analog circuit noise could couple in. I guess it would be better to run them on the bottom side of the PCB, next to the GPIO connector, or maybe use shielded cables.

                                                                                                                                                                                             

                                                                                                                                                                                            so long,

                                                                                                                                                                                             

                                                                                                                                                                                            Hias

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

                                                                                                                                                                                              Your website notes say that there has been a bugfix to the micbias setting on LineIn. What was the bug? I'm interested since I haven't noticed any issues with using LineIn mic bias.

                                                                                                                                                                                               

                                                                                                                                                                                              The bug was that micbias was always enabled on linein - probably not a problem for your case when you want the bias voltage, but it caused issues with gear that wasn't prepared to be connected to a DC biased input.

                                                                                                                                                                                               

                                                                                                                                                                                              so long,

                                                                                                                                                                                               

                                                                                                                                                                                              Hias

                                                                                                                                                                                              2 of 2 people found this helpful
                                                                                                                                                                                              • 97. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                hystrix

                                                                                                                                                                                                @Hias: Thanks for clarifying the micbias thing.

                                                                                                                                                                                                 

                                                                                                                                                                                                I'm just playing with the reworked driver right now.  I haven't been able to record yet, so I'm currently troubleshooting.

                                                                                                                                                                                                 

                                                                                                                                                                                                UPDATE:  Got it working on Linux raspberrypi 4.9.13-v7+ #974 SMP Wed Mar 1 20:09:48 GMT 2017 armv7l GNU/Linux

                                                                                                                                                                                                 

                                                                                                                                                                                                I had to go back to my old usecase script, though, and make a change to the card name, for example:

                                                                                                                                                                                                 

                                                                                                                                                                                                Before:

                                                                                                                                                                                                 

                                                                                                                                                                                                amixer $1 -Dhw:sndrpiwsp cset name='IN3L Volume' 30

                                                                                                                                                                                                 

                                                                                                                                                                                                After:

                                                                                                                                                                                                 

                                                                                                                                                                                                amixer $1 -Dhw:RPiCirrus cset name='IN3L Volume' 30

                                                                                                                                                                                                 

                                                                                                                                                                                                I couldn't get the new Record_from_Linein_Micbias.sh to work for some reason.

                                                                                                                                                                                                1 of 1 people found this helpful
                                                                                                                                                                                                • 98. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                  hiassoft

                                                                                                                                                                                                  I had to go back to my old usecase script, though, and make a change to the card name, for example:

                                                                                                                                                                                                   

                                                                                                                                                                                                  Before:

                                                                                                                                                                                                   

                                                                                                                                                                                                  amixer $1 -Dhw:sndrpiwsp cset name='IN3L Volume' 30

                                                                                                                                                                                                   

                                                                                                                                                                                                  After:

                                                                                                                                                                                                   

                                                                                                                                                                                                  amixer $1 -Dhw:RPiCirrus cset name='IN3L Volume' 30

                                                                                                                                                                                                   

                                                                                                                                                                                                  I couldn't get the new Record_from_Linein_Micbias.sh to work for some reason.

                                                                                                                                                                                                  What didn't work with the new mixer script?

                                                                                                                                                                                                   

                                                                                                                                                                                                  If the input volume was too low you can just enter the mixer command above (plus the same for IN3R) or you can change Record_from_Linein_Micbias.sh and add "30" after the record_from_linein_micbias call:

                                                                                                                                                                                                  #!/bin/sh
                                                                                                                                                                                                  
                                                                                                                                                                                                  MYDIR=$(dirname "$0")
                                                                                                                                                                                                  . "${MYDIR}/rpi-cirrus-functions.sh"
                                                                                                                                                                                                  
                                                                                                                                                                                                  record_from_linein_micbias 30
                                                                                                                                                                                                  
                                                                                                                                                                                                  

                                                                                                                                                                                                   

                                                                                                                                                                                                  Of course you can use your own scripts if you prefer, in that case you should probably add this mixer setting to set micbias (use "on" or "off"):

                                                                                                                                                                                                  amixer -q -c RPiCirrus cset name="Line Input Micbias" on
                                                                                                                                                                                                  

                                                                                                                                                                                                   

                                                                                                                                                                                                  so long,

                                                                                                                                                                                                   

                                                                                                                                                                                                  Hias

                                                                                                                                                                                                  • 99. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                    jezzas

                                                                                                                                                                                                    Hi,

                                                                                                                                                                                                    I am relatively new to this so  I am fast becoming frustrated with the installation of this card so need a some help. I thought I had run through everything  you said word for word but seem to get stuck at aplay -1. Thanking you in advance for anything you can shed light on.

                                                                                                                                                                                                     

                                                                                                                                                                                                    ###config.txt###

                                                                                                                                                                                                    # 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

                                                                                                                                                                                                    dtoverlay=rpi-cirrus-wm1502

                                                                                                                                                                                                    dtdebug=1

                                                                                                                                                                                                     

                                                                                                                                                                                                     

                                                                                                                                                                                                    # Uncomment this to enable the lirc-rpi module

                                                                                                                                                                                                    #dtoverlay=lirc-rpi

                                                                                                                                                                                                     

                                                                                                                                                                                                     

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

                                                                                                                                                                                                     

                                                                                                                                                                                                     

                                                                                                                                                                                                    # Enable audio (loads snd_bcm2835)

                                                                                                                                                                                                    dtparam=audio=on

                                                                                                                                                                                                    start_x=0

                                                                                                                                                                                                     

                                                                                                                                                                                                    ###vcgencmd version###

                                                                                                                                                                                                    Mar  2 2017 15:32:36

                                                                                                                                                                                                    Copyright (c) 2012 Broadcom

                                                                                                                                                                                                    version a867bcec14cd829107be1c03c0953a076919f4d7 (clean) (release)

                                                                                                                                                                                                     

                                                                                                                                                                                                    ###sudo vcdbg log msg 2>&1###

                                                                                                                                                                                                     

                                                                                                                                                                                                    000922.857: HDMI:EDID version 1.3, 1 extensions, unknown aspect ratio

                                                                                                                                                                                                    000922.921: HDMI:EDID features - videodef 0x80 standby suspend active off; colour encoding:RGB444|YCbCr422; sRGB is not default colourspace; preferred format is not native; does not support GTF

                                                                                                                                                                                                    000922.999: HDMI:EDID found preferred DMT detail timing format: 1360x768p @ 60 Hz (39)

                                                                                                                                                                                                    000923.040: HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II

                                                                                                                                                                                                    000923.076: HDMI:EDID found DMT format: code 5, 640x480p @ 72 Hz in established timing I/II

                                                                                                                                                                                                    000923.115: HDMI:EDID found DMT format: code 6, 640x480p @ 75 Hz in established timing I/II

                                                                                                                                                                                                    000923.153: HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II

                                                                                                                                                                                                    000923.191: HDMI:EDID found DMT format: code 10, 800x600p @ 72 Hz in established timing I/II

                                                                                                                                                                                                    000923.227: HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II

                                                                                                                                                                                                    000923.265: HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II

                                                                                                                                                                                                    000923.301: HDMI:EDID found DMT format: code 17, 1024x768p @ 70 Hz in established timing I/II

                                                                                                                                                                                                    000923.341: HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II

                                                                                                                                                                                                    000923.432: HDMI:EDID standard timings block x 8: 0x0101 0101 0101 0101 0101 0101 0101 0101

                                                                                                                                                                                                    000936.446: HDMI:EDID parsing v3 CEA extension 0

                                                                                                                                                                                                    000936.485: HDMI:EDID monitor support - underscan IT formats:no, basic audio:yes, yuv444:yes, yuv422:no, #native DTD:1

                                                                                                                                                                                                    000936.527: HDMI:EDID found CEA detail timing format: 720x480p @ 60 Hz (2)

                                                                                                                                                                                                    000936.585: HDMI:EDID found audio format 2 channels PCM, sample rate: 32|44|48 kHz, sample size: 16|20|24 bits

                                                                                                                                                                                                    000936.604: HDMI:EDID found HDMI VSDB length 7

                                                                                                                                                                                                    000936.630: HDMI:EDID HDMI VSDB has physical address 2.0.0.0

                                                                                                                                                                                                    000936.652: HDMI:EDID HDMI VSDB supports AI:yes, dual link DVI:no

                                                                                                                                                                                                    000936.683: HDMI:EDID HDMI VSDB deep colour support - 48-bit:no 36-bit:no 30-bit:no DC_yuv444:no

                                                                                                                                                                                                    000936.700: HDMI:EDID HDMI VSDB max TMDS clock 225 MHz

                                                                                                                                                                                                    000936.715: HDMI:EDID HDMI VSDB has no latency information

                                                                                                                                                                                                    000936.756: HDMI:EDID found CEA format: code 16, 1920x1080p @ 60Hz (native)

                                                                                                                                                                                                    000936.788: HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz (native)

                                                                                                                                                                                                    000936.822: HDMI:EDID found CEA format: code 2, 720x480p @ 60Hz

                                                                                                                                                                                                    000936.838: HDMI:EDID found Video Capability DB length 2

                                                                                                                                                                                                    000936.864: HDMI:EDID video capability: CE:3 IT:3 PT:0 QS:0

                                                                                                                                                                                                    000936.900: HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023

                                                                                                                                                                                                    000937.029: HDMI:EDID preferred mode remained as DMT (39) 1360x768p @ 60 Hz with pixel clock 85 MHz

                                                                                                                                                                                                    000951.502: HDMI:Setting property pixel encoding to Default

                                                                                                                                                                                                    000951.521: HDMI:Setting property pixel clock type to PAL

                                                                                                                                                                                                    000951.542: HDMI:Setting property content type flag to No data

                                                                                                                                                                                                    000951.560: HDMI:Setting property fuzzy format match to enabled

                                                                                                                                                                                                    001195.292: hdmi: HDMI:>>>>>>>>>>>>>Rx sensed, reading EDID<<<<<<<<<<<<<

                                                                                                                                                                                                    001207.350: hdmi: HDMI:EDID version 1.3, 1 extensions, unknown aspect ratio

                                                                                                                                                                                                    001207.420: hdmi: HDMI:EDID features - videodef 0x80 standby suspend active off; colour encoding:RGB444|YCbCr422; sRGB is not default colourspace; preferred format is not native; does not support GTF

                                                                                                                                                                                                    001207.501: hdmi: HDMI:EDID found preferred DMT detail timing format: 1360x768p @ 60 Hz (39)

                                                                                                                                                                                                    001207.547: hdmi: HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II

                                                                                                                                                                                                    001207.589: hdmi: HDMI:EDID found DMT format: code 5, 640x480p @ 72 Hz in established timing I/II

                                                                                                                                                                                                    001207.630: hdmi: HDMI:EDID found DMT format: code 6, 640x480p @ 75 Hz in established timing I/II

                                                                                                                                                                                                    001207.673: hdmi: HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II

                                                                                                                                                                                                    001207.712: hdmi: HDMI:EDID found DMT format: code 10, 800x600p @ 72 Hz in established timing I/II

                                                                                                                                                                                                    001207.755: hdmi: HDMI:EDID found DMT format: code 11, 800x600p @ 75 Hz in established timing I/II

                                                                                                                                                                                                    001207.798: hdmi: HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II

                                                                                                                                                                                                    001207.841: hdmi: HDMI:EDID found DMT format: code 17, 1024x768p @ 70 Hz in established timing I/II

                                                                                                                                                                                                    001207.881: hdmi: HDMI:EDID found DMT format: code 18, 1024x768p @ 75 Hz in established timing I/II

                                                                                                                                                                                                    001207.978: hdmi: HDMI:EDID standard timings block x 8: 0x0101 0101 0101 0101 0101 0101 0101 0101

                                                                                                                                                                                                    001220.995: hdmi: HDMI:EDID parsing v3 CEA extension 0

                                                                                                                                                                                                    001221.036: hdmi: HDMI:EDID monitor support - underscan IT formats:no, basic audio:yes, yuv444:yes, yuv422:no, #native DTD:1

                                                                                                                                                                                                    001221.080: hdmi: HDMI:EDID found CEA detail timing format: 720x480p @ 60 Hz (2)

                                                                                                                                                                                                    001221.140: hdmi: HDMI:EDID found audio format 2 channels PCM, sample rate: 32|44|48 kHz, sample size: 16|20|24 bits

                                                                                                                                                                                                    001221.161: hdmi: HDMI:EDID found HDMI VSDB length 7

                                                                                                                                                                                                    001221.190: hdmi: HDMI:EDID HDMI VSDB has physical address 2.0.0.0

                                                                                                                                                                                                    001221.214: hdmi: HDMI:EDID HDMI VSDB supports AI:yes, dual link DVI:no

                                                                                                                                                                                                    001221.246: hdmi: HDMI:EDID HDMI VSDB deep colour support - 48-bit:no 36-bit:no 30-bit:no DC_yuv444:no

                                                                                                                                                                                                    001221.270: hdmi: HDMI:EDID HDMI VSDB max TMDS clock 225 MHz

                                                                                                                                                                                                    001221.290: hdmi: HDMI:EDID HDMI VSDB has no latency information

                                                                                                                                                                                                    001221.334: hdmi: HDMI:EDID found CEA format: code 16, 1920x1080p @ 60Hz (native)

                                                                                                                                                                                                    001221.372: hdmi: HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz (native)

                                                                                                                                                                                                    001221.407: hdmi: HDMI:EDID found CEA format: code 2, 720x480p @ 60Hz

                                                                                                                                                                                                    001221.430: hdmi: HDMI:EDID found Video Capability DB length 2

                                                                                                                                                                                                    001221.461: hdmi: HDMI:EDID video capability: CE:3 IT:3 PT:0 QS:0

                                                                                                                                                                                                    001221.503: hdmi: HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023

                                                                                                                                                                                                    001221.634: hdmi: HDMI:EDID preferred mode remained as DMT (39) 1360x768p @ 60 Hz with pixel clock 85 MHz

                                                                                                                                                                                                    001221.656: hdmi: HDMI: hotplug attached with HDMI support

                                                                                                                                                                                                    001221.693: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead

                                                                                                                                                                                                    001224.105: hdmi: HDMI: power_on to DMT mode 1360x768@60

                                                                                                                                                                                                    001227.284: hdmi: HDMI: Action callback added to queue to happen at frame 2

                                                                                                                                                                                                    001227.308: hdmi: HDMI: Action stop_3d_mode added to queue to happen at frame 2

                                                                                                                                                                                                    001227.331: hdmi: HDMI: Action unmute added to queue to happen at frame 3

                                                                                                                                                                                                    001227.357: hdmi: HDMI: Action cec_init added to queue to happen at frame 3

                                                                                                                                                                                                    001279.752: *** Restart logging

                                                                                                                                                                                                    001281.457: Read command line from file 'cmdline.txt'

                                                                                                                                                                                                    dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

                                                                                                                                                                                                    001559.187: Loading 'kernel7.img' to 0x8000 size 0x45d5b0

                                                                                                                                                                                                    001562.845: No kernel trailer (run mkknlimg to fix) - assuming DT-capable

                                                                                                                                                                                                    001569.324: Loading 'bcm2710-rpi-3-b.dtb' to 0x4655b0 size 0x442f

                                                                                                                                                                                                    001581.513: dtdebug: delete_node(/__local_fixups__)

                                                                                                                                                                                                    001590.041: dtdebug: /aliases:i2c_vc=i2c0

                                                                                                                                                                                                    001596.219: dtdebug: /__symbols__:i2c_vc=i2c0

                                                                                                                                                                                                    001601.114: dtdebug: /__overrides__:i2c_vc=i2c0

                                                                                                                                                                                                    001613.506: dtdebug: /__overrides__:i2c_vc_baudrate=i2c0_baudrate

                                                                                                                                                                                                    001618.518: dtdebug: /aliases:i2c=i2c1

                                                                                                                                                                                                    001624.830: dtdebug: /__symbols__:i2c=i2c1

                                                                                                                                                                                                    001629.830: dtdebug: /__overrides__:i2c=i2c1

                                                                                                                                                                                                    001634.875: dtdebug: /aliases:i2c_arm=i2c1

                                                                                                                                                                                                    001641.227: dtdebug: /__symbols__:i2c_arm=i2c1

                                                                                                                                                                                                    001646.265: dtdebug: /__overrides__:i2c_arm=i2c1

                                                                                                                                                                                                    001658.822: dtdebug: /__overrides__:i2c_baudrate=i2c1_baudrate

                                                                                                                                                                                                    001673.781: dtdebug: /__overrides__:i2c_arm_baudrate=i2c1_baudrate

                                                                                                                                                                                                    001673.816: dtparam: uart0_clkrate=48000000

                                                                                                                                                                                                    001677.337: dtdebug: /__overrides__ has no uart0_clkrate property

                                                                                                                                                                                                    001677.350: Unknown dtparam 'uart0_clkrate' - ignored

                                                                                                                                                                                                    001693.781: dtdebug: Failed to open overlay file 'overlays/rpi-cirrus-wm1502.dtbo'

                                                                                                                                                                                                    001704.690: dtdebug: Failed to open overlay file 'overlays/rpi-cirrus-wm1502-overlay.dtb'

                                                                                                                                                                                                    001715.594: dtdebug: Failed to open overlay file 'overlays/rpi-cirrus-wm1502.dtb'

                                                                                                                                                                                                    001715.610: Failed to load overlay 'rpi-cirrus-wm1502'

                                                                                                                                                                                                    001715.716: dtparam: audio=on

                                                                                                                                                                                                    001719.190: dtdebug: Found override audio

                                                                                                                                                                                                    001719.227: dtdebug:   override audio: string target 'status'

                                                                                                                                                                                                    001742.293: dtdebug: /aliases:serial0=uart1

                                                                                                                                                                                                    001747.373: dtdebug: /aliases:serial1=uart0

                                                                                                                                                                                                    001762.536: dtparam: uart1=off

                                                                                                                                                                                                    001765.849: dtdebug: Found override uart1

                                                                                                                                                                                                    001765.885: dtdebug:   override uart1: string target 'status'

                                                                                                                                                                                                    002648.343: dtparam: arm_freq=1200000000

                                                                                                                                                                                                    002651.675: dtdebug: Found override arm_freq

                                                                                                                                                                                                    002651.727: dtdebug:   override arm_freq: cell target clock-frequency @ offset 0 (size 4)

                                                                                                                                                                                                    002662.450: dtdebug:   override arm_freq: cell target clock-frequency @ offset 0 (size 4)

                                                                                                                                                                                                    002673.250: dtdebug:   override arm_freq: cell target clock-frequency @ offset 0 (size 4)

                                                                                                                                                                                                    002684.136: dtdebug:   override arm_freq: cell target clock-frequency @ offset 0 (size 4)

                                                                                                                                                                                                    002695.132: dtparam: core_freq=400000000

                                                                                                                                                                                                    002698.694: dtdebug: /__overrides__ has no core_freq property

                                                                                                                                                                                                    002698.708: Unknown dtparam 'core_freq' - ignored

                                                                                                                                                                                                    002698.727: dtparam: cache_line_size=64

                                                                                                                                                                                                    002702.022: dtdebug: Found override cache_line_size

                                                                                                                                                                                                    002702.071: dtdebug:   override cache_line_size: cell target cache-line-size @ offset 0 (size 4)

                                                                                                                                                                                                    002721.339: dtdebug: delete_node(/hat)

                                                                                                                                                                                                    002729.440: Device tree loaded to 0x2effb700 (size 0x4856)

                                                                                                                                                                                                    002735.006: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined

                                                                                                                                                                                                    004132.356: vchiq_core: vchiq_init_state: slot_zero = 0xfa980000, is_master = 1

                                                                                                                                                                                                    004136.802: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead

                                                                                                                                                                                                    004142.295: TV service:host side not connected, dropping notification 0x00000002, 0x00000002, 0x00000027

                                                                                                                                                                                                     

                                                                                                                                                                                                    ###dmesg###

                                                                                                                                                                                                    [    0.000000] Booting Linux on physical CPU 0x0

                                                                                                                                                                                                    [    0.000000] Linux version 4.9.13-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #974 SMP Wed Mar 1 20:09:48 GMT 2017

                                                                                                                                                                                                    [    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d

                                                                                                                                                                                                    [    0.000000] CPU: div instructions available: patching division code

                                                                                                                                                                                                    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

                                                                                                                                                                                                    [    0.000000] OF: fdt:Machine model: Raspberry Pi 3 Model B Rev 1.2

                                                                                                                                                                                                    [    0.000000] cma: Reserved 8 MiB at 0x3a800000

                                                                                                                                                                                                    [    0.000000] Memory policy: Data cache writealloc

                                                                                                                                                                                                    [    0.000000] On node 0 totalpages: 241664

                                                                                                                                                                                                    [    0.000000] free_area_init_node: node 0, pgdat 80c6ed80, node_mem_map b9faa000

                                                                                                                                                                                                    [    0.000000]   Normal zone: 2124 pages used for memmap

                                                                                                                                                                                                    [    0.000000]   Normal zone: 0 pages reserved

                                                                                                                                                                                                    [    0.000000]   Normal zone: 241664 pages, LIFO batch:31

                                                                                                                                                                                                    [    0.000000] percpu: Embedded 14 pages/cpu @b9f64000 s25600 r8192 d23552 u57344

                                                                                                                                                                                                    [    0.000000] pcpu-alloc: s25600 r8192 d23552 u57344 alloc=14*4096

                                                                                                                                                                                                    [    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3

                                                                                                                                                                                                    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 239540

                                                                                                                                                                                                    [    0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=1360 bcm2708_fb.fbheight=768 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

                                                                                                                                                                                                    [    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)

                                                                                                                                                                                                    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

                                                                                                                                                                                                    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

                                                                                                                                                                                                    [    0.000000] Memory: 936304K/966656K available (7168K kernel code, 483K rwdata, 2012K rodata, 1024K init, 778K bss, 22160K reserved, 8192K cma-reserved)

                                                                                                                                                                                                    [    0.000000] Virtual kernel memory layout:

                                                                                                                                                                                                        vector  : 0xffff0000 - 0xffff1000   (   4 kB)

                                                                                                                                                                                                        fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

                                                                                                                                                                                                        vmalloc : 0xbb800000 - 0xff800000   (1088 MB)

                                                                                                                                                                                                        lowmem  : 0x80000000 - 0xbb000000   ( 944 MB)

                                                                                                                                                                                                        modules : 0x7f000000 - 0x80000000   (  16 MB)

                                                                                                                                                                                                          .text : 0x80008000 - 0x80800000   (8160 kB)

                                                                                                                                                                                                          .init : 0x80b00000 - 0x80c00000   (1024 kB)

                                                                                                                                                                                                          .data : 0x80c00000 - 0x80c78f6c   ( 484 kB)

                                                                                                                                                                                                           .bss : 0x80c7a000 - 0x80d3cb64   ( 779 kB)

                                                                                                                                                                                                    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1

                                                                                                                                                                                                    [    0.000000] Hierarchical RCU implementation.

                                                                                                                                                                                                    [    0.000000] Build-time adjustment of leaf fanout to 32.

                                                                                                                                                                                                    [    0.000000] NR_IRQS:16 nr_irqs:16 16

                                                                                                                                                                                                    [    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 19.20MHz (phys).

                                                                                                                                                                                                    [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns

                                                                                                                                                                                                    [    0.000008] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns

                                                                                                                                                                                                    [    0.000021] Switching to timer-based delay loop, resolution 52ns

                                                                                                                                                                                                    [    0.000323] Console: colour dummy device 80x30

                                                                                                                                                                                                    [    0.000343] console [tty1] enabled

                                                                                                                                                                                                    [    0.000368] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)

                                                                                                                                                                                                    [    0.000385] pid_max: default: 32768 minimum: 301

                                                                                                                                                                                                    [    0.000718] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)

                                                                                                                                                                                                    [    0.000728] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)

                                                                                                                                                                                                    [    0.001707] Disabling cpuset control group subsystem

                                                                                                                                                                                                    [    0.001868] CPU: Testing write buffer coherency: ok

                                                                                                                                                                                                    [    0.001911] ftrace: allocating 22388 entries in 66 pages

                                                                                                                                                                                                    [    0.053391] CPU0: update cpu_capacity 1024

                                                                                                                                                                                                    [    0.053406] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000

                                                                                                                                                                                                    [    0.053478] Setting up static identity map for 0x100000 - 0x100034

                                                                                                                                                                                                    [    0.055729] CPU1: update cpu_capacity 1024

                                                                                                                                                                                                    [    0.055737] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001

                                                                                                                                                                                                    [    0.056469] CPU2: update cpu_capacity 1024

                                                                                                                                                                                                    [    0.056476] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002

                                                                                                                                                                                                    [    0.057153] CPU3: update cpu_capacity 1024

                                                                                                                                                                                                    [    0.057159] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003

                                                                                                                                                                                                    [    0.057243] Brought up 4 CPUs

                                                                                                                                                                                                    [    0.057253] SMP: Total of 4 processors activated (153.60 BogoMIPS).

                                                                                                                                                                                                    [    0.057257] CPU: All CPU(s) started in HYP mode.

                                                                                                                                                                                                    [    0.057261] CPU: Virtualization extensions available.

                                                                                                                                                                                                    [    0.058054] devtmpfs: initialized

                                                                                                                                                                                                    [    0.069480] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4

                                                                                                                                                                                                    [    0.069763] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

                                                                                                                                                                                                    [    0.069780] futex hash table entries: 1024 (order: 4, 65536 bytes)

                                                                                                                                                                                                    [    0.070322] pinctrl core: initialized pinctrl subsystem

                                                                                                                                                                                                    [    0.071224] NET: Registered protocol family 16

                                                                                                                                                                                                    [    0.073604] DMA: preallocated 1024 KiB pool for atomic coherent allocations

                                                                                                                                                                                                    [    0.082811] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.

                                                                                                                                                                                                    [    0.082817] hw-breakpoint: maximum watchpoint size is 8 bytes.

                                                                                                                                                                                                    [    0.082964] Serial: AMBA PL011 UART driver

                                                                                                                                                                                                    [    0.086588] bcm2835-mbox 3f00b880.mailbox: mailbox enabled

                                                                                                                                                                                                    [    0.087116] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe

                                                                                                                                                                                                    [    0.164009] bcm2835-dma 3f007000.dma: DMA legacy API manager at bb80f000, dmachans=0x1

                                                                                                                                                                                                    [    0.165854] SCSI subsystem initialized

                                                                                                                                                                                                    [    0.166008] usbcore: registered new interface driver usbfs

                                                                                                                                                                                                    [    0.166090] usbcore: registered new interface driver hub

                                                                                                                                                                                                    [    0.166182] usbcore: registered new device driver usb

                                                                                                                                                                                                    [    0.172957] raspberrypi-firmware soc:firmware: Attached to firmware from 2017-03-02 15:32

                                                                                                                                                                                                    [    0.174485] clocksource: Switched to clocksource arch_sys_counter

                                                                                                                                                                                                    [    0.221410] VFS: Disk quotas dquot_6.6.0

                                                                                                                                                                                                    [    0.221484] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

                                                                                                                                                                                                    [    0.221683] FS-Cache: Loaded

                                                                                                                                                                                                    [    0.221927] CacheFiles: Loaded

                                                                                                                                                                                                    [    0.234330] NET: Registered protocol family 2

                                                                                                                                                                                                    [    0.235224] TCP established hash table entries: 8192 (order: 3, 32768 bytes)

                                                                                                                                                                                                    [    0.235333] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)

                                                                                                                                                                                                    [    0.235518] TCP: Hash tables configured (established 8192 bind 8192)

                                                                                                                                                                                                    [    0.235605] UDP hash table entries: 512 (order: 2, 16384 bytes)

                                                                                                                                                                                                    [    0.235646] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)

                                                                                                                                                                                                    [    0.235856] NET: Registered protocol family 1

                                                                                                                                                                                                    [    0.236259] RPC: Registered named UNIX socket transport module.

                                                                                                                                                                                                    [    0.236265] RPC: Registered udp transport module.

                                                                                                                                                                                                    [    0.236269] RPC: Registered tcp transport module.

                                                                                                                                                                                                    [    0.236273] RPC: Registered tcp NFSv4.1 backchannel transport module.

                                                                                                                                                                                                    [    0.237330] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available

                                                                                                                                                                                                    [    0.239642] workingset: timestamp_bits=14 max_order=18 bucket_order=4

                                                                                                                                                                                                    [    0.256234] FS-Cache: Netfs 'nfs' registered for caching

                                                                                                                                                                                                    [    0.257222] NFS: Registering the id_resolver key type

                                                                                                                                                                                                    [    0.257249] Key type id_resolver registered

                                                                                                                                                                                                    [    0.257254] Key type id_legacy registered

                                                                                                                                                                                                    [    0.259712] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)

                                                                                                                                                                                                    [    0.259815] io scheduler noop registered

                                                                                                                                                                                                    [    0.259821] io scheduler deadline registered (default)

                                                                                                                                                                                                    [    0.260133] io scheduler cfq registered

                                                                                                                                                                                                    [    0.265892] BCM2708FB: allocated DMA memory fa910000

                                                                                                                                                                                                    [    0.265916] BCM2708FB: allocated DMA channel 0 @ bb80f000

                                                                                                                                                                                                    [    0.295471] Console: switching to colour frame buffer device 170x48

                                                                                                                                                                                                    [    0.314053] bcm2835-rng 3f104000.rng: hwrng registered

                                                                                                                                                                                                    [    0.314159] vc-cma: Videocore CMA driver

                                                                                                                                                                                                    [    0.314167] vc-cma: vc_cma_base      = 0x00000000

                                                                                                                                                                                                    [    0.314172] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)

                                                                                                                                                                                                    [    0.314177] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)

                                                                                                                                                                                                    [    0.314384] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)

                                                                                                                                                                                                    [    0.329966] brd: module loaded

                                                                                                                                                                                                    [    0.339021] loop: module loaded

                                                                                                                                                                                                    [    0.339034] Loading iSCSI transport class v2.0-870.

                                                                                                                                                                                                    [    0.339637] usbcore: registered new interface driver smsc95xx

                                                                                                                                                                                                    [    0.339652] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)

                                                                                                                                                                                                    [    0.565711] Core Release: 2.80a

                                                                                                                                                                                                    [    0.565721] Setting default values for core params

                                                                                                                                                                                                    [    0.565750] Finished setting default values for core params

                                                                                                                                                                                                    [    0.766149] Using Buffer DMA mode

                                                                                                                                                                                                    [    0.766154] Periodic Transfer Interrupt Enhancement - disabled

                                                                                                                                                                                                    [    0.766159] Multiprocessor Interrupt Enhancement - disabled

                                                                                                                                                                                                    [    0.766164] OTG VER PARAM: 0, OTG VER FLAG: 0

                                                                                                                                                                                                    [    0.766178] Dedicated Tx FIFOs mode

                                                                                                                                                                                                    [    0.766526] WARN::dwc_otg_hcd_init:1053: FIQ DMA bounce buffers: virt = 0xba904000 dma = 0xfa904000 len=9024

                                                                                                                                                                                                    [    0.766550] FIQ FSM acceleration enabled for :

                                                                                                                                                                                                    Non-periodic Split Transactions

                                                                                                                                                                                                    Periodic Split Transactions

                                                                                                                                                                                                    High-Speed Isochronous Endpoints

                                                                                                                                                                                                    Interrupt/Control Split Transaction hack enabled

                                                                                                                                                                                                    [    0.766556] dwc_otg: Microframe scheduler enabled

                                                                                                                                                                                                    [    0.766605] WARN::hcd_init_fiq:459: FIQ on core 1 at 0x8058e200

                                                                                                                                                                                                    [    0.766614] WARN::hcd_init_fiq:460: FIQ ASM at 0x8058e570 length 36

                                                                                                                                                                                                    [    0.766625] WARN::hcd_init_fiq:486: MPHI regs_base at 0xbb87c000

                                                                                                                                                                                                    [    0.766683] dwc_otg 3f980000.usb: DWC OTG Controller

                                                                                                                                                                                                    [    0.766718] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1

                                                                                                                                                                                                    [    0.766749] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000

                                                                                                                                                                                                    [    0.766796] Init: Port Power? op_state=1

                                                                                                                                                                                                    [    0.766800] Init: Power Port (0)

                                                                                                                                                                                                    [    0.767008] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

                                                                                                                                                                                                    [    0.767018] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

                                                                                                                                                                                                    [    0.767027] usb usb1: Product: DWC OTG Controller

                                                                                                                                                                                                    [    0.767034] usb usb1: Manufacturer: Linux 4.9.13-v7+ dwc_otg_hcd

                                                                                                                                                                                                    [    0.767042] usb usb1: SerialNumber: 3f980000.usb

                                                                                                                                                                                                    [    0.767902] hub 1-0:1.0: USB hub found

                                                                                                                                                                                                    [    0.767942] hub 1-0:1.0: 1 port detected

                                                                                                                                                                                                    [    0.768641] dwc_otg: FIQ enabled

                                                                                                                                                                                                    [    0.768646] dwc_otg: NAK holdoff enabled

                                                                                                                                                                                                    [    0.768650] dwc_otg: FIQ split-transaction FSM enabled

                                                                                                                                                                                                    [    0.768664] Module dwc_common_port init

                                                                                                                                                                                                    [    0.768900] usbcore: registered new interface driver usb-storage

                                                                                                                                                                                                    [    0.769132] mousedev: PS/2 mouse device common for all mice

                                                                                                                                                                                                    [    0.770152] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer

                                                                                                                                                                                                    [    0.770427] bcm2835-cpufreq: min=600000 max=1200000

                                                                                                                                                                                                    [    0.770816] sdhci: Secure Digital Host Controller Interface driver

                                                                                                                                                                                                    [    0.770821] sdhci: Copyright(c) Pierre Ossman

                                                                                                                                                                                                    [    0.771199] sdhost: log_buf @ ba907000 (fa907000)

                                                                                                                                                                                                    [    0.844520] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)

                                                                                                                                                                                                    [    0.866852] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0

                                                                                                                                                                                                    [    0.866860] mmc-bcm2835 3f300000.mmc: DMA channel allocated

                                                                                                                                                                                                    [    0.911676] mmc0: host does not support reading read-only switch, assuming write-enable

                                                                                                                                                                                                    [    0.913638] mmc0: new high speed SDHC card at address 0007

                                                                                                                                                                                                    [    0.914249] mmcblk0: mmc0:0007 SD16G 14.5 GiB

                                                                                                                                                                                                    [    0.915778]  mmcblk0: p1 p2

                                                                                                                                                                                                    [    0.924629] sdhci-pltfm: SDHCI platform and OF driver helper

                                                                                                                                                                                                    [    0.932440] ledtrig-cpu: registered to indicate activity on CPUs

                                                                                                                                                                                                    [    0.940721] hidraw: raw HID events driver (C) Jiri Kosina

                                                                                                                                                                                                    [    0.940902] usbcore: registered new interface driver usbhid

                                                                                                                                                                                                    [    0.940906] usbhid: USB HID core driver

                                                                                                                                                                                                    [    0.941684] vchiq: vchiq_init_state: slot_zero = 0xba980000, is_master = 0

                                                                                                                                                                                                    [    0.943457] Initializing XFRM netlink socket

                                                                                                                                                                                                    [    0.943480] NET: Registered protocol family 17

                                                                                                                                                                                                    [    0.943593] Key type dns_resolver registered

                                                                                                                                                                                                    [    0.944106] Registering SWP/SWPB emulation handler

                                                                                                                                                                                                    [    0.944929] registered taskstats version 1

                                                                                                                                                                                                    [    0.948144] vc-sm: Videocore shared memory driver

                                                                                                                                                                                                    [    0.948154] [vc_sm_connected_init]: start

                                                                                                                                                                                                    [    0.948192] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)

                                                                                                                                                                                                    [    0.949753] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

                                                                                                                                                                                                    [    0.951300] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

                                                                                                                                                                                                    [    0.952423] [vc_sm_connected_init]: end - returning 0

                                                                                                                                                                                                    [    0.953610] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2

                                                                                                                                                                                                    [    0.953955] of_cfs_init

                                                                                                                                                                                                    [    0.954040] of_cfs_init: OK

                                                                                                                                                                                                    [    0.955804] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)

                                                                                                                                                                                                    [    0.970761] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)

                                                                                                                                                                                                    [    0.970804] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.

                                                                                                                                                                                                    [    0.980624] devtmpfs: mounted

                                                                                                                                                                                                    [    0.982469] Freeing unused kernel memory: 1024K (80b00000 - 80c00000)

                                                                                                                                                                                                    [    0.984617] Indeed it is in host mode hprt0 = 00021501

                                                                                                                                                                                                    [    1.049155] random: fast init done

                                                                                                                                                                                                    [    1.112688] mmc1: new high speed SDIO card at address 0001

                                                                                                                                                                                                    [    1.184543] usb 1-1: new high-speed USB device number 2 using dwc_otg

                                                                                                                                                                                                    [    1.184697] Indeed it is in host mode hprt0 = 00001101

                                                                                                                                                                                                    [    1.272693] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)

                                                                                                                                                                                                    [    1.273042] systemd[1]: Detected architecture 'arm'.

                                                                                                                                                                                                    [    1.401917] NET: Registered protocol family 10

                                                                                                                                                                                                    [    1.403356] systemd[1]: Inserted module 'ipv6'

                                                                                                                                                                                                    [    1.405107] systemd[1]: Set hostname to <SonicPi>.

                                                                                                                                                                                                    [    1.414847] usb 1-1: New USB device found, idVendor=0424, idProduct=9514

                                                                                                                                                                                                    [    1.414862] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

                                                                                                                                                                                                    [    1.415698] hub 1-1:1.0: USB hub found

                                                                                                                                                                                                    [    1.415792] hub 1-1:1.0: 5 ports detected

                                                                                                                                                                                                    [    1.744540] usb 1-1.1: new high-speed USB device number 3 using dwc_otg

                                                                                                                                                                                                    [    1.797914] systemd[1]: Cannot add dependency job for unit regenerate_ssh_host_keys.service, ignoring: Unit regenerate_ssh_host_keys.service failed to load: No such file or directory.

                                                                                                                                                                                                    [    1.801197] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.

                                                                                                                                                                                                    [    1.801534] systemd[1]: Started Forward Password Requests to Wall Directory Watch.

                                                                                                                                                                                                    [    1.801606] systemd[1]: Starting Remote File Systems (Pre).

                                                                                                                                                                                                    [    1.801765] systemd[1]: Reached target Remote File Systems (Pre).

                                                                                                                                                                                                    [    1.801910] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.

                                                                                                                                                                                                    [    1.894872] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00

                                                                                                                                                                                                    [    1.894888] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

                                                                                                                                                                                                    [    1.897845] smsc95xx v1.0.5

                                                                                                                                                                                                    [    1.990568] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:15:f5:5a

                                                                                                                                                                                                    [    2.021304] fuse init (API version 7.26)

                                                                                                                                                                                                    [    2.070018] i2c /dev entries driver

                                                                                                                                                                                                    [    2.084570] usb 1-1.4: new low-speed USB device number 4 using dwc_otg

                                                                                                                                                                                                    [    2.211902] systemd-udevd[141]: starting version 215

                                                                                                                                                                                                    [    2.233076] usb 1-1.4: New USB device found, idVendor=413c, idProduct=2003

                                                                                                                                                                                                    [    2.233092] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0

                                                                                                                                                                                                    [    2.233100] usb 1-1.4: Product: Dell USB Keyboard

                                                                                                                                                                                                    [    2.233108] usb 1-1.4: Manufacturer: Dell

                                                                                                                                                                                                    [    2.253828] input: Dell Dell USB Keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:413C:2003.0001/input/input0

                                                                                                                                                                                                    [    2.324702] hid-generic 0003:413C:2003.0001: input,hidraw0: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-3f980000.usb-1.4/input0

                                                                                                                                                                                                    [    2.424641] usb 1-1.5: new low-speed USB device number 5 using dwc_otg

                                                                                                                                                                                                    [    2.564158] usb 1-1.5: New USB device found, idVendor=413c, idProduct=3010

                                                                                                                                                                                                    [    2.564181] usb 1-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0

                                                                                                                                                                                                    [    2.576889] input: HID 413c:3010 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:413C:3010.0002/input/input1

                                                                                                                                                                                                    [    2.577434] hid-generic 0003:413C:3010.0002: input,hidraw1: USB HID v1.00 Mouse [HID 413c:3010] on usb-3f980000.usb-1.5/input0

                                                                                                                                                                                                    [    2.915471] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

                                                                                                                                                                                                    [    3.775813] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000

                                                                                                                                                                                                    [    4.038983] usbcore: registered new interface driver brcmfmac

                                                                                                                                                                                                    [    4.195976] brcmfmac: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7

                                                                                                                                                                                                    [    4.493157] systemd-journald[126]: Received request to flush runtime journal from PID 1

                                                                                                                                                                                                    [    6.478415] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

                                                                                                                                                                                                    [    6.478468] brcmfmac: power management disabled

                                                                                                                                                                                                    [    6.544853] uart-pl011 3f201000.serial: no DMA platform data

                                                                                                                                                                                                    [    6.837437] Adding 102396k swap on /var/swap.  Priority:-1 extents:3 across:208896k SSFS

                                                                                                                                                                                                    [    7.445730] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup

                                                                                                                                                                                                    [    7.446086] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

                                                                                                                                                                                                    [    7.751172] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

                                                                                                                                                                                                    [    8.659119] IPv6: wlan0: IPv6 duplicate address fe80::b9bc:f350:f578:952c detected!

                                                                                                                                                                                                    [   11.177445] Bluetooth: Core ver 2.22

                                                                                                                                                                                                    [   11.177494] NET: Registered protocol family 31

                                                                                                                                                                                                    [   11.177497] Bluetooth: HCI device and connection manager initialized

                                                                                                                                                                                                    [   11.177630] Bluetooth: HCI socket layer initialized

                                                                                                                                                                                                    [   11.177641] Bluetooth: L2CAP socket layer initialized

                                                                                                                                                                                                    [   11.177661] Bluetooth: SCO socket layer initialized

                                                                                                                                                                                                    [   11.191235] Bluetooth: HCI UART driver ver 2.3

                                                                                                                                                                                                    [   11.191242] Bluetooth: HCI UART protocol H4 registered

                                                                                                                                                                                                    [   11.191245] Bluetooth: HCI UART protocol Three-wire (H5) registered

                                                                                                                                                                                                    [   11.191351] Bluetooth: HCI UART protocol Broadcom registered

                                                                                                                                                                                                    [   11.482577] Bluetooth: BNEP (Ethernet Emulation) ver 1.3

                                                                                                                                                                                                    [   11.482584] Bluetooth: BNEP filters: protocol multicast

                                                                                                                                                                                                    [   11.482597] Bluetooth: BNEP socket layer initialized

                                                                                                                                                                                                    [   32.888357] random: crng init done

                                                                                                                                                                                                     

                                                                                                                                                                                                    ###lsmod###

                                                                                                                                                                                                    Module                  Size  Used by

                                                                                                                                                                                                    bnep                   12051  2

                                                                                                                                                                                                    hci_uart               19956  1

                                                                                                                                                                                                    btbcm                   7916  1 hci_uart

                                                                                                                                                                                                    bluetooth             365511  22 hci_uart,bnep,btbcm

                                                                                                                                                                                                    brcmfmac              222720  0

                                                                                                                                                                                                    brcmutil                9092  1 brcmfmac

                                                                                                                                                                                                    cfg80211              542899  1 brcmfmac

                                                                                                                                                                                                    evdev                  12423  4

                                                                                                                                                                                                    rfkill                 20851  4 bluetooth,cfg80211

                                                                                                                                                                                                    snd_bcm2835            24427  1

                                                                                                                                                                                                    snd_pcm                97226  1 snd_bcm2835

                                                                                                                                                                                                    snd_timer              23840  1 snd_pcm

                                                                                                                                                                                                    snd                    70032  5 snd_timer,snd_bcm2835,snd_pcm

                                                                                                                                                                                                    bcm2835_gpiomem         3940  0

                                                                                                                                                                                                    uio_pdrv_genirq         3923  0

                                                                                                                                                                                                    uio                    10204  1 uio_pdrv_genirq

                                                                                                                                                                                                    fixed                   3285  0

                                                                                                                                                                                                    i2c_dev                 6913  0

                                                                                                                                                                                                    fuse                   99603  3

                                                                                                                                                                                                    ipv6                  406215  58

                                                                                                                                                                                                     

                                                                                                                                                                                                    ###aplay -1###

                                                                                                                                                                                                     

                                                                                                                                                                                                    pi@SonicPi:~ $ aplay -1

                                                                                                                                                                                                    aplay: invalid option -- '1'

                                                                                                                                                                                                    Try `aplay --help' for more information.

                                                                                                                                                                                                    • 100. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                      0d0a

                                                                                                                                                                                                      IT looks Like your output goes to hdmi

                                                                                                                                                                                                       

                                                                                                                                                                                                      the white rider

                                                                                                                                                                                                      (Het leuke van ... is

                                                                                                                                                                                                      • 101. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                        jezzas

                                                                                                                                                                                                        Hi Michel,

                                                                                                                                                                                                         

                                                                                                                                                                                                        Thank you for the quick reply, am I to assume you are looking at the config.txt part of my original post as I only see that HDMI has been commented out. What do I do to stop the output to HDMI?

                                                                                                                                                                                                         

                                                                                                                                                                                                        Jerry

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

                                                                                                                                                                                                          Hi Jerry!

                                                                                                                                                                                                          Thank you for the quick reply, am I to assume you are looking at the config.txt part of my original post as I only see that HDMI has been commented out. What do I do to stop the output to HDMI?

                                                                                                                                                                                                           

                                                                                                                                                                                                          Comment out (or remove) the "dtparam=audio=on" line at the end of config txt, then the only audio device in your system will be the cirrus card.

                                                                                                                                                                                                           

                                                                                                                                                                                                          Edit: ah, and you seem to have a typo in the dtoverlay=rpi-cirrus-wm5102 line (you have 1502 there instead of 5102) - so the cirrus driver won't load at all.

                                                                                                                                                                                                           

                                                                                                                                                                                                          so long,

                                                                                                                                                                                                           

                                                                                                                                                                                                          Hias

                                                                                                                                                                                                          1 of 1 people found this helpful
                                                                                                                                                                                                          • 103. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                            jezzas

                                                                                                                                                                                                            Hi Hias,

                                                                                                                                                                                                            I am really frustrated now as I removed "dtparam=audio=on" completely and after a reboot the sound card wasn't seen (red X over the sound icon in Jessie). I put the line back and obviously the onboard card was seen.

                                                                                                                                                                                                             

                                                                                                                                                                                                            Just so I am not going completely mad can you confirm the correct syntax to start these please?

                                                                                                                                                                                                             

                                                                                                                                                                                                            ./Reset_paths.sh
                                                                                                                                                                                                            ./Playback_to_Lineout.sh
                                                                                                                                                                                                            ./Playback_to_SPDIF.sh
                                                                                                                                                                                                            ./Record_from_Linein.sh

                                                                                                                                                                                                             

                                                                                                                                                                                                            I apologise for the nooby question but it is the only thing I can think of that is not working after going line by line on the instructions.

                                                                                                                                                                                                             

                                                                                                                                                                                                            Jerry

                                                                                                                                                                                                            • 104. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                              0d0a

                                                                                                                                                                                                              hiassoft noted a typo in your load statement. See his reply for detail!| Check also if alsamixer has the right board selected (after implementing hiassoft's answers!

                                                                                                                                                                                                              • 105. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                jezzas

                                                                                                                                                                                                                Thanks Michel,

                                                                                                                                                                                                                 

                                                                                                                                                                                                                I had made the changes to the typo and it still didn't work. I think I am over my head with his as I naively thought it straight forward as your instructions are really good. I will have one more go but my skills are (obviously) not up to this as I am unsure what I have to do to check if "alsamixer has the right board selected"

                                                                                                                                                                                                                 

                                                                                                                                                                                                                Thank you both for your patience.

                                                                                                                                                                                                                 

                                                                                                                                                                                                                Jerry

                                                                                                                                                                                                                • 106. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                  0d0a

                                                                                                                                                                                                                  In alsamixer you Will see THE selected card in the left top

                                                                                                                                                                                                                   

                                                                                                                                                                                                                   

                                                                                                                                                                                                                  the white rider

                                                                                                                                                                                                                  (Het leuke van ... is

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

                                                                                                                                                                                                                    You can also type "aplay -l" to see the list of installed soundcards. It should look like this:

                                                                                                                                                                                                                     

                                                                                                                                                                                                                    pi@raspberrypi:~ $ aplay -l
                                                                                                                                                                                                                    **** List of PLAYBACK Hardware Devices ****
                                                                                                                                                                                                                    card 0: RPiCirrus [RPi-Cirrus], device 0: WM5102 AiFi wm5102-aif1-0 []
                                                                                                                                                                                                                      Subdevices: 1/1
                                                                                                                                                                                                                      Subdevice #0: subdevice #0
                                                                                                                                                                                                                    

                                                                                                                                                                                                                     

                                                                                                                                                                                                                    so long,

                                                                                                                                                                                                                     

                                                                                                                                                                                                                    Hias

                                                                                                                                                                                                                    1 of 1 people found this helpful
                                                                                                                                                                                                                    • 108. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                      jezzas

                                                                                                                                                                                                                      Thank you for your help, I have discovered that the sound card is broken (tested it on one at work)

                                                                                                                                                                                                                       

                                                                                                                                                                                                                      Jerry

                                                                                                                                                                                                                      1 of 1 people found this helpful
                                                                                                                                                                                                                      • 109. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                        0d0a

                                                                                                                                                                                                                        That is a pity ..

                                                                                                                                                                                                                         

                                                                                                                                                                                                                        the white rider

                                                                                                                                                                                                                        (Het leuke van ... is

                                                                                                                                                                                                                        • 110. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                          linovonburg

                                                                                                                                                                                                                          Hi Hias

                                                                                                                                                                                                                           

                                                                                                                                                                                                                          First of all, thank you for fixing and maintaining these drivers. After spending a few days trying to get my Wolfson Audio Board and Raspberry Pi B to work together, it seems that Wolfson and after that Cirrus Logic both dropped the ball hard on this one...

                                                                                                                                                                                                                           

                                                                                                                                                                                                                          I installed the most recent Raspbian image to my SD and then updated that with `rpi-update` to kernel 4.9.13+.

                                                                                                                                                                                                                          Then I configured everything as layed out in your tutorial.

                                                                                                                                                                                                                           

                                                                                                                                                                                                                          Unfortunately, `aplay -l` just tells me `no soundcards found...`.

                                                                                                                                                                                                                           

                                                                                                                                                                                                                          I doubt that the problem is a defective card, since I tried two different ones with the same result.

                                                                                                                                                                                                                           

                                                                                                                                                                                                                          Here you can find the various logs:

                                                                                                                                                                                                                          config.txt: http://paste.ubuntu.com/24131932/

                                                                                                                                                                                                                          vcgencmd version: http://paste.ubuntu.com/24131739/

                                                                                                                                                                                                                          vcdbg log msg: http://paste.ubuntu.com/24131740/

                                                                                                                                                                                                                          dmesg: http://paste.ubuntu.com/24131742/

                                                                                                                                                                                                                          lsmod: http://paste.ubuntu.com/24131744/

                                                                                                                                                                                                                          aplay -l: http://paste.ubuntu.com/24131746/

                                                                                                                                                                                                                          /etc/modprobe.d/cirrus.conf: http://paste.ubuntu.com/24131950/

                                                                                                                                                                                                                           

                                                                                                                                                                                                                          Do you have an idea what is wrong here?

                                                                                                                                                                                                                           

                                                                                                                                                                                                                          Thank you and best regards,

                                                                                                                                                                                                                          Lino

                                                                                                                                                                                                                          • 111. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                            jezzas

                                                                                                                                                                                                                            Hi again,

                                                                                                                                                                                                                             

                                                                                                                                                                                                                            Moved forward somewhat from my last attempt and I now have the sound card available in alsamixer, with aplay -l I have:

                                                                                                                                                                                                                             

                                                                                                                                                                                                                            pi@raspberrypi:/etc/modprobe.d $ aplay -l

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

                                                                                                                                                                                                                            card 0: RPiCirrus [RPi-Cirrus], device 0: WM5102 AiFi wm5102-aif1-0 []

                                                                                                                                                                                                                              Subdevices: 1/1

                                                                                                                                                                                                                              Subdevice #0: subdevice #0

                                                                                                                                                                                                                             

                                                                                                                                                                                                                            Which seems to be the same as other people but I am getting no sound out of if. I tried:

                                                                                                                                                                                                                             

                                                                                                                                                                                                                            pi@raspberrypi:~ $ aplay police_s.wav

                                                                                                                                                                                                                            Playing WAVE 'police_s.wav' : Unsigned 8 bit, Rate 22000 Hz, Mono

                                                                                                                                                                                                                            aplay: set_params:1233: Sample format non available

                                                                                                                                                                                                                            Available formats:

                                                                                                                                                                                                                            - S16_LE

                                                                                                                                                                                                                            - S24_LE

                                                                                                                                                                                                                            - S32_LE

                                                                                                                                                                                                                            and have tried all different examples of text to put into my .asoundrc file to no avail, what is the default I would need to do to get a sample wav file to play?

                                                                                                                                                                                                                             

                                                                                                                                                                                                                            I am using Linux version 4.9.13-v7 on a RaspberryPi

                                                                                                                                                                                                                             

                                                                                                                                                                                                                            Thanks

                                                                                                                                                                                                                             

                                                                                                                                                                                                                            Jerry

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

                                                                                                                                                                                                                              Which seems to be the same as other people but I am getting no sound out of if. I tried:

                                                                                                                                                                                                                               

                                                                                                                                                                                                                              pi@raspberrypi:~ $ aplay police_s.wav

                                                                                                                                                                                                                              Playing WAVE 'police_s.wav' : Unsigned 8 bit, Rate 22000 Hz, Mono

                                                                                                                                                                                                                              aplay: set_params:1233: Sample format non available

                                                                                                                                                                                                                              Available formats:

                                                                                                                                                                                                                              - S16_LE

                                                                                                                                                                                                                              - S24_LE

                                                                                                                                                                                                                              - S32_LE

                                                                                                                                                                                                                              and have tried all different examples of text to put into my .asoundrc file to no avail, what is the default I would need to do to get a sample wav file to play?

                                                                                                                                                                                                                              Remove your .asoundrc, then it'll work out of the box:

                                                                                                                                                                                                                              pi@raspberrypi:~/audiotest $ aplay 440hz-22050-mono-8bit.wav
                                                                                                                                                                                                                              Playing WAVE '440hz-22050-mono-8bit.wav' : Unsigned 8 bit, Rate 22000 Hz, Mono
                                                                                                                                                                                                                              pi@raspberrypi:~/audiotest $
                                                                                                                                                                                                                              

                                                                                                                                                                                                                               

                                                                                                                                                                                                                              The hardware doesn't support 8-bit mono audio and the plughw alsa plugin (which is enabled by default) will automatically convert any sample format/rate and channel formats not supported by the hardware to something appropriate - use "aplay -v ..." to see which backend format is being used.

                                                                                                                                                                                                                               

                                                                                                                                                                                                                              You probably have changed the default device from "plughw" to "hw", in this case you can only play files with formats supported by the hardware:

                                                                                                                                                                                                                              pi@raspberrypi:~/audiotest $ aplay -Dhw:0 440hz-22050-mono-8bit.wav
                                                                                                                                                                                                                              Playing WAVE '440hz-22050-mono-8bit.wav' : Unsigned 8 bit, Rate 22000 Hz, Mono
                                                                                                                                                                                                                              aplay: set_params:1233: Sample format non available
                                                                                                                                                                                                                              Available formats:
                                                                                                                                                                                                                              - S16_LE
                                                                                                                                                                                                                              - S24_LE
                                                                                                                                                                                                                              - S32_LE
                                                                                                                                                                                                                              pi@raspberrypi:~/audiotest $ aplay -Dplughw:0 440hz-22050-mono-8bit.wav
                                                                                                                                                                                                                              Playing WAVE '440hz-22050-mono-8bit.wav' : Unsigned 8 bit, Rate 22000 Hz, Mono
                                                                                                                                                                                                                              pi@raspberrypi:~/audiotest $
                                                                                                                                                                                                                              

                                                                                                                                                                                                                               

                                                                                                                                                                                                                              so long,

                                                                                                                                                                                                                               

                                                                                                                                                                                                                              Hias

                                                                                                                                                                                                                              1 of 1 people found this helpful
                                                                                                                                                                                                                              • 113. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                jezzas

                                                                                                                                                                                                                                I now get this but no sound via lineout

                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                pi@raspberrypi:~ $ aplay police_s.wav

                                                                                                                                                                                                                                Playing WAVE 'police_s.wav' : Unsigned 8 bit, Rate 22000 Hz, Mono

                                                                                                                                                                                                                                pi@raspberrypi:~ $

                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                So it wants to do something, one thing I have notice in alsamixer is that the default speaker is Speaker Digital is this right?

                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                Jerry

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

                                                                                                                                                                                                                                  Have you downloaded the mixer scripts http://www.horus.com/~hias/tmp/cirrus/cirrus-ng-scripts.tgz and run Playback_to_Lineout.sh?

                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                  so long,

                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                  Hias

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

                                                                                                                                                                                                                                    Hi Lino!

                                                                                                                                                                                                                                    Unfortunately, `aplay -l` just tells me `no soundcards found...`.

                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                    According to your dmesg the kernel detected the WM8804 chip but not the WM5102 (arizona):

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

                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                    I'm not quite sure what's causing this, I saw this a few times back then when testing the older 4.4 kernel driver - but never saw this with kernel 4.9.

                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                    Have you tried another power supply or another RPi?

                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                    BTW: you don't have to enable i2c, spi and i2s in config.txt, this is automatically done by the rpi-cirrus-wm5102 overlay. I don't think this'll cause any harm, but better remove the lines.

                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                    so long,

                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                    Hias

                                                                                                                                                                                                                                    • 116. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                      jezzas

                                                                                                                                                                                                                                      Thanks for your patience Hias, I ran the Playback_to_Lineout.sh script again and it work perfectly.

                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                      I have just got to tell you as I ran aplay police_s.wav to test the sound which is a police siren and had not realised I had the volume up to the top, I nearly fell off my chair when it went off :-)

                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                      Thanks once again.

                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                      Jerry

                                                                                                                                                                                                                                      • 117. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                        timg73

                                                                                                                                                                                                                                        Hias,

                                                                                                                                                                                                                                        A huge thank-you for all the work you've put into supporting the Cirrus Audio card.  Until now I've been using your kernel packages, and have just got round to trying the latest official 4.9 kernel which is also working very nicely.  It's a real shame that the Cirrus card has (or appears to have) gone out of production just when the software support became so good.  The older Wolfson cards are still available, so perhaps I'll get a couple and try modifying them to fit a 40-pin header.  Anyway, thanks again for everything you've done.  I really do appreciate it.

                                                                                                                                                                                                                                        Tim

                                                                                                                                                                                                                                        • 118. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                          hystrix

                                                                                                                                                                                                                                          The Cirrus Card does seem to be out of stock everywhere - what a shame.  I just started working on an alternative ultrasound sensistive microphone, since the electret type I was using has been out of production for years and is now virtually impossible to get hold of.

                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                          What other options are there for recording audio at 192kHz with the Raspberry Pi?

                                                                                                                                                                                                                                           

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

                                                                                                                                                                                                                                            Tim and hysterix,

                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                            Do not dispair.

                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                            If you look earlier in this thread (2 weeks ago)  Matthias and I were discussing how to adapt the Wolfson variant of this card to run on Pi2/3.  He should take all the credit for verifying that this is a simple matter  ..... indeed trivial from a software perspective.  The hardware modifications are not to everybodys taste and I am still looking into less obtrusive ways of making the adaptation (using a piggy back board, eg)

                                                                                                                                                                                                                                            pcb

                                                                                                                                                                                                                                            Trouble is it needs to be double sided, plated through and gold plated on the 8 "thick" pads!  But such a board (with connectors installed) would allow the Wolfson card to plug into a Pi 2/3 with no hardware modifications to either (Hias, if you are reading this, can you confirm that I have not done something stupid like reverse clks or tx/rx?).  For the more intrepid/impatient, the solution which Hias has already posted works perfectly.  For those who do not want to unsolder the 8 pin pogo connector, you can cut-off pin 2 of the connector (which snags the I2C pull up resistor on the Pi) and place a small piece of insulating material beneath the pins for extra safety.  That would make the only unsoldering the removal of one resistor on the Wolfson card.

                                                                                                                                                                                                                                            1 of 1 people found this helpful
                                                                                                                                                                                                                                            • 120. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                              hystrix

                                                                                                                                                                                                                                              Hi John. I have a spare Wolfson card, so I might try adapting it for Pi2/3.

                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                              It's a shame that the Wolfson card doesn't have Line In micbias, but I could live with that.

                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                              Many thanks for the info.

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

                                                                                                                                                                                                                                                Hi,

                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                Interesting,  I really had not investigated that part of the schematics.  You are right of course  ..... can you not tie the inputs to the bias as the signal leaves the jack socket? Much easier there as you are not working at a microscopic scale.

                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                Let us all know what route you take for the modification  ..... as you rightly note the only way of using the Wolfson device is through this card, so we all need to work on finding the best way forward. Best of luck

                                                                                                                                                                                                                                                • 122. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                  hystrix

                                                                                                                                                                                                                                                  Hi John - Is removing R39 on the Wolfson board absolutely essential?

                                                                                                                                                                                                                                                   

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

                                                                                                                                                                                                                                                    Hystrix

                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                    As always Hias is the guru, but (for a direct plug in connection between pi and Wolfson) yes removal of R39 is necessary, otherwise you will be pumping the I2S bit clock directly into the 8804 SPDIF chip CSB pin.

                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                    This (and the pogo connector) are the reasons I am looking at a piggy back board .... I do not trust myself on components of that size. The down side of this is board construction and the extra height that is involved in the sandwich as a whole

                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                    If you do not want to unsolder R39 and do not want to use a piggy back board, the only alternative is to cut pin 12 out of the 40 way connector on the pi and run a flying lead from the stump of that pin up to pin 3 of the pogo connector on the W (working on cutting one of the tracks on the Wolfson board is in my opinion more difficult than removing R39). If you have no intention of reusing the pi with its expansion header, this is perhaps the easiest modification

                                                                                                                                                                                                                                                    1 of 1 people found this helpful
                                                                                                                                                                                                                                                    • 124. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                      hiassoft

                                                                                                                                                                                                                                                      Hi John!

                                                                                                                                                                                                                                                      The hardware modifications are not to everybodys taste and I am still looking into less obtrusive ways of making the adaptation (using a piggy back board, eg)

                                                                                                                                                                                                                                                      pcb

                                                                                                                                                                                                                                                      Trouble is it needs to be double sided, plated through and gold plated on the 8 "thick" pads! But such a board (with connectors installed) would allow the Wolfson card to plug into a Pi 2/3 with no hardware modifications to either (Hias, if you are reading this, can you confirm that I have not done something stupid like reverse clks or tx/rx?).

                                                                                                                                                                                                                                                      Looks like you have pins 3/4 and 5/6 of P5 swapped - the P5 layout (as eg here http://elinux.org/RPi_Low-level_peripherals) is from the bottom side of the board (as opposed to the P1 layout which is from the top side). Pin 1 of P5 is next to the P1 GPIO connector.

                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                      Instead of using "hard" gold plated P5 pads you could try ENIG finish - it's cheaper and should be OK (though not as durable as hard gold).

                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                      You'd probably need to make the PCB full-size so you can add mounting screws for the Wolfson card and the RPi2/3. Then mechanical stability should be OK.

                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                      Other than these issues your approach look fine!

                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                      so long,

                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                      Hias

                                                                                                                                                                                                                                                      1 of 1 people found this helpful
                                                                                                                                                                                                                                                      • 125. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                        hystrix

                                                                                                                                                                                                                                                        Ha! I was just looking at those pogo pin connections myself.  From the photo, it looks like the connections are:

                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                        P5 Pin 3 to GPIO Pin 12

                                                                                                                                                                                                                                                        P5 Pin 4 to GPIO Pin 35

                                                                                                                                                                                                                                                        P5 Pin 5 to GPIO Pin 38

                                                                                                                                                                                                                                                        P5 Pin 6 to GPIO Pin 40

                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                        And remove R39.

                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                        Are those the only chnages to make?  On the piggy-back board, what is that connection on GPIO Pin 33 on the 40 pin header and GPIO Pin 12 on the 26 pin header?

                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                        Many thanks :-)

                                                                                                                                                                                                                                                        • 126. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                          hiassoft
                                                                                                                                                                                                                                                          It's a shame that the Wolfson card doesn't have Line In micbias, but I could live with that.

                                                                                                                                                                                                                                                          Looking at the schematic it seems you can add it quite easily: remove C8 (it's next to the WM5102), then connect that to 2 2k2 resistors and solder the other end to line in (junction between R55/L6/C33 and R56/L7/C32). Then it'd be like the Cirrus card.

                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                          Taking Micbias from the headset in would also be a possibility, just remember that'd you'd need to enable Headset input as well (you could just do a "cirrus-listen headset headset" then micbias on headset in will always be on).

                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                          Is removing R39 on the Wolfson board absolutely essential?

                                                                                                                                                                                                                                                          Yes. During reset pin 5 of the WM8804 is used as in input to select the I2C address - so you need to have it connected to the pullup. Afterwards it's an output so if you leave it connected to P1 header pin 12 it'd clash with the I2S clock. I haven't found an easier way to cut the connection from GPIO pin 12 to the WM8804 so removing the in-line 0R resistor R39 seems to be the easiest method ATM.

                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                          so long,

                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                          Hias

                                                                                                                                                                                                                                                          1 of 1 people found this helpful
                                                                                                                                                                                                                                                          • 127. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                            psyj

                                                                                                                                                                                                                                                            Hystrix

                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                            See Hias comment, it looks as though I have mirrored the J5 pins, so wait for the revised diagram! Sorry!  But the link you are referring to provides the correct connection back to the 8804.  That is done for completeness, because as Hias says, the pin on the 8804 can be left open circuit without a problem.

                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                            The minimum set of connections are just as you say.

                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                            As per Hias suggestion, I had thought of making the piggy back card "full size" so that it can offer mechanical support.  At the moment I am thinking of what else to use the card space for.  I need to drive a relay(!) based digital attenuator for the output of the Wolfson, so I will probably put a couple of I2C ports on the card.

                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                            Hias,

                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                            Once again, thank you for your help

                                                                                                                                                                                                                                                            1 of 1 people found this helpful
                                                                                                                                                                                                                                                            • 128. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                              psyj

                                                                                                                                                                                                                                                              And herewith the revised pcb

                                                                                                                                                                                                                                                              pcb.png

                                                                                                                                                                                                                                                              1 of 1 people found this helpful
                                                                                                                                                                                                                                                              • 129. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                hystrix

                                                                                                                                                                                                                                                                Hi John - thanks for the update.

                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                Now all I have to do is find the elusive R39.  I only had a quick look last night.

                                                                                                                                                                                                                                                                 

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

                                                                                                                                                                                                                                                                  Now all I have to do is find the elusive R39. I only had a quick look last night.

                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                  It's on the bottom side of the PCB, near the mounting hole.

                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                  so long,

                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                  Hias

                                                                                                                                                                                                                                                                  • 131. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                    hystrix

                                                                                                                                                                                                                                                                    Hias and John,

                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                    I got my "Frankenson" sound card working with a Pi2 .

                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                    I didn't de-solder the pogo pins.  I found a cover that fits over them nicely - made from a UK 3-pin mains plug protector that all new electrical devices come with.  I cut the end off the Earth pin end of the protector.  It fits neatly onto the pogo pins.  Once the Wolfson card is attached to the Pi, the cover is held nicely in place, and stops them shorting on anything on the Pi.

                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                    Wolfson.PNG

                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                    Here's the pogo cover made from a plug protector:

                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                    plug-pin_protector.PNGplug-pin_protector2.PNGplug-pin_protector3.PNG

                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                    Thanks for your help with this neat hack.

                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                    Hystrix

                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                    1 of 1 people found this helpful
                                                                                                                                                                                                                                                                    • 132. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                      psyj

                                                                                                                                                                                                                                                                      Bravo, I like it.  One of the positive british traits that, improvisation.

                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                      I knew UK plugs would prove better one day .... It has only taken 60 years  ..... Ironically I cut the last one off my appliances only this week.

                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                      More seriously, note that there is a wee bit of strain introduced by the pin protector, perhaps raise the Wolfson card a millimetre to compensate.

                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                      I have just made the mark 1 piggy back board, so if I can get the single sided version to work, expect photos of that too.  It's good to see an active community

                                                                                                                                                                                                                                                                      • 133. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                        hystrix

                                                                                                                                                                                                                                                                        Ha!  I knew someone would mention the strain caused by the pogo pin protector.    This was an early photo - I actually trimmed off some more of the plastic on the left-hand side.  You can see the black header is catching on it in the photo - it's much better now.

                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                        My only concern is whether the springs in the pogo pins will eventually start to push the audio card off the header.  Time will tell.  I may even file off some of the plastic from the bottom of the pin protector, so the springs aren't compressed as much.

                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                        I look foward to the photos of the piggy-back board.

                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                        1 of 1 people found this helpful
                                                                                                                                                                                                                                                                        • 134. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                          msmithers

                                                                                                                                                                                                                                                                          Hi Matthias,

                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                          Thank you very, very much for all your work with the Cirrus audio card.

                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                          Can you help with one question? I'd like to run simple stereo-in stereo-out for real-time processing. I managed to get simple pass-through working on with the Cirrus card on a Pi 2 about 2 years ago (with Jessie Lite), but the latency (from buffer setup) had to be very high (e.g. > 40 milliseconds) to avoid glitching. (I modified example code from ALSA project - the C library reference: Examples )

                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                          Is there any guidance you can give on how to configure the card for relatively low latency input to output?

                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                          Driver models like ASIO (Windows) nicely handle input and output in the one driver callback. ALSA seems to want to keep input and output independent, and I suspect ALSA's problems relate to input and output driver buffer FIFO's getting out of synchronisation. Also, the ALSA documentation is not great, and the configuration is convoluted.

                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                          Also, I've already read many pages on creating/running a "realtime" kernel, including

                                                                                                                                                                                                                                                                          http://wiki.linuxaudio.org/wiki/raspberrypi

                                                                                                                                                                                                                                                                          but I'd prefer to avoid OS customisation and stay with the regular distributions.

                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                          (I'm very familiar with designing and coding DSP processing, but not very familiar with Linux. Sorry.)

                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                          Cheers,

                                                                                                                                                                                                                                                                          Michael

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

                                                                                                                                                                                                                                                                            Michael,

                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                            Not a reply from Matthias, but a quick question to your question  .... I presume you want to do more than stream input to output directly, because that can be done with zero CPU overhead.  Which leads to the question as to what you wish to do .... that cannot be done with the cirrus card itself.  I have moved away from using Brutefir or folve as room correction filters, preferring the cirrus card because, whilst slightly inferior, it does give me the opportunity to do analogue in/out filtering in very near real time as well as digital sources and easy splitting of the signal into more than two paths ...... I would love to get hold of the built in DSP logic, which may be capable of doing rather more.  As it is I get 8 biquad filters to improve a stereo signal.

                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                            Regards

                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                            John

                                                                                                                                                                                                                                                                            1 of 1 people found this helpful
                                                                                                                                                                                                                                                                            • 136. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                              msmithers

                                                                                                                                                                                                                                                                              Hi John,

                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                                                              I plan to implement a custom DSP chain - gain, delay, state-space biquads and long FIR - in C/C++. I've done this many times on Windows and Mac. On the Raspberry Pi, it's the ALSA setup that confounds me. (The ALSA model seems like a mess. Some of the ALSA project docs haven't been updated since 2002.)

                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                                                              I'd previously managed to get the ALSA project "latency.c" example compiled and working to pass input to output, to see how low I could push the latency. But it requires buffer settings that push latency out to 40ms+ before it doesn't glitch.

                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                                                              Flatmax Studio's Audio Injector soundcard, for Raspberry Pi, claims very low latency, but the noise performance of the codec is not quite as good as this Cirrus / Wolfson card.

                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                                                              Kind regards,

                                                                                                                                                                                                                                                                              Michael

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

                                                                                                                                                                                                                                                                                I got my "Frankenson" sound card working with a Pi2 .

                                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                                I didn't de-solder the pogo pins. I found a cover that fits over them nicely - made from a UK 3-pin mains plug protector that all new electrical devices come with. I cut the end off the Earth pin end of the protector. It fits neatly onto the pogo pins. Once the Wolfson card is attached to the Pi, the cover is held nicely in place, and stops them shorting on anything on the Pi.

                                                                                                                                                                                                                                                                                That's looking really nice, well done! And I think the cap over the pogo pins is a rather clever idea!

                                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                                so long,

                                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                                Hias

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

                                                                                                                                                                                                                                                                                  Hi Michael!

                                                                                                                                                                                                                                                                                  I plan to implement a custom DSP chain - gain, delay, state-space biquads and long FIR - in C/C++. I've done this many times on Windows and Mac. On the Raspberry Pi, it's the ALSA setup that confounds me. (The ALSA model seems like a mess. Some of the ALSA project docs haven't been updated since 2002.)

                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                  I'd previously managed to get the ALSA project "latency.c" example compiled and working to pass input to output, to see how low I could push the latency. But it requires buffer settings that push latency out to 40ms+ before it doesn't glitch.

                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                  Which kernel version are you using and did you try running the latency test as root? It's best to use the latest "rpi-update" kernel, kernels before 4.9.13 contained a nasty bug in the DMA driver which could explain your issues: https://github.com/raspberrypi/linux/pull/1858

                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                  I did a quick test with kernel 4.9.16, latency.c started as a normal user and option "-r 96000" on RPi3 which worked quite well:

                                                                                                                                                                                                                                                                                  !!!Scheduler set to Round Robin with priority 99 FAILED!!!
                                                                                                                                                                                                                                                                                  Playback device is hw:0,0
                                                                                                                                                                                                                                                                                  Capture device is hw:0,0
                                                                                                                                                                                                                                                                                  Parameters are 96000Hz, S16_LE, 2 channels, non-blocking mode
                                                                                                                                                                                                                                                                                  Poll mode: no
                                                                                                                                                                                                                                                                                  Loop limit is 2880000 frames, minimum latency = 64, maximum latency = 4096
                                                                                                                                                                                                                                                                                  ...
                                                                                                                                                                                                                                                                                  Trying latency 128 frames, 1333.333us, 1.333333ms (750.0000Hz)
                                                                                                                                                                                                                                                                                  Success
                                                                                                                                                                                                                                                                                  Playback:
                                                                                                                                                                                                                                                                                  *** frames = 2880128 ***
                                                                                                                                                                                                                                                                                    state       : RUNNING
                                                                                                                                                                                                                                                                                    trigger_time: 33.588546808
                                                                                                                                                                                                                                                                                    tstamp      : 0.000000
                                                                                                                                                                                                                                                                                    delay       : 80
                                                                                                                                                                                                                                                                                    avail       : 48
                                                                                                                                                                                                                                                                                    avail_max   : 76
                                                                                                                                                                                                                                                                                  Capture:
                                                                                                                                                                                                                                                                                  *** frames = 2880000 ***
                                                                                                                                                                                                                                                                                    state       : RUNNING
                                                                                                                                                                                                                                                                                    trigger_time: 33.588543839
                                                                                                                                                                                                                                                                                    tstamp      : 0.000000
                                                                                                                                                                                                                                                                                    delay       : 44
                                                                                                                                                                                                                                                                                    avail       : 44
                                                                                                                                                                                                                                                                                    avail_max   : 44
                                                                                                                                                                                                                                                                                  Maximum read: 28 frames
                                                                                                                                                                                                                                                                                  Maximum read latency: 291.667us, 0.291667ms (3428.5714Hz)
                                                                                                                                                                                                                                                                                  Playback time = 33.588546, Record time = 33.588543, diff = 3
                                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                  When running latency as root (so it could set realtime scheduling) it worked fine as well, but locked up the RPi in the end - these are the dangers of using realtime scheduling priority, there seems to be some bug in the software

                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                  I have to add that I tested on a headless RPi (i.e. no GUI running).

                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                  Have you tried starting your application(s) via "sudo chrt -r 99 ..."? Using realtime scheduling priorities can help a lot with latency issues.

                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                  so long,

                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                  Hias

                                                                                                                                                                                                                                                                                  1 of 1 people found this helpful
                                                                                                                                                                                                                                                                                  • 139. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                                    eljot

                                                                                                                                                                                                                                                                                    Broken Wi-Fi.

                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                    Hi,

                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                    thank you so much for you work! It works so far. But it does not go along well with my wi-fi dongle. I get no connection wehn using the card.

                                                                                                                                                                                                                                                                                    I flashed the SD-card with the Raspien Jesse lite image (2017-03-02), set my wi-fi, started, updated with rpi-update to the new kernel (4.9.16+) reboot and everything was fine. Then I edited the /boot/config.txt and the

                                                                                                                                                                                                                                                                                    /etc/modprobe.d/cirrus.conf, reboot the system and it did not work. Reedited the files and It worked again. Then reedited again, took out the dongle and tried with LAN. It works. So wi-fi and card are working but not at the same time.

                                                                                                                                                                                                                                                                                    I have the original wolfson card on a Raspberry Pi 1 model B The wi-fi dongel is an Edimax EW-7811Un witch is a RTL8188CUS as far as I know I use the Pi headless and can not find my HDMI cable so I can not say if it boots at all I have a TTL cable I could use

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

                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                      thank you so much for you work! It works so far. But it does not go along well with my wi-fi dongle. I get no connection wehn using the card.

                                                                                                                                                                                                                                                                                      I flashed the SD-card with the Raspien Jesse lite image (2017-03-02), set my wi-fi, started, updated with rpi-update to the new kernel (4.9.16+) reboot and everything was fine. Then I edited the /boot/config.txt and the

                                                                                                                                                                                                                                                                                      /etc/modprobe.d/cirrus.conf, reboot the system and it did not work. Reedited the files and It worked again. Then reedited again, took out the dongle and tried with LAN. It works. So wi-fi and card are working but not at the same time.

                                                                                                                                                                                                                                                                                      I have the original wolfson card on a Raspberry Pi 1 model B The wi-fi dongel is an Edimax EW-7811Un witch is a RTL8188CUS as far as I know I use the Pi headless and can not find my HDMI cable so I can not say if it boots at all I have a TTL cable I could use

                                                                                                                                                                                                                                                                                      Not sure what could be causing this. Could you grab dmesg from a non-working setup, with both the wifi dongle and Wolfson card enabled?

                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                      so long,

                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                      Hias

                                                                                                                                                                                                                                                                                      • 141. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                                        msmithers

                                                                                                                                                                                                                                                                                        Hi Hias,

                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                        Thanks for the reply. Yes, a few days ago I did a completely fresh install of Jessie Lite (headless), updated it to 4.9.16 and set it up for the Cirrus card, as per your instructions.

                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                        I'm testing both a Pi2 and Pi3 with the Cirrus card. I've mostly been testing at 96 kHz, and passing iPod audio through the lineIn and out to headphones. (I prefer polling - only so I can see the actual CPU load (and later watch it change as I add DSP).) I modified latency.c to run for much longer and to allow more than 2 periods per buffer. Thanks for tip wrt RT scheduling... Running latency with sudo allows it to schedule itself as realtime and it's a little more stable. (I also copied the RT scheduling code into the PortAudio example, mentioned below).

                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                        Regardless of realtime scheduling, buffer settings and more, I have found that latency.c cannot be trusted to run forever without a buffer under/overrun error at some point.

                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                        In light of this, I installed PortAudio, compiled it for ALSA, configured it for the Cirrus and started playing with the example programs; particularly paex_read_write_wire.c. Whether running default or elevated to RT scheduling, it also can't be trusted to run forever. However...

                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                        This morning I figured I'd try using a PortAudio callback function in paex_read_write_wire.c, instead of the default write/read looping function calls. It now appears perfectly stable on both the Pi2 and the Pi3. I've been running the Pi2 for a few hours now, whilst running 4 SSH and SFTP sessions, and 2 instances of top. At 96 kHz, the CPU load for paex_read_write_wire is about 7% on the Pi2. (The PortAudio documentation says the callback is treated even more specially than realtime scheduling and running as root.)

                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                        The next step is to measure the analog-to-analog latency and begin coding some DSP. And another challenge will be trying to extend the DSP across multiple cores with multi-threading!

                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                        Kind regards,

                                                                                                                                                                                                                                                                                        Michael

                                                                                                                                                                                                                                                                                        1 of 1 people found this helpful
                                                                                                                                                                                                                                                                                        • 142. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                                          msmithers

                                                                                                                                                                                                                                                                                          Ok, here are some analog-to-analog measurements with the Cirrus on the Pi2. With PortAudio input and output set to:

                                                                                                                                                                                                                                                                                          - defaultHighInputLatency, measured latency = 43.06ms (with 6.9% CPU).

                                                                                                                                                                                                                                                                                          - defaultLowInputLatency, measured latency = 8.396ms (with 10.6% CPU).

                                                                                                                                                                                                                                                                                          Note: loopback in PortAudio callback function.

                                                                                                                                                                                                                                                                                          1 of 1 people found this helpful
                                                                                                                                                                                                                                                                                          • 143. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                                            eljot

                                                                                                                                                                                                                                                                                            I just did it everything again on a different SD-Card to try something. Now the kernel version is 4.9.17+ and there is no Problem anymore.

                                                                                                                                                                                                                                                                                            It works.

                                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                                            so long,

                                                                                                                                                                                                                                                                                            Leander

                                                                                                                                                                                                                                                                                            1 of 1 people found this helpful
                                                                                                                                                                                                                                                                                            • 144. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                                              muellerjanla

                                                                                                                                                                                                                                                                                              Thank you very much for your hard work on keeping the driver up-to-date and for the libreELEC system.

                                                                                                                                                                                                                                                                                              • 145. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                                                tovow

                                                                                                                                                                                                                                                                                                Hello Matthias,

                                                                                                                                                                                                                                                                                                first I would like to thank the great work on the Cirrus Logic Audio Card and congratulate the driver it in the official Kernel has done it.

                                                                                                                                                                                                                                                                                                I use an RPI 2B with Moode Audioplayer. After initial difficulties the driver with Kernel 4.9.16 runs perfectly.

                                                                                                                                                                                                                                                                                                A few questions I still have.

                                                                                                                                                                                                                                                                                                Does the Cirrus Logic Audio Card run in SLAVE or MASTER mode? Background is the one I would like to use one of ALLO.COM Kali I2S reclocker.

                                                                                                                                                                                                                                                                                                It should work with the Cirrus Logic Audio Card.

                                                                                                                                                                                                                                                                                                The Cirrus_listen.sh script, how can I route Digital IN to Digital OUT or Analog OUT and then still works the volume control?

                                                                                                                                                                                                                                                                                                What is the command? Can then possibly a DRC program and Convolver operate?

                                                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                                                Best regards

                                                                                                                                                                                                                                                                                                Theo

                                                                                                                                                                                                                                                                                                 

                                                                                                                                                                                                                                                                                                Ps. translated with Google translator

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

                                                                                                                                                                                                                                                                                                  Does the Cirrus Logic Audio Card run in SLAVE or MASTER mode? Background is the one I would like to use one of ALLO.COM Kali I2S reclocker.

                                                                                                                                                                                                                                                                                                  The Cirrus card is the clock master.

                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                  More precisely, the WM5102 controls the I2S clock, usually derived from the on-board crystal connected to the WM8804. If you use SPDIF input things change a bit, then the WM8804 syncs onto the signal from the SPDIF input stream and that is used as a reference clock.

                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                  This allows for slight variations in clocking - crystals and clocks are usually a few ppm off - but you still have to manually configure the card to the correct clock rate.

                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                  eg if you configure the card to 44.1kHz and then feed a 48kHz digital signal in you'll get garbage. You can use several alsa controls (the ones starting with "IEC958 Capture" to monitor the WM8804 (SPDIF transceiver) status bits - see WM8804 datasheet for details - to check if it's properly locked onto the SPDIF input stream and/or what it thinks the approximate SPDIF rate is.

                                                                                                                                                                                                                                                                                                  The Cirrus_listen.sh script, how can I route Digital IN to Digital OUT or Analog OUT and then still works the volume control?

                                                                                                                                                                                                                                                                                                  What is the command?

                                                                                                                                                                                                                                                                                                  For SPDIF output with the listen script you can adjust the volume via "AIF2TX1 Input 2 Volume" (left channel) and "AIF2TX2 Input 2 Volume" (right channel). These are only coarse-grain volume controls though.

                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                  For lineout with listen script you have both coarse-grain controls, separated for left and right, "HPOUT2L Input 2 Volume" and "HPOUT2R Input 2 Volume" and a finer-grain control common to both L+R channels, "HPOUT2 Digital Volume".

                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                  If you specify another mixer number (default is 2) in the listen scripts you'll have to use the same number in the "Input X" names.

                                                                                                                                                                                                                                                                                                  Can then possibly a DRC program and Convolver operate?

                                                                                                                                                                                                                                                                                                  Sure, but in this case better setup the card for normal playback/recording instead of using the listen scripts. You can then use eg brutefir to process the audio signals.

                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                  so long,

                                                                                                                                                                                                                                                                                                   

                                                                                                                                                                                                                                                                                                  Hias

                                                                                                                                                                                                                                                                                                  1 of 1 people found this helpful
                                                                                                                                                                                                                                                                                                  • 147. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                                                    tovow

                                                                                                                                                                                                                                                                                                    Hi Matthias,

                                                                                                                                                                                                                                                                                                    thanks for the reply.

                                                                                                                                                                                                                                                                                                    What I do not understand is how I use the Cirrus_listen.sh script.

                                                                                                                                                                                                                                                                                                    I have to enter something at the command level or change the script as such.

                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                    Listen_Out

                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                    An Example of the Digital IN to Digital OUT or sample Command would be good.

                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                     

                                                                                                                                                                                                                                                                                                    Ciao Theo

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

                                                                                                                                                                                                                                                                                                      Hi Theo!

                                                                                                                                                                                                                                                                                                      What I do not understand is how I use the Cirrus_listen.sh script.

                                                                                                                                                                                                                                                                                                      I have to enter something at the command level or change the script as such.

                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                      An Example of the Digital IN to Digital OUT or sample Command would be good.

                                                                                                                                                                                                                                                                                                      The first parameter is the output, the second the input. To listen to SPDIF in on SPDIF out use:

                                                                                                                                                                                                                                                                                                      Cirrus_listen.sh spdif spdif
                                                                                                                                                                                                                                                                                                      

                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                      To listen to SPDIF in on line out use:

                                                                                                                                                                                                                                                                                                      Cirrus_listen.sh line spdif
                                                                                                                                                                                                                                                                                                      

                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                      To change lineout to listen on linein use this:

                                                                                                                                                                                                                                                                                                      Cirrus_listen.sh line line
                                                                                                                                                                                                                                                                                                      

                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                      If you enter all three commands (in the sequence above) you'll get the following results

                                                                                                                                                                                                                                                                                                      1. spdif in -> spdif out
                                                                                                                                                                                                                                                                                                      2. spdif in -> spdif out and spdif in -> line out
                                                                                                                                                                                                                                                                                                      3. spdif in -> spdif out and line in -> line out

                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                      so long,

                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                      Hias

                                                                                                                                                                                                                                                                                                      1 of 1 people found this helpful
                                                                                                                                                                                                                                                                                                      • 149. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                                                        psyj

                                                                                                                                                                                                                                                                                                        Theo,

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        Hopefully I can save Matthias some time.  The two scripts cirrus_listen.sh and rpi-cirrus-functions.sh (upon which it depends) are pretty straightforward (but very useful).  They ultimately generate the primitive amixer commands which are used to control the card via the command line interpreter.  These commands look like

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        amixer -Dhw:0 cset name='HPOUT2L Input 1 Volume' 24

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        This example (not generated by Matthias script) does the following:- it specifies that we want to change something about HPOUT2 (One of the analogue outputs from the card).  the left channel (hence L).  Each of the outputs on the Cirrus card has a 4 channel mini mixer, and this command changes something (the Volume in this case) associated with input 1 of that mini mixer ...... it sets the volume level to 24 (which if I remember correctly is 0dB gain)

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        So Matthias scripts simplifies issuing lots of these commands down to a single line.  As the usage generated by the script says

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        usage output input [mixer-num]

                                                                                                                                                                                                                                                                                                        output: line, headset, spdif, speaker

                                                                                                                                                                                                                                                                                                        input: line, headset, spdif, dmic

                                                                                                                                                                                                                                                                                                        mixer-num: 1-4, default is 2

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        "output" decides which of four outputs (line|headset|spdif|speaker) you want to use

                                                                                                                                                                                                                                                                                                        "input" decides which of four inputs (line|headset|spdif|dmic) you want to connect to the output you previously selected

                                                                                                                                                                                                                                                                                                        "mixer-num" is optional and lets you decide (if you wish) which of the mini mixer inputs you want to use

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        So (to answer your question) connecting "digital in" to "digital out" is simply

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        ./Cirrus_listen.sh spdif spdif

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        and if you want to use another input (eg 3) to the mini mixer associated with the "digital out"

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        ./Cirrus_listen.sh spdif spdif 3

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        (Why would you want to specify another input? Well by using different numbers you use different inputs to the same mini mixer. For example, I want to setup   analogue line output to

                                                                                                                                                                                                                                                                                                             take input from analogue line input on mixer channel 1

                                                                                                                                                                                                                                                                                                        and

                                                                                                                                                                                                                                                                                                             from a digital source on mixer channel 2. 

                                                                                                                                                                                                                                                                                                        That way I can play my digital music library, or listen to LPs (or both at the same time) just by changing volume levels on the mixer)

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        (Matthias, I hope that this is exactly correct,  I do not have a system in front of me, just your scripts)

                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                        POSTSCRIPT :- I note that Matthias and I were working on a reply at the same time.  Sorry Matthias

                                                                                                                                                                                                                                                                                                        1 of 1 people found this helpful
                                                                                                                                                                                                                                                                                                        • 150. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                                                                                                                                                                                                                                                                                          tovow

                                                                                                                                                                                                                                                                                                          Hi Matthias,

                                                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                                                          Thanks for the quick reply and now I also understand the procedure better.  

                                                                                                                                                                                                                                                                                                          I want to try over an Odroid C1 + with the Mutec MC 1.2 DDC over Digital IN into the Cirrus Logic Audio Card.

                                                                                                                                                                                                                                                                                                          Let's see if there is something related to Jitter.

                                                                                                                                                                                                                                                                                                          @John Tindle: also with you I would like to thank for the detailed explanation. 

                                                                                                                                                                                                                                                                                                          Then I can try a little.

                                                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                                                           

                                                                                                                                                                                                                                                                                                          Ciao Theo

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

                                                                                                                                                                                                                                                                                                            All,

                                                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                                                            I promised an update on the piggy back card approach. Apologies for the delay, real world demands ...

                                                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                                                            First a photo

                                                                                                                                                                                                                                                                                                            piggy.JPG

                                                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                                                            Herewith my observations

                                                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                                                            1)  Making the pcb at home is a pain for the following reasons.

                                                                                                                                                                                                                                                                                                            1.     Drilling the board exactly (for the headers) is difficult.
                                                                                                                                                                                                                                                                                                            2.      I can do only single sided boards and this approach demands "creativity" when installing the 26 pin header for the Wolfson. Plated through holes would be better/easier/stronger
                                                                                                                                                                                                                                                                                                            3.     (and worst) the pads to receive the pogo connectors must be gold plated (So whilst my card works at the moment, I await the effects of O2)

                                                                                                                                                                                                                                                                                                            So the board needs to be made professionally to be a good long term option  .... and that will mean 10 of them!

                                                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                                                            2) The Wolfson is well clear of the main board.  This is good for ventilation and