Audio Codec Breakout (BOB-21250 / BOB-21772) connection to Raspberry Pi

Hello all!

I’ve been trying to get the Audio Codec Breakout board connected to the Raspberry Pi (Attempting on the W, Pi 3 and Pi 4) and functioning but am having some issues. Given that there are no direct drivers for the Raspberry Pi, I’ve been following the guide over at https://learn.sparkfun.com/tutorials/sp … udio-codec.

My pinout is pulled from the guide here:

WM8960 Stereo CODEC (I2S)
Pin #	GPIO	Function
12	GPIO 18 (PCM_CLK)	BCLK
35	GPIO 19 (PCM_FS)	DAC-LRC
38	GPIO 20 (PCM_DIN)	ADC-DAT
40	GPIO 21 (PCM_DOUT	DAC-DAT
// as well as general i2c setup on pins 03 and 05, as well as 3v3, 5v and gnd
// also worth noting, I'm getting the POWER led on when power is supplied

With that in mind, I’m following the guide and using the drivers found at https://github.com/waveshare/WM8960-Audio-HAT.

The install goes as expected and completes. however, I’m still unable to get any audio output. Here’s some of my findings from the logs/configurations:

Service Status:

dlawle@sound:~ $ 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 Tue 2023-10-03 16:20:11 EDT; 5min ago
    Process: 458 ExecStart=/usr/bin/wm8960-soundcard (code=exited, status=99)
   Main PID: 458 (code=exited, status=99)
        CPU: 783ms

Oct 03 16:20:07 sound systemd[1]: Starting WM8960 soundcard service...
Oct 03 16:20:07 sound wm8960-soundcard[458]: + exec
Oct 03 16:20:07 sound wm8960-soundcard[464]: ++ basename /usr/bin/wm8960-soundcard
Oct 03 16:20:11 sound systemd[1]: wm8960-soundcard.service: Main process exited, code=exited, status=99/n/a
Oct 03 16:20:11 sound systemd[1]: wm8960-soundcard.service: Failed with result 'exit-code'.
Oct 03 16:20:11 sound systemd[1]: Failed to start WM8960 soundcard service.

Journalctl response for service starting

Oct 03 16:26:03 sound systemd[1]: Configuration file /lib/systemd/system/wm8960-soundcard.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Oct 03 16:26:03 sound systemd[1]: Configuration file /lib/systemd/system/wm8960-soundcard.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Oct 03 16:26:28 sound sudo[1678]:   dlawle : TTY=pts/0 ; PWD=/home/dlawle ; USER=root ; COMMAND=/usr/bin/systemctl restart wm8960-soundcard.service
Oct 03 16:26:28 sound sudo[1678]: pam_unix(sudo:session): session opened for user root(uid=0) by dlawle(uid=1000)
Oct 03 16:26:28 sound systemd[1]: Starting WM8960 soundcard service...
Oct 03 16:26:28 sound wm8960-soundcard[1681]: + exec
Oct 03 16:26:28 sound wm8960-soundcard[1682]: ++ basename /usr/bin/wm8960-soundcard
Oct 03 16:26:28 sound su[1692]: (to dlawle) root on none
Oct 03 16:26:28 sound su[1692]: pam_unix(su:session): session opened for user dlawle(uid=1000) by (uid=0)
Oct 03 16:26:28 sound systemd[1]: Started Session c1 of user dlawle.
Oct 03 16:26:28 sound su[1692]: pam_unix(su:session): session closed for user dlawle
Oct 03 16:26:28 sound systemd[1]: session-c1.scope: Succeeded.
Oct 03 16:26:28 sound kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/i2c@7e804000/status
Oct 03 16:26:28 sound su[1705]: (to dlawle) root on none
Oct 03 16:26:28 sound su[1705]: pam_unix(su:session): session opened for user dlawle(uid=1000) by (uid=0)
Oct 03 16:26:28 sound systemd[1]: Started Session c2 of user dlawle.
Oct 03 16:26:28 sound su[1705]: pam_unix(su:session): session closed for user dlawle
Oct 03 16:26:28 sound systemd[1]: session-c2.scope: Succeeded.
Oct 03 16:26:29 sound su[1723]: (to dlawle) root on none
Oct 03 16:26:29 sound su[1723]: pam_unix(su:session): session opened for user dlawle(uid=1000) by (uid=0)
Oct 03 16:26:29 sound systemd[1]: Started Session c3 of user dlawle.
Oct 03 16:26:29 sound su[1723]: pam_unix(su:session): session closed for user dlawle
Oct 03 16:26:29 sound systemd[1]: session-c3.scope: Succeeded.
Oct 03 16:26:29 sound kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/i2s@7e203000/status
Oct 03 16:26:30 sound su[1734]: (to dlawle) root on none
Oct 03 16:26:30 sound su[1734]: pam_unix(su:session): session opened for user dlawle(uid=1000) by (uid=0)
Oct 03 16:26:30 sound systemd[1]: Started Session c4 of user dlawle.
Oct 03 16:26:30 sound su[1734]: pam_unix(su:session): session closed for user dlawle
Oct 03 16:26:30 sound systemd[1]: session-c4.scope: Succeeded.
Oct 03 16:26:31 sound systemd[1]: wm8960-soundcard.service: Main process exited, code=exited, status=99/n/a
Oct 03 16:26:31 sound systemd[1]: wm8960-soundcard.service: Failed with result 'exit-code'.
Oct 03 16:26:31 sound systemd[1]: Failed to start WM8960 soundcard service.
Oct 03 16:26:31 sound sudo[1678]: pam_unix(sudo:session): session closed for user root

Dkms status:

dlawle@sound:~ $ sudo dkms status
wm8960-soundcard, 1.0, 6.1.21-v8+, aarch64: installed

aplay -l status: (interestingly, the card is NOT set at card 0

dlawle@sound:~ $ aplay -l
**** 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: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
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

Concerned about the ```
Oct 03 16:26:28 sound kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/i2c@7e804000/status

Small update - I was able to get this working by using the seeed voicecard precompiled image, but still unsuccessful getting any 64bit version to work. Image can be found here: https://github.com/respeaker/seeed-voicecard/