This is interesting.
Quick look at Raspberry PI 5 HDMI only.
In the recent GitHub commit the vc4-hdmi-0 and vc4-hdmi-1 are disabled.
If you can see hdmi related entries in the /volumio/app/plugins/audio_interface/alsa_controller/ignoreCards.json, please remove them for this test.
Let see what brakes (as volumio or root user):
aplay -D volumio /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
ALSA lib pcm_plug.c:835:(snd_pcm_plug_hw_refine_schange) Unable to find an usable slave format for 'volumioOutput'
ALSA lib pcm_plug.c:839:(snd_pcm_plug_hw_refine_schange) Format: S24_3LE
ALSA lib pcm_plug.c:844:(snd_pcm_plug_hw_refine_schange) Slave format: IEC958_SUBFRAME_LE
ALSA lib pcm_plug.c:924:(snd_pcm_plug_hw_refine_cchange) Unable to find an usable client format
ALSA lib pcm_plug.c:928:(snd_pcm_plug_hw_refine_cchange) Format: S24_3LE
ALSA lib pcm_plug.c:933:(snd_pcm_plug_hw_refine_cchange) Slave format: IEC958_SUBFRAME_LE
ALSA lib pcm_params.c:2226:(snd1_pcm_hw_refine_slave) Slave PCM not usable
aplay: set_params:1310: Broken configuration for this PCM: no configurations available
Which is complaining about IEC958_SUBFRAME_LE slave format.
Quick dive into the /etc/asound.conf as root user confirms the suspicion, alsa slave is not being made aware of its format:
pcm.postVolume {
type empty
slave.pcm "volumioOutput"
}
# There is always a plug before the hardware to be safe
pcm.volumioOutput {
type plug
slave.pcm "volumioHw"
}
pcm.volumioHw {
type hw
card "vc4hdmi0"
}
A quick update for the slave:
pcm.volumioOutput {
type plug
slave.pcm "volumioHw"
type "iec958"
slave.format "IEC958_SUBFRAME_LE"
}
Quick test:
aplay -D volumio /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Nicely reproduced audio center on connected HDMI to port 0.
Volumio process starts after alsa and is not aware at this point about the slave IEC958, hence will still complain.
Digging further:
The Volumio’s app alsa controller may need some “tweaking”:
/volumio/app/plugins/audio_interface/alsa_controller/index.js
diff index.js.propsed index.js
2157,2158d2156
< asoundcontent += ' type "iec958"\n';
< asoundcontent += ' slave.format "IEC958_SUBFRAME_LE"\n';
A part of the /volumio/app/plugins/audio_interface/alsa_controller/index.js showing change:
asoundcontent += '# There is always a plug before the hardware to be safe\n';
asoundcontent += 'pcm.volumioOutput {\n';
asoundcontent += ' type plug\n';
asoundcontent += ' slave.pcm "volumioHw"\n';
asoundcontent += ' type "iec958"\n';
asoundcontent += ' slave.format "IEC958_SUBFRAME_LE"\n';
asoundcontent += '}\n\n';
asoundcontent += 'pcm.volumioHw {\n';
asoundcontent += ' type hw\n';
asoundcontent += ' card \"' + card + '\"\n';
if(device != null) {
asoundcontent += ' device ' + device + '\n';
}
Quick reboot, HDMI sound works.
Above is a “dirty hack” for the Raspberry Pi 5 HDMI sound. Since in this example, the IEC958_SUBFRAME_LE is hardcoded in the …/alsa_controller/index.js without any awareness of any other audio outputs (Bluetooth, DAC, etc) the sound will break for any IEC958 unaware device.
This will be to the Volumio dev’s to provide an articulated and slave format aware switch for the Playback Options.
Happy hacking!