Moode Audio Player for Raspberry Pi

Hi,

I'm able to repro this and its due to coverart module fallback routine looking for any image in the containing folder, file or embedded if the currently playing song has no embedded image and there are no image files matching the list below.

Folder.jpg,folder.jpg
Folder.png,folder.png
Cover.jpg,cover.jpg
Cover.png,cover.png

I can probably change the logic so the fallback routine only looks for image files and does not also check for embedded images but I have to think a bit about whether this would create a situation when one problem is solved but another is created.

I'll add to the TODO list.

Regards,
Tim

Great thanks! 🙂

Found another bug, USB stick won't show up in browse list. It does get mounted and appear in /media. Tried with 3 different setup all v2.6.

Regards!
 
Feature suggestion:

1. show Moode UI through HDMI after boot up. I think better than blank screen. 🙂
2. usb ir remote support (windows media center remote)
3. crossfade 0-15sec

Temporary solution for #3
mpc - Program for controlling Music Player Daemon (MPD)

crossfade [<seconds>]
Gets and sets the current amount of crossfading between songs (0 disables crossfading).

To activate crossfade
Code:
pi@moode:~ $ mpc crossfade 7

To disable:
Code:
pi@moode:~ $ mpc crossfade 0

Seems to stay on after reboot also! :up:
 
A friend did this 😕
he checked tlog and nothing was there.
He is very noob at linux, so he didn't check other logs.
A reboot fixed it.

When this happens what could be the cause?

Lol it happened to me today.
Release: 2.6 2016-06-07
Update: (2016-07-28)
Platform Information

ver: 1.0
Linux kernel: 4.4.13+
Architecture: ARMv6l
MPD version: 0.19.15
Hdwr rev: Pi-1B+ 512MB
IQAudio PiDac+

Was playing, somewhere along the last track in the album it just stopped and the UI went nuts (volume 0, missing track time dial, no playlist, no album picture etc .

mpd.service: main process exited, code=killed, status=11/SEGV, .
😱

  • moode.log shows nothing wrong after the system start, actually it doesn't show anything after the start.
  • auth.log, nothing about.
  • kern.log, nothing about.
  • nginx log, nothing about.
  • php*.log, nothing about.
  • mpd.log, nothing, only shows until the last song played before the crash.
  • daemon.log:
Code:
Aug 21 19:10:29 moode systemd[1]: Startup finished in 3.254s (kernel) + 1min 19.897s (userspace) = 1min 23.152s.
Aug 21 19:24:06 moode systemd[1]: Starting Cleanup of Temporary Directories...
Aug 21 19:24:06 moode systemd[1]: Started Cleanup of Temporary Directories.
Aug 21 20:08:54 moode systemd[1]: mpd.service: main process exited, code=killed, status=11/SEGV
Aug 21 20:08:54 moode systemd[1]: Unit mpd.service entered failed state.
Aug 21 20:11:31 moode systemd[1]: Starting user-1000.slice.
Aug 21 20:11:31 moode systemd[1]: Created slice user-1000.slice.
Aug 21 20:11:31 moode systemd[1]: Starting Session c1 of user pi.
Aug 21 20:11:31 moode systemd[1]: Started Session c1 of user pi.
Aug 21 20:11:31 moode systemd[1]: Starting User Manager for UID 1000...
Aug 21 20:11:31 moode systemd[10664]: Starting Paths.
Aug 21 20:11:31 moode systemd[10664]: Reached target Paths.
Aug 21 20:11:31 moode systemd[10664]: Starting Timers.
Aug 21 20:11:31 moode systemd[10664]: Reached target Timers.
Aug 21 20:11:31 moode systemd[10664]: Starting Sockets.
Aug 21 20:11:31 moode systemd[10664]: Reached target Sockets.
Aug 21 20:11:31 moode systemd[10664]: Starting Basic System.
Aug 21 20:11:31 moode systemd[10664]: Reached target Basic System.
Aug 21 20:11:31 moode systemd[10664]: Starting Default.
Aug 21 20:11:31 moode systemd[10664]: Reached target Default.
Aug 21 20:11:31 moode systemd[10664]: Startup finished in 126ms.
Aug 21 20:11:31 moode systemd[1]: Started User Manager for UID 1000.
Aug 21 20:13:37 moode systemd[1]: Starting Music Player Daemon...
Aug 21 20:13:37 moode systemd[1]: Started Music Player Daemon.

the crash happened at "Aug 21 20:08:54". What you see afterwards is me ssh'ing and restarting mpd service.

After restarting mpd service, everything works fine.


If I set mpd log level to verbose, would it help?

SD card corruption? mmm
 
Snap.... Same thing happens to me on quite a regular basis.

Interestingly...
Code:
Linux moodeBrev2 4.4.8+ #880 Fri Apr 22 21:27:42 BST 2016 armv6l GNU/Linux

Hardware config is original Pi B rev2 (512MB) with HifiBerry DAC. Pulling audio via Samba from a Cubietruck acting as NAS.

I am starting to wonder if my B rev 2 is getting "obsoleted".

J.
 
Lol it happened to me today.


Was playing, somewhere along the last track in the album it just stopped and the UI went nuts (volume 0, missing track time dial, no playlist, no album picture etc .

mpd.service: main process exited, code=killed, status=11/SEGV, .
😱

...

If I set mpd log level to verbose, would it help?

SD card corruption? mmm


Ugh. SEGV == segmentation fault, which means mpd tried to read or write outside the memory allocated to it or tried to write to a read-only memory location. The SEGV signal is the software equivalent of the technical violation called on an olympic wrestler stepping outside the circle. In low-level code, it's often the result of a malformed pointer but mpd works so well in so many applications, it's difficult for me to believe this is the issue here.

I'm dubious that verbose mpd logs will be illuminating, but YMMV.

I've seen messages on several RPi-related forums where the posters said SD card corruption was found to be the cause of their SEGVs. Certainly, I'd try cleaning the card first.

Another possible cause is running out of memory (so-called memory leak). Since the RPiB and RPiB+ have at most 512MB of RAM, this might be an issue if your system does not have swap enabled (I just checked that my MoodePlayer on an RPi3B does not). You could try enabling swap (see RPi documentation to learn how) and see if this stops your SEGV problems.

Also, it looks like MoodeOS 1.0 accepts the default allocation of 64MB of memory to the GPU. If and only if less than 32MB - 48MB of swap space gets used in the above test, you could try reducing the GPU allocation by adding an appropriate gpu_mem parameter in /boot/config.txt and rebooting.

Original config.txt:
Code:
hdmi_drive=2
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=audio=on

Possible modified config.txt:
Code:
hdmi_drive=2
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=audio=on
gpu_mem=16

Note that 16MB is the minimum possible setting according to RPi documentation. Because changing the parameter value affects other things, it's possible 16 is too small for MoodePlayer (seems unlikely to me). Trial and error here.

Finally, the CPU in the original RPi series is ARMv6 architecture compared to the ARMv7 architecture of the CPU in the RPi2 and RPi3. This means there are subtle differences in execution. Probably not the cause here, but always has to be kept in mind.

Regards,
Kent
 
thank you Kent for taking the time to write that. I guess only time will tell, enabled verbose and just waiting for it to happen another time!
Just buying another sd card as the ones I have have been abused by dd too many times 😀

kdan said:
Hi,

A couple of days ago I asked you about your setup where you connect the Raspberry to the amp via remote-in. Here's my post: http://www.diyaudio.com/forums/pc-based/271811-moode-audio-player-raspberry-pi-424.html#post4801236

Please share some details about this project either via private message or publicly in the forum.

Cheers,
Dan
Hello Dan,
DISCLAIMER: if your raspberry or your expensive amp blows in smoke, it's not my fault, it's yours.

I'm speaking about the 3.5mm remote-in trigger feature that some amps have.

I just used a npn transistor between the raspberry and the amp. I had it around and didn't want to use the gpio directly. I wasn't trusting my cheap dvom when measuring my amp's remote-in current, so I took a safer route.

Pins to/from the npn transistor:
- base: a free gpio pin you want to use,
- collector: 5v from gpio rail,
- emitter: to the amp's remote-in 3.5mm jack + (mine is a mono 3.5mm jack).

Obliviously wire the ground of the 3.5mm remote-in jack to a ground in the gpio connector.
It may or may not work depending on your amp remote-in specs, especially the low voltage limit. Some brands call it 12v trigger, but some starts as low as 3v, mine from 2.x volts works fine.

Then I use a bash script to trigger all of this, stolen from here and adapted to my needs:
You have to adjust:
- gpio pin #
- sound card path
- delay/time you want

Mine, IQAudio PiDac+, gpio26, 2 minutes turn-off delay looks like this:
Code:
#!/bin/bash

# This Script is to read the Alsa Sound State and Automatcally
# swing a GPIO pin to allow auto switch on / off of an external
# amplifier, its crude dirty and badly written any sugestions
# or criticism welcome
#
# Trevor Cockayne [email]trevoml@gmail.com[/email]



#   Exports pin to userspace
echo "26" > /sys/class/gpio/export

# Sets pin 26 as an output
echo "out" > /sys/class/gpio/gpio26/direction


count=0

time=120

let count=$time

for (( ; ; ))
        do
                if grep -q "closed" /proc/asound/IQaudIODAC/pcm0p/sub0/hw_params; then
#                       echo "DAC IDLE"
                        let "count++"
                else
#                       echo "DAC Playing"
                        count=0
        fi
                if [[ $count -gt $time || $count == $time ]]
                        then
#                               echo "Amp Off"
                                echo "0" > /sys/class/gpio/gpio26/value
                                count=$time
                        else
#                               echo "Amp ON"
                                echo "1" > /sys/class/gpio/gpio26/value
        fi
# echo $count
sleep 1
done

Make it executable, make a systemd service that launches it and enable the service so that it will start automatically at next boot.
If you don't get this, read about systemd here : https://wiki.archlinux.org/index.php/systemd

eg my /etc/systemd/system/autoamp.service:
Code:
[Unit]
Description=Automatic Amplifier Control

[Service]
ExecStart=/usr/bin/autoamp
After=mpd.service
Require=mpd.service

[Install]
WantedBy=multi-user.target
 
Last edited:
Thanks for sharing.
I asked about your project because I'm thinking about some sort of controlling both moode and the amp with the same controller. Like using the amp's IR controller to start/stop/next commands to moode (either via an IR sensor connected to the Raspberry Pi or a link through the amp's IR out mini-jacks, but the latter uses 5 VDC which makes it a bit more complicated).
Setting the amp on when music starts on the moode is also an interesting idea but my amp does not have the trigger-in port, only an out.
 
oh well, then yours must be an integrated amplifier (pre+amp)... what I wrote above was just to turn on/off the amplifier automatically based on mpd, using the trigger/remote/whatever they call 3.5mm jacks.
Mine is only amp, no volume knob/no display, iqaudio pidac+ is working as dac/preamp 🙂

I use a remote too. Actually is pretty easy and you can do whatever you want with lirc and some bash scripts.
You just need an IR Receiver and maybe a resistor, read about "lirc" and how to set remotes.

In your case, pretty sure you can do something with lirc.
You could use an IR receiver in the raspberry, and pass the signal out using an IR transmitter to your amp. It doesn't only pass the same signal, it can pass whatever button you want.
quick google search to give you a starting point... Erik's Data Dump: Controlling a receiver using an raspberry pi and an ir transmitter
 
Hi, it looks like the TheJazzGroove radio station has changed its links again. I need a few people to confirm that the link below works globally.

"http://mp3-128.streamthejazzgroove.com"

Their new link strategy is supposed to redirect to either the East coast server or West coast server from the common link (above) depending on geo-location.

Thanks,
Tim
 

Attachments

  • The Jazz Groove.png
    The Jazz Groove.png
    47.6 KB · Views: 287
Hi, it looks like the TheJazzGroove radio station has changed its links again. I need a few people to confirm that the link below works globally.

"http://mp3-128.streamthejazzgroove.com"

Their new link strategy is supposed to redirect to either the East coast server or West coast server from the common link (above) depending on geo-location.

Thanks,
Tim

Resolves to the "East Channel" as it should here in Maryland. If I get really clever I might be able to figure out how to use my Hotspot Shield account to test via their various virtual locations internationally, but it would be ugly since they don't have a Linux client (sigh).

Regards,
Kent
 
WKCR FM - Columbia University - Kings Crown Radio

Hi, I'm just getting started planning a music player based on Raspberry Pi 3 model B, and stumble onto this thread. I checked out the list of supported internet radio stations and noticed one my favorites missing. May I suggest WKCR FM, Columbia U's radio station in NYC?

https://www.cc-seas.columbia.edu/wkcr/
Link to stream: http://wkcr.streamguys1.com/live.m3u

How easy/difficult is it for a Moode user to manually add a link to a stream URL?

Thanks, I'll be looking some more at Moode Player.
 
Tim, I just did a quick test:
various random Europe countries, UAE, China, Brazil, Argentina all seem to resolve to TheJazzGroove.com - West, don't know if it's good or bad 😀
Est/West thing seems to be working only inside USA, foreigners are all redirected to the west one?
 
Lol it happened to me today.


Was playing, somewhere along the last track in the album it just stopped and the UI went nuts (volume 0, missing track time dial, no playlist, no album picture etc .

mpd.service: main process exited, code=killed, status=11/SEGV, .
...

If I set mpd log level to verbose, would it help?

SD card corruption? mmm

To continue the discussion:

Last night I dug up an old RPi1B and installed moode-sdimg-r26 to an SD card I had on hand. Didn't bother to update the installation so "AboutMoode" reports
Code:
Release: 2.6, 2016-06-07 release notes
...
ver: 1.0
Linux kernel: 4.4.8+
Architecture: ARMv6l
MPD version: 0.19.15
Hdwr rev: Pi-1B 512MB

Left it playing a jazz station overnight. Still running this morning but about the time I went to change selection this morning, BAM, mpd seg faulted. I haven't seen this error with the same image on an uSD card running for weeks on end in either an RPi2B or an RPi3B.

So let's review the bidding -

Corrupted SD card? Possibly, but this was a card selected at random, and the same problem has been seen by you and Jerms and now me, so I'm dubious.

Memory overrun? Well, the top command is telling me there is 445MB of memory total and only about half of that is in use while MoodePlayer is running, so it seems doubtful. (Hence, my musing about swap space is moot.)

Difference in running the Moode distro on an ARMv6l vs ARMv7l architecture as implemented in the RPi1B vs RPi2B/RPi3B? Seems like this is now a leading contender, but saying it isn't the same as understanding it 🙁

I've restarted mpd logging verbosely, just in case, but as I said before I don't expect it to be helpful. I'd hate to have to fire up gdb 😱 It's an approach only a true Linux believer could love.

Regards,
Kent
 
at least I'm not alone. Also a friend with identical config as mine (RPi1B+) had this trouble before it happened to me.
All these cards corrupted? mmm no way.
This is way beyond my knowledge, can't help on that! 😱

Sure the fact that has been reported only on ARMv6l (raspy 1) seems weird.

someone just reported a Segmentation fault issue on mpd bug tracker (also armv6l)
https://bugs.musicpd.org/view.php?id=4571

He attacked a gdb backtrace too.
 
Last edited:
moode 2.6 on raspberry pi3

Hi. I really enjoy moode player. And I found one problem.

When I copy music data from my Windows 10 client, I encounter a problem.

I attach 4TB HGST Disk via USB and the USB can be seen from WiFi attach to moode 2.6 on raspberry pi3. And I wanted to copy whole my music directory, just as 400GB size, my moode 2.6 tells me no such big space on it.

I use 32GB microSD for moode 2.6, and almost 30GB is maximum limit to copy 4TB USB HDD at one operation.

I wonder if I could copy whole directory at once.

Thank you very much in advance.
 
Can I share one information?

I use ubuntu as well and I found ubuntu ext4 formatted disk cannot access from moode 2.6.

Maybe this would caused because ubuntu ext4 is extended from normal ext4?

From WiFi, I can access ubuntu ext4 formatted disk but not from moode player.
It seems moodeOS handles ubuntu disk properly but player?

CentOS would better?
 
Last edited: