Thank you for your donation!


Instruction Guide 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi
I'm still not able to get a repro after two 5 hour tests. One system is functioning as a Multiroom sender and the other has an Allo Boss HAT.

I can try over the weekend with HDMI and Headphone.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
I was able to repro with HDMI and Headphone interfaces. CPU utilization on one core slowly increases for the MPD rtio thread which is not normal. Typically this thread will only consume  0.3% - 0.5% of a CPU core as on my earlier 5 hour tests.

I noticed that if nothing is reading the output of the Loopback device the thread reaches ~90% on one core in around 1.5 - 2 hours of playback. If on the other hand the Loopback output is being read for example by arecord, then even after 5 hours the rtio thread is only at ~50% utilization on the core.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
(09-21-2022, 06:21 PM)adrii Wrote: A quick fix for the flashing spectrum and slow adaptation of bar heights is to install an older version of cava

Cava has ben updated to fix the slow adaptation of bar heights, and mpd_oled has been updated to fix the flashing. I have made a new mpd_oled binary package with these updates.

Adrian.
Reply
Running Moode 8.2.0  on a Pi-3B with audio out via HDMI to a Sony AVR.
Trying to install for an oled that I know works ...followed the latest instructions for the binary but as soon as I turn loopback on the audio stops and Moode fails to open the device from then on.
I can complete the oled install and use sox to change the output to upsample to 96kHz which allows mood to play a file but still does not output audio while loopback is on.
At this point whilst the oled displays correctly on idle when play begins it reports the track info and scrolls it but no spectrum appears.

I am using the 32bit MoOde version so next is to try the 64bit but if you have any suggestions it would be appreciated.

Edit   Same behaviour with the 64bit version.
As soon as I turn loopback on then this error appears each time I try to play a file or webradio..(Unsure if this is a MoOde bug or oled script related)

Code:
MPD error
Failed to open "ALSA Default" (alsa); Error opening ALSA device "_audioout"; snd_pcm_hw_params_set_buffer_time_near() failed: Invalid argument
Code:
sudo systemctl status mpd_oled | cat
● mpd_oled.service - MPD OLED Display
    Loaded: loaded (/etc/systemd/system/mpd_oled.service; enabled; vendor preset: enabled)
    Active: active (running) since Thu 2022-09-29 15:51:35 NZDT; 2h 22min ago
   Process: 389 ExecStartPre=/usr/bin/mpd_oled_launch_test (code=exited, status=0/SUCCESS)
  Main PID: 1046 (mpd_oled)
     Tasks: 3 (limit: 1010)
       CPU: 50.826s
    CGroup: /system.slice/mpd_oled.service
            └─1046 /usr/bin/mpd_oled -o 6 -b 10 -g 1 -f 20 -c alsa,plughw:Loopback,1

Sep 29 15:51:04 moode systemd[1]: Starting MPD OLED Display...
Sep 29 15:51:35 moode systemd[1]: Started MPD OLED Display.
Sep 29 17:42:24 moode mpd_oled[12775]: ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card
Sep 29 17:42:24 moode mpd_oled[12775]: error opening stream: No such device

Reply
Hi Bob

Is there still an issue if the loopback setting is on, but mpd_oled isn't running?

You can disable the mpd_oled service at boot with
Code:
sudo systemctl disable mpd_oled
Then reboot and test if you still have the error.

After testing, you can enable the mpd_oled service at boot again, and also start it immediately, with
Code:
sudo systemctl enable mpd_oled
sudo systemctl start mpd_oled


Adrian.
Reply
(09-29-2022, 06:15 AM)adrii Wrote: Hi Bob

Is there still an issue if the loopback setting is on, but mpd_oled isn't running?

You can disable the mpd_oled service at boot with
Code:
sudo systemctl disable mpd_oled
Then reboot and test if you still have the error.

After testing, you can enable the mpd_oled service at boot again, and also start it immediately, with
Code:
sudo systemctl enable mpd_oled
sudo systemctl start mpd_oled


Adrian.

Quote:is there still an issue if the loopback setting is on, but mpd_oled isn't running?

Yes...even with mpd_oled uninstalled....so must be a MoOde bug then...sigh
Thanks for your prompt reply !!  Cool

Reply
You could check what device numbers are being assigned to which devices with and without loopback set to on (reboot after setting loopback to off before running the command)

Code:
aplay -l
Reply
(09-29-2022, 07:38 AM)adrii Wrote: You could check what device numbers are being assigned to which devices with and without loopback set to on (reboot after setting loopback to off before running the command)

Code:
aplay -l
loopback off (audio working)
Code:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
 Subdevices: 3/4
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
 Subdevices: 4/4
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
with loopback on
Code:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
 Subdevices: 4/4
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
 Subdevices: 4/4
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
card 2: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
 Subdevices: 8/8
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
 Subdevice #4: subdevice #4
 Subdevice #5: subdevice #5
 Subdevice #6: subdevice #6
 Subdevice #7: subdevice #7
card 2: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
 Subdevices: 8/8
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
 Subdevice #4: subdevice #4
 Subdevice #5: subdevice #5
 Subdevice #6: subdevice #6
 Subdevice #7: subdevice #7
pi@moode:~ $

Reply
The loopback device being set to card 2 may be the cause of the error (with the alsa configuration meant for the loopback refering to the headphones instead?)
Reply
Aha.....I had forgotten that the  headphone output could be disabled....the things one lets slide lol.

I will try with  dtparam  audio=off  and see if that fixes it :-)

looks like that has done the trick...will try again tomorrow when i have the system running again.

Code:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
 Subdevices: 6/8
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
 Subdevice #4: subdevice #4
 Subdevice #5: subdevice #5
 Subdevice #6: subdevice #6
 Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
 Subdevices: 8/8
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
 Subdevice #4: subdevice #4
 Subdevice #5: subdevice #5
 Subdevice #6: subdevice #6
 Subdevice #7: subdevice #7
Quick trial without any HDMI connected and all seems to be fine!!  Got the spectrum analyser  and the title scrolling working.

Reply


Forum Jump: