Giter VIP home page Giter VIP logo

wm8960-audio-hat's Introduction

WM8960 Audio HAT

The drivers of [WM8960 Audio HAT] for Raspberry Pi.

http://www.waveshare.net/shop/WM8960-Audio-HAT.htm

http://www.waveshare.com/wm8960-audio-hat.htm

Install wm8960-soundcard

Get the wm8960 soundcard source code. and install all linux kernel drivers

git clone https://github.com/waveshare/WM8960-Audio-HAT
cd WM8960-Audio-HAT
sudo ./install.sh 
sudo reboot

While the upstream wm8960 codec is not currently supported by current Pi kernel builds, upstream wm8960 has some bugs, we had fixed it. we must it build manually.

Check that the sound card name matches the source code wm8960-soundcard.

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: 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 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: wm8960soundcard [wm8960-soundcard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: wm8960soundcard [wm8960-soundcard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

If you want to change the alsa settings, You can use sudo alsactl --file=/etc/wm8960-soundcard/wm8960_asound.state store to save it.

Usage:

#It will capture sound an playback on hw:1
arecord -f cd -Dhw:1 | aplay -Dhw:1
#capture sound 
#arecord -d 10 -r 16000 -c 1 -t wav -f S16_LE test.wav
arecord -D hw:1,0 -f S32_LE -r 16000 -c 2 test.wav
#play sound file test.wav
aplay -D hw:1,0 test.wav

uninstall wm8960-soundcard

If you want to upgrade the driver , you need uninstall the driver first.

pi@raspberrypi:~/WM8960-Audio-HAT $ sudo ./uninstall.sh 
...

------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Thank you!
------------------------------------------------------

Enjoy !

wm8960-audio-hat's People

Contributors

dr-ni avatar waveshare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wm8960-audio-hat's Issues

Sound Output

Hi I want the module to always output sound on the connected speaker like when I am playing youtube is there anyway to configure this\

also instead of outputting
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
it outputs this
card 0: b1[bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]

How do I make it the default device?

Hi,
I have been working on getting this device working on my Raspberry Pi 4 using the latest Raspbian OS 32-bit.
After some issues I have got aplay working and mpg123 but I have to specify the device (HW:1,0) every time.
I followed the guide provided in PDF form and got to the section on making it the default device. I edited the specified config file and made the changes suggested in the instructions. I get silence unless I specify the device.
If left with the original settings I get audio out of the Raspberry Pi headphone socket so the players are working when you do not specify the device and are picking up the default device when it's set to the Pi but not when it's set to the WM8960.
Any ideas how to get it working as the default device?

These are the changes in alsa.conf I have tried...

First the suggested changes from the instructions:
defaults.ctl.card 1
defaults.pcm.card 1
These just produce silence.

When all are set to 0 the sound outputs through the Pi's headphone socket fine.

aplay -l produces the following output:
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 8/8
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
Subdevice #7: subdevice #7
card 1: wm8960soundcard [wm8960-soundcard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

only 20 seconds playback

hallo,
i tried wl8960 driver on raspberry 3 and 4 rasbean buster.
the installation works good, it shows everthing fine,

i can play a soundfile:
aplay -D plughw:CARD=wm8960soundcard,DEV=0 test.wav

but, this runs only for ~20 seconds, after that no sound is produced, i have to reboot to get sound again.
but the alsamixer still works ok.
does anybody know, how to solve this?

thanks anan

Any way for WM8960 Hat to work with iUniker 2.8" 640x480 touchscreen?

The 2.8" MZDPI-VGA-ZERO touchscreen uses these pins on Raspberry Pi:
1 - 3V3
2 - 5V0
3 - GPIO2 - VSYNC (Vertical synch for Display DATA)
4 - 5V0
5 - GPIO3 - HSYNC (Horizontal synch for Display DATA)
6 - GND
7 - GPIO4 - B3 (BLUE signal 3)
8 - GPIO14 - G4 (GREEN signal 4)
9 - GND
10 - GPIO15 - G5 (GREEN signal 5)
11 - GPIO17 - G7 (GREEN signal 7)
12 - GPIO18 - NC
13 - GPIO27 - TP-INT (touch int signal)
14 - GND
15 - GPIO22 - R5 (RED signal 5)
16 - GPIO23 - R6 (RED signal 6)
17 - 3V3
18 - GPIO24 - R7 (RED signal 7)
19 - GPIO10 - SPI-MOSI (SPI master output slave input)
20 - GND
21 - GPIO9 - SPI-MISO (SPI master input slave output)
22 - GPIO25 - NC
23 - GPIO11 -SPI-SCLK (SPI clock)
24 - GPIO8 - B7 (BLUE signal 7)
25 - GND
26 - GPIO7 - B6 (BLUE signal 6)
27 - GPIO0 - DE (Enable signal for Display)
28 - GPIO1 - PCLK (Clock signal for Display Data)
29 - GPIO5 - B4 (BLUE signal 4)
30 - GND
31 - GPIO6 - B5 (BLUE signal 5)
32 - GPIO12 - G2 (GREEN signal 2)
33 - GPIO13 - G3 (GREEN signal 3)
34 - GND
35 - GPIO19 - NC
36 - GPIO16 - G6 (GREEN signal 6)
37 - GPIO26 - NC
38 - GPIO20 - R3 (RED signal 3)
39 - GND
40 - GPIO21 - R4 (RED signal 4)

The Waveshare WM8960 Hat uses these pins:
2 - 5V0
3 - GPIO2 - SDA (I2C Data input)
5 - GPIO3 - SCL (I2C Clock input)
6 - GND
11 - GPIO17 - BUTTON (Configurable)
12 - GPIO18 - CLK (I2S Bit clock input)
35 - GPIO19 - LRCLK (I2S Frame clock input)
38 - GPIO20 - ADC (I2S Data input)
40 - GPIO21 - DAC (I2S Data output)

It looks like interference happens on pins 3, 5, 11, 38, and 40.

Question 1: any way to re-jig the pin assignment so as to correct the interference?
Question 2: if it is possible, is it straightforward to update one or the other board driver to reflect the new pins?

THANKS for humoring me, I don't know much about Raspberry Pi and I have these two hats (one is a really slick little touchscreen display, the other is a fantastic little audio amplifier). I got them to work individually, it would be nice if there was a way for them to work together at the same time.

MZDPI-VGA-ZERO Pins.xls
2.8 inch Screen User Guide 190320.pdf

WM8960 and RPi0-2W running Raspbian (v 5.10.103, armv7l)

Hello,

I recently tried to download and install the driver for this audio hat from both:
https://github.com/waveshare/WM8960-Audio-HAT and
https://github.com/Sybility/WM8960-Audio-HAT.git

However, each time there is an error trying to start up the service:
● wm8960-soundcard.service - WM8960 soundcard service
Loaded: loaded (/lib/systemd/system/wm8960-soundcard.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2022-03-10 12:47:43 EST; 6min ago
Process: 432 ExecStart=/usr/bin/wm8960-soundcard (code=exited, status=99)
Main PID: 432 (code=exited, status=99)
CPU: 801ms

Mar 10 12:47:39 rpi0-alpha systemd[1]: Starting WM8960 soundcard service...
Mar 10 12:47:39 rpi0-alpha wm8960-soundcard[432]: + exec
Mar 10 12:47:39 rpi0-alpha wm8960-soundcard[434]: ++ basename /usr/bin/wm8960-soundcard
Mar 10 12:47:43 rpi0-alpha systemd[1]: wm8960-soundcard.service: Main process exited, code=exited, status=99/n/a
Mar 10 12:47:43 rpi0-alpha systemd[1]: wm8960-soundcard.service: Failed with result 'exit-code'.
Mar 10 12:47:43 rpi0-alpha systemd[1]: Failed to start WM8960 soundcard service.

This happens whether I restart / recompile / reinstall / reboot the RPi0.
There is audio but it is all buzzy and garbled.

Also, I get the message "Failed to load i2s-mmap" when I reboot the RPi0. This happened ever since in installed the driver from the beginning.

Is there any way to fix this?
Thank you.

Headphone jack detection does not work

I'm using the WM8960 HAT on a Raspi zero using raspbian buster. I've installed the driver like described in the wiki. Everything is working (sound on speaker, on headphone, adjustable with alsa).
BUT when the headphone jack is plugged, it doesn't mute the speaker.
In the datasheet on page 45 the jack detection is mentioned, but I don't have enough knowledge to unterstand how that has to be done. Is it a hardware switch or a software switch? If hardware I think mine is broken, if software does that have to be implemented in the driver, in alsa or done by a script which listens to a gpio?
Thanks a lot

Adding unrelated dtoverlays kills soundcard

I added these lines to my /boot/config.txt:

dtoverlay=rotary-encoder,pin_a=5,pin_b=6,encoding=binary,relative_axis=1
dtoverlay=gpio-key,gpio=0,label=playpause,keycode=32

When I boot, I no longer see the soundcard in the mixers.

Build error on kernel: 5.15.30-v7+ (armv7l)

New kernel version for Raspberry OS Bullseye
raspberrypi-kernel (1:1.20220328-1).
raspberrypi-kernel-headers (1:1.20220328-1).

Build fails with error message:
"Error! Bad return status for module build on kernel: 5.15.30-v7+ (armv7l)"
make.log

Using driver with custom board

I am trying to make a custom board with WM8960 and trying to use drivers provided here. I am able to detect card but not able to make it work. There is no audio output when i play or record. Are there some pre settings done in IC or something like that for drivers to work?

Install on piCore

Im trying to install the HAT on a raspi Zero W with piCore Kernel 5.10.77
There is a wm8960-soundcard.dtbo in the overlays which seems not to work.
So I tried to install step by step cause the install.sh isnt working. Major problem is the missing apt, cause piCore works with tcz not deb.
Manual installed git, i2c-tools and build a libasound2-plugins tcz from raspian buster deb.
I added the entry in the config.txt on boot and build a tcz with the .conf .state, the bin wm8960-soundcard in it. Since there is no systemd I simply start it in the bootlocal.
What I cannot figure out is how to build the two snd-soc... ko without dkms.
I tried to copy them from a working Raspian Buster (sadly 5.10.11) installation, but when I try to add them on piCore I got an error.
The following packages are available:
make, cmake, autoconf, automake, compiletc, gcc installed.
Does anyone got this working or is able to tell me the possible config / command to build the .ko?

Thanks a lot

Soundcard doesn't compile on latest kernel - both RetroPie 5.4.71 + Raspbian Desktop 5.10.17-v71+

Have wasted 2 days on trying to get this up with zero support from waveshare. Tried compiling on latest image of Raspbian, no good. Anyone else have any luck with this on the later versions of the kernel?

RetroPie 4.7.1
DKMS: add completed.
Error! echo
Your kernel headers for kernel 5.10.17-v7l+ cannot be found at
/lib/modules/5.10.17-v7l+/build or /lib/modules/5.10.17-v7l+/source.
Created symlink /etc/systemd/system/sysinit.target.wants/wm8960-soundcard.ser vice → /lib/systemd/system/wm8960-soundcard.service.
Job for wm8960-soundcard.service failed because the control process exited wi th error code.
See "systemctl status wm8960-soundcard.service" and "journalctl -xe" for deta ils.

Raspbian Desktop
DKMS: add completed.
Error! echo
Your kernel headers for kernel 5.10.17-v7l+ cannot be found at
/lib/modules/5.10.17-v7l+/build or /lib/modules/5.10.17-v7l+/source.
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.

kernel 5.10.11+ problem

DKMS make.log for wm8960-soundcard-1.0 for kernel 5.10.11+ (armv6l)
Fr 5. Feb 14:50:10 CET 2021
make: Verzeichnis „/usr/src/linux-headers-5.10.11+“ wird betreten
CC [M] /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.o
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c: In function ‘wm8960_configure_clocking’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:747:15: error: implicit declaration of function ‘snd_soc_component_read32’; did you mean ‘snd_soc_component_read’? [-Werror=implicit-function-declaration]
u16 iface1 = snd_soc_component_read32(component, WM8960_IFACE1);
^~~~~~~~~~~~~~~~~~~~~~~~
snd_soc_component_read
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1367:3: error: ‘const struct snd_soc_dai_ops’ has no member named ‘digital_mute’
.digital_mute = wm8960_mute,
^~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1367:18: error: initialization of ‘int (*)(struct snd_pcm_substream *, struct snd_soc_dai )’ from incompatible pointer type ‘int ()(struct snd_soc_dai *, int)’ [-Werror=incompatible-pointer-types]
.digital_mute = wm8960_mute,
^~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1367:18: note: (near initialization for ‘wm8960_dai_ops.prepare’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.o] Error 1
make: *** [Makefile:1808: /var/lib/dkms/wm8960-soundcard/1.0/build] Fehler 2
make: Verzeichnis „/usr/src/linux-headers-5.10.11+“ wird verlassen

No sound from wm8960-audio-hat

Although all seems to be properly installed.

  • sysctl status wm8690-soundcard.service:
    ● wm8960-soundcard.service - WM8960 soundcard service
    Loaded: loaded (/lib/systemd/system/wm8960-soundcard.service; enabled; vendor preset: enabled)
    Active: active (exited) since Tue 2023-06-06 17:38:01 CEST; 3h 14min ago
    Process: 308 ExecStart=/usr/bin/wm8960-soundcard (code=exited, status=0/SUCCESS)
    Main PID: 308 (code=exited, status=0/SUCCESS)
    CPU: 917ms
    Jun 06 17:37:54 abubox systemd[1]: Starting WM8960 soundcard service...
    Jun 06 17:37:55 abubox wm8960-soundcard[308]: + exec
    Jun 06 17:37:55 abubox wm8960-soundcard[313]: ++ basename /usr/bin/wm8960-soundcard
    Jun 06 17:38:01 abubox systemd[1]: Finished WM8960 soundcard service.

  • "uname -a"
    Linux abubox 6.1.21+ #1642 Mon Apr 3 17:19:14 BST 2023 armv6l GNU/Linux
    on Raspberry Pi Zero W v1.1

  • dkms status:
    wm8960-soundcard, 1.0, 6.1.21+, armv6l: installed (original_module exists)

  • test: aplay -D hw:0,0 -vv --vumeter=stereo marina.wav:

    Playing WAVE 'marina.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
    Hardware PCM card 0 'wm8960-soundcard' device 0 subdevice 0
      Its setup is:
      stream       : PLAYBACK
      access       : RW_INTERLEAVED
      format       : S16_LE
      subformat    : STD
      channels     : 2
      rate         : 44100
      exact rate   : 44100 (44100/1)
      msbits       : 16
      buffer_size  : 22052
      period_size  : 5513
      period_time  : 125011
      tstamp_mode  : NONE
      tstamp_type  : MONOTONIC
      period_step  : 1
      avail_min    : 5513
      period_event : 0
      start_threshold  : 22052
      stop_threshold   : 22052
      silence_threshold: 0
      silence_size : 0
      boundary     : 1445199872
      appl_ptr     : 0
      hw_ptr       : 0
    

    vu-meter is responding but no sound

Can anyone help me with this issue...
Thanks.

wm8960 driver doesn't install

edit: issue fixed using reseeed's repo with kernel downgrade

to all Pi operators, use the reseeed audio hat repo to downgrade the kernel if needed, the audio works just fine using their stuff

error on raspberry pi 4 raspios 64

root@raspberrypi:/home/pi/Documents/WM8960-Audio-HAT# cat /var/lib/dkms/wm8960-soundcard/1.0/build/make.log
DKMS make.log for wm8960-soundcard-1.0 for kernel 5.4.72-v8+ (aarch64)
Sat 21 Nov 2020 09:09:54 PM CET
make: Entering directory '/usr/src/linux-headers-5.4.72-v8+'
AR /var/lib/dkms/wm8960-soundcard/1.0/build/built-in.a
CC [M] /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.o
CC [M] /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.o
LD [M] /var/lib/dkms/wm8960-soundcard/1.0/build/snd-soc-wm8960-soundcard.o
LD [M] /var/lib/dkms/wm8960-soundcard/1.0/build/snd-soc-wm8960.o
Building modules, stage 2.
MODPOST 2 modules
ERROR: "__stack_chk_guard" [/var/lib/dkms/wm8960-soundcard/1.0/build/snd-soc-wm8960-soundcard.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make: *** [Makefile:1645: modules] Error 2
make: Leaving directory '/usr/src/linux-headers-5.4.72-v8+'

unable to save the Headphone value after a reboot

Hello,

Even after a sudo alsactl --file=/etc/wm8960-soundcard/wm8960_asound.state store
after a reboot the headphone level back to zero ... :(
any idea ?
kernel : 5.10.17-v7l+

thanks in advance.

Fails to install on Raspberry Pi Zero Rev 1.2

A) From the error log

DKMS make.log for wm8960-soundcard-1.0 for kernel 4.9.35+ (armv6l) Fri Dec 25 04:35:11 +07 2020
make: Entering directory '/usr/src/linux-headers-4.9.35+'
LD /var/lib/dkms/wm8960-soundcard/1.0/build/built-in.o
CC [M] /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.o
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c: In function ‘wm8960_configure_clocking’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:747:2: error: implicit declaration of function ‘snd_soc_component_read32’ [-Werror=implicit-function-declaration]
u16 iface1 = snd_soc_component_read32(component, WM8960_IFACE1);
^
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c: In function ‘wm8960_set_bias_level_out3’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:951:3: error: implicit declaration of function ‘snd_soc_component_get_bias_level’ [-Werror=implicit-function-declaration]
switch (snd_soc_component_get_bias_level(component)) {
^
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1411:2: error: unknown field ‘set_bias_level’ specified in initializer
.set_bias_level = wm8960_set_bias_level,
^
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1411:2: warning: initialization from incompatible pointer type
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1411:2: warning: (near initialization for ‘soc_component_dev_wm8960.remove’)
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1412:2: error: unknown field ‘suspend_bias_off’ specified in initializer
.suspend_bias_off = 1,
^
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1412:2: warning: initialization makes pointer from integer without a cast
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1412:2: warning: (near initialization for ‘soc_component_dev_wm8960.of_xlate_dai_name’)
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1413:2: error: unknown field ‘idle_bias_on’ specified in initializer
.idle_bias_on = 1,
^
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1413:2: warning: initialization makes pointer from integer without a cast
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1413:2: warning: (near initialization for ‘soc_component_dev_wm8960.seq_notifier’)
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1414:2: error: unknown field ‘use_pmdown_time’ specified in initializer
.use_pmdown_time = 1,
^
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1414:2: warning: initialization makes pointer from integer without a cast
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1414:2: warning: (near initialization for ‘soc_component_dev_wm8960.stream_event’)
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1415:2: error: unknown field ‘endianness’ specified in initializer
.endianness = 1,
^
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1416:2: error: unknown field ‘non_legacy_dai_naming’ specified in initializer
.non_legacy_dai_naming = 1,
^
cc1: some warnings being treated as errors
scripts/Makefile.build:293: recipe for target '/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.o' failed
make[1]: *** [/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.o] Error 1
Makefile:1490: recipe for target 'module/var/lib/dkms/wm8960-soundcard/1.0/build' failed
make: *** [module/var/lib/dkms/wm8960-soundcard/1.0/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.9.35+'

B) About the Pi

PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie

Linux pizero 4.9.35+ #1014 Fri Jun 30 14:34:49 BST 2017 armv6l GNU/Linux

Build Error on kernal 5.4.51-v7+

I'm trying to get my Audio-HAT working with retropie "retropie-buster-4.6-rpi2_rpi3.img".

During install, the sound card code has a few build errors.

make.log file attached.
make.log

Memory Leak warning Prohibiting Service Start

Hi

Running Install.sh produces the following error:

Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.17-v7l+/kernel/sound/soc/codecs/

snd-soc-wm8960-soundcard.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.17-v7l+/kernel/sound/soc/bcm/

depmod...

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.
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Enjoy!

Running "journalctl -xe" returns the following:

-- The job identifier is 567.
Mar 09 09:09:32 raspberrypi wm8960-soundcard[1890]: + exec
Mar 09 09:09:32 raspberrypi wm8960-soundcard[1890]: ++ basename /usr/bin/wm8960-soundcard
Mar 09 09:09:32 raspberrypi kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/i
Mar 09 09:09:34 raspberrypi systemd[1]: wm8960-soundcard.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit wm8960-soundcard.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Mar 09 09:09:34 raspberrypi systemd[1]: wm8960-soundcard.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit wm8960-soundcard.service has entered the 'failed' state with result 'exit-code'.
Mar 09 09:09:34 raspberrypi systemd[1]: Failed to start WM8960 soundcard service.
-- Subject: A start job for unit wm8960-soundcard.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit wm8960-soundcard.service has finished with a failure.
--
-- The job identifier is 567 and the job result is failed.
Mar 09 09:09:34 raspberrypi sudo[606]: pam_unix(sudo:session): session closed for user root

Addition Linux raspberrypi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux

I am unable to get the soundcard to be listed by Alsa due to this.

WM8960 and Volumio

Hi,
I have a problem with installing WM8960 at volumio.

Based on the couple of tips which I've found online, I did:

  • sudo volumio kernelsource
  • instalation which show me error:
make KERNELRELEASE=4.19.118-v7+ -C /lib/modules/4.19.118-v7+/build M=/var/lib/dkms/wm8960-soundcard/1.0/build.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.19.118-v7+ (armv7l)
  • aplay -l doesn't show me WM8960 just:
volumio@volumio:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 3/3
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2

Is there anyway to make WM8960 work with volumio? Thank you

is this project dead ?

you got two issues about the recent kernel on two latest versions of stable raspberry pi os linux (x86 and x86_64) and you are basically ignoring us .... is this project dead and buried ?

Enabling the use of the line input 2 in the driver software?

Hi,
I was wondering of it would be possible to enable the use of the line input 2 (LINPUT2, RINPUT2) in the driver software? I could imagine that you then have 2 subdevices 0 and 1 in such a way that
sudo arecord -D hw1,0 is using the mics, and sudo arecord hw1,1 is using the line input. Or the driver implements 2 devices: 1,0 is the mics, and 2,0 is the line input.

Although I am able to program in C, I could not find a way to do this in your code. Could it be done? An maybe someone already did it?
This could make your Audio_HAT a much more attractive replacement for the discontinued Wolfson/Cirrus Logic Audio Card.

Regards, Rinus

Works on Raspberry Pi 3B+ Rasperry Pi OS, 2022, version 1

Works on Raspberry Pi 3B+ Raspberry Pi OS, 2022, version 1, 32 bit, with desktop environment (you have to enable it manually - bugged). ( 2022-01-28-raspios-buster-armhf )

I only used sudo apt update.
Skipped sudo apt upgrade

Had to install/compile the driver twice with a reboot between and it worked.

  • Informative post.

Connecting Audio Board to Pi

I am trying to connect Wm8960 audio board to raspberry pi (not hat).
I have installed drivers and connected module. But when i use i2cdetect, i get no address of connected board.

[BUG] Switching, with GNOME Eolie running, prevents speakers from working

I am using this repository on Manjaro ARM for RPi 4. I was using RPi's audio jack and I decided to switch to the Sound Card HAT. After switching, the audio source stopped working but the application playing the audio didn't freeze. Just the audio froze.

The audio was being played from Mozilla Firefox when I decided to switch to Sound Card HAT. At this point GNOME Eolie was already running. After tinkering with various audio settings for a while, I closed GNOME Eolie. The audio started working.

Any further process of starting/stopping GNOME Eolie and switching different audio sources has no effect on the audio.

Help me troubleshoot the issue. I will love to submit a patch.

Reduced playback speed on Raspberry Pi Zero W

Hi there,

I just got board and speaker bundle. The setup worked perfectly fine. I just played the sample song and it only runs at a lower speed.
Both playback speed and pitch are effected. I have tried aplay and ffplay same result. Both supposedly played at 44.1kHz which does match the sampling rate of the sample wav-file.

I am using a Raspberry Pi Zero W.

I haven't tried another Pi version yet, but it also doesn't matter, since I would need this to work on a zero, otherwise I could just use the sound card and a simple amplifier on a larger Pi board.

Best,
Joe

Error! Bad return status for module build on kernel: 6.1.19-v8+ (aarch64)

I did
git clone https://github.com/waveshare/WM8960-Audio-HAT
cd WM8960-Audio-HAT
sudo ./install.sh
sudo reboot

but its not working
this is the log

DKMS make.log for wm8960-soundcard-1.0 for kernel 6.1.19-v8+ (aarch64)
Mon 20 Mar 2023 01:33:32 PM EDT
make: Entering directory '/usr/src/linux-headers-6.1.19-v8+'
CC [M] /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.o
CC [M] /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.o
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1417:3: error: ‘const struct snd_soc_component_driver’ has no member named ‘non_legacy_dai_naming’; did you mean ‘legacy_dai_naming’?
1417 | .non_legacy_dai_naming = 1,
| ^~~~~~~~~~~~~~~~~~~~~
| legacy_dai_naming
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1532:14: error: initialization of ‘void (*)(struct i2c_client )’ from incompatible pointer type ‘int ()(struct i2c_client *)’ [-Werror=incompatible-pointer-types]
1532 | .remove = wm8960_i2c_remove,
| ^~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1532:14: note: (near initialization for ‘wm8960_i2c_driver.remove’)
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c: In function ‘wm8960_hw_params’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:882:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
882 | if ((iface & 0x3) != 0) {
| ^
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:887:2: note: here
887 | default:
| ^~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:250: /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:2012: /var/lib/dkms/wm8960-soundcard/1.0/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.1.19-v8+'

an error occurs during installation...

Building module:
cleaning build area.....
make -j1 KERNELRELEASE=4.19.42+ -C /lib/modules/4.19.42+/build M=/var/lib/dkms/wm8960-soundcard/1.0/build..........(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.19.42+ (armv6l)
Consult /var/lib/dkms/wm8960-soundcard/1.0/build/make.log for more information.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area.....
make -j1 KERNELRELEASE=4.19.42-v7+ -C /lib/modules/4.19.42-v7+/build M=/var/lib/dkms/wm8960-soundcard/1.0/build........(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.19.42-v7+ (armv6l)
Consult /var/lib/dkms/wm8960-soundcard/1.0/build/make.log for more information.
Created symlink /etc/systemd/system/sysinit.target.wants/wm8960-soundcard.service → /lib/systemd/system/wm8960-soundcard.service.

master override meaning?

In your device tree overlay file you have:

  __overrides__ {
        alsaname = <&slave_overlay>,"simple-audio-card,name";
        compatible = <&wm8960>,"compatible";
        master = <0>,"=2!3";
    };
};

What does the master = <0>,"=2!3"; override do? And how is it used?

Can't record and playback at the same time

Hi,

I'm trying to use the WM8960 for VOIP. I'm using the Multichannel Duplex profile. The rest of the config is per this guide.
Input works, output does not when VOIP (separate they work). I get this error message from PulseAudio:

pulseaudio[811]: Resume failed, couldn't restore original sample settings.

What should I do to fix this error?

Kind regards,
Tom

install fails on patchos due to systemd-modules-load "Failed to insert module 'snd_soc_wm8960_soundcard': Device or resource busy" but somehow rebooting and running sudo ./install.sh again got it working

running patchbox image https://community.blokas.io/t/beta-patchbox-os-image-2020-11-23/2433 on RPi4. uname -a returns:

uname -a Linux patchbox 5.10.17-v7l+ #1421 SMP Thu May 27 14:00:13 BST 2021 armv7l GNU/Linux

What follows below is the output of the 2nd attempt at installing. After my first attempt installing, there was no "wm8960soundcard" device in aplay -l.

So on my second attempt installing I looked at the output...and noticed the errors "Job for systemd-modules-load.service failed because the control process exited with error code" and "Job for wm8960-soundcard.service failed because the control process exited with error code"

patch@patchbox:~/WM8960-Audio-HAT $ sudo ./install.sh 
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://apt.blokas.io rpi InRelease              
Reading package lists... Done                 
Building dependency tree       
Reading state information... Done
183 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
raspberrypi-kernel is already the newest version (1:1.20210527-1).
raspberrypi-kernel-headers is already the newest version (1:1.20210527-1).
0 upgraded, 0 newly installed, 0 to remove and 183 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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).
libasound2-plugins is already the newest version (1.1.8-1).
0 upgraded, 0 newly installed, 0 to remove and 183 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.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.10.17-v7l+ -C /lib/modules/5.10.17-v7l+/build M=/var/lib/dkms/wm8960-soundcard/1.0/build....
cleaning build area...

DKMS: build completed.

snd-soc-wm8960.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.17-v7l+/kernel/sound/soc/codecs/

snd-soc-wm8960-soundcard.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.17-v7l+/kernel/sound/soc/bcm/

depmod...
Job for systemd-modules-load.service failed because the control process exited with error code.
See "systemctl status systemd-modules-load.service" and "journalctl -xe" for details.

DKMS: install completed.
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!
------------------------------------------------------

running systemctl status systemd-modules-load.service reports:

● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2021-06-15 16:29:59 EDT; 3min 51s ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
 Main PID: 2666 (code=exited, status=1/FAILURE)

Jun 15 16:29:59 patchbox systemd[1]: Starting Load Kernel Modules...
Jun 15 16:29:59 patchbox systemd-modules-load[2666]: Failed to insert module 'snd_soc_wm8960_soundcard': Device or resource busy
Jun 15 16:29:59 patchbox systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Jun 15 16:29:59 patchbox systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
Jun 15 16:29:59 patchbox systemd[1]: Failed to start Load Kernel Modules.

and running systemctl status wm8960-soundcard.service reports:

● wm8960-soundcard.service - WM8960 soundcard service
   Loaded: loaded (/lib/systemd/system/wm8960-soundcard.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2021-06-15 16:30:03 EDT; 4min 24s ago
  Process: 2699 ExecStart=/usr/bin/wm8960-soundcard (code=exited, status=99)
 Main PID: 2699 (code=exited, status=99)

Jun 15 16:30:00 patchbox su[2723]: pam_unix(su:session): session closed for user patch
Jun 15 16:30:01 patchbox su[2743]: (to patch) root on none
Jun 15 16:30:01 patchbox su[2743]: pam_unix(su:session): session opened for user patch by (uid=0)
Jun 15 16:30:01 patchbox su[2743]: pam_unix(su:session): session closed for user patch
Jun 15 16:30:02 patchbox su[2754]: (to patch) root on none
Jun 15 16:30:02 patchbox su[2754]: pam_unix(su:session): session opened for user patch by (uid=0)
Jun 15 16:30:02 patchbox su[2754]: pam_unix(su:session): session closed for user patch
Jun 15 16:30:03 patchbox systemd[1]: wm8960-soundcard.service: Main process exited, code=exited, status=99/n/a
Jun 15 16:30:03 patchbox systemd[1]: wm8960-soundcard.service: Failed with result 'exit-code'.
Jun 15 16:30:03 patchbox systemd[1]: Failed to start WM8960 soundcard service.

and journalctl -xe reports:

-- Support: https://www.debian.org/support
-- 
-- A stop job for unit pisound-ctl.service has finished.
-- 
-- The job identifier is 5809 and the job result is done.
Jun 15 16:34:47 patchbox systemd[1]: Started Bluetooth service for Pisound companion app..
-- Subject: A start job for unit pisound-ctl.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit pisound-ctl.service has finished successfully.
-- 
-- The job identifier is 5809.
Jun 15 16:34:47 patchbox pisound-ctl[3456]: Reading Pisound version failed, did the kernel module load successfully?
Jun 15 16:34:47 patchbox pisound-ctl[3456]: [3456] main: Pisound Control Server 1.03 starting...
Jun 15 16:34:47 patchbox systemd[1]: pisound-ctl.service: Main process exited, code=exited, status=234/n/a
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit pisound-ctl.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 234.
Jun 15 16:34:47 patchbox systemd[1]: pisound-ctl.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit pisound-ctl.service has entered the 'failed' state with result 'exit-code'.
Jun 15 16:34:48 patchbox pisound-btn[425]: 2021-06-15.16:34:48: Blink.
Jun 15 16:34:49 patchbox pisound-btn[425]: 2021-06-15.16:34:49: Blink.
Jun 15 16:34:50 patchbox pisound-btn[425]: 2021-06-15.16:34:50: Blink.
Jun 15 16:34:51 patchbox pisound-btn[425]: 2021-06-15.16:34:51: Blink.
Jun 15 16:34:52 patchbox pisound-btn[425]: 2021-06-15.16:34:52: Blink.
Jun 15 16:34:53 patchbox pisound-btn[425]: 2021-06-15.16:34:53: Blink.
Jun 15 16:34:53 patchbox systemd[1]: pisound-ctl.service: Service RestartSec=5s expired, scheduling restart.
Jun 15 16:34:53 patchbox systemd[1]: pisound-ctl.service: Scheduled restart job, restart counter is at 71.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Automatic restarting of the unit pisound-ctl.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jun 15 16:34:53 patchbox systemd[1]: Stopped Bluetooth service for Pisound companion app..
-- Subject: A stop job for unit pisound-ctl.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A stop job for unit pisound-ctl.service has finished.
-- 
-- The job identifier is 5870 and the job result is done.
Jun 15 16:34:53 patchbox systemd[1]: Started Bluetooth service for Pisound companion app..
-- Subject: A start job for unit pisound-ctl.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit pisound-ctl.service has finished successfully.
-- 
-- The job identifier is 5870.
Jun 15 16:34:53 patchbox pisound-ctl[3469]: Reading Pisound version failed, did the kernel module load successfully?
Jun 15 16:34:53 patchbox pisound-ctl[3469]: [3469] main: Pisound Control Server 1.03 starting...
Jun 15 16:34:53 patchbox systemd[1]: pisound-ctl.service: Main process exited, code=exited, status=234/n/a
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit pisound-ctl.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 234.
Jun 15 16:34:53 patchbox systemd[1]: pisound-ctl.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit pisound-ctl.service has entered the 'failed' state with result 'exit-code'.

And as this is my second time, fortunately aplay -l does report the device is available at this point...:

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 3: wm8960soundcard [wm8960-soundcard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

And upon reboot, the wm8960soundcard alsa device is still available.

So I don't know what exactly the problem is or if there is really one, but at least it works, but it seems something is slightly off.

Error! Bad return status for module build on kernel: 5.15.32-v7l+ (armv7l)

Hello,
The WM8960-Audio-HAT board was working fine on Raspberry PI 4B with Raspbian OS bullseye, until 4 days ago when a system software update was installed.
I'm trying to reinstall the board software, but I get this error:

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.15.32-v7l+ -C /lib/modules/5.15.32-v7l+/build M=/var/lib/dkms/wm8960-soundcard/1.0/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.32-v7l+ (armv7l)
Consult /var/lib/dkms/wm8960-soundcard/1.0/build/make.log for more information.

Is there a fix for this?

Does not work with Raspberry Pi 4b with current Kernel 5.4.72-v7l+ #1356 SMP

pi@raspberrypi:/var/lib/dpkg/WM8960-Audio-HAT $ sudo ./install.sh
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
raspberrypi-kernel is already the newest version (1.20201022-1).
raspberrypi-kernel-headers is already the newest version (1.20201022-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
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).
libasound2-plugins is already the newest version (1.1.8-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

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

DKMS: add completed.
Error! echo
Your kernel headers for kernel 5.4.51-v7l+ cannot be found at
/lib/modules/5.4.51-v7l+/build or /lib/modules/5.4.51-v7l+/source.

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.

Please reboot your raspberry pi to apply all settings
Enjoy!

Can't build driver on 4.19.66-v7+

Hi,

I get the following output from make on the above kernel version (this is on Stretch)

/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:26:13: error: ‘asoc_simple_startup’ undeclared here (not in a function)
.startup = asoc_simple_startup,
^~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:27:14: error: ‘asoc_simple_shutdown’ undeclared here (not in a function)
.shutdown = asoc_simple_shutdown,
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:28:15: error: ‘asoc_simple_hw_params’ undeclared here (not in a function)
.hw_params = asoc_simple_hw_params,
^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:82:13: warning: ‘struct asoc_simple_data’ declared inside parameter list will not be visible outside of this definition or declaration
struct asoc_simple_data *adata)
^~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_parse_convert’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:87:2: error: implicit declaration of function ‘asoc_simple_parse_convert’ [-Werror=implicit-function-declaration]
asoc_simple_parse_convert(dev, top, PREFIX, adata);
^~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:98:13: warning: ‘struct simple_dai_props’ declared inside parameter list will not be visible outside of this definition or declaration
struct simple_dai_props *props,
^~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_parse_mclk_fs’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:105:40: error: dereferencing pointer to incomplete type ‘struct simple_dai_props’
of_property_read_u32(top, prop, &props->mclk_fs);
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:118:15: warning: ‘struct link_info’ declared inside parameter list will not be visible outside of this definition or declaration
struct link_info *li,
^~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:115:43: warning: ‘struct asoc_simple_priv’ declared inside parameter list will not be visible outside of this definition or declaration
static int simple_dai_link_of_dpcm(struct asoc_simple_priv *priv,
^~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_dai_link_of_dpcm’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:121:23: error: implicit declaration of function ‘simple_priv_to_dev’ [-Werror=implicit-function-declaration]
struct device *dev = simple_priv_to_dev(priv);
^~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:121:23: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:122:38: error: implicit declaration of function ‘simple_priv_to_link’ [-Werror=implicit-function-declaration]
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
^~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:122:66: error: dereferencing pointer to incomplete type ‘struct link_info’
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:123:39: error: implicit declaration of function ‘simple_priv_to_props’ [-Werror=implicit-function-declaration]
struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link);
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:125:52: error: ‘struct snd_soc_dai_link’ has no member named ‘cpus’; did you mean ‘ops’?
struct snd_soc_dai_link_component *cpus = dai_link->cpus;
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:162:12: error: dereferencing pointer to incomplete type ‘struct simple_dai_props’
dai_props->cpu_dai = &priv->dais[li->dais++];
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:162:29: error: dereferencing pointer to incomplete type ‘struct asoc_simple_priv’
dai_props->cpu_dai = &priv->dais[li->dais++];
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:164:9: error: implicit declaration of function ‘asoc_simple_parse_cpu’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_cpu(np, dai_link, &is_single_links);
^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:168:9: error: implicit declaration of function ‘asoc_simple_parse_clk_cpu’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_clk_cpu(dev, np, dai_link, dai);
^~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:172:9: error: implicit declaration of function ‘asoc_simple_set_dailink_name’ [-Werror=implicit-function-declaration]
ret = asoc_simple_set_dailink_name(dev, dai_link,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:178:3: error: implicit declaration of function ‘asoc_simple_canonicalize_cpu’ [-Werror=implicit-function-declaration]
asoc_simple_canonicalize_cpu(dai_link, is_single_links);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:189:34: error: ‘asoc_simple_be_hw_params_fixup’ undeclared (first use in this function)
dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:189:34: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:197:9: error: implicit declaration of function ‘asoc_simple_parse_codec’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_codec(np, dai_link);
^~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:201:9: error: implicit declaration of function ‘asoc_simple_parse_clk_codec’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_clk_codec(dev, np, dai_link, dai);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:212:3: error: implicit declaration of function ‘snd_soc_of_parse_node_prefix’ [-Werror=implicit-function-declaration]
snd_soc_of_parse_node_prefix(top, cconf, codecs->of_node,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:221:39: error: passing argument 4 of ‘simple_parse_mclk_fs’ from incompatible pointer type [-Werror=incompatible-pointer-types]
simple_parse_mclk_fs(top, np, codec, dai_props, prefix);
^~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:95:13: note: expected ‘struct simple_dai_props *’ but argument is of type ‘struct simple_dai_props *’
static void simple_parse_mclk_fs(struct device_node *top,
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:223:2: error: implicit declaration of function ‘asoc_simple_canonicalize_platform’ [-Werror=implicit-function-declaration]
asoc_simple_canonicalize_platform(dai_link);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:225:8: error: implicit declaration of function ‘asoc_simple_parse_tdm’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_tdm(np, dai);
^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:229:8: error: implicit declaration of function ‘asoc_simple_parse_daifmt’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_daifmt(dev, node, codec,
^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:237:21: error: ‘asoc_simple_dai_init’ undeclared (first use in this function)
dai_link->init = asoc_simple_dai_init;
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:247:17: warning: ‘struct link_info’ declared inside parameter list will not be visible outside of this definition or declaration
struct link_info *li,
^~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:244:38: warning: ‘struct asoc_simple_priv’ declared inside parameter list will not be visible outside of this definition or declaration
static int simple_dai_link_of(struct asoc_simple_priv *priv,
^~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_dai_link_of’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:250:23: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct device *dev = simple_priv_to_dev(priv);
^~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:251:66: error: dereferencing pointer to incomplete type ‘struct link_info’
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:286:11: error: dereferencing pointer to incomplete type ‘struct simple_dai_props’
dai_props->cpu_dai = &priv->dais[li->dais++];
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:286:28: error: dereferencing pointer to incomplete type ‘struct asoc_simple_priv’
dai_props->cpu_dai = &priv->dais[li->dais++];
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:295:40: error: passing argument 4 of ‘simple_parse_mclk_fs’ from incompatible pointer type [-Werror=incompatible-pointer-types]
simple_parse_mclk_fs(top, cpu, codec, dai_props, prefix);
^~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:95:13: note: expected ‘struct simple_dai_props *’ but argument is of type ‘struct simple_dai_props *’
static void simple_parse_mclk_fs(struct device_node *top,
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:305:8: error: implicit declaration of function ‘asoc_simple_parse_platform’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_platform(plat, dai_link);
^~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:327:17: error: ‘struct snd_soc_dai_link’ has no member named ‘cpus’; did you mean ‘ops’?
dai_link->cpus->dai_name,
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:333:19: error: ‘asoc_simple_dai_init’ undeclared (first use in this function)
dai_link->init = asoc_simple_dai_init;
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:346:11: warning: ‘struct link_info’ declared inside parameter list will not be visible outside of this definition or declaration
struct link_info *li,
^~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:345:40: warning: ‘struct asoc_simple_priv’ declared inside parameter list will not be visible outside of this definition or declaration
static int simple_for_each_link(struct asoc_simple_priv *priv,
^~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_for_each_link’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:356:23: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct device *dev = simple_priv_to_dev(priv);
^~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:372:27: error: storage size of ‘adata’ isn’t known
struct asoc_simple_data adata;
^~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:372:27: warning: unused variable ‘adata’ [-Wunused-variable]
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:422:13: warning: ‘struct asoc_simple_priv’ declared inside parameter list will not be visible outside of this definition or declaration
struct asoc_simple_priv *priv)
^~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_parse_aux_devs’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:424:23: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct device *dev = simple_priv_to_dev(priv);
^~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:426:30: error: implicit declaration of function ‘simple_priv_to_card’ [-Werror=implicit-function-declaration]
struct snd_soc_card *card = simple_priv_to_card(priv);
^~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:426:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:445:19: error: ‘struct snd_soc_aux_dev’ has no member named ‘dlc’
card->aux_dev[i].dlc.of_node = aux_node;
^
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:452:35: warning: ‘struct asoc_simple_priv’ declared inside parameter list will not be visible outside of this definition or declaration
static int simple_parse_of(struct asoc_simple_priv *priv)
^~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_parse_of’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:454:23: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct device *dev = simple_priv_to_dev(priv);
^~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:456:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct snd_soc_card *card = simple_priv_to_card(priv);
^~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:457:19: error: storage size of ‘li’ isn’t known
struct link_info li;
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:463:8: error: implicit declaration of function ‘asoc_simple_parse_widgets’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_widgets(card, PREFIX);
^~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:467:8: error: implicit declaration of function ‘asoc_simple_parse_routing’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_routing(card, PREFIX);
^~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:471:8: error: implicit declaration of function ‘asoc_simple_parse_pin_switches’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_pin_switches(card, PREFIX);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:490:30: error: passing argument 1 of ‘simple_for_each_link’ from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = simple_for_each_link(priv, &li,
^~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:345:12: note: expected ‘struct asoc_simple_priv *’ but argument is of type ‘struct asoc_simple_priv *’
static int simple_for_each_link(struct asoc_simple_priv priv,
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:491:9: error: passing argument 3 of ‘simple_for_each_link’ from incompatible pointer type [-Werror=incompatible-pointer-types]
simple_dai_link_of,
^~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:345:12: note: expected ‘int (
)(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , bool) {aka int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , _Bool)}’ but argument is of type ‘int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , bool) {aka int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info *, _Bool)}’
static int simple_for_each_link(struct asoc_simple_priv priv,
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:492:9: error: passing argument 4 of ‘simple_for_each_link’ from incompatible pointer type [-Werror=incompatible-pointer-types]
simple_dai_link_of_dpcm);
^~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:345:12: note: expected ‘int (
)(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , bool) {aka int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , _Bool)}’ but argument is of type ‘int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , bool) {aka int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info *, _Bool)}’
static int simple_for_each_link(struct asoc_simple_priv *priv,
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:497:8: error: implicit declaration of function ‘asoc_simple_parse_card_name’ [-Werror=implicit-function-declaration]
ret = asoc_simple_parse_card_name(card, PREFIX);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:501:35: error: passing argument 2 of ‘simple_parse_aux_devs’ from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = simple_parse_aux_devs(top, priv);
^~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:421:12: note: expected ‘struct asoc_simple_priv *’ but argument is of type ‘struct asoc_simple_priv *’
static int simple_parse_aux_devs(struct device_node *node,
^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:457:19: warning: unused variable ‘li’ [-Wunused-variable]
struct link_info li;
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:509:16: warning: ‘struct link_info’ declared inside parameter list will not be visible outside of this definition or declaration
struct link_info *li, bool is_top)
^~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:506:37: warning: ‘struct asoc_simple_priv’ declared inside parameter list will not be visible outside of this definition or declaration
static int simple_count_noml(struct asoc_simple_priv priv,
^~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_count_noml’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:511:4: error: dereferencing pointer to incomplete type ‘struct link_info’
li->dais++; /
CPU or Codec */
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:521:16: warning: ‘struct link_info’ declared inside parameter list will not be visible outside of this definition or declaration
struct link_info *li, bool is_top)
^~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:518:37: warning: ‘struct asoc_simple_priv’ declared inside parameter list will not be visible outside of this definition or declaration
static int simple_count_dpcm(struct asoc_simple_priv priv,
^~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_count_dpcm’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:523:4: error: dereferencing pointer to incomplete type ‘struct link_info’
li->dais++; /
CPU or Codec */
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:532:14: warning: ‘struct link_info’ declared inside parameter list will not be visible outside of this definition or declaration
struct link_info *li)
^~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:531:42: warning: ‘struct asoc_simple_priv’ declared inside parameter list will not be visible outside of this definition or declaration
static void simple_get_dais_count(struct asoc_simple_priv *priv,
^~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_get_dais_count’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:534:23: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct device *dev = simple_priv_to_dev(priv);
^~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:584:5: error: dereferencing pointer to incomplete type ‘struct link_info’
li->link = 1;
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:590:23: error: passing argument 1 of ‘simple_for_each_link’ from incompatible pointer type [-Werror=incompatible-pointer-types]
simple_for_each_link(priv, li,
^~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:345:12: note: expected ‘struct asoc_simple_priv *’ but argument is of type ‘struct asoc_simple_priv *’
static int simple_for_each_link(struct asoc_simple_priv *priv,
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:590:29: error: passing argument 2 of ‘simple_for_each_link’ from incompatible pointer type [-Werror=incompatible-pointer-types]
simple_for_each_link(priv, li,
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:345:12: note: expected ‘struct link_info *’ but argument is of type ‘struct link_info *’
static int simple_for_each_link(struct asoc_simple_priv priv,
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:591:9: error: passing argument 3 of ‘simple_for_each_link’ from incompatible pointer type [-Werror=incompatible-pointer-types]
simple_count_noml,
^~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:345:12: note: expected ‘int (
)(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , bool) {aka int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , _Bool)}’ but argument is of type ‘int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , bool) {aka int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info *, _Bool)}’
static int simple_for_each_link(struct asoc_simple_priv priv,
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:592:9: error: passing argument 4 of ‘simple_for_each_link’ from incompatible pointer type [-Werror=incompatible-pointer-types]
simple_count_dpcm);
^~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:345:12: note: expected ‘int (
)(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , bool) {aka int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , _Bool)}’ but argument is of type ‘int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info , bool) {aka int ()(struct asoc_simple_priv *, struct device_node *, struct device_node *, struct link_info *, _Bool)}’
static int simple_for_each_link(struct asoc_simple_priv *priv,
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘simple_soc_probe’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:603:8: error: implicit declaration of function ‘asoc_simple_init_hp’ [-Werror=implicit-function-declaration]
ret = asoc_simple_init_hp(card, &priv->hp_jack, PREFIX);
^~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:603:39: error: dereferencing pointer to incomplete type ‘struct asoc_simple_priv’
ret = asoc_simple_init_hp(card, &priv->hp_jack, PREFIX);
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:607:8: error: implicit declaration of function ‘asoc_simple_init_mic’ [-Werror=implicit-function-declaration]
ret = asoc_simple_init_mic(card, &priv->mic_jack, PREFIX);
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c: In function ‘asoc_simple_probe’:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:620:19: error: storage size of ‘li’ isn’t known
struct link_info li;
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:624:34: error: dereferencing pointer to incomplete type ‘struct asoc_simple_priv’
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
^~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:628:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
card = simple_priv_to_card(priv);
^
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:634:24: error: passing argument 1 of ‘simple_get_dais_count’ from incompatible pointer type [-Werror=incompatible-pointer-types]
simple_get_dais_count(priv, &li);
^~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:531:13: note: expected ‘struct asoc_simple_priv *’ but argument is of type ‘struct asoc_simple_priv *’
static void simple_get_dais_count(struct asoc_simple_priv *priv,
^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:638:8: error: implicit declaration of function ‘asoc_simple_init_priv’ [-Werror=implicit-function-declaration]
ret = asoc_simple_init_priv(priv, &li);
^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:644:25: error: passing argument 1 of ‘simple_parse_of’ from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = simple_parse_of(priv);
^~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:452:12: note: expected ‘struct asoc_simple_priv *’ but argument is of type ‘struct asoc_simple_priv *’
static int simple_parse_of(struct asoc_simple_priv *priv)
^~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:676:12: error: dereferencing pointer to incomplete type ‘struct simple_dai_props’
dai_props->cpu_dai = &priv->dais[dai_idx++];
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:679:20: error: ‘struct snd_soc_dai_link’ has no member named ‘cpus’; did you mean ‘ops’?
cpus = dai_link->cpus;
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:686:23: error: ‘struct snd_soc_dai_link’ has no member named ‘platforms’; did you mean ‘platform_name’?
platform = dai_link->platforms;
^~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:693:21: error: ‘asoc_simple_dai_init’ undeclared (first use in this function)
dai_link->init = asoc_simple_dai_init;
^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:702:2: error: implicit declaration of function ‘asoc_simple_debug_info’ [-Werror=implicit-function-declaration]
asoc_simple_debug_info(priv);
^~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:710:2: error: implicit declaration of function ‘asoc_simple_clean_reference’ [-Werror=implicit-function-declaration]
asoc_simple_clean_reference(card);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:620:19: warning: unused variable ‘li’ [-Wunused-variable]
struct link_info li;
^~
At top level:
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.c:31:12: warning: ‘asoc_simple_parse_dai’ defined but not used [-Wunused-function]
static int asoc_simple_parse_dai(struct device_node *node,
^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:303: recipe for target '/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.o' failed
make[1]: *** [/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.o] Error 1
Makefile:1519: recipe for target 'module/var/lib/dkms/wm8960-soundcard/1.0/build' failed
make: *** [module/var/lib/dkms/wm8960-soundcard/1.0/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.19.66-v7+'

Spent hours on some of the other workarounds here but nothing seems to work.

WM9860 sound card not detected

how i resolve it ?

Hit:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
75 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
raspberrypi-kernel-headers is already the newest version (1.20190925+1-1).
raspberrypi-kernel is already the newest version (1.20190925+1-1).
0 upgraded, 0 newly installed, 0 to remove and 75 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version (2.3-2).
git is already the newest version (1:2.11.0-3+deb9u4).
i2c-tools is already the newest version (3.1.2-3).
libasound2-plugins is already the newest version (1.1.1-1).
0 upgraded, 0 newly installed, 0 to remove and 75 not upgraded.
Error! There are no instances of module: wm8960-soundcard
1.0 located in the DKMS tree.

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

DKMS: add completed.
Error! echo
Your kernel headers for kernel 4.19.75-v8+ cannot be found at
/lib/modules/4.19.75-v8+/build or /lib/modules/4.19.75-v8+/source.
Created symlink /etc/systemd/system/sysinit.target.wants/wm8960-soundcard.service → /lib/systemd/system/wm8960-soundcard.ser                                        vice.
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Enjoy!
------------------------------------------------------

after finish install this the resualt

pi@retropie:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: 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 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@retropie:~ $ uname -a
Linux retropie 4.19.75-v8+ #1270 SMP PREEMPT Tue Sep 24 18:59:17 BST 2019 aarch64 GNU/Linux

Software (systemd) does not work with Raspberry Pi 4b with current Raspberry Pi OS 64bit

I have a fresh install of PI OS 64bit on a PI 4B, I have followed the instructions to the letter, I have uninstalled, and reinstalled, the PI OS is up to date. the service complains as such:

Mar 28 12:37:13 discovery-pi systemd[1]: Starting WM8960 soundcard service...
Mar 28 12:37:13 discovery-pi wm8960-soundcard[469]: + exec
Mar 28 12:37:13 discovery-pi wm8960-soundcard[475]: ++ basename /usr/bin/wm8960-soundcard
Mar 28 12:37:17 discovery-pi systemd[1]: wm8960-soundcard.service: Main process exited, code=exited, status=99/n/a
Mar 28 12:37:17 discovery-pi systemd[1]: wm8960-soundcard.service: Failed with result 'exit-code'.
Mar 28 12:37:17 discovery-pi systemd[1]: Failed to start WM8960 soundcard service.

I have blacklist snd_bcm2835, and still the problem persists the old remaining sound cards are as follows:

pi@discovery-pi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: wm8960soundcard [wm8960-soundcard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

And still:
pi@discovery-pi:~ $ systemctl status wm8960-soundcard.service
● wm8960-soundcard.service - WM8960 soundcard service
Loaded: loaded (/lib/systemd/system/wm8960-soundcard.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2022-03-28 12:37:17 EDT; 35min ago
Process: 469 ExecStart=/usr/bin/wm8960-soundcard (code=exited, status=99)
Main PID: 469 (code=exited, status=99)
CPU: 721ms

Additionally the journal is of no additional help:

pi@discovery-pi:~ $ journalctl -xe
░░ The job identifier is 2049.
Mar 28 15:45:08 discovery-pi su[3496]: pam_unix(su:session): session closed for user pi
Mar 28 15:45:08 discovery-pi systemd[1]: session-c7.scope: Succeeded.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit session-c7.scope has successfully entered the 'dead' state.
Mar 28 15:45:08 discovery-pi kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/i2s@7e203000/status
Mar 28 15:45:08 discovery-pi su[3507]: (to pi) root on none
Mar 28 15:45:08 discovery-pi su[3507]: pam_unix(su:session): session opened for user pi(uid=1000) by (uid=0)
Mar 28 15:45:08 discovery-pi systemd[1]: Started Session c8 of user pi.
░░ Subject: A start job for unit session-c8.scope has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit session-c8.scope has finished successfully.
░░
░░ The job identifier is 2122.
Mar 28 15:45:09 discovery-pi su[3507]: pam_unix(su:session): session closed for user pi
Mar 28 15:45:09 discovery-pi systemd[1]: session-c8.scope: Succeeded.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit session-c8.scope has successfully entered the 'dead' state.
Mar 28 15:45:10 discovery-pi systemd[1]: wm8960-soundcard.service: Main process exited, code=exited, status=99/n/a
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStart= process belonging to unit wm8960-soundcard.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 99.
Mar 28 15:45:10 discovery-pi systemd[1]: wm8960-soundcard.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit wm8960-soundcard.service has entered the 'failed' state with result 'exit-code'.
Mar 28 15:45:10 discovery-pi systemd[1]: Failed to start WM8960 soundcard service.
░░ Subject: A start job for unit wm8960-soundcard.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit wm8960-soundcard.service has finished with a failure.
░░
░░ The job identifier is 1834 and the job result is failed.
Mar 28 15:45:10 discovery-pi sudo[3451]: pam_unix(sudo:session): session closed for user root
lines 2355-2403/2403 (END)

I am really quite annoyed that this driver you supplied for this card, I have wasted too much time for something that is supposed to work with this Pi and this OS, That indicated when buying in that it worked with the PI 4B among others, and it clearly does not work. I sent a ticket to the support and they have not gotten back to me, and you have this code to compile for the machine and it doesn't work. Please explain to me how this is acceptable, Their was not warning on the purchase page that the driver may or may not work, if it had no one would buy it

Error! Bad return status for module build on kernel: 5.10.11+ (armv6l)

Hello
I am trying to install from the card on a Pi Zero running Buster but I get this error
Building module:
cleaning build area.....
make -j1 KERNELRELEASE=5.10.11+ -C /lib/modules/5.10.11+/build M=/var/lib/dkms/wm8960-soundcard/1.0/build.........(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.11+ (armv6l)
Consult /var/lib/dkms/wm8960-soundcard/1.0/build/make.log for more information.
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.
Is there a fix for this? I

Error! Bad return status for module build on kernel: 5.10.103-v7+ (armv7l)

Hi

I've got a similar problem to #44 but this is on a brand new PiPad 13.3" with Raspberry Pi 3A+.

Having done the
sudo apt-get update
sudo apt-get upgrade

and then grabbing the git repo as instructed, I run the
sudo ./install.sh

and I get the error as per the subject.

I've done the recommended sudo ./uninstall.sh & sudo reboot and tried again, and tried the sudo ./install.sh multiple times but no success.

I've also tried dr-ni's version but get the same result.

Any pointers please?

WM9860 sound card not detected on raspberry pi

raspberry pi 3B+
Linux raspberrypi 4.19.66-v7+ armv7l GNU/Linux

hardware installed
driver installed
card not detected
aplay -l only shows

pi@raspberrypi:~/WM8960-Audio-HAT $ aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: 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 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
Subdevices: 1/1
Subdevice #0: subdevice #0
pi@raspberrypi:~/WM8960-Audio-HAT $

pi@raspberrypi:/WM8960-Audio-HAT $ sudo dkms status
wm8960-soundcard, 1.0, 4.19.66+, armv7l: installed
wm8960-soundcard, 1.0, 4.19.66-v7+, armv7l: installed
wm8960-soundcard, 1.0, 4.19.66-v7l+, armv7l: installed
pi@raspberrypi:
/WM8960-Audio-HAT $

WM8960 与 pigpiod 的冲突是要命的,无法使用软串口了?

使用 pigpiod 命令 或是 pigpiod -t 0 然后启动软串口,其中 .wave_send_once() 如下描述
"""
Transmits the waveform with id wave_id. The waveform is sent
once.

  NOTE: Any hardware PWM started by [*hardware_PWM*] will
  be cancelled.

  wave_id:= >=0 (as returned by a prior call to [*wave_create*]).

  Returns the number of DMA control blocks used in the waveform.

  ...
  cbs = pi.wave_send_once(wid)
  ...
  """

如果正在播放音乐,执行此命令会当即停止,即便释放后也无法正确的播放音频,求解决!

Very low pitch on playback

I followed the instructions from the Wiki and successfully installed the drivers for RPI.
But when I try to playback anything on the module the pitch is very low (sounds much deeper).
Mic is not working sometimes but when it works it sounds normal.

I'm using:
Raspberry Pi 3B+
WM8960 Hi-Fi Sound Card HAT
Speakers that are delivered with the module

I tried several settings but wasn't able to get the HAT working properly.

Error! Bad return status for module build on kernel: 5.10.11-v7l+ (armv7l)

Hi,
if I try to install the driver, then I get the following error:

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.10.11-v7l+ -C /lib/modules/5.10.11-v7l+/build M=/var/lib/dkms/wm8960-soundcard/1.0/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.11-v7l+ (armv7l)
Consult /var/lib/dkms/wm8960-soundcard/1.0/build/make.log for more information.
mkdir: das Verzeichnis „/etc/wm8960-soundcard“ kann nicht angelegt werden: Die Datei existiert bereits
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.

I already tried the Workaround from an other issue with no luck.


Workaround in wm8960.c:

Replace all
snd_soc_component_read32
to
snd_soc_component_read

and replace L928
static int wm8960_mute(struct snd_soc_dai *dai, int mute)
to
static int wm8960_mute(struct snd_soc_dai *dai, int mute, int direction)

and replace L1367
.digital_mute = wm8960_mute,
to
,.mute_stream = wm8960_mute,


This is from the Logfile (make.log)
DKMS make.log for wm8960-soundcard-1.0 for kernel 5.10.11-v7l+ (armv7l)
Fr 12. Feb 14:55:44 CET 2021
make: Verzeichnis „/usr/src/linux-headers-5.10.11-v7l+“ wird betreten
CC [M] /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.o
CC [M] /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960-soundcard.o
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1367:3: error: ‘const struct snd_soc_dai_ops’ has no me$
.digital_stream = wm8960_mute,
^~~~~~~~~~~~~~
mute_stream
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1367:20: error: initialization of ‘int (*)(struct snd_p$
.digital_stream = wm8960_mute,
^~~~~~~~~~~
/var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.c:1367:20: note: (near initialization for ‘wm8960_dai_ops$
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/wm8960-soundcard/1.0/build/wm8960.o] Fehler 1
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
make: *** [Makefile:1808: /var/lib/dkms/wm8960-soundcard/1.0/build] Fehler 2
make: Verzeichnis „/usr/src/linux-headers-5.10.11-v7l+“ wird verlassen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.