This serves as a follow up to an outdated thread regarding Volumio compatibility with WM8960.
Since the WM8960 currently seems to be the only amplifier board that runs with Pi’s on-board power and has a phone jack additionally to the speaker connectors, I assume it’s worth another look. For my use case (battery-powered kids juke box with speakers and headphone support) it seems the perfect choice.
I’ve gone through all the replies in said thread. The last hope was a comment by Inbxa in February 2022 mentioning editing the dacs.json manually and then installing the DAC’s driver. As of today, I cannot confirm this is working.
Setup: Volumio 3.757, 17-09-2024 on a Raspberry Pi 5 with 7-inch touch screen.
Reproduction
- Following Step 1-5 from Inbxa Volumio install
- The original WM8960 repo install script is not working on Buster anymore. It expects the config.txt in /boot/firmware/, which is bookworm-compatible. There is a community wrapper that fixes this to work with buster.
- One can select the audio output in Volumio, but pressing play has no effect (no sound, no seconds counting down) and showing the error "Failed to open “alsa” (alsa); Error opening ALSA device “volumio”; snd_pcm_hw_params() failed: Invalid argument
What I have debugged:
~$ 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: wm8960soundcard [wm8960-soundcard], device 0: 1f000a0000.i2s-wm8960-hifi wm8960-hifi-0 [1f000a0000.i2s-wm8960-hifi wm8960-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
speaker-test -c2 -Dhw:1,0 works!
~$ speaker-test -c2 -Dhw:1,0
speaker-test 1.1.8
Playback device is hw:1,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 131072
Period size range from 32 to 1024
Using max buffer size 131072
Periods = 4
was set period_size = 1024
was set buffer_size = 131072
0 - Front Left
1 - Front Right
Time per period = 3.247001
0 - Front Left
[...]
Maybe issues with 44,1 kHz?
~$ aplay -Dhw:1,0 /volumio/app/startup.wav
Playing WAVE '/volumio/app/startup.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1403: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (23219 23220)
PERIOD_SIZE: 1024
PERIOD_BYTES: 4096
PERIODS: 22
BUFFER_TIME: (510839 510840)
BUFFER_SIZE: 22528
BUFFER_BYTES: 90112
TICK_TIME: 0
But a self-recorded 48 kHz Sample works flawlessly
~$ aplay -Dhw:1,0 test48000.wav
Playing WAVE 'test48000.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
This is where my debugging capabilities come to an end. Maybe one last note: I used the same hardware with a second SD card running an up-to-date Raspberry Pi OS. After installing the driver from the mentioned repo, system sound, Spotify (Browser) and media players work flawlessly.
If anyone is able to look into this or give me hints I could try out, I would be very thankful.