[rpi4 4GB Allo Boss Dac + ompd + kodi] mpd fails to start

Few Months back i upgraded to an rpi4 4GB, installed O!MPD and sound was playing.
Added KODI and put it on autostart. Kodi was playing fine. I did not use kodi on my previous install that was running on a rpi3.

Now i do not remember testing if O!MPD was playing sound/music after the Kodi install and if it was any of the updates since then that might have broken it.
The o!mpd webserver is running but mpd service is not.

Right now with both installed, kodi has sound but o!mpd is not able to play.
I tried removing kodi from autostart but the problem remained.
dietpi-justboom always starts up and i should mention i did not install the allo boss dac dietpi image back then because it was outdated.


Version: DietPi v7.5.2
Device model : RPi 4 Model B (aarch64)

# systemctl status mpd
● mpd.service - Music Player Daemon (DietPi)
   Loaded: loaded (/lib/systemd/system/mpd.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2021-09-14 07:54:07 EEST; 19s ago
     Docs: man:mpd(1)
           man:mpd.conf(5)
  Process: 1370 ExecStart=/usr/bin/mpd --no-daemon /etc/mpd.conf (code=exited, status=1/FAILURE)
 Main PID: 1370 (code=exited, status=1/FAILURE)

Sep 14 07:54:06 arcade systemd[1]: Starting Music Player Daemon (DietPi)...
Sep 14 07:54:06 arcade mpd[1370]: Sep 14 07:54 : exception: bind to '127.0.0.1:6600' failed (continuing anyway, because binding to '/run/mpd/socket' succeeded): Failed to bind socket: Address already in use
Sep 14 07:54:06 arcade mpd[1370]: Sep 14 07:54 : exception: Input plugin 'tidal' is unavailable: No Tidal application token configured
Sep 14 07:54:06 arcade mpd[1370]: Sep 14 07:54 : exception: Input plugin 'qobuz' is unavailable: No Qobuz app_id configured
Sep 14 07:54:06 arcade mpd[1370]: Sep 14 07:54 : exception: Failed to create pid file "/run/mpd/pid": Permission denied
Sep 14 07:54:07 arcade systemd[1]: mpd.service: Main process exited, code=exited, status=1/FAILURE
Sep 14 07:54:07 arcade systemd[1]: mpd.service: Failed with result 'exit-code'.
Sep 14 07:54:07 arcade systemd[1]: Failed to start Music Player Daemon (DietPi).

Now when i manually start mpd o!mpd still is not able to play anything.

# systemctl start mpd
# systemctl status mpd
● mpd.service - Music Player Daemon (DietPi)
   Loaded: loaded (/lib/systemd/system/mpd.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-09-14 07:47:34 EEST; 5min ago
     Docs: man:mpd(1)
           man:mpd.conf(5)
 Main PID: 3162 (mpd)
    Tasks: 3 (limit: 3950)
   CGroup: /system.slice/mpd.service
           └─3162 /usr/bin/mpd --no-daemon /etc/mpd.conf

Sep 14 07:47:25 arcade systemd[1]: Starting Music Player Daemon (DietPi)...
Sep 14 07:47:25 arcade mpd[3162]: Sep 14 07:47 : exception: bind to '127.0.0.1:6600' failed (continuing anyway, because binding to '/run/mpd/socket' succeeded): Failed to bind socket: Address already in use
Sep 14 07:47:25 arcade mpd[3162]: Sep 14 07:47 : exception: Input plugin 'tidal' is unavailable: No Tidal application token configured
Sep 14 07:47:25 arcade mpd[3162]: Sep 14 07:47 : exception: Input plugin 'qobuz' is unavailable: No Qobuz app_id configured
Sep 14 07:47:34 arcade systemd[1]: Started Music Player Daemon (DietPi).

After a reboot mpd service fails to start.
after a dietpi-software reinstall 128 129 mpd status is active but o!mpd still cannot play anything, rebooting the rpi4 and checking status of mpd service shows it down again.


# cat /etc/group |grep audio
audio:x:29:

Tried adding dietpi and/or mpd to the group but restarts shows mpd still down.


dmesg parts after a boot

[    1.771145] systemd[1]: Detected architecture arm64.
[    1.797205] systemd[1]: Set hostname to <arcade>.
[    2.234776] random: systemd: uninitialized urandom read (16 bytes read)
[    2.292532] random: systemd: uninitialized urandom read (16 bytes read)
[    2.292584] systemd[1]: Reached target Swap.
[    2.292776] random: systemd: uninitialized urandom read (16 bytes read)
[    2.293677] systemd[1]: Created slice User and Session Slice.
[    2.294078] systemd[1]: Listening on udev Control Socket.
[    2.294131] systemd[1]: Reached target Slices.
[    2.294479] systemd[1]: Listening on Journal Socket.
[    2.300793] systemd[1]: Starting Load Kernel Modules...
[    2.303204] systemd[1]: Mounting POSIX Message Queue File System...
[    2.365481] cryptd: max_cpu_qlen set to 1000
[    2.652535] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    2.831510] systemd-journald[120]: Received request to flush runtime journal from PID 1
[    3.057396] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
[    3.058677] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
[    3.064430] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
[    3.064765] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
[    3.213681] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    3.214605] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    3.214618] [vc_sm_connected_init]: start
[    3.221953] [vc_sm_connected_init]: installed successfully
[    3.393111] snd-allo-boss-dac soc:sound: snd_soc_register_card() failed: -517
[    3.406900] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
[    3.408834] snd-allo-boss-dac soc:sound: snd_soc_register_card() failed: -517
[    3.415015] snd-allo-boss-dac soc:sound: snd_soc_register_card() failed: -517
[    3.603618] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    3.613884] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    3.643396] snd-allo-boss-dac soc:sound: snd_soc_register_card() failed: -517
[    3.646541] checking generic (3ea9b000 12c000) vs hw (0 ffffffffffffffff)
[    3.646557] fb0: switching to vc4drmfb from simple
[    3.646858] Console: switching to colour dummy device 80x25
[    3.647800] vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])
[    3.648297] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[    3.712204] snd-allo-boss-dac soc:sound: snd_soc_register_card() failed: -517
[    3.713084] brcmfmac: F1 signature read @0x18000000=0x15264345
[    3.718689] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    3.719554] snd-allo-boss-dac soc:sound: snd_soc_register_card() failed: -517
[    3.720127] usbcore: registered new interface driver brcmfmac
[    3.850806] Console: switching to colour frame buffer device 80x30
[    3.868128] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
[    3.887908] snd-allo-boss-dac soc:sound: snd_soc_register_card() failed: -517
[    3.899009] pcm512x 1-004d: supply AVDD not found, using dummy regulator
[    3.899131] pcm512x 1-004d: supply DVDD not found, using dummy regulator
[    3.899172] pcm512x 1-004d: supply CPVDD not found, using dummy regulator
[    3.997784] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    3.997865] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    4.066916] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan  4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e
[    4.735142] random: crng init done
[    4.735155] random: 7 urandom warning(s) missed due to ratelimiting
[    5.631260] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save disabled
[   32.265180] broken atomic modeset userspace detected, disabling atomic
[   33.235858] FS-Cache: Netfs 'cifs' registered for caching

