1 20 21 22 23 24 25 368 Replies Latest reply on Oct 14, 2018 12:18 PM by hiassoft Go to original post
      • 315. Re: New reworked driver for Wolfson/Cirrus Logic audio card
        lidgaca

        Hi

         

        First up I guess I need to add my thanks for your sterling work on this driver ... it really is much appreciated. I'm new to Pi stuff, but reasonably competent with Linux so I may have made pigs ear of something basic

         

        I want to use the Wolfson Audio card on a Pi B as a digital recorder, taking input from LineIn and using output from LineOut.

         

        I have the system basically working, thanks to your excellent instructions, but I don't have very good control of recording or playback levels. I am using the ResetPaths.sh, Playback_to_Lineout.sh and Record_from_Linein.sh scripts after every reboot.

         

        I'm recording with Audacity - bascially it's the utility I know best. However both recording and playback levels are very low.

         

        I assume that I should adjust them using the Pi audio mixer tool ('USB settings') on the top toolbar, but that is problematic. The pi mixer lists about 60 possible options for input and output controls. The trouble is I don't know which ones relate to the analog line in and analog line out. If you could point me to a resource that tells me what these RPICirrus control mnemonics mean, or just tell me which of the controls I should enable. I would be grateful.

         

         

         

        -- Chris

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

          lidgaca  schrieb:

           

          I'm recording with Audacity - bascially it's the utility I know best. However both recording and playback levels are very low.

           

          I assume that I should adjust them using the Pi audio mixer tool ('USB settings') on the top toolbar, but that is problematic. The pi mixer lists about 60 possible options for input and output controls. The trouble is I don't know which ones relate to the analog line in and analog line out. If you could point me to a resource that tells me what these RPICirrus control mnemonics mean, or just tell me which of the controls I should enable. I would be grateful.

           

          For line-in the analog input gain controls are IN3L/R (default is +8dB) and if that's not enough you can an apply a digital gain via "IN3L/R Digital" (default here is 0dB).

           

          For line-out gain you can change HPOUT2 (default is 0dB). But note that this is a digital gain as well, so you can get clipping if you set it above 0dB.

           

          Have a look at the rpi-cirrus-functions.sh script that's sourced by the Playback/Record scripts, at the beginning it there are definitions of the various internal mixer and input/output names. (eg line_in="IN3", line_out="HPOUT2" etc). You can use that as a reference.

           

          so long,

           

          Hias

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

            Hi Matthias

            I'm trying to get a Wolfson card working with a Rpi B and Max2Play / Squeezelite - I've been through the driver install instructions here RPi Linux driver for Wolfson / Cirrus Logic Audio Card  and the card is recognised. I can get Squeezelite running too. I don't get any sound on any of the Sound Card Ports. I've disabled the default sound and shairport which seems to interfere sometimes. The error I'm failing on is when I try to assign the output using the playback to ****.sh . I get "amixer: Control hw:sndrpiwsp open error: No such device

             

            Any hints and tips ?

             

             

            # For more options and information see

            # http://rpf.io/configtxtreadme

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

             

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

            #hdmi_safe=1

             

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

            # and your display can output without overscan

            #disable_overscan=1

             

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

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

            #overscan_left=16

            #overscan_right=16

            #overscan_top=16

            #overscan_bottom=16

             

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

            # overscan.

            #framebuffer_width=1280

            #framebuffer_height=720

             

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

            #hdmi_force_hotplug=1

             

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

            #hdmi_group=1

            #hdmi_mode=1

             

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

            # DMT (computer monitor) modes

            #hdmi_drive=2

             

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

            # no display

            #config_hdmi_boost=4

             

            # uncomment for composite PAL

            #sdtv_mode=2

             

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

            #arm_freq=800

             

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

            #dtparam=i2c_arm=on

            #dtparam=i2s=on

            #dtparam=spi=on

             

            # Uncomment this to enable the lirc-rpi module

            #dtoverlay=lirc-rpi

             

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

             

            # Enable audio (loads snd_bcm2835)

            dtparam=audio=off

            gpu_mem=128

             

            dtoverlay=rpi-cirrus-wm5102

             

            #dtdebug=1:

            Jul 21 2017 23:56:02

            Copyright (c) 2012 Broadcom

            version f52771674311a841405cea05e8738a526dd60ee1 (clean) (release)

            001014.575: brfs: File read: /mfs/sd/config.txt

            001015.223: brfs: File read: 1651 bytes

            001024.719: HDMI:EDID error reading EDID block 0 attempt 0

            001025.983: HDMI:EDID error reading EDID block 0 attempt 1

            001027.242: HDMI:EDID error reading EDID block 0 attempt 2

            001028.500: HDMI:EDID error reading EDID block 0 attempt 3

            001029.758: HDMI:EDID error reading EDID block 0 attempt 4

            001031.017: HDMI:EDID error reading EDID block 0 attempt 5

            001032.275: HDMI:EDID error reading EDID block 0 attempt 6

            001033.534: HDMI:EDID error reading EDID block 0 attempt 7

            001034.792: HDMI:EDID error reading EDID block 0 attempt 8

            001036.051: HDMI:EDID error reading EDID block 0 attempt 9

            001037.072: HDMI:EDID giving up on reading EDID block 0

            001050.299: brfs: File read: /mfs/sd/config.txt

            001050.813: HDMI:Setting property pixel encoding to Default

            001050.831: HDMI:Setting property pixel clock type to PAL

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

            001050.868: HDMI:Setting property fuzzy format match to enabled

            001060.268: gpioman: gpioman_get_pin_num: pin WL_LPO_CLK not defined

            001060.295: gpioman: gpioman_get_pin_num: pin BT_ON not defined

            001060.316: gpioman: gpioman_get_pin_num: pin WL_ON not defined

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

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

            001232.720: hdmi: HDMI:EDID error reading EDID block 0 attempt 0

            001233.986: hdmi: HDMI:EDID error reading EDID block 0 attempt 1

            001235.248: hdmi: HDMI:EDID error reading EDID block 0 attempt 2

            001236.511: hdmi: HDMI:EDID error reading EDID block 0 attempt 3

            001237.773: hdmi: HDMI:EDID error reading EDID block 0 attempt 4

            001239.036: hdmi: HDMI:EDID error reading EDID block 0 attempt 5

            001240.298: hdmi: HDMI:EDID error reading EDID block 0 attempt 6

            001241.560: hdmi: HDMI:EDID error reading EDID block 0 attempt 7

            001242.822: hdmi: HDMI:EDID error reading EDID block 0 attempt 8

            001244.084: hdmi: HDMI:EDID error reading EDID block 0 attempt 9

            001245.109: hdmi: HDMI:EDID giving up on reading EDID block 0

            001245.143: hdmi: HDMI: No lookup table for resolution group 0

            001245.161: hdmi: HDMI: hotplug attached with DVI support

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

            001245.501: hdmi: HDMI:EDID error reading EDID block 0 attempt 0

            001246.765: hdmi: HDMI:EDID error reading EDID block 0 attempt 1

            001248.028: hdmi: HDMI:EDID error reading EDID block 0 attempt 2

            001249.291: hdmi: HDMI:EDID error reading EDID block 0 attempt 3

            001250.554: hdmi: HDMI:EDID error reading EDID block 0 attempt 4

            001251.817: hdmi: HDMI:EDID error reading EDID block 0 attempt 5

            001253.080: hdmi: HDMI:EDID error reading EDID block 0 attempt 6

            001254.343: hdmi: HDMI:EDID error reading EDID block 0 attempt 7

            001255.606: hdmi: HDMI:EDID error reading EDID block 0 attempt 8

            001256.870: hdmi: HDMI:EDID error reading EDID block 0 attempt 9

            001257.896: hdmi: HDMI:EDID giving up on reading EDID block 0

            001257.936: hdmi: HDMI: hotplug deassert

            001257.950: hdmi: HDMI: HDMI is currently off

            001257.964: hdmi: HDMI: changing mode to unplugged

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

            001258.736: *** Restart logging

            001258.762: brfs: File read: 1651 bytes

            001260.181: brfs: File read: /mfs/sd/cmdline.txt

            001260.230: 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

            001260.498: brfs: File read: 136 bytes

            001533.574: brfs: File read: /mfs/sd/kernel.img

            001533.598: Loading 'kernel.img' to 0x8000 size 0x42daa8

            001533.641: No kernel trailer - assuming DT-capable

            001533.669: brfs: File read: 4381352 bytes

            001536.399: brfs: File read: /mfs/sd/bcm2708-rpi-b.dtb

            001536.423: Loading 'bcm2708-rpi-b.dtb' to 0x435aa8 size 0x3b5d

            001601.262: brfs: File read: 15197 bytes

            001603.177: brfs: File read: /mfs/sd/config.txt

            001603.538: dtparam: audio=off

            001611.315: brfs: File read: 1651 bytes

            001626.915: brfs: File read: /mfs/sd/overlays/rpi-cirrus-wm5102.dtbo

            001649.501: Loaded overlay 'rpi-cirrus-wm5102'

            002625.755: Device tree loaded to 0x17febb00 (size 0x447a)

            002627.029: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined

            004275.650: vchiq_core: vchiq_init_state: slot_zero = 0x57580000, is_master = 1

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

            056158.613: TV service: erorr getting supported HDMI modes

            057371.977: TV service: erorr getting supported HDMI modes

            057831.094: TV service: erorr getting supported HDMI modes

            058768.377: TV service: erorr getting supported HDMI modes

            082183.299: TV service: erorr getting supported HDMI modes

            082451.454: TV service: erorr getting supported HDMI modes

            [    0.000000] Booting Linux on physical CPU 0x0

            [    0.000000] Linux version 4.9.39+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #1020 Sat Jul 22 14:08:01 BST 2017

            [    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d

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

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

            [    0.000000] cma: Reserved 8 MiB at 0x17400000

            [    0.000000] Memory policy: Data cache writeback

            [    0.000000] On node 0 totalpages: 98304

            [    0.000000] free_area_init_node: node 0, pgdat c09168d4, node_mem_map d7c8bb00

            [    0.000000]   Normal zone: 864 pages used for memmap

            [    0.000000]   Normal zone: 0 pages reserved

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

            [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768

            [    0.000000] pcpu-alloc: [0] 0

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

            [    0.000000] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

            [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)

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

            [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

            [    0.000000] Memory: 370972K/393216K available (5948K kernel code, 489K rwdata, 1948K rodata, 404K init, 734K bss, 14052K reserved, 8192K cma-reserved)

            [    0.000000] Virtual kernel memory layout:

                vector  : 0xffff0000 - 0xffff1000   (   4 kB)

                fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

                vmalloc : 0xd8800000 - 0xff800000   ( 624 MB)

                lowmem  : 0xc0000000 - 0xd8000000   ( 384 MB)

                modules : 0xbf000000 - 0xc0000000   (  16 MB)

                  .text : 0xc0008000 - 0xc05d75dc   (5950 kB)

                  .init : 0xc0841000 - 0xc08a6000   ( 404 kB)

                  .data : 0xc08a6000 - 0xc0920788   ( 490 kB)

                   .bss : 0xc0920788 - 0xc09d7f88   ( 734 kB)

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

            [    0.000000] NR_IRQS:16 nr_irqs:16 16

            [    0.000030] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns

            [    0.000074] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns

            [    0.000173] bcm2835: system timer (irq = 27)

            [    0.000652] Console: colour dummy device 80x30

            [    0.001400] console [tty1] enabled

            [    0.001454] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)

            [    0.060352] pid_max: default: 32768 minimum: 301

            [    0.060819] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)

            [    0.060887] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)

            [    0.062011] Disabling cpuset control group subsystem

            [    0.062288] CPU: Testing write buffer coherency: ok

            [    0.062394] ftrace: allocating 21716 entries in 64 pages

            [    0.179207] Setting up static identity map for 0x8200 - 0x8238

            [    0.181264] devtmpfs: initialized

            [    0.190594] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5

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

            [    0.191220] futex hash table entries: 256 (order: -1, 3072 bytes)

            [    0.192534] pinctrl core: initialized pinctrl subsystem

            [    0.194049] NET: Registered protocol family 16

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

            [    0.206279] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.

            [    0.206374] hw-breakpoint: maximum watchpoint size is 4 bytes.

            [    0.206513] Serial: AMBA PL011 UART driver

            [    0.209654] bcm2835-mbox 2000b880.mailbox: mailbox enabled

            [    0.259215] bcm2835-dma 20007000.dma: DMA legacy API manager at d880d000, dmachans=0x1

            [    0.262003] SCSI subsystem initialized

            [    0.262312] usbcore: registered new interface driver usbfs

            [    0.262487] usbcore: registered new interface driver hub

            [    0.262725] usbcore: registered new device driver usb

            [    0.269281] raspberrypi-firmware soc:firmware: Attached to firmware from 2017-07-21 23:56

            [    0.271175] clocksource: Switched to clocksource timer

            [    0.328137] VFS: Disk quotas dquot_6.6.0

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

            [    0.328695] FS-Cache: Loaded

            [    0.329088] CacheFiles: Loaded

            [    0.348326] NET: Registered protocol family 2

            [    0.349769] TCP established hash table entries: 4096 (order: 2, 16384 bytes)

            [    0.349927] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

            [    0.350059] TCP: Hash tables configured (established 4096 bind 4096)

            [    0.350194] UDP hash table entries: 256 (order: 0, 4096 bytes)

            [    0.350259] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

            [    0.350605] NET: Registered protocol family 1

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

            [    0.351589] RPC: Registered udp transport module.

            [    0.351626] RPC: Registered tcp transport module.

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

            [    0.352805] hw perfevents: enabled with armv6_1176 PMU driver, 3 counters available

            [    0.355307] workingset: timestamp_bits=14 max_order=17 bucket_order=3

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

            [    0.376969] NFS: Registering the id_resolver key type

            [    0.377077] Key type id_resolver registered

            [    0.377120] Key type id_legacy registered

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

            [    0.382146] io scheduler noop registered

            [    0.382213] io scheduler deadline registered (default)

            [    0.382722] io scheduler cfq registered

            [    0.388646] BCM2708FB: allocated DMA memory 57500000

            [    0.388777] BCM2708FB: allocated DMA channel 0 @ d880d000

            [    0.397046] Console: switching to colour frame buffer device 82x26

            [    0.407490] bcm2835-rng 20104000.rng: hwrng registered

            [    0.410346] vc-cma: Videocore CMA driver

            [    0.413030] vc-cma: vc_cma_base      = 0x00000000

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

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

            [    0.421157] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)

            [    0.451574] brd: module loaded

            [    0.466475] loop: module loaded

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

            [    0.472380] usbcore: registered new interface driver smsc95xx

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

            [    0.705654] Core Release: 2.80a

            [    0.708125] Setting default values for core params

            [    0.710478] Finished setting default values for core params

            [    0.913309] Using Buffer DMA mode

            [    0.915704] Periodic Transfer Interrupt Enhancement - disabled

            [    0.918141] Multiprocessor Interrupt Enhancement - disabled

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

            [    0.923233] Dedicated Tx FIFOs mode

            [    0.926300] WARN::dwc_otg_hcd_init:1032: FIQ DMA bounce buffers: virt = 0xd7514000 dma = 0x57514000 len=9024

            [    0.931488] FIQ FSM acceleration enabled for :

            Non-periodic Split Transactions

            Periodic Split Transactions

            High-Speed Isochronous Endpoints

            Interrupt/Control Split Transaction hack enabled

            [    0.944332] dwc_otg: Microframe scheduler enabled

            [    0.944480] WARN::hcd_init_fiq:459: FIQ on core 0 at 0xc0451784

            [    0.947144] WARN::hcd_init_fiq:460: FIQ ASM at 0xc0451a60 length 36

            [    0.949745] WARN::hcd_init_fiq:486: MPHI regs_base at 0xd88a5000

            [    0.952506] dwc_otg 20980000.usb: DWC OTG Controller

            [    0.955219] dwc_otg 20980000.usb: new USB bus registered, assigned bus number 1

            [    0.958008] dwc_otg 20980000.usb: irq 56, io mem 0x00000000

            [    0.960672] Init: Port Power? op_state=1

            [    0.963323] Init: Power Port (0)

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

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

            [    0.971483] usb usb1: Product: DWC OTG Controller

            [    0.974066] usb usb1: Manufacturer: Linux 4.9.39+ dwc_otg_hcd

            [    0.976630] usb usb1: SerialNumber: 20980000.usb

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

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

            [    0.986387] dwc_otg: FIQ enabled

            [    0.986397] dwc_otg: NAK holdoff enabled

            [    0.986403] dwc_otg: FIQ split-transaction FSM enabled

            [    0.986424] Module dwc_common_port init

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

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

            [    0.994241] bcm2835-wdt 20100000.watchdog: Broadcom BCM2835 watchdog timer

            [    0.997436] bcm2835-cpufreq: min=700000 max=700000

            [    1.000694] sdhci: Secure Digital Host Controller Interface driver

            [    1.003468] sdhci: Copyright(c) Pierre Ossman

            [    1.006571] sdhost-bcm2835 20202000.sdhost: could not get clk, deferring probe

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

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

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

            [    1.019185] usbcore: registered new interface driver usbhid

            [    1.022043] usbhid: USB HID core driver

            [    1.026033] vchiq: vchiq_init_state: slot_zero = 0xd7580000, is_master = 0

            [    1.031498] Initializing XFRM netlink socket

            [    1.034749] NET: Registered protocol family 17

            [    1.038003] Key type dns_resolver registered

            [    1.043207] registered taskstats version 1

            [    1.046543] vc-sm: Videocore shared memory driver

            [    1.049285] [vc_sm_connected_init]: start

            [    1.053137] [vc_sm_connected_init]: end - returning 0

            [    1.063227] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2

            [    1.900329] console [ttyAMA0] enabled

            [    1.909300] sdhost: log_buf @ d7513000 (57513000)

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

            [    1.999701] of_cfs_init

            [    2.025143] of_cfs_init: OK

            [    2.031601] Waiting for root device /dev/mmcblk0p2...

            [    2.041035] random: fast init done

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

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

            [    2.234833] mmc0: new high speed SDHC card at address aaaa

            [    2.244395] mmcblk0: mmc0:aaaa SU16G 14.8 GiB

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

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

            [    2.331805]  mmcblk0: p1 p2 p3

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

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

            [    2.491807] usb 1-1: New USB device found, idVendor=0424, idProduct=9512

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

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

            [    2.521062] hub 1-1:1.0: 3 ports detected

            [    2.529234] devtmpfs: mounted

            [    2.538301] Freeing unused kernel memory: 404K (c0841000 - c08a6000)

            [    2.547769] This architecture does not have kernel memory protection.

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

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

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

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

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

            [    3.021679] smsc95xx v1.0.5

            [    3.119612] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:43:4b:a6

            [    3.211073] NET: Registered protocol family 10

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

            [    3.231446] systemd[1]: Set hostname to <m2pplayer>.

            [    3.467805] uart-pl011 20201000.serial: no DMA platform data

            [    4.233739] systemd[1]: [/lib/systemd/system/mpd.service:17] Unknown lvalue 'ControlGroup' in section 'Service'

            [    4.250240] systemd[1]: [/lib/systemd/system/mpd.service:20] Unknown lvalue 'ControlGroupAttribute' in section 'Service'

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

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

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

            [    4.346627] systemd[1]: Expecting device dev-ttyAMA0.device...

            [    4.732222] fuse init (API version 7.26)

            [    6.156115] systemd-udevd[119]: starting version 215

            [    7.933077] gpiomem-bcm2835 20200000.gpiomem: Initialised: Registers at 0x20200000

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

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

            [    8.936691] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry

            [   10.409750] systemd-journald[116]: Received request to flush runtime journal from PID 1

            [   12.439642] arizona spi0.1: Failed to get mclk1: -2

            [   12.439673] arizona spi0.1: Failed to get mclk2: -2

            [   12.440182] LDO1: supplied by RPi-Cirrus 1v8

            [   12.441064] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry

            [   12.561707] arizona spi0.1: WM5102 revision C

            [   12.619193] Adding alias for supply MICVDD,(null) -> MICVDD,spi0.1

            [   12.619985] Adding alias for supply MICVDD,(null) -> MICVDD,spi0.1

            [   12.619997] Adding alias for supply DBVDD2,(null) -> DBVDD2,spi0.1

            [   12.620007] Adding alias for supply DBVDD3,(null) -> DBVDD3,spi0.1

            [   12.620014] Adding alias for supply CPVDD,(null) -> CPVDD,spi0.1

            [   12.620021] Adding alias for supply SPKVDDL,(null) -> SPKVDDL,spi0.1

            [   12.620028] Adding alias for supply SPKVDDR,(null) -> SPKVDDR,spi0.1

            [   12.620571] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry

            [   12.829661] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry

            [   12.830668] MICVDD: supplied by RPi-Cirrus 1v8

            [   12.834067] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry

            [   12.965272] wm8804 1-003b: revision E

            [   12.966111] snd-rpi-cirrus soc:sound: ASoC: CODEC DAI wm5102-aif1 not registered - will retry

            [   13.484746] snd-rpi-cirrus soc:sound: wm5102-aif1 <-> 20203000.i2s mapping ok

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

            [   16.401627] Adding 102396k swap on /var/swap.  Priority:-1 extents:7 across:307200k SSFS

            [   17.832340] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1

            [   29.581585] random: crng init done

            [   46.747262] bcm2835-i2s 20203000.i2s: I2S SYNC error!

            Module                  Size  Used by

            cfg80211              525806  0

            rfkill                 21373  1 cfg80211

            snd_soc_wm5102        373091  1

            snd_soc_wm8804_i2c      1986  1

            snd_soc_wm8804          9720  1 snd_soc_wm8804_i2c

            snd_soc_wm_adsp        31617  1 snd_soc_wm5102

            snd_soc_arizona        38962  1 snd_soc_wm5102

            gpio_arizona            2277  0

            arizona_micsupp         3417  1

            arizona_spi             1971  0

            arizona_ldo1            3784  1

            snd_soc_bcm2835_i2s     6283  2

            snd_soc_rpi_cirrus     13872  1

            regmap_mmio             3977  1 snd_soc_bcm2835_i2s

            snd_soc_core          175744  7 snd_soc_wm8804,snd_soc_rpi_cirrus,snd_soc_wm5102,arizona_micsupp,snd_soc_bcm2835_i2s,snd_soc_arizona,snd_soc_wm_adsp

            snd_compress           10144  2 snd_soc_core,snd_soc_wm_adsp

            snd_pcm_dmaengine       6002  1 snd_soc_core

            snd_pcm                97825  6 snd_soc_wm8804,snd_soc_rpi_cirrus,snd_pcm_dmaengine,snd_soc_arizona,snd_soc_core

            i2c_bcm2835             6433  0

            snd_timer              22706  1 snd_pcm

            snd                    68784  6 snd_compress,snd_soc_rpi_cirrus,snd_timer,snd_soc_core,snd_pcm

            spi_bcm2835             7424  0

            bcm2835_gpiomem         3791  2

            uio_pdrv_genirq         3718  0

            uio                    10166  1 uio_pdrv_genirq

            fixed                   3029  11

            fuse                   94600  1

            ipv6                  384500  40

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

            card 0: RPiCirrus [RPi-Cirrus], device 0: WM5102 AiFi wm5102-aif1-0 []

              Subdevices: 0/1

              Subdevice #0: subdevice #0

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

              mikebainbridge  schrieb:

               

              Hi Matthias

              I'm trying to get a Wolfson card working with a Rpi B and Max2Play / Squeezelite - I've been through the driver install instructions here RPi Linux driver for Wolfson / Cirrus Logic Audio Card  and the card is recognised. I can get Squeezelite running too. I don't get any sound on any of the Sound Card Ports. I've disabled the default sound and shairport which seems to interfere sometimes. The error I'm failing on is when I try to assign the output using the playback to ****.sh . I get "amixer: Control hw:sndrpiwsp open error: No such device

              Any hints and tips ?

               

              The amixer error means you are using the old usecase scripts. Use the new mixer scripts from here http://www.horus.com/~hias/tmp/cirrus/cirrus-ng-scripts.tgz and everything should be fine.

               

              so long,

               

              Hias

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

                Got it ! Many thanks - sound from the SPDIF port running the script manually. Max2Play need to update their PHP in the scripts in the UI.

                 

                New problem now it's working (not yours I suspect) is running Squeezelite on mp3 up to 320 is fine. Flac gets choppy and wav doesn't play at all - I'll swap over onto the Max2Play and Squeezelite support areas !

                 

                thanks again

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

                  BTW: The latest version of the mixer scripts is also available in a github repo: https://github.com/HiassofT/rpi-cirrus-config

                   

                  so long,

                   

                  Hias

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

                    A massive thank you for this updated driver, it's ironic the card is finally getting the love it deserved as it's lifecyle comes to an end, but I for one am very grateful for your excellent efforts!

                    The Wolfson / Cirris cards are great value, especially when you factor in their capabilities compared to other DAC cards. Having ADC and DAC capability as well as microphones is brilliant.

                    I've just bought a couple more, especially as they now work with the Pi3 (when modified), for £18 they are a steal.

                    On that subject, I have a unit here with a Pi3 and the official Raspberry Pi 7" touch display. I wanted to confirm this card will still work (with the P5 re-routing) with the display. I'm aware that the display uses i2s, but on the Pi3 this is routed via the display connector and I believe this is a different i2S (i2s0) from the one on the GPIO connector of the Pi3 (i2s1). Is this correct?

                     

                    I'm really looking forward to making a neat all-in one Squeezebox touch replacement by adding this card along with the display.

                     

                    Also, the card is a little sensitive to PSU noise - the measured results on HiFi world show the effect of this: -

                    MEASURED PERFORMANCE

                    "A major issue with this audio board is that it’s very dependent upon the quality of the power supply used to drive it. A noisy 5V switch-mode power supply unit (PSU) resulted in 76dB dynamic range from Line Out, but a quiet one (Apple phone charger) gave an excellent 110dB – an improvement of 34dB gained solely by using a better power supply.

                    More surprisingly, this also cleaned up the digital S/PDIF output to a Chord 2Qute external DAC, allowing it deliver the full 121dB dynamic range of which it is capable.

                    A good supply would be a battery of some sort, lead-acid or lithium ion, for top audio results, or a smoothed linear supply, bearing in mind that 5V is needed and batteries deliver 6V. Switch-mode supplies generate rubbish and the audio card is sensitive to this (the Apple charger is switch mode, but clean). See p320 of the WM5102 datasheet for more on this."

                    A simple tweak that helps with this is to improve the filtering on the board itself - I've removed R36 (a zero-ohm link) and replaced it with a 1R resistor (so as not to create too large a voltage drop, the 3V3 regulator needs around 3.9V in, depending on load). I've then soldered a 6.3V 3300uF capacitor (salvaged from a PC motherboard) in parallel with C47, this creates a low pass filter starting at around 50Hz, which should help isolate the DAC from PSU noise and load-related noise from the Pi, especially at higher frequencies. A separate linear supply would be better, but this makes for an elegant solution when using a single supply. The board appears to draw very little current, the specs say <300mA IIRC, but it's nowhere near this on mine.

                    A longer term solution is to replace the 3V3 regulator (U13) with a high quality shunt regulator, fed from a current source. This will then provide a very high degree of isolation from the PSU - all the other regulators on the board run from the output of the 3V3 regulator.@

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

                      I got this working today on my own Raspberry Pi3, with the 7" touchscreen.

                       

                      I've documented the process which will hopefully make it easier for anyone else who wants to try this: -

                       

                      https://alw-audio.co.uk/?p=605

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

                        Hi Andrew,

                         

                        thanks a lot for sharing your blog posts, they are very well done and interesting reads!

                         

                        so long,

                         

                        Hias

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

                          Thank you for your hard work on the driver! It's transformed my ability to use the card.

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

                            Thanks for your work on the driver! I am trying to troubleshoot a Raspberry Pi that has been loaded with Documentation – The COSMO Project . At first the audiocard was not being recognized but then I followed the instructions here RPi Linux driver for Wolfson / Cirrus Logic Audio Card  and now the sound card is showing up. But I'm unable to get sound out from the headphones even after following those instructions.

                             

                            I have run

                            ./Reset_paths.sh

                            ./Playback_to_Headset.sh

                             

                            Here is the debug info

                            $ 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

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

                              Subdevices: 7/7

                              Subdevice #0: subdevice #0

                              Subdevice #1: subdevice #1

                              Subdevice #2: subdevice #2

                              Subdevice #3: subdevice #3

                              Subdevice #4: subdevice #4

                              Subdevice #5: subdevice #5

                              Subdevice #6: subdevice #6

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

                              Subdevices: 1/1

                              Subdevice #0: subdevice #0

                             

                            /etc/modprobe.d/cirrus.conf

                            softdep arizona-spi pre: arizona-ldo1

                            softdep spi-bcm2708 pre: fixed

                            options snd slots=snd-soc-rpi-cirrus,snd-bcm2835

                             

                            ouput of

                            $ vcgencmd version

                            Mar 16 2018 16:21:29

                            Copyright (c) 2012 Broadcom

                            version db815f3ae3dc88cf21fed2765f3b25d9d2bea67a (clean) (release)

                             

                            /boot/config.txt - debian Pastezone

                            output of dmesg - debian Pastezone

                            ouput of sudo vcdbg log msg 2>&1 - debian Pastezone

                             

                            output of

                            $ lsmod

                            Module                  Size  Used by

                            ipv6                  434176  36

                            tun                    36864  2

                            cfg80211              573440  0

                            rfkill                 28672  1 cfg80211

                            i2c_dev                16384  0

                            snd_soc_wm5102        385024  1

                            snd_soc_wm_adsp        40960  1 snd_soc_wm5102

                            snd_soc_arizona        49152  1 snd_soc_wm5102

                            gpio_arizona           16384  0

                            arizona_micsupp        16384  1

                            snd_soc_wm8804_i2c     16384  1

                            snd_soc_rpi_cirrus     24576  5

                            snd_soc_bcm2835_i2s    16384  2

                            snd_soc_wm8804         16384  1 snd_soc_wm8804_i2c

                            snd_bcm2835            32768  6

                            snd_soc_core          188416  7 snd_soc_wm8804,snd_soc_rpi_cirrus,snd_soc_wm5102,arizona_micsupp,snd_soc_bcm2835_i2s,snd_soc_arizona,snd_soc_wm_adsp

                            snd_compress           20480  2 snd_soc_core,snd_soc_wm_adsp

                            snd_pcm_dmaengine      16384  1 snd_soc_core

                            snd_pcm                98304  7 snd_soc_wm8804,snd_soc_rpi_cirrus,snd_pcm_dmaengine,snd_soc_bcm2835_i2s,snd_soc_arizona,snd_bcm2835,snd_soc_core

                            snd_seq                69632  0

                            snd_seq_device         16384  1 snd_seq

                            snd_timer              32768  2 snd_seq,snd_pcm

                            arizona_spi            16384  0

                            arizona_ldo1           16384  1

                            snd                    69632  30 snd_compress,snd_seq,snd_soc_rpi_cirrus,snd_timer,snd_seq_device,snd_bcm2835,snd_soc_core,snd_pcm

                            spi_bcm2835            16384  0

                            i2c_bcm2835            16384  0

                            evdev                  24576  6

                            uio_pdrv_genirq        16384  0

                            uio                    20480  1 uio_pdrv_genirq

                            fixed                  16384  11

                             

                            I have used alsamixer to check that the default card is the Cirrus Logic one. But when logged in to the desktop I'm unable to select RPI-Cirrus Logic from the options.

                            https://ibb.co/hAogaH

                             

                             

                             

                             

                             

                             

                             

                             

                             

                             

                             

                            Thanks in advance.

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

                              The logs look fine, not exactly sure what's failing.

                               

                              I'm not familiar with COSMO, but here are some things to check:

                              Did you get any errors on the console when running Playback_to_Headset.sh?

                              Have you tested audio output with speaker-test?

                              After running and stopping speaker-test do you see "DMA transfer could not be terminated" in dmesg?

                              Does the card work with Raspbian?

                               

                              so long,

                               

                              Hias

                              • 329. Re: New reworked driver for Wolfson/Cirrus Logic audio card
                                arunk

                                I finally managed to get the sound card to work using

                                 

                                $ aplay loop.wav -D sysdefault:CARD=0

                                 

                                by trying things from here - https://raspberrypi.stackexchange.com/questions/19705/usb-card-as-my-default-audio-device

                                 

                                but I'm not able to get the default sound card to be card 0, even though that is the card 0 shown when I run `$ aplay -l`. Disabling the default soundcard by commenting out dtparam=audio=on in /boot/config.txt makes the Raspberry Pi unusable. The desktop GUI loads but keeps bouncing. The top menu does not display and the system is not usable. Any clue on what to check for?

                                 

                                Thanks so much for your help.