Open Fysek opened 9 months ago
I encountered the same wm8960-soundcard.service error code 99
issue, but I just did a test and it doesn't seem to affect any related functionalities, such as running commands like aplay xxx.wav, etc. It's really strange, isn't it?
Interesting finding @YuMingC233, did you try to run alsamixer to check if raspbian sees it as a sound card? Here's a manual https://www.waveshare.com/wiki/WM8960_Audio_HAT Btw. what is your hardware and kernel version?
Raspberry Pi Zero 2
WM8960 Audio HAT
After assembly
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
When I normally boot it up, there is an error at the end of the startup, like this:
Further error information
Looks identical, doesn't it? 😏😏
When I tried to reboot:
Ok, it failed.
When I checked journalctl -xe
to investigate further:
Memory leak? But when I checked htop
, I found no applications hogging system resources:
However, when I tried to reboot it again, the same error occurred.
Actually, this issue is not "fatal." When I use aplay xxx.wav
in this state, it can play correctly, and even more advanced "real-time listening" commands like arecord -f cd | sudo arecord -f cd | aplay
work fine.
Note, none of my commands explicitly specify the hardware.
@Fysek You might also try testing to see if you can replicate it.
Cheers 🥂
I have been experience the same problem.
Okay, it looks like I figured out what's problem.
Okay, it looks like I figured out what's problem.
@Subuday Could you share what's the problem and any possible solutions, please?
On my Raspberry Pi Zero 2 W, by default I have two devices:
card 0: vc4hdmi
card 1: wm8960soundcard
You can check this using aplay -l
.
Then I checked logs of wm8960-soundcard.service: alsactl restore
No state is present for card vc4hdmi
alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "vc4-hdmi" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card vc4hdmi
So it looks like alsactl tries to restore by default with card 0 that is vc4hdmi instead wm8960soundcard.
To fix starting of the service, just modify it to launch with the correct card. In my case it is alsactl restore -c 1
Maybe we need some code that would either disabling vc4hdmi or setting proper card by searching in system wm8960soundcard.
I am working on PI 2 zero W with WM8960 Audio HAT https://www.waveshare.com/wiki/WM8960_Audio_HAT raspberrypi-kernel : (1:1.20230405-1) raspberrypi-kernel-headers: (1:1.20230405-1)
I did this: sudo apt-get dist-upgrade sudo apt-get update git clone https://github.com/waveshare/WM8960-Audio-HAT cd WM8960-Audio-HAT sudo nano wm8960-soundcard.dts Change target = <&i2c1>; to <&i2c0> ; line 25 sudo ./install.sh sudo reboot -> nothing changed
Dec 10 18:40:17 pizero systemd[1]: Starting WM8960 soundcard service... Dec 10 18:40:17 pizero wm8960-soundcard[369]: + exec Dec 10 18:40:17 pizero wm8960-soundcard[400]: ++ basename /usr/bin/wm8960-soundcard Dec 10 18:40:20 pizero systemd[1]: wm8960-soundcard.service: Main process exited, code=exited, status=99/n/a Dec 10 18:40:20 pizero systemd[1]: wm8960-soundcard.service: Failed with result 'exit-code'. Dec 10 18:40:20 pizero systemd[1]: Failed to start WM8960 soundcard service.