aplay

:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: BossDAC [BossDAC], device 0: Boss DAC HiFi [Master] pcm512x-hifi-0 [Boss DAC HiFi [Master] pcm512x-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0



:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=BossDAC
    BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
    Default Audio Device
dmix:CARD=BossDAC,DEV=0
    BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
    Direct sample mixing device
dsnoop:CARD=BossDAC,DEV=0
    BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
    Direct sample snooping device
hw:CARD=BossDAC,DEV=0
    BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
    Direct hardware device without any conversions
plughw:CARD=BossDAC,DEV=0
    BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
    Hardware device with all software conversions

asound.conf

:~# cat /etc/asound.conf 
pcm.!default {
	type hw
	card 0
	device 0
}

ctl.!default {
	type hw
	card 0
}

Went ahead with a failed upgrad to Bullsey.
Wrote Bullseye image to sd and updated fully only to see mpd failing to start during a fresh clean install.

Found https://github.com/MichaIng/DietPi/issues/4729 will try the workaround.

Hi,

mpd is failing because of a change done on Raspberry OS side. More details and a workaround could be found at our GitHub https://github.com/MichaIng/DietPi/issues/4729

Hi Joulinar, yes seems we posted the same time (:
Just went through that thread, will try it out and post when t works.

RPi devs updated the FFmpeg package and the workaround should not be needed anymore.

https://github.com/MichaIng/DietPi/issues/4729#issuecomment-920008509