Can the original (previously Wolfson) Cirrus Logic audio card be made to work with Volumio 3.449?

Thanks for such a speedy response, Darmur. Yes, I’d be very happy to help. Before I posted, while checking for relevant threads, I found a link to instructions for providing just this information - now I can’t find it again! I’ll wait on your guidance.

IIRC the Woflson card that I have could not be connected to a Pi3 without some soldering, it was for this reason I used a Pi1, where it plugs in simply. I even found a nice case on eBay to house the combined unit.
I should probably tidy up my guide because I started with mods to the json file but ended up not using them. I haven’t powered the unit up recently, I found the Pi1 too slow to be usable for Volumio, especially as I have a couple of x64 NUCs and Pi3s lying around.

I don’t recall having to do any soldering. Maybe it’s not a Pi3! I do know it’s a B+; was that a version of the 1 or 2 rather than the 3?

there are two versions of the Wolfson/Cirrus Audio card, one is for Raspberry Pi B+ (with 26-pin + 8-pin connectors), one is for newer RPis (with 40-pin connector)

image

1 Like

I’ll write you tomorrow with the instructions

  1. connect the SD-card to the PC
  2. open the file “userconfig.txt” with Notepad++ (under Windows) or with any text editor (under macOS or Linux)
  3. add the string “dtoverlay=cirrus-wm5102” on a new line and save
  4. insert the card on the Raspberry Pi, power it up and then follow the instructions from the initial post of this thread
  5. type the command “amixer controls” and paste the output (text or screenshot)

Hi,

From the images you posted yesterday I’m sure mine is the one in the bottom picture.

Here’s the info requested:

RaspberryPi B+

I2S DAC: Off

Welcome to Volumio for Raspberry Pi (5.10.92+ armv6l)
volumio@volumio-rpb:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
volumio@volumio-rpb:~$ amixer controls
numid=4,iface=MIXER,name='Master Playback Switch'
numid=3,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'
volumio@volumio-rpb:~$ 

Looking at that output, I suspect I shouldn’t have run with I2S DAC = Off. But when I set up the Pi, having nothing in the presented list that corresponded to the Cirrus Logic card, I assumed I’d have to run without a DAC. Should I just choose the first one in the list and run the commands again?

the DAC must be connected to the Raspberry Pi to obtain the required information.

please run with I2S DAC set as OFF, but with the added line in userconfig.txt

I did add that line, and I’ve just checked that t was saved. BTW, I assume this is the file in the boot partition: /boot/userconfig.txt? It was an empty file when I opened it and now has just that one line in it.
I’m now wondering if the audio card has come loose inside the case. I’ll open it up and take a look.

with what program did you edit the /boot/userconfig.txt file?

gedit on a linux desktop (Manjaro Gnome)

I edited the file as you suggested from the desktop, but when I checked it I used ssh from the desktop into the pi.

I’ve checked the card is firmly attached, run the commands again, but got the same result.

editing from a linux system is fine, it’s not the problem

please make sure the connections are good

Yes, seems firmly attached. I’ve run the commands again, but same result.

Is there another command to check it’s seen by the OS?

PS When last used (years ago) it was definitely working. At that time I used Max2play as the OS and it recognised and deployed the card.

I think I’ve found the problem.

the dt-overlay has been renamed in the most recent kernels, for the kernel 5.10.x we use on Volumio, the name is the old one.

please edit the string on /boot/userconfig.txt as following

dtoverlay=rpi-cirrus-wm5102

and do again the procedure

Here we go:

volumio@volumio-rpb:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 2: RPiCirrus [RPi-Cirrus], device 0: WM5102 AiFi wm5102-aif1-0 [WM5102 AiFi wm5102-aif1-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
volumio@volumio-rpb:~$ amixer controls
numid=4,iface=MIXER,name='Master Playback Switch'
numid=3,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'
volumio@volumio-rpb:~$ 

That seems to have got a result at last. Though no change from the amixer controls command - were you expecting something related to the audio card?

the amixer request was an attempt, not 100% required to have this HAT in the DAC list.

you should be able to use the HAT right now, keeping I2S DAC OFF and selecting the new entry from the drop-down selection.

Maybe you have to change the default control for volume or change something from Alasamixer to enable the SPDIF output. Please let me know, so I can move forward with creating a pull-request

OK, thanks, definite progress, in that, as you say, I can now choose the cirrus card from the drop-down menu; but no sound! Checking that all connections are good, I took the jack out the cirrus line-out, plugged it into the pi headphones socket, and immediately plenty of sound.

Is the fact that the Cirrus card now appears in the Output Device drop-down menu due simply to that userconfig.txt edit, or is it also dependent on the system finding the actual hardware card? (If the latter, we know it’s probably not a HAT connection problem but more likely software configuration?)

PS I’m not needing the SPDIF output as it’s a purely analogue amplifier.

1 Like

if the card is listed with aplay -l, it means it’s recognized and configured by the OS.

some HATs require to change settings via alsamixer, but not having the board in my hands I can’t tell you what to change

looking at the previous thread from @pauljwells , he downloaded this collection of scripts and run “./Playback_to_Lineout.sh” to have sound coming out from the green connector

Thanks, that’s helpful.

I see @pauljwells is posting for a Pi B and with Volumio v. 2.861. Mine’s a B+ running Vol. 3.449 . Could it cause problems to follow his guide step by step?