waveshare / WM8960-Audio-HAT

The drivers of [WM8960 Audio HAT] for Raspberry Pi
GNU General Public License v3.0
100 stars 65 forks source link

does not work with Raspberry Pi 3b or 4b with current Raspberry Pi OS #11

Open AndreMarschalek opened 3 years ago

AndreMarschalek commented 3 years ago

Job for wm8960-soundcard.service failed because the control process exited with error code

root@raspberrypi:/home/pi/WM8960-Audio-HAT# /usr/bin/wm8960-soundcard

Brummbude commented 3 years ago

Could you explain the issue please? This SW package is a device driver not a service. Please, follow the instructions given in the manual. If it was compiled successfully you are all set

AndreMarschalek commented 3 years ago

i am following the instructions described at https://www.waveshare.com/w/upload/5/54/WM8960_Audio_HAT_User_Manual_EN.pdf

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

if you take a look at the source of

https://github.com/waveshare/WM8960-Audio-HAT/blob/master/install.sh ... cutted ...

set service

cp wm8960-soundcard /usr/bin/ cp wm8960-soundcard.service /lib/systemd/system/ systemctl enable wm8960-soundcard.service systemctl start wm8960-soundcard

" This SW package is a device driver not a service. " please tell me why your driver which is not a service installs one ?

Brummbude commented 3 years ago

Ups, didn't noticed that when I was playing around with the driver. But: I do have an Raspberry 3B and I did compile it but Ina different way: Apt update Apt upgrade cd /etc/modprobe.d sudo vi alsa-blacklist.conf Enter the following line: blacklist snd_bcm2835 Save the file Reboot Then git clone https://github.com/waveshare/WM8960-Audio-HAT cd WM8960-Audio-HAT sudo ./install.sh sudo reboot I did not need to reboot the soundcard was working after that. And yes I know the install script should do the update magic but I did not put any trust in that.

The outcome is here: https://github.com/waveshare/WM8960-Audio-HAT/issues/10#issuecomment-674251718

vvstubbs commented 2 years ago

I have a similar problem, 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

Any thoughts or should I just return the device?

vvstubbs commented 2 years ago

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, 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

sebastientaggart commented 1 year ago

Same exact problem here, on Pi Zero v1.3 fresh install.