Moode Audio Player for Raspberry Pi

One minor issue: coverart via shairport is not shown. The corresponding option is 'on'.

It worked only the first time after the fresh installation of moode 3.0 and since then - no luck.

Rüdiger

+1

Hi,

Airplay metadata is received into to a pipe that Moode reads. The pipe is first-in-first-out (FIFO) and can become out of sync or contain incomplete metadata, and there is no mechanism for requesting metadata to be sent again by the client.

Generally it works well but not always. When the pipe becomes out of sync it may be necessary to turn Airplay OFF/ON or turn off/on the Airplay connection at the sender (iTunes, etc). Sometimes refreshing Moode screen is also necessary.

If u turn on Debug logging in Moode and examine /var/log/moode.log you will see similar to below when Airplay metadata is working well. Volume cmds and metadata received, ending with "Fget waiting for pipe data..."

-Tim

20161203 083348 engine-sps: Pipe opened
20161203 083348 engine-sps: Airplay active flag=(0)
20161203 083348 engine-sps: $_GET[state]=(undefined)
20161203 083348 engine-sps: Cache[state]=(ok)
20161203 083348 engine-sps: Airplay session not active
20161203 083348 engine-sps: Fget waiting for pipe data...
20161203 083350 engine-sps: Volume=(-20.30,-44.20,-96.30,0.00)
20161203 083350 engine-sps: Volume=(-20.30,-44.20,-96.30,0.00)
20161203 083350 engine-sps: Album=(Progression: Art of the Trio, Vol. 5 (Live))
20161203 083350 engine-sps: Artist=(Brad Mehldau)
20161203 083350 engine-sps: Genre=(Jazz)
20161203 083350 engine-sps: Title=(The Folks Who Live On the Hill (Live))
20161203 083350 engine-sps: Image file created
20161203 083350 engine-sps: Imageurl=(images/spscover.jpg)
20161203 083350 engine-sps: Imagelen=(90349)
20161203 083350 engine-sps: Imagetype=(jpg)
20161203 083350 engine-sps: Imagetype_raw=(ÿØÿàJFIFÿÛC)
20161203 083350 engine-sps: Progress=(Array)
20161203 083350 engine-sps: Updating cache...
20161203 083350 engine-sps: Cache updated
20161203 083350 engine-sps: Pipe data returned to client
20161203 083350 engine-sps: Connect
20161203 083350 engine-sps: Opening pipe...
20161203 083350 engine-sps: Pipe opened
20161203 083351 engine-sps: Airplay active flag=(1)
20161203 083351 engine-sps: $_GET[state]=(ok)
20161203 083351 engine-sps: Cache[state]=(ok)
20161203 083351 engine-sps: Fget waiting for pipe data...
 
Tim, I'm on 3.0 with thursday's in-place update. No playback (Hifiberry DAC+ Pro). Checked all settings. Can't play radio or music off of USB. Squeezelite and airplay also don't work. Playlist shows songs after a restart, but at a certain point it stops displaying, screen goes blank and volume setting goes to '0'.
 
Tim, I'm on 3.0 with thursday's in-place update. No playback (Hifiberry DAC+ Pro). Checked all settings. Can't play radio or music off of USB. Squeezelite and airplay also don't work. Playlist shows songs after a restart, but at a certain point it stops displaying, screen goes blank and volume setting goes to '0'.

Hi,

Post /var/log/moode.log

-Tim
 
20161203 074543 worker: Startup
20161203 074545 worker: Host (moode)
20161203 074545 worker: Hdwr (Pi-2B 1GB)
20161203 074545 worker: Arch (armv7l)
20161203 074545 worker: Kver (4.4.30-v7+)
20161203 074545 worker: Ktyp (Standard)
20161203 074545 worker: Gov (ondemand)
20161203 074545 worker: OS (moodeOS 1.1)
20161203 074546 worker: Rel (Moode 3.0 2016-11-27)
20161203 074546 worker: Upd (2016-12-02)
20161203 074546 worker: MPD (0.19.19)
20161203 074546 worker: Session loaded
20161203 074546 worker: Debug logging (off)
20161203 074546 worker: File check...
20161203 074546 worker: File check ok
20161203 074547 worker: Auto-shuffle deactivated
20161203 074547 worker: USB sources (BA42E30942E2C969)
20161203 074547 worker: MPD scheduler policy (time-share)
20161203 074547 worker: MPD started
20161203 074547 worker: wlan0 exists
20161203 074547 worker: wlan0 trying SSID (Pliny the Welder)
20161203 074548 worker: Squeezelite renderer started
20161203 074548 worker: HDMI port off
20161203 074548 worker: Audio (I2S audio device)
20161203 074548 worker: Audio (HiFiBerry DAC+ Pro)
20161203 074602 worker: PCM52xx/PCM51xx/TAS5756 chip options applied
20161203 074603 worker: ALSA outputs unmuted
20161203 074603 worker: ALSA mixer name (Digital)
20161203 074603 worker: MPD volume control (software)
20161203 074603 worker: MPD output 1 ALSA default (enabled)
20161203 074603 worker: MPD output 2 ALSA crossfeed (disabled)
20161203 074603 worker: Hdwr volume controller exists
20161203 074604 worker: Volume level (63) restored
20161203 074604 worker: wlan0 (192.168.1.7)
20161203 074604 worker: eth0 exists
20161203 074604 worker: eth0 address not assigned
20161203 074604 worker: Airplay receiver started
20161203 074604 worker: Airplay volume (auto)
20161203 074604 worker: NAS sources (none configured)
20161203 074604 worker: MPD consume reset to off
20161203 074604 worker: MPD crossfade (off)
20161203 074604 worker: Watchdog started
20161203 074604 worker: End startup
20161203 074604 worker: Ready
20161203 074929 worker: Job mpdcfg
20161203 075019 worker: Job alsavolume
20161203 080501 worker: Job clearsyslogs

Tim, everything works when I turn off the Squeezelite renderer.
 
Hi,

Airplay metadata is received into to a pipe that Moode reads. The pipe is first-in-first-out (FIFO) and can become out of sync or contain incomplete metadata, and there is no mechanism for requesting metadata to be sent again by the client.

Generally it works well but not always. When the pipe becomes out of sync it may be necessary to turn Airplay OFF/ON or turn off/on the Airplay connection at the sender (iTunes, etc). Sometimes refreshing Moode screen is also necessary.

If u turn on Debug logging in Moode and examine /var/log/moode.log you will see similar to below when Airplay metadata is working well. Volume cmds and metadata received, ending with "Fget waiting for pipe data..."

-Tim

20161203 083348 engine-sps: Pipe opened
20161203 083348 engine-sps: Airplay active flag=(0)
20161203 083348 engine-sps: $_GET[state]=(undefined)
20161203 083348 engine-sps: Cache[state]=(ok)
20161203 083348 engine-sps: Airplay session not active
20161203 083348 engine-sps: Fget waiting for pipe data...
20161203 083350 engine-sps: Volume=(-20.30,-44.20,-96.30,0.00)
20161203 083350 engine-sps: Volume=(-20.30,-44.20,-96.30,0.00)
20161203 083350 engine-sps: Album=(Progression: Art of the Trio, Vol. 5 (Live))
20161203 083350 engine-sps: Artist=(Brad Mehldau)
20161203 083350 engine-sps: Genre=(Jazz)
20161203 083350 engine-sps: Title=(The Folks Who Live On the Hill (Live))
20161203 083350 engine-sps: Image file created
20161203 083350 engine-sps: Imageurl=(images/spscover.jpg)
20161203 083350 engine-sps: Imagelen=(90349)
20161203 083350 engine-sps: Imagetype=(jpg)
20161203 083350 engine-sps: Imagetype_raw=(ÿØÿàJFIFÿÛC)
20161203 083350 engine-sps: Progress=(Array)
20161203 083350 engine-sps: Updating cache...
20161203 083350 engine-sps: Cache updated
20161203 083350 engine-sps: Pipe data returned to client
20161203 083350 engine-sps: Connect
20161203 083350 engine-sps: Opening pipe...
20161203 083350 engine-sps: Pipe opened
20161203 083351 engine-sps: Airplay active flag=(1)
20161203 083351 engine-sps: $_GET[state]=(ok)
20161203 083351 engine-sps: Cache[state]=(ok)
20161203 083351 engine-sps: Fget waiting for pipe data...

Hi,

I should also mention that skipping back a few tracks then forward can also work to resynchronize the Airplay metadata pipe.

-Tim
 
None of your shairport proposals work, even a reboot does not bring the metadata back...

Hi,

Couple quick tests on my end with iTunes on Mac and iPhone and no issues with metadata from Apple Music or local files. One time though I did have to skip tracks back and forth to sync up the pipe.

Turn on debug logging and check /var/log/moode.log for engine-sps entries similar to the example in previous post.

-Tim
 
Hi Bob,

I checked the 3.0 image and HDMI defaults to ON.

-Tim

'ON' for audio not debugging.....:) hdmi_drive=2
So there is output to a screen during boot only.

hdmi_drive=1 as default would make attaching a screen to debug possible. ;)

What's needed is a second switch that toggles Hdmi output to either text or audio with Hdmi=ON and Hdmi=Text as the defaults.

cheers Bob.
 
Last edited:
it looks like that:

Code:
20161203 184253 engine-sps: Connect
20161203 184253 engine-sps: Opening pipe...
20161203 184253 engine-sps: Pipe opened
20161203 184253 engine-sps: Airplay active flag=(1)
20161203 184253 engine-sps: $_GET[state]=(ok)
20161203 184253 engine-sps: Cache[state]=(ok)
20161203 184253 engine-sps: Fget waiting for pipe data...

The artist/title is submitted, but the coverart not
 
'ON' for audio not debugging.....:) hdmi_drive=2
So there is output to a screen during boot only.

hdmi_drive=1 as default would make attaching a screen to debug possible. ;)

What's needed is a second switch that toggles Hdmi output to either text or audio with Hdmi=ON and Hdmi=Text as the defaults.

cheers Bob.

Hi Bob,

I was referring to the HDMI port ON/OFF setting in Moode System config. This actually turns the port off.

-Tim
 
There's no setting for that on Moode. IQAudio Pi-Dac+ will work.


And if you happen to own the piano 2.1, you can choose the 'iqaudio dac pro' which sports the same PCM5142dac chip.

Rüdiger

Thank you. Will try that. Couple more question. How do I change Squeezelite to up sample everything to 384K with advance kernel in place.
 
Last edited:
Just installed 3.0! Fantastic job Tim!
Only a couple of questions.
What are best settings for "CPU governor " and "MPD scheduler policy".
I have an rpi3 and pcm5102 and I usually play music upsampling 24bit 192kHz SOX.

immagi12.jpg
 
Last edited:
Just installed 3.0! Fantastic job Tim!
Only a couple of questions.
What are best settings for "CPU governor " and "MPD scheduler policy".
I have an rpi3 and pcm5102 and I usually play music upsampling 24bit 192kHz SOX.

View attachment 583650

Hi,

First, CHECK for software update, INSTALL, reboot

Linux kernel: Advanced
CPU governor: Performance
MPD scheduler policy: Try FIFO on multi-core CPU, RR on single-core CPU

FIFO and RR are real-time scheduler policies that enable MPD to have priority over other tasks.

With the FIFO scheduling policy, a thread will be suspended when any of 3 conditions occurs:

1. It is blocked by accessing synchronize resource (I/O block, mutex, semaphore...)
2. It is preempted by a higher priority thread
3. It volunteers to give up control of processor (call sleep() or pthread_yield())

In the Round Robin (RR) scheduling policy, a thread will be suspended when any of 4 conditions occurs:

1. Same as FIFO
2. Same as FIFO
3. Same as FIFO
4. Its Time Slice expires.

As you can see, RR includes a time slice component which guarantees that a bad behaving thread can't entirely monopolize the CPU and starve other threads.

-Tim