No Audio Output Device on Raspberry Pi 5

Hello everyone,

I recently bought a Raspberry Pi 5 to run volumio on.
Did the initial setup, and have the device connected via HDMI to my AV-Receiver(I tried both HDMI outputs, as I read that only 1 of them supports audio?!?). I am unable to play anything cause there seems to be no audio output available.
In the webUI for the “General Playback Options->Audio Output->Output Device” it says “No Audio Device Available”

In addition when I try to play a song over the webUI, I get the error message:
Failed to open “alsa” (alsa)
Failed to open alsa device “volumio” no such device.

So I have been browsing this forum a bit and any related information included additional DACs installed to the raspberry pi. I previously ran volumio successfully on a Pi3 without the need for an additional DAC to work via HDMI.

I dont really know or understand why I have this issue now, or what I can do about it.

  1. Do I need an additional DAC for my Pi5 to have audio output?
  2. I did the initial set up of the Pi5 connected to a different Monitor that has no audio. Could that cause an issue like this?

I installed the latest Volumio 3.569

Would be super grateful for any help.

I saw that v3.595 has audio over HDMI in Pi5.

oh wow. I am gonna give that a try then and let you know if that worked. Good find, ty.

oh, where do I find that update? on the web interface it says its up to date, and I can only find version 3.569 here: Get Started - Volumio

Remember, this is a trial version, you can install it at your own risk.

http://volumio.local/dev/

and push TRUE in “TEST MODE”

after that after restart you should have update

1 Like

So, I updated to 3.595 and now I have new options for the Output Devices.

HDMI 0
and
HDMI 1

Now I dont get an error any more for audio output, but playback still does not work and I cant have any audio output :thinking:

1 Like

I can’t help you on this point because I have USB output.
Wait for specialist.

Try with newest 3.596.

Thanks for your feedback. We are working to enable HDMI audio out on PI5, we’ll keep you posted

1 Like

3.596 does not work yet.

Will have to wait for @volumio to have an update for me.

Appreciate the help and replies

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!

1 Like

@volumio can you have a look at that?

Expanding on the /volumio/app/plugins/audio_interface/alsa_controller/index.js:

The var card = self.config.get(‘outputdevicecardname’) already has device list on Output Device selector.
As such, the iec958 slave switch can be used with this example:

    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';
    if ( card  === 'vc4hdmi0' || card === 'vc4hdmi1' ) {
    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';
    }
    asoundcontent += '}\n';

Raspberry Pi 5 HDMI, USB, Sabre audio - just to test few, are working as expected.

Happy hacking!

1 Like

thank you for the hints!

He gave me hints here too :

But it is to high level for me

@nerd thanks for your hints! We’ve successfully enabled PI5 HDMI out thanks to your suggestions!

@volumio - I haven’t had a chance to test it on RPI 4 yet. Hope nothing breaks there.

Happy hacking!

If you guys are curious, you can update to TEST version 3.601

IMPORTANT: If you manually edited some files, do a factory reset before

Let us know how it goes

2 Likes

@volumio - 3.601 works as a charm.
Pushed to NVME with the same outcome.

Happy hacking!

1 Like

Is It ready to download?? :upside_down_face:

Edit : but I ask about 3.601 “nerd” version. My NVMe HatDrive still waiting.