ULTRA++ installation guide

update 04/04/23 : note that due to an update of PI OS only the 64bits version on the PI OS is working.
GitHub - Sybility/WM8960-Audio-HAT: The drivers of [WM8960 Audio HAT] for Raspberry Pi

Installation:

I have not written the install script but it will be fully compatible with this project form WAVESHARE as it is based on the WOLFSON WM8960. The Raspiaudio implementation offers an additional external microphone input as well as stereo speakers onboard.

Choose your method :

Method 1 the simple way: if you just need to use the speakers and onboard microphone:
UPDATE 25/01/24 only this method is supported today

Method 2 full control if you just need to use all options (longer installation):
[update 25/01/24] No longer working

Check also comments here with use with RPI5:

[updated 25/04/22]
This is a new method from Seed. Clone the driver and install it with commands copy and paste each line in a terminal window:

git clone GitHub - RASPIAUDIO/WM8960-Audio-HAT: The drivers of [WM8960 Audio HAT] for Raspberry Pi

cd WM8960-Audio-HAT
sudo ./install.sh
sudo reboot

it could take a long time 5 minutes on a PI4, but 15mn or more on a Pi zero, so relax go get a coffee then

sudo reboot

if you use raspbian desktop select the audio device from the top right menu by doing a right click:

To test type
speaker-test -l5 -c2 -t wav

if it does not work redo the install one more time

cd WM8960-Audio-HAT
sudo ./uninstall.sh
sudo ./install.sh

If it does work, just go on youtube and play some music!

Pinout:

GPIO PIN FUNCTION
GPIO2 PIN3 I2C SDA
GPIO3 PIN5 I2C SCL
GPIO25 PIN22 LED
  PIN17 3.3v
  PIN25 39 6 14 GND
GPIO19 PIN35 I2S LRCLK
  PIN2 4 5v
GPIO18 PIN12 I2S CLK
GPIO20 PIN38 I2S ADC
GPIO21 PIN40 I2S DAC
GPIO23 PIN16 BUTTON (this pin as an external pull up)

Device number
this will be usefull in the alsa mixer to understand what input is connected to which microphones
Onbard microphones:
Linput1
Rinput1

External microphone jack input:
Linput2
Rinput2

Line input
Linput3
Rinput3

External speakers/speaker output:
SPK_L
SPK_R

Presets

You will notice that alsamixer have a LOT of settings with that dac so it could be confusing at first to do what you want. So I made a few basic scripts to select different devices, these Alasa presets are here : GitHub - RASPIAUDIO/WM8960-Audio-HAT: The drivers of [WM8960 Audio HAT] for Raspberry Pi look for the preset_* files

For example download this Onboard microphones input and headphones output:

wget https://raw.githubusercontent.com/RASPIAUDIO/WM8960-Audio-HAT/master/preset_onboard_microphones_input1

For example to only enable the headphones and onboard speakers :

alsactl --file preset_onboard_microphones_input1 restore 0

sudo arecord -f cd -Dhw:0

Here are others scripts I have made:

External microphone input and headphones output:
preset_external_jack_microphone_input2

Onboard microphones input and headphones output:
preset_onboard_microphones_input1

Onboard microphones with high gain input and headphones output:
preset_onboard_microphones_input1_alotofgain

Headphones output:
preset_headphone_jack_output_only

External line input and headphones output:
preset_lineIN-jack_input3

Headphones ans speakers output:
preset_onboard_Speakers_and_headphone_jack_output

To save your own preset:

alsactl --file Mycustom_presets store

To restore your own preset:

alsactl --file Mycustom_presets restore

I have just followed the installation guide for my RPi4 and it worked fine. I had to run the install script twice.
I would like to use this board on a Jetson Nano. Could you provide any guidance on doing that?
I am also replying on this because I noticed that the pinout seems to be wrong. Should not I2S CLK be PIN12? That seems to be how both the Nano and RPI configures their GPIO port for audio devices.

Hi and welcome!

Porting a the WM8960 codec on Jetson nano will involve some work as this codec usues some I2C commands to change volumes or to enable other options. Somebody already tried and I have found that:

Please share your results.

Yes, I have also found that and will try to see how it goes. Thanks for your response.

Hello there, thanks for the instructions. I have run the script on my raspberry pi 4 and it seems to be working (the soundcard gets recognized by alsa). But for some reason everything on the raspberry pi which has to do with the soundcard takes place really slowly. For example changing the volume works normal if the output is on analog (rpi onboard output), but if it is set to wm8960, after moving the volume slider it takes a few seconds for the slider to actually move! Some sound applications have also got really slow since I installed the soundcard. Audacity for example does not even launch after running and seeing the logo.
Besides I don’t hear any sound from the sound card. Neither from the speakers nor through the headphone jack. Do you know what’s the problem?

p.s I’ve run the second bash script from the end of your post as well.

Thanks in advance

Hi and welcome,
if you can’t hear any sound something failed, can you try in the download directory to run the uninstall script, and do install it again?

I did, it did not work again. I got following at the end of the installation:

DKMS: install completed.
Created symlink /etc/systemd/system/sysinit.target.wants/wm8960-soundcard.service → /lib/systemd/system/wm8960-soundcard.service.
Job for wm8960-soundcard.service failed because the control process exited with error code.
See “systemctl status wm8960-soundcard.service” and “journalctl -xe” for details.

running the systemctl command will give out:

wm8960-soundcard.service - WM8960 soundcard service

