Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi
(07-02-2022, 11:05 AM)Андрей Wrote: Hi ROCH23

Great, thanks for letting me know. I'll need to review the mpd_oled launch test though, as mpd_oled should not start until Moode has finished starting.

Adrian.

● mpd_oled.service - MPD OLED Display
     Loaded: loaded (/etc/systemd/system/mpd_oled.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-07-02 20:48:29 +07; 1h 55min ago
   Main PID: 452 (mpd_oled)
      Tasks: 2 (limit: 9293)
        CPU: 25.970s
     CGroup: /system.slice/mpd_oled.service
             └─452 /usr/bin/mpd_oled -o1 -b 32 -g 1 -f 60 -c alsa,plughw:Loopback,1

Jul 02 20:48:29 moode systemd[1]: Started MPD OLED Display.
Reply
It looks like cava has not started (no spectrum display), possibly because mpd_oled started too early without the launch test.
Reply
Hi ROCH23

Just to let you know that I have extended the launch test timeout from the default 90 seconds to 180 seconds. This is currently only available when installing mpd_oled from source, I haven't updated the binary package yet.

Adrian.
Reply
Hi Adrian, hi all,
following numerous tests I noticed that, using "mpd_oled" and then "cava" and "alsa",  "via loopback", the output sample rate does not vary (with respect to the variation of the input) from that of the first track after the reboot.
It should also be noted that with "loopback" enabled, the load of the MPD process (monitored by TOP) continuously increases until it reaches saturation.
I can provide details of both series of tests carried out.
If you think it is better, we could analyze these two issues separately and, if desired, on the respective GITHUBs.
Best regards and thanks,
Francesco
Reply
Hi Francesco

Thanks for the report.

I believe the solution to the first issue is for mpd_oled to stop cava every time playback stops, and then restart it again when playback resumes. The downside of this is that cava must adjust the spectrum levels every time (although an mpd_oled option could probably be added to indicate a suitable initial level). I don't have any plans to make this change in the current version of mpd_oled, but I will include it in the development version when I start looking at it again (which probably won't be until Raspberry Pis are available again).

For the increasing CPU usage, I'll first install the latest version of Moode and see what happens here.

Adrian.
Reply
Hi Francesco

I have installed the legacy version of the latest Moode on a Pi Zero and installed the mpd_oled package. Moode has been running for over an hour and I have started and stopped the radio a few times. There hasn't been any noticeable increase in CPU usage for mpd in this time.

If you haven't tried, I recommend disabling the the mpd_oled service and rebooting


Code:
sudo systemctl disable mpd_oled
sudo reboot


And seeing if the mpd CPU usage issue persists for you when mpd_oled is not running.

Adrian.
Reply
Hi Adrian,
Thanks for your prompt replay. About the second issue, I already submited it to Tim and he cannot replay that situation.
It happen on several systems (even from scratch) with different hats, on the same radio, loopback enable (and system rebooted), no pause: if stopped or station changed, the load restart from lowest number.
Thank you very much for the time spent and best regards,
Francesco
Reply
What Radio station?
Are there any MPD options enabled for example resampling, Camilla, HTTP server, etc?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
I notice that with the latest Moode and mpd_oled on a Pi Zero the spectrum area flashes irregularly and frequently (average 1 flash per second). I'll investigate this.
Reply
A quick fix for the flashing spectrum and slow adaptation of bar heights is to install an older version of cava


Code:
git clone https://github.com/karlstav/cava
cd cava
git checkout -b old 1b7c395
./autogen.sh
./configure --disable-input-portaudio --disable-input-sndio --disable-output-ncurses --disable-input-pulse --program-prefix=mpd_oled_
make
sudo make install-strip

Adrian.
Reply


Forum Jump: