[PLUGIN] mpd_oled + IQAudio Dac Pro troubleshooting

Yesterday I ended up disappearing down an mpd_old rabbit hole after upgrading one of my Volumio players from a HiFiBerry DAC+ Zero to an IQAudio DAC Pro.

Posting the experience here as it might save someone a lot of rebooting and trawling through documentation.

System.
Volumio 3.378
Raspberry Pi 3B+
IQ Audio DAC Pro (same results with IQ Audio DAC Plus)
mpd_oled plugin 1.1.1 (same results with 1.0.18)
SH1106 I2C OLED (type 6)

Symptom.
Starting playback after rebooting produces an ‘alsa device not found’ pop-up. The pop-up may refer to a ‘volumio’ device or it may say something oddly different.
alsacap reports device busy for the audio interface.

Workaround.

  1. Install your audio interface and make sure Volumio is working properly after rebooting. If you are changing audio interfaces as I was I recommend uninstalling the mpd_oled plug-in while you get the audio interface working. A couple additional reboots now can save some head scratching later.
  2. Install the mpd_oled plug-in. Enable the plug-in and configure as required.
  3. Disable the plug in and reboot.
  4. After Volumio has started go ahead and enable the mpd_oled plug-in.
  5. Reselect your music track from the library before clicking Play. (Otherwise you might hear nothing and think you still have a problem to solve, like I did.)
  6. mpd_oled works fine.
  7. Try to remember to disable the mpd_oled plug-in before rebooting.

Additional.
As an aside I also discovered /var/log/mpd.log was being spammed around once a second

Dec 08 23:17 : client: [30] opened from local
Dec 08 23:17 : client: [30] closed

The log spam appears to be down to a bug in mpd whereby the log level defaults to ‘secure’ despite what it says in the mpd.conf file. The spam starts as soon as the mpd_oled plug in is enabled and is not specific to the IQAudio card. My HiFi Berry was producing the same behaviour, I just had not noticed it.

Resolution.
Edit /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl
Uncomment the line
log_level "default"
Reboot, which should trigger volumio to regenerate /etc/mpd.conf

Comments.
As far as I can tell the mpd_oled / device busy issue is down to the mpd_oled_plugin and mpd_oled services starting before the volumio and mpd services are ready for them. I did take a look at trying to delay systemd from starting mpd_oled but couldn’t quite fathom the interaction with cava. I managed to get mpd_oled working but without the cava element of the display.

Hi,
I’ve been having similar difficulties with an ‘alsa device not found’ popup. My set up is a RPi Zero W with a Justboom DAC Zero hat, and then an Adafruit OLED bonnet.

(I was running Volumio 2 on a RPi Zero W, but my SD card became corrupted, and I’ve not been able to rebuild Volumio 2 with the Nanosound plugins successfully. So I’ve upgraded to Volumio 3.396).

I’m interested to know how you managed to get mpd_oled working without the cava element of the display, as I suspect the spectrum analysis is too much for my RPi Zero W…

1 Like

I have forgotten exactly what steps I took but the gist is that I was fiddling with the systemd configuration from an ssh command line; disabling services from starting at boot, stopping, starting them manually and starting the mpd_oled binary manually with different parameters. I found the binary in /usr/bin

Some useful commands
//manually control the service
$ systemctl stop mpd_oled
$ systemctl start mpd_oled
$ systemctl restart mpd_oled

//disable and enable start on boot
$ systemctl disable mpd_oled
$ systemctl enable mpd_oled

Good luck