Waveshare WM8960

Hi everyone, new user to Volumio here!
I’ve come across the Volumio system as a viable solution to distribute music easily with both DACs and have been looking at using this Waveshare WM8960 driver board with small speakers as a little test bench but it does not want to work.
looking at the kernel files for Volumio there is a file for the WM8960 codec installed but if I go through the steps to install the sound card driver I get errors

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....(bad exit status: 2)
make KERNELRELEASE=3.6-trunk-rpi -C /lib/modules/3.6-trunk-rpi/build M=/var/lib/dkms/wm8960-soundcard/1.0/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 3.6-trunk-rpi (armv7l)
Consult /var/lib/dkms/wm8960-soundcard/1.0/build/make.log for more information.
Error! echo
Your kernel headers for kernel 4.14.92+ cannot be found at
/lib/modules/4.14.92+/build or /lib/modules/4.14.92+/source.
Error! echo
Your kernel headers for kernel 4.14.92-v7+ cannot be found at
/lib/modules/4.14.92-v7+/build or /lib/modules/4.14.92-v7+/source.
Created symlink from /etc/systemd/system/sysinit.target.wants/wm8960-soundcard.service to /lib/systemd/system/wm8960-soundcard.service.
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Enjoy!
------------------------------------------------------
volumio@volumio:~/WM8960-Audio-HAT$ sudo reboot

Anyone able to give me any pointers as to how to have this soundcard installed and functional, the small speaker form factor and smallness of the unit with a pi zero w is what I’m looking for as a test bench.

Thanks All.

Hi Sammers, same here. I just recently received mine in the mail, assuming it will work with the various dac amps that volumio supports. I was wrong… A whole day of searching and following the brief wiki guide https://github.com/waveshare/WM8960-Audio-HAT%20for%20the%20WM8960 from waveshare, yields zero results.

Mine is added manually to dkms correctly but failed to be detected in the aplay -l list as card 1. However it was detected as hifiberry instead? Strange…I tried all sorts of i2c configurations from volumio’s GUI, nothing works.

A bit upsetting from waveshare, the audio hat is just what I need too, small, supports 2 x amped L/R audio outputs.

Did anyone get this to work? I’m struggling around and I’m about to replace it with a hi-fi berry board

Hi,
I started to play with Waveshare WM8960 and volumio and now I have a partially working setup.
To avoid the ‘linux-image-3.6-trunk-rpi’ error messages you have to extend the /boot partition from 60M to eg. 100M.
Right before the ./install.sh card driver installation script you have to download the kernel source of your current kernel with sudo volumio kernelsource command. (You can also remove the apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel line from intsall.sh if you want to save some disk space).
After the install.sh you can check the success of the installation volumio@volumio:~$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: wm8960soundcard [wm8960-soundcard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0] Subdevices: 0/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 IEC958/HDMI [bcm2835 IEC958/HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1] Subdevices: 1/1 Subdevice #0: subdevice #0

Under the playback options now you can select wm8960-soundcard as output device. And voilà!

Currently the I2S mode doesn’t work for me but I will try to find out the right entry in dacs.json to make it work.

EDIT: it works with 2.692 but not with 2.668 or 2.657

The correct entry is {"id":"wm8960-soundcard","name":"Waveshare - WM8960","overlay":"wm8960-soundcard","alsanum":"0","mixer":"","modules":"","script":"","needsreboot":"no"},
You need to insert it into dacs.json under /volumio/app/plugins/system_controller/i2s_dacs in “Raspberry PI” section
So the result would be similar to this:

{ "devices":[ {"name":"Raspberry PI","data":[ {"id":"wm8960-soundcard","name":"Waveshare - WM8960","overlay":"wm8960-soundcard","alsanum":"0","mixer":"","modules":"","script":"","needsreboot":"no"}, {"id":"adafruit-max98357","name":"Adafruit MAX98357","overlay":"hifiberry-dac","alsanum":"1","mixer":"","modules":"","script":"","needsreboot":"yes"},
Now you can switch I2S DAC to on and select Waveshare - WM8960 form the list under Playback options.

Hi,
Thanks for the info posted here, it helped me setup my Waveshare. I would just like to add that, for my setup, using volumio 2.692, the i2s mode didn’t quite work reliably at each reboot and I wasn’t able to change the volume level. I had to update dacs.json to include the i2s-mmap overlay, the mixer and the i2c address, as well as force a reboot. The updated dacs.json line looks as follows:

{"id":"wm8960-soundcard","name":"Waveshare WM8960","overlay":"i2s-mmap, wm8960-soundcard","alsanum":"0","mixer":"Speaker","modules":"","script":"","i2c_address":"1a","needsreboot":"yes"}

Hi,
I tested it with Raspberry Pi Zero W and it works fine for me and I did not have problems with reboot. What kind of SBC are you using?

Hi,
I am using a Pi 3 Model A+. I’ve found that it keeps reverting the Volume Mixer Control to headphones but I have a speaker connection on the green block not on the headphone jack. When that happens I have to go to Settings and set it back to Speaker…
waveshare.jpg

Hello, i have the same problem to work this card wm8960 with volumio
It is work with the 2.773 of volumio? how i can " extend the /boot partition from 60M to eg. 100M" because raspi-config isn’t installed? could you please explain how i have to do?
Thank you very much

Hi,
You can use any free partition manager such as EaseUS Partition Master Free or GParted Disk Partition

Hi there!

Sorry to bother you guys with a maybe stupid beginner-question: How do I do that? How can I update the dacs.json file? I’m not even able to find this file.

Thanks for your time!

hi, is it possible to make an image of your working volumio with the WM8960 HAT?

I can’t get it to work…

Thanks