Ulrar / hassio-addons

Repo for hassio addons
MIT License
23 stars 10 forks source link

Local playback does not work on arm #1

Closed marecabo closed 4 years ago

marecabo commented 4 years ago

When selecting Built-in Audio Stereo as output in the addon configuration, local playback (speaker: "Computer") does not work and fails with these messages in the log:

Addon Audio Config

image

Log on RPi3B+ 32bit (armv7)

[  LOG]   laudio: Cannot open shared library /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_ctl_pulse.so ((null): /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory)
[  LOG]   laudio: Failed to attach mixer 'default': No such device or address
[  LOG]   laudio: Could not open mixer 'default' ('(null)')

Log on RPi4B 64bit (aarch64)

[  LOG]   laudio: Cannot open shared library /usr/lib/aarch64-linux-gnu/alsa-lib/libasound_module_ctl_pulse.so ((null): /usr/lib/aarch64-linux-gnu/alsa-lib/libasound_module_ctl_pulse.so: cannot open shared object file: No such file or directory)
[  LOG]   laudio: Failed to attach mixer 'default': No such device or address
[  LOG]   laudio: Could not open mixer 'default' ('(null)')
marecabo commented 4 years ago

Fortunately this can be fixed by adding libasound2-plugins to RUN_DEPS in the Dockerfile on both of these platforms.

Ulrar commented 4 years ago

Ah sorry, I should have specified that you need to use "pulseaudio" as the backend for local, not alsa. Can you try and confirm it does work ? libasound2-plugins has a plugin to redirect alsa output to pulseaudio, which is why it solves it too.

audio {
...
    type = "pulseaudio"
...
}

If it works fine for you I'll add a note to the readme

marecabo commented 4 years ago

Thanks for this clarification! I just rebuilt the addon without libasound2-plugins and can confirm that applying your change in /share/forked-daapd/forked-daapd.conf makes it work.

Ulrar commented 4 years ago

Great, thanks for the confirmation !