Audio driver bug


I tried to get MPD setup on the vero4k, and I found that there seems to be an audio bug in the driver.

exception: Failed to open "default detected output" [alsa]
exception: nested: Error opening ALSA device "default"
exception: snd_pcm_hw_params_set_buffer_time_near() failed: Invalid argument

according to ALSA documentation that error means “configuration space is empty”, which means that the sound chip driver is not doing the right thing.

Obviously, sound playback does work with other software on the vero4k, such as kodi, so they are likely setting things up in a different way and do not stumble on the bug. Although, I have noticed before sometimes strange audio problems, depending on the source material I’m watching in kodi.

I tried to find the original upstream source for the amlogic audio chipset, but I only could find the imported source in the OSMC github tree. For example, this looks relevant. I suspect there may be some additional driver updates from upstream that maybe fix some of these issues, and maybe that needs to be re-imported from the amlogic driver tree. If not, maybe it needs to be passed up to them to fix?

Excuse my ignorance: what is MPD?

MPD is the Music Player Daemon.

You run it somewhere and can control it everywhere. Its a great way to have a headless music server.

Just to understand your aim: You want to setup a headless music player on Vero 4k and not use OSMC/Kodi? :thinking:

Isn’t this quite a hardware overkill for such an application? Thinking more RPi with such a scenario.

1 Like

I was running it on my rpi3 before, and I moved to the vero4k when that arrived. It needs very little hardware to run, yes… but I also use OSMC/Kodi.

Ok, well the answer to your question is for some reason, AMLogic do not provide a full ALSA driver so if MPD needs to access the soundcard via ALSA it will struggle. If I’m right, you may find multi-channel output works but stereo doesn’t.

It doesn’t affect Kodi but it does break other apps which expect ALSA set up in the right way. I’ve been looking into it and will use MPD as a test case, now.

I should note that if I install pulseaudio, and setup mpd to use pulse audio, with this trivial config:

audio_output {
        type            "pulse"
        name            "pulse audio"

it works fine.

That’s good to know.