You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Raspberry Pi Model: Pi Zero W 2 and Pi 4
Kernel Version: 6.6.47+rpt-rpi-v8
Operating System: Debian-based Raspberry Pi OS
WM8960 HAT Repository: https://github.com/waveshare/WM8960-Audio-HAT
Problem Description:
The wm8960-soundcard.service fails to start on both the Raspberry Pi Zero W 2 and Raspberry Pi 4 after following the installation procedure for the WM8960 HAT. The soundcard is detected, and both playback and recording functionalities are working, but the service fails with exit code 99.
Expected Behavior:
The wm8960-soundcard.service should successfully load the device tree overlay and configure ALSA to recognize and initialize the WM8960 HAT soundcard.
The soundcard should be automatically initialized and work on boot without manual intervention.
Actual Behavior:
The wm8960-soundcard.service fails with exit code 99.
Device tree overlay application fails within the service, though it works when manually applied via /boot/firmware/config.txt.
Manual ALSA configuration is required for soundcard initialization.
Since the soundcard worked manually, we decided to disable the failing wm8960-soundcard.service:
sudo systemctl disable wm8960-soundcard.service
We relied on manual setup (ALSA configuration and /boot/firmware/config.txt) to manage the soundcard, which worked consistently after reboots.
Final Outcome and Observations:
Manual Configuration Works: After manually applying the device tree overlay and configuring ALSA, the WM8960 soundcard works correctly for both playback and recording.
Service Failure: The wm8960-soundcard.service consistently fails to apply the device tree overlay, resulting in exit code 99.
The text was updated successfully, but these errors were encountered:
Platform Information:
Problem Description:
The wm8960-soundcard.service fails to start on both the Raspberry Pi Zero W 2 and Raspberry Pi 4 after following the installation procedure for the WM8960 HAT. The soundcard is detected, and both playback and recording functionalities are working, but the service fails with exit code 99.
Expected Behavior:
The wm8960-soundcard.service should successfully load the device tree overlay and configure ALSA to recognize and initialize the WM8960 HAT soundcard.
The soundcard should be automatically initialized and work on boot without manual intervention.
Actual Behavior:
The wm8960-soundcard.service fails with exit code 99.
Device tree overlay application fails within the service, though it works when manually applied via
/boot/firmware/config.txt
.Manual ALSA configuration is required for soundcard initialization.
Steps Taken to Investigate and Resolve the Issue:
Step 1: Installation Procedure
We followed the instructions in the official WM8960 HAT repository as follows:
sudo apt-get update sudo apt-get upgrade sudo apt-get install git git clone https://github.com/waveshare/WM8960-Audio-HAT cd WM8960-Audio-HAT sudo ./install.sh sudo reboot
After reboot, the wm8960-soundcard.service failed to start.
Step 2: Checking Service Status
The service status consistently failed with the following logs:
journalctl -xeu wm8960-soundcard.service
This revealed that the device tree overlay failed to apply:
Step 3: Investigating Overlay Loading
We manually checked the device tree overlays using:
Output:
This shows that the overlay is loaded manually via
/boot/firmware/config.txt
.We confirmed that the following line was present in
/boot/firmware/config.txt
:Step 4: Manual ALSA Configuration
Since the service failed to configure ALSA, we manually created the required symlinks and saved the ALSA state:
Playback and recording functionality were confirmed by running:
Output:
Testing the recording and playback:
arecord -D hw:3,0 -f cd test.wav aplay test.wav
Both recording and playback worked without issues.
Step 5: Fixing Mono Channel Playback Issues
When attempting to play a mono .wav file (Front_Center.wav), we encountered a "Channels count not available" error:
We fixed this by converting the file to stereo:
This resolved the issue.
Step 6: Disabling the Failing Service
Since the soundcard worked manually, we decided to disable the failing wm8960-soundcard.service:
We relied on manual setup (ALSA configuration and /boot/firmware/config.txt) to manage the soundcard, which worked consistently after reboots.
Final Outcome and Observations:
Manual Configuration Works: After manually applying the device tree overlay and configuring ALSA, the WM8960 soundcard works correctly for both playback and recording.
Service Failure: The wm8960-soundcard.service consistently fails to apply the device tree overlay, resulting in exit code 99.
The text was updated successfully, but these errors were encountered: