Latest mpd addon requires unsupported alsa buffering

Hello,

I recently switched to CoreELEC on my Odroid C2., thank you to the developers and the community! Unfortunately the latest update to the 9.0.2 addon repository introduced a problem for me.

The latest mpd (repo 9.0.2, addon 9.0.107, mpd 0.21.4) enforces ALSA output buffering.
It used to work with the following output configuration:

audio_output {
type				"alsa"
name			"PCM5102 DAC"
device			"hw:0,0"
format			"44100:16:2"	# Required for Odroid!
mixer_type		"software"
auto_channels		"no"		# Required for Odroid!
auto_format 		"no"		# Required for Odroid!
buffer_time 		"0"		# Required for Odroid!
}

With the latest version mpd exits with an error because of the zero buffer time.
With small values I hear strange noise.
With the default value of 500000 the command ‘mpc play’ gives the error: Error opening ALSA device “hw:0,0”; snd_pcm_hw_params_set_buffer_time_near() failed: Invalid argument

Playing a wav-file with ‘aplay -D hw:0,0 -t wav test.wav’ works perfectly.

Is there a way to downgrade mpd to the previous version?
Or is there another solution?

Thank you for your help,
Pim.

Hi,
Same issue with latest mpd. I downgraded to 0.20.21 version. Hapilly was in ~/.kodi/addons/packages - service.multimedia.mpd-9.0.106.zip. Try update from zip.

dewastor

Thanks dewastor!

The old zip was still there indeed.
Unfortunately I read your message too late and made my own zip…
At least now I know how to build CoreELEC myself :slight_smile:

Tonight I fixed the problem by recompiling the previous version of MPD, following instructions from https://libreelec.wiki/compile

On my linux laptop:

sudo apt install gcc make git unzip wget xz-utils
git clone https://github.com/CoreELEC/CoreELEC
cd CoreELEC/
# Need to build libcrypt first manually because (I think) mpd is missing a dependency
# Need to add CCACHE_DISABLE=1 to prevent another error message (found this workaround in https://github.com/ocaml/opam/issues/3395 )
PROJECT=Amlogic DEVICE=S905 ARCH=arm CCACHE_DISABLE=1 scripts/build libgcrypt
PROJECT=Amlogic DEVICE=S905 ARCH=arm CCACHE_DISABLE=1 scripts/create_addon mpd

Be patient, it takes a while…
Now revert to the previous mpd version by replacing some lines in packages/addons/service/mpd/package.mk:


PKG_VERSION=“0.20.21”
PKG_SHA256=“8322764dc265c20f05c8c8fdfdd578b0722e74626bef56fcd8eebfb01acc58dc”
PKG_REV=“106”

cp -P $PKG_BUILD/.$TARGET_NAME/src/mpd $ADDON_BUILD/$PKG_ADDON_ID/bin

Rebuild mpd:

PROJECT=Amlogic DEVICE=S905 ARCH=arm CCACHE_DISABLE=1 scripts/create_addon mpd

You then have a zip file that you can transfer to the C2:
build.CoreELEC-S905.arm-9.0-devel/addons/mpd/service.multimedia.mpd-9.0.106.zip

Uninstall the mpd version 0.21.4 and install the previous from the zip-file.

Ok. More complicated but effective. Once I made self compiled addon in Libreelec that I need for music and know it’s quit problematic.
Uncheck automatic updates of mpd addon to prevent from future problems :slight_smile:

Does anybody has still those older mpd daemon zips and could give me access to it? I have the same problem and it would allow me to avoid recompilation. Thanks!

Hi, can someone Updload a working mpd Zip File Please.

Hi guys,

I’m quite new to Khadas Kodi. One day I found MPD added on to Kodi sounds pretty good, but there was a problem. That is, when it comes to DSD files I heard constant sizzle noise. I concluded that I ran into the issue specific to ARM MPD 0.21.4. So I also want to get rid of ARM MPD 0.21.4, though I don’t encounter ALSA buffering issue yet.

Thanks to you guys I could manage to build 0.20.21.

I worked on my CentOS 8 box and here is what I did.

  1. Groupinstall ‘Develpment Tools’ and then install the followings;
    sudo dnf --enablerepo=powertools install texinfo perl-Parse-Yapp gperf rpcgen golang
  2. Since Khads Kodi stays on Leia, specify version 9.2.8;
    git clone GitHub - CoreELEC/CoreELEC: A lightweight OS for KODI -b 9.2.8 --depth 1

Rest of the work is the same as presented by @pim but omit double quotes from PKG_VERSION and PKG_SHA256 in package.mk.

…
PKG_VERSION=0.20.21
PKG_SHA256=8322764dc265c20f05c8c8fdfdd578b0722e74626bef56fcd8eebfb01acc58dc
PKG_REV=“106”
…
cp -P $PKG_BUILD/.$TARGET_NAME/src/mpd $ADDON_BUILD/$PKG_ADDON_ID/bin