Loaded: loaded (/lib/systemd/system/wm8960-soundcard.service; enabled; vendor
Active: active (exited) since Tue 2021-02-23 13:33:00 CET; 5min ago
Process: 498 ExecStart=/usr/bin/wm8960-soundcard (code=exited, status=0/SUCCES
Main PID: 498 (code=exited, status=0/SUCCESS)

Feb 23 13:32:55 raspberrypi systemd[1]: Starting WM8960 soundcard service…
Feb 23 13:32:55 raspberrypi wm8960-soundcard[498]: + exec
Feb 23 13:32:55 raspberrypi wm8960-soundcard[498]: ++ basename /usr/bin/wm8960-s
Feb 23 13:33:00 raspberrypi systemd[1]: Started WM8960 soundcard service.

running the test script will give out:

–2021-02-23 13:34:26-- http://test.raspiaudio.com/
Resolving test.raspiaudio.com (test.raspiaudio.com)… 217.160.0.133, 2001:8d8:100f:f000::268
Connecting to test.raspiaudio.com (test.raspiaudio.com)|217.160.0.133|:80… connected.
HTTP request sent, awaiting response… 302 Found
Location: http://raspiaudio.com/s/test [following]
–2021-02-23 13:34:27-- http://raspiaudio.com/s/test
Resolving raspiaudio.com (raspiaudio.com)… 217.160.0.133, 2001:8d8:100f:f000::268
Reusing existing connection to test.raspiaudio.com:80.
HTTP request sent, awaiting response… 302 Found
Location: https://raspiaudio.com/s/test [following]
–2021-02-23 13:34:27-- https://raspiaudio.com/s/test
Connecting to raspiaudio.com (raspiaudio.com)|217.160.0.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1129 (1.1K)
Saving to: ‘STDOUT’

  •                 0%[                    ]       0  --.-KB/s               -----> Test for Raspiaudio MIC+
    

------Please puch on the Yellow button to continue

  •               100%[===================>]   1.10K  --.-KB/s    in 0.002s  
    

2021-02-23 13:34:27 (598 KB/s) - written to stdout [1129/1129]

–2021-02-23 13:34:27-- http://27/
Resolving 27 (27)… 0.0.0.27
Connecting to 27 (27)|0.0.0.27|:80… amixer: Unable to find simple control ‘Micro’,0

amixer: Unable to find simple control ‘Master’,0

Are you using the last version of Raspbian release 32bits 2021-01-11?

I downloaded and installed the raspbian in november 2020, so I’m not sure… (kinda new to the whole rpi stuff)
but the command uname -a gives out:

Linux raspberrypi 5.10.11-v7l+ #1399 SMP Thu Jan 28 12:09:48 GMT 2021 armv7l GNU/Linux

Does this mean the release is from 2021-01-28 ? And should I use a specific verion of raspbian to get the soundcard work?

No it shouldn’t be limited to this release, but the idea is to try a tested working confirguration then add your other software components one by one to understand what make it fails. My advice is to start from a fresh copy of raspbian last version and run the install script again.

thx

1 Like

I have gone through all the steps to install Ultra on a Raspberry Pi 3 a few times, including uninstall and re-installs.
I get the following error messages at the conclusion of the install:

.

I don’t know where to go from here. Can someone walk me through the steps to correct this.

Hi Daniel,

Can you confirm that you are using :
"Raspberry Pi OS with desktop and recommended software

  • Release date: January 11th 2021
  • Kernel version: 5.4 "
    ?

Using command uname -a, I get the following
Linux raspberrypi 4.9.35 - v7+ #1014 SMP Fri June 30 14:47:43 BST 2017 armv71 GNU/Linux

this is an old version, is there any way you could do a a new sd with the last version or upgrade:

When I
sudo apt update
sudo apt full-upgrade

I get the same version response.4.9.35.

Then I think you need to flash a new SD card with the lattest version.

I was having trouble using the device on a raspberry pi 3. I was still running raspbian stretch and it seemed that was a problem. So I updated to buster using

sudo apt-get update
sudo apt-get upgrade
sudo sed -i 's/stretch/buster/g' /etc/apt/sources-list
sudo sed -i 's/stretch/buster/g' /etc/apt/sources-list.d/raspi-list
sudo apt-get remove apt-listchanges
sudo apt-get update
sudo apt-get full-upgrade -y

After the update was finished, I also ran rpi-update to update the firmware. Unfortunately, I still was not able to use the device. To resolve the issue, I installed a fresh raspbian image to another sd card and installed the device on this system. There it worked flawlessly, so I tried to figure out the differences between the two systems.
Turns out, that a specific firmware version seems to work with the device. The firmware version is 5.10.17
To use this specific version in your raspbian OS, use the following command to install it:

sudo rpi-update 78c1429cc1d5a200d824d2629c3ceba4ba4617fe

It works for me, let me know if it works for you.

Another thing: If you want to persist the settings that you have made with alsamixer, save your settings to the file /etc/wm8960-soundcard/wm8960_asound.state. That way the settings will not get reset after a reboot. Use the command

sudo alsactl --file /etc/wm8960-soundcard/wm8960_asound.state store

thanks for your feedback, I will try that

Here are some additional steps you may want to do:

  1. Comment line dtparam=audio=on in sudo nano /boot/config.txt

  2. sudo nano /etc/pulse/default.pa and then add the following lines and save.

    load-module module-alsa-source device = hw: 0,0
    load-module module-alsa-sink

The reason you want to disable onboard audio is because some version of Buster keeps changing the audio out to HDMI on reboot.

Thanks to RASPIAUDIO, I just received their hat. The above works for all the wm8960 based devices.

I have modified the asound.conf as well with a buffer. Will raise a PR in the git.