Moode Audio Player for Raspberry Pi

Hi,

From what I've been able to gather, the AMP+ overlay does not work in 3.18.5 kernel (but is supposed to work in newer, yet to be released kernel) so the /etc/modules drivers must be used instead.

I can code for this in 1.9 but I just want to be sure of your working configuration so if you wouldn't mind confirming the contents of the following files, I'd appreciate it.

(1) /etc/modules
snd_soc_bcm2708
bcm2708_dmaengine
snd_soc_hifiberry_amp

(2) /boot/config.txt
dtoverlay=hifiberry-amp

Have u tested it without the line in #(2) ? Reason I ask is that it's unusual to have both the overlay and the modules loaded at the same time. I'm surprised it even boots like this!

Regards,
TC

Funny you should ask... I forgot to add it to config.txt and it didn't work, IIRC.

As I mentioned in email, you can see for yourself, if it's easier.
 
Funny you should ask... I forgot to add it to config.txt and it didn't work, IIRC.

As I mentioned in email, you can see for yourself, if it's easier.

Hi,

I was not able to ssh in today (Network not reachable...), but I see from your email:

"so it’s running kernel 3.18.7+ I believe".

I'm guessing that the workaround will not work on 3.18.5 kernel which is current kernel for Moode. Kernel 3.18.7 is in the Feb 16 release of Raspbian so I may try this as new kernel for Moode.

Regards,
Tim
 
Hello Tim,

I have been using your release 1.8 since a few days after you put it out, and am pleased with the advances. The "Library" issue persists, but remains a low priority for me.

I'm posting this to ask about DSD. I see some folks on Computer Audiophile are successfully using DSD128 from USB on the RPi2, which is encouraging to me. Have you tried DSD128 or higher (as opposed to DSD64)? The fellow who reported success was using an NAS and USB out, which I had thought might lead to contention, but apparently not.

Thanks,

Skip
 
Hi,

I was not able to ssh in today (Network not reachable...), but I see from your email:

"so it’s running kernel 3.18.7+ I believe".

I'm guessing that the workaround will not work on 3.18.5 kernel which is current kernel for Moode. Kernel 3.18.7 is in the Feb 16 release of Raspbian so I may try this as new kernel for Moode.

Regards,
Tim

I might have given you the wrong details... I just checked it and it works from my us-based server - I will send you a PM.

It is running: 3.18.13-v7+ #784 SMP PREEMPT Sat May 9 15:57:36 BST 2015 armv7l

cat /etc/modules
# HiFiBerry AMP
snd_soc_bcm2708
bcm2708_dmaengine
snd_soc_hifiberry_amp

cat /boot/config.txt
gpu_mem=16
dtparam=i2c_arm=off
hdmi_drive=2
force_turbo=1
dtoverlay=hifiberry-amp
 
I think I've found out why songs get displayed as radio stations - it's when they don't have proper or full tags.

Here - before and after tagging:
 

Attachments

  • Screenshot 2015-05-19 09.37.23.png
    Screenshot 2015-05-19 09.37.23.png
    40.5 KB · Views: 370
  • Screenshot 2015-05-19 10.12.47.png
    Screenshot 2015-05-19 10.12.47.png
    42.8 KB · Views: 361
Hello Tim,

I have been using your release 1.8 since a few days after you put it out, and am pleased with the advances. The "Library" issue persists, but remains a low priority for me.

I'm posting this to ask about DSD. I see some folks on Computer Audiophile are successfully using DSD128 from USB on the RPi2, which is encouraging to me. Have you tried DSD128 or higher (as opposed to DSD64)? The fellow who reported success was using an NAS and USB out, which I had thought might lead to contention, but apparently not.

Thanks,

Skip

Hi Skip,

Currently, I don't have any DSD files in my collection to use for testing, but I do have download links to these and other formats. At some point after the need for feature coding dies down, I'll try to focus on format support and plumbing enhancements :)

Regards,
TC
 
Hi,

Here's some screen shots of the completed Playback history feature in release 1.9 that includes the following:

- Typedown search
- First/last page speed buttons
- Google song search

The playback history log is turned on/off by a setting on the Custom config popup and cleared if desired, by a setting on the System config page. System logs can also be cleared via System config (no need for ssh!). The history log is maintained by server-side code so no need to have the Player UI running.

Regards,
tcmods.org
http://twitter.com/MoodeAudio
TC
 

Attachments

  • moode-r19-playhist-1d.png
    moode-r19-playhist-1d.png
    220.5 KB · Views: 346
  • moode-r19-playhist-1a.png
    moode-r19-playhist-1a.png
    244.8 KB · Views: 352
  • moode-r19-playhist-1b.png
    moode-r19-playhist-1b.png
    161.2 KB · Views: 320
  • moode-r19-playhist-1c.png
    moode-r19-playhist-1c.png
    103 KB · Views: 110
Hi.

I'm just trying your solution on a Pi2. Worked out of the box. Very nice.

I hooked up my RME Fireface UCX (in class compliant mode).
Another working interface you can add to your DAC list.

