[Pkg-mpd-maintainers] Bug#982314: mpd: 100% of CPU time on ARM Cortex A8 when playing 88.2kHz flac

Stefan Monnier monnier at iro.umontreal.ca
Mon Feb 8 03:29:30 GMT 2021


Package: mpd
Version: 0.21.5-3
Severity: normal

Dear Maintainer,

I'm pretty sure this is not a bug in MPD but probably in some of the
libraries it uses (libresample, maybe?).

Usually, when playing 44.1kHz flac files on my ARM SoC based on
Allwinner A10 (with one ARM Cortex A8), the CPU use of MPD is
negligeable (<10%), but when playing flac files sampled at 88.2kHz the
CPU is pegged at 100% and the playback frequently skips because the
CPU can't keep up.

I tried this test on my BananaPi with the exact same setup (cloned
Debian install) and the BananPi plays the file with no problem at all,
with a CPU use still <10%.

The BananaPi is a very similar machine built around the Allwinner A20
which is also a very similar SoC (but with two ARM Cortex A7).  AFAIK
the audio output hardware is similar, so I'd expect that if resampling
is needed on one it's also needed on the other, but I'm not 100% sure
and don't know how to confirm it.

The other important difference is the CPU, where the A7 is a bit more
recent and lists support for the following additional features:

    evtstrm
    idiva
    idivt
    lpae
    vfpv4

So I'm wondering if the problem might be that some library is using
one of those features and is then massively slowed down by
some in-kernel emulation of the missing feature?
Not sure how to check that either.


        Stefan


-- System Information:
Debian Release: 10.8
  APT prefers stable
  APT policy: (990, 'stable'), (50, 'testing')
Architecture: armhf (armv7l)

Kernel: Linux 5.6.0-2-armmp (SMP w/1 CPU core)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=fr_CH.UTF-8, LC_CTYPE=fr_CH.UTF-8 (charmap=UTF-8), LANGUAGE=fr_CH.U
TF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mpd depends on:
ii  adduser                           3.118
ii  init-system-helpers               1.56+nmu1
ii  libadplug-2.2.1-0v5               2.2.1+dfsg3-1
ii  libao4                            1.2.2+20180113-1
ii  libasound2                        1.1.8-1
ii  libaudiofile1                     0.3.6-5
ii  libavahi-client3                  0.7-4+b1
ii  libavahi-common3                  0.7-4+b1
ii  libavcodec58                      7:4.1.6-1~deb10u1
ii  libavformat58                     7:4.1.6-1~deb10u1
ii  libavutil56                       7:4.1.6-1~deb10u1
ii  libbz2-1.0                        1.0.6-9.2~deb10u1
ii  libc6                             2.28-10
ii  libcdio-cdda2                     10.2+0.94+2-4
ii  libcdio-paranoia2                 10.2+0.94+2-4
ii  libcdio18                         2.0.0-2
ii  libcurl3-gnutls                   7.64.0-4+deb10u1
ii  libdbus-1-3                       1.12.20-0+deb10u1
ii  libexpat1                         2.2.6-2+deb10u1
ii  libfaad2                          2.8.8-3
ii  libflac8                          1.3.2-3
ii  libfluidsynth1                    1.1.11-1
ii  libgcc-s1 [libgcc1]               10.1.0-3
ii  libgcc1                           1:8.3.0-6
ii  libgcrypt20                       1.8.4-5
ii  libgme0                           0.6.2-1
ii  libicu63                          63.1-6+deb10u1
ii  libid3tag0                        0.15.1b-14
ii  libiso9660-11                     2.0.0-2
ii  libixml10                         1:1.8.4-2
ii  libjack-jackd2-0 [libjack-0.125]  1.9.12~dfsg-2
ii  libjs-sphinxdoc                   1.8.4-1
ii  libmad0                           0.15.1b-10
ii  libmikmod3                        3.3.11.1-4
ii  libmms0                           0.6.4-3
ii  libmodplug1                       1:0.8.9.0-2
ii  libmp3lame0                       3.100-2+b1
ii  libmpcdec6                        2:0.1~r495-1+b2
ii  libmpdclient2                     2.16-1
ii  libmpg123-0                       1.25.10-2
ii  libnfs12                          3.0.0-2
ii  libogg0                           1.3.2-1+b1
ii  libopenal1                        1:1.19.1-1
ii  libopus0                          1.3-1
ii  libpcre3                          2:8.39-12
ii  libpulse0                         12.2-4+deb10u1
ii  libsamplerate0                    0.1.9-2
ii  libshout3                         2.4.1-2
ii  libsidplayfp4                     1.8.8-1
ii  libsmbclient                      2:4.9.5+dfsg-5+deb10u1
ii  libsndfile1                       1.0.28-6
ii  libsoxr0                          0.1.2-3
ii  libsqlite3-0                      3.27.2-3+deb10u1
ii  libstdc++6                        8.3.0-6
ii  libsystemd0                       241-7~deb10u6
ii  libupnp13                         1:1.8.4-2
ii  libvorbis0a                       1.3.6-2
ii  libvorbisenc2                     1.3.6-2
ii  libwavpack1                       5.1.0-6
ii  libwildmidi2                      0.4.3-1
ii  libyajl2                          2.1.0-3
ii  libzzip-0-13                      0.13.62-3.2
ii  lsb-base                          10.2019051400
ii  zlib1g                            1:1.2.11.dfsg-1

mpd recommends no packages.

Versions of packages mpd suggests:
ii  avahi-daemon      0.7-4+b1
pn  icecast2          <none>
ii  mpc [mpd-client]  0.31-1
ii  pulseaudio        12.2-4+deb10u1

-- Configuration Files:
/etc/default/mpd changed:
MPD_OPTS="-N -20"

/etc/mpd.conf changed:
music_directory         "/var/lib/mpd/music"
playlist_directory              "/var/lib/mpd/playlists"
db_file                 "/var/lib/mpd/tag_cache"
log_file                        "/var/log/mpd/mpd.log"
pid_file                        "/run/mpd/pid"
state_file                      "/var/lib/mpd/state"
sticker_file                   "/var/lib/mpd/sticker.sql"
user                            "mpd"
bind_to_address         "0.0.0.0"
input {
        plugin "curl"
}
input {
        enabled    "no"
        plugin     "qobuz"
}
input {
        enabled      "no"
        plugin       "tidal"
}
decoder {
        plugin                  "hybrid_dsd"
        enabled                 "no"
}
audio_output {
        type            "alsa"
        name            "My ALSA Device"
        mixer_control   "Power Amplifier"
}
replaygain                      "album"
filesystem_charset              "UTF-8"


-- no debconf information



More information about the Pkg-mpd-maintainers mailing list