Hello all, I recently purchased a WM8960 hat for a hobby project, I simply just want to play an audio file (.wav or .mp3) decently loudly through a speaker. It is mounted onto a Raspberry Pi 3B+ with the included stereo speakers connected via the JST 4 pin header. I've been following the instructions on the wiki to install the driver and run the tests, but I'm running into some trouble, it's been some time since I've used a Pi but I'll attach all of the relevant info I can find. I've tried 64bit Raspbian, 32bit, and a prebuilt image specifically for the WM8960 hat on 32bit bullseye from the installation page, which I what is currently have flashed.I can see the the hat in my sound devices as card 1, device 0, it shows up in alsamixer, I can see it on i2cdetect, etc. I can not for the life of me find a way to get the audio file to play from the speaker, the only time I ever hear audio out of it is when I run with the white noise stereo test.
When I attempt to play the file directly with aplay, I get the following:I attempted to restart the wm8960 service via system ctl, which failed and directed me to the status output here:
I've tried reinstalling the driver and rebooting, manually setting a default device in my asound.conf, setting my device and checking my volume in alsamixer, I tried using mplayer, and several other fixes with no luck. I'm finding the audio configuration and various utilities a little hard to parse, and I've only been able to see fragments of solutions to similar problems on other forums, none of which I've gotten to work.
Does anyone see any glaring issues or have recommendations either for different hardware or software tools? I'd be happy to include any additional output to troubleshoot, thanks.
Code:
~ $ uname -aLinux raspberrypi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux
Code:
speaker-test -c2 -Dhw:1,0
When I attempt to play the file directly with aplay, I get the following:
Code:
~ $ aplay -Dhw:1,0 ur-dur.wavPlaying WAVE 'ur-dur.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereoaplay: set_params:1407: Unable to install hw params:ACCESS: RW_INTERLEAVEDFORMAT: S16_LESUBFORMAT: STDSAMPLE_BITS: 16FRAME_BITS: 32CHANNELS: 2RATE: 44100PERIOD_TIME: (125011 125012)PERIOD_SIZE: 5513PERIOD_BYTES: 22052PERIODS: 4BUFFER_TIME: (500045 500046)BUFFER_SIZE: 22052BUFFER_BYTES: 88208TICK_TIME: 0
Code:
~ $ 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 Sun 2024-09-15 16:45:47 EDT; 6min ago Process: 7957 ExecStart=/usr/bin/wm8960-soundcard (code=exited, status=99) Main PID: 7957 (code=exited, status=99) CPU: 484msSep 15 16:45:44 raspberrypi systemd[1]: Starting WM8960 soundcard service...Sep 15 16:45:44 raspberrypi wm8960-soundcard[7957]: + execSep 15 16:45:44 raspberrypi wm8960-soundcard[7958]: ++ basename /usr/bin/wm8960-soundcardSep 15 16:45:47 raspberrypi systemd[1]: wm8960-soundcard.service: Main process exited, code=exited, status=99/n/aSep 15 16:45:47 raspberrypi systemd[1]: wm8960-soundcard.service: Failed with result 'exit-code'.Sep 15 16:45:47 raspberrypi systemd[1]: Failed to start WM8960 soundcard service.
I've tried reinstalling the driver and rebooting, manually setting a default device in my asound.conf, setting my device and checking my volume in alsamixer, I tried using mplayer, and several other fixes with no luck. I'm finding the audio configuration and various utilities a little hard to parse, and I've only been able to see fragments of solutions to similar problems on other forums, none of which I've gotten to work.
Does anyone see any glaring issues or have recommendations either for different hardware or software tools? I'd be happy to include any additional output to troubleshoot, thanks.
Statistics: Posted by gragleas — Sun Sep 15, 2024 9:02 pm