Install wm8960-soundcard

hello everyone, I wanted to make a multimedia screen with the official reaspberry screen and as a support a smart pi touch and I also had a WM8960 sound card, I can not get it to work.
I have the latest version of OSMC and RPI 2
thanks for the help

Try updating to a v19 build. This features a newer kernel with more drivers.

I took the last version available in downloads

sorry i don’t speak english very well, i use google translate

How did you install the WM8960?

I found some instructions at https://www.waveshare.com/w/upload/5/54/WM8960_Audio_HAT_User_Manual_EN.pdf. However, I also found some complications with these instructions, like it uses DKMS, which OSMC does not currently support.

On the OSMC 4.19 kernel, the driver failed to build, probably because it is a bit old. It might work on the OSMC 5.10 kernel. I don’t have an OSMC 5.10 kernel to try right now but the driver does compile on a Raspberry Pi OS 5.10 kernel, so will probably also compile on OSMC kernel 5.10.

1 Like

thank you, I understand better why I had error messages, and also to install the drivers need the git command but the command does not exist (-bash: git: command not found)

sudo apt-get install build-essential
I think that should pull in git.

1 Like

thank you, installation in progress on the other hand essential no S at the end
I signal it if ever someone uses the topic for the same problem

Corrected

I have an error during the installation

osmc@osmc:~/WM8960-Audio-HAT$ sudo ./install.sh
Hit:1 http://security.debian.org buster/updates InRelease
Hit:2 http://ftp.debian.org/debian buster InRelease
Hit:3 http://ftp.debian.org/debian buster-updates InRelease
Hit:4 http://ftp.fau.de/osmc/osmc/apt buster InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package raspberrypi-kernel-headers
E: Unable to locate package raspberrypi-kernel
Reading package lists... Done
Building dependency tree
Reading state information... Done
libasound2-plugins is already the newest version (1.1.8-1).
dkms is already the newest version (2.6.1-4).
git is already the newest version (1:2.20.1-2+deb10u3).
i2c-tools is already the newest version (4.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

------------------------------
Deleting module version: 1.0
completely from the DKMS tree.
------------------------------
Done.

Creating symlink /var/lib/dkms/wm8960-soundcard/1.0/source ->
                 /usr/src/wm8960-soundcard-1.0

DKMS: add completed.
Error! Your kernel headers for kernel 4.19.122-2-osmc cannot be found.
Please install the linux-headers-4.19.122-2-osmc package,
or use the --kernelsourcedir option to tell DKMS where it's located
mkdir: cannot create directory '/etc/wm8960-soundcard': File exists
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.
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Enjoy!
------------------------------------------------------
osmc@osmc:~$ uname -a
Linux osmc 4.19.122-2-osmc #1 SMP PREEMPT Sat Jul 4 02:39:56 UTC 2020 armv7l GNU/Linux

on the forum I found this command sudo apt install rbp2-headers - $ (uname -r)

sudo apt install rbp2-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  module-init-tools
The following NEW packages will be installed:
  rbp2-headers-4.19.122-2-osmc
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 9307 kB of archives.
After this operation, 66.1 MB of additional disk space will be used.
Get:1 http://ftp.fau.de/osmc/osmc/apt buster/main armhf rbp2-headers-4.19.122-2-osmc armhf 2 [9307 kB]
Fetched 9307 kB in 3s (3429 kB/s)
Selecting previously unselected package rbp2-headers-4.19.122-2-osmc.
(Reading database ... 34201 files and directories currently installed.)
Preparing to unpack .../rbp2-headers-4.19.122-2-osmc_2_armhf.deb ...
Unpacking rbp2-headers-4.19.122-2-osmc (2) ...
Setting up rbp2-headers-4.19.122-2-osmc (2) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.122-2-osmc /boot/vmlinuz-4.19.122-2-osmc
Error! Your kernel headers for kernel 4.19.122-2-osmc cannot be found.
Please install the linux-headers-4.19.122-2-osmc package,
or use the --kernelsourcedir option to tell DKMS where it's located

As I already mentioned, (a) DKMS is not supported on OSMC; and (b) the driver does not build on the 4.19 kernel. As you also discovered, the install.sh script is written for the Raspberry Pi OS, so you will need to modify it for OSMC – or run the steps manually.

If you are using the Waveshare HAT, I would suggest that you wait until the 5.10 kernel is released. Because DKMS doesn’t work on OSMC, you will probably need to rebuild the driver manually whenever a new kernel version is released.

1 Like

I’m sorry I misunderstood, I will wait with the next system update to see what happens