A first glance comment:
It seems that just one processor out of 4 is used on the Pi2.
I'd recommend to change CPU affinity and task priority of mpd to e.g. CPU1
and assign the USB interrupt to another free CPU e.g CPU2.

Thx.
 
Just figured that IRQ affinity can not be set on the Pi2.

Funny. You'll get 4 processors and you can't make full use them.

If anybody has a solution to it let me know.


I just wrote this little script:

Code:
root@moode:~# cat tune.sh 
#!/bin/bash -x

chrt -f -p 80 $(pgrep mpd)
taskset -c -p 3 $(pgrep mpd)
IR=$(cat /proc/interrupts | grep ":usb" | awk '{print $1}' | cut -f 1 -d ":")
echo 2 >/proc/irq/$IR/smp_affinity

exit


The last echo gives I/O errors.

Cheers
 
Hi.

I'm just trying your solution on a Pi2. Worked out of the box. Very nice.

I hooked up my RME Fireface UCX (in class compliant mode).
Another working interface you can add to your DAC list.

A first glance comment:
It seems that just one processor out of 4 is used on the Pi2.
I'd recommend to change CPU affinity and task priority of mpd to e.g. CPU1
and assign the USB interrupt to another free CPU e.g CPU2.

Thx.

Hi,

Thanks!

I'll add the RME audio device to the DAC list on tcmods.org and to the Audio De ice Description database in Moode :)

Will investigate CPU pinning, interesting.

Regards,
TC
 
regarding cpu usage on Pi 2

Hi

If you run htop in a ssh terminal whilst pi is playing 192/24 flat, you will see Pi is running with almost No load.

One core shows about 5 per cent, other three cores 0 per cent.

however each core does appear to get a turn, as each time htop rescans, a different core is showing load

Cheers

Patrick
 
Hi.

I have <1% load on my B+ (overclocked 950Mhz) with squeezelite.
I have currently 3-4% load on my Pi2 (no overclocking) with mpd.

Both on 24/44.1 flacs.

One huge advantage of squeezlite is the configurable processing buffer, which can have any size e.g. 200MB.
Basically you'll see a bulk load and bulk decoding of the flac in the first couple seconds (with higher load) and then the whole track is played back from the internal decoding buffer at minimum load. This avoids all interprocess/interthread bottlenecks that usually cause higher load.

BTW: Do you have MPD compiled with the rtopt patch in?

Cheers
 
Hi.

It's me again. Reference to my earlier post:

Lifting up just the prority of mpd might cause XRUNS, especially if you load
data over the network. While the file gets loaded from my NFS mount I experience around 2s of initial XRUNS and after that its fine. I'd say the
USB-out overrules the ethernet-in. Once the buffer is initially filled the whole setting works ok.
 
Last edited:
I'd say the
USB-out overrules the ethernet-in.

USB-audio is isochronous, all samples available to be transfered to the endpoint will be put into each frame up to 90% of the frame capacity (by USB specifications, the kernel USB core should adhere). But 44/16x2 does not take much of the bandwidth even on 12Mbps fullspeed.

Perhaps the problem is USB1.2 audio mixed with USB2 ethernet, forcing the USB to 12Mbps?

Still the way to go would be to fill the input buffer first and then start the playback, like e.g. mplayer does it (-cache + -cache-min). Perhaps MPD can be configured a bit in that respect?
 
Regarding CPU affinity.
Not only IRQ assignments didn't work. Task assignments didn't work either, even though "taskset" was reporting positive results.

One step further:

You need to isolate CPUs from CPU balancing first. All tasks are balanced between all CPUs on the PI2 by default.
By introducing a new parameter to /boot/cmdline.txt e.g.:

isolcpus=3

you would isolate the 4th CPU from balancing.
Basically all automatic loaded tasks will be then spread over CPU0 and 1,2. CPU3 can now exclusively be used. You can also add another CPU to the list.

With" taskset" you can now assign a dedicated task e.g. mpd to e.g. CPU3.

However. IRQ assignments are still giving errors.
 
Hi,

Just a couple quick announcements:

(1) There is a nice review of Moode in Part-Time Audiophile :)
Review: Raspberry Pi 2 as Music Streamer | Confessions of a Part-Time Audiophile

(2) tcmods.org web site has a new look as part of transition to new moodeaudio.org domain/email sometime in June.

(3) Several nice UPnP enhancements have tested out and should make it into release 1.9

- Album art displayed if URL provided by UPnP DB server
- Improved metadata handling for UPnP song files
- Play/pause handling for UPnP song files

Regards,
tcmods.org
Moode on Twitter
TC
 
I have a simple question, as I am having some trouble trying to get to the interface for this thing.

The "Readme" on the TCMods site says to go to "http://moode" when booted and connected to a network.

When I do this, depending on the browser I either get nothing at all, or the Moode college site (mode.com). The address for this device seems weird in that it has no .com, .org, etc. so I'm wondering if this is a typo or if there is something I am missing.

I really appreciate all the hard work on this project, but am frustrated that the instructions on the site don't seem to work for me. I do have it booted properly as near as I can tell, and it is showing up when I scan the network.

Any suggestions?