Moode Audio Player for Raspberry Pi

Tweaking config.txt in MoOde 4.0 to reduce CPU and memory and running real time CPU

more details please :)

which extra lines in config.txt ? how to run CPU in RT priority ?

Add these lines to the config.txt file after what is already there to restrict speed:

arm_freq=800
sdram_freq=400
core_freq=400
gpu_freq=300
over_voltage=-4 or -2
over_voltage_sdram=-4 or -2 if showing problems
gpu_mem=16

setting process to realtime priority seems to sound better to do,
ssh to the pi then run these lines (I always just copy and paste):


sudo nano /lib/systemd/system/mpd.service

CPUSchedulingPolicy=fifo
CPUSchedulingPriority=99
Nice=-20

exit and save then run these lines

sudo systemctl daemon-reload
sudo systemctl restart mpd

see how it sounds after that ;)
 
Hi Kent

Re the link for the MoOde 4.0 Rpi3B+ image

You're right I was only thinking of making things easier for enthusiasts, it sounds like a risky thing to be posting, I'll take the link down. Hopefully Tim will have the next image builder soon to work with the B+ with all the bells and whistles.

Best of luck and thanks to you and Tim and others for all the hard work on the Moode project.

B+ does seem to sound better than the B on my system and using the underclocking to 800mhz makes a difference for the better. Early days yet, needs more listening time.

Rod

Hi, Rod.

I should have mentioned that early in the new era of building from script, I made a similar offer and then backed away from it when I was apprised of the potential consequences. We learn from our mistakes! Only after the fact did I start doing my homework. The entire FOSS ecosystem seems to be remarkably rickety when it comes to licenses. Compliance is in the eye of the license holder, not the licensee, and an aggrieved license holder can make life very difficult.

On the audio front, I'm sure others are following your tweaking adventures. These days with my ancient ears I'm lucky to be able to still enjoy the music, and moOde has made that dead easy:D

Regards,
Kent
 
Running on Pi3B+, everything works except wifi because moode is setting GB as country code in wpa_supplicant.conf. If I manually edit wpa_supplicant.conf and change it to US, wifi connects, but obviously when the configuration changes moode overwrites the file and it's set to GB again. Tried setting locales at the linux configuration to no avail. How can I make moode spit out something other than GB when writing the wpa config?

@aep600

I'm not sure I'm following the sequence of events here. I'm going to make a wild stab that "when the configuration changes" refers to when you tell mosbuild.sh you want to use a WiFi connection during the build.

You can edit mosbuild.sh manually (using nano or vi/vim for example) before you execute it to change the default Country Code from "GB" to "US" (or whatever the appropriate County Code is for the build). Around line 464, you should find the following
Code:
                echo "country=GB" > part1/wpa_supplicant.conf


Regards,
Kent
 
Last edited:
Running on Pi3B+, everything works except wifi because moode is setting GB as country code in wpa_supplicant.conf. If I manually edit wpa_supplicant.conf and change it to US, wifi connects, but obviously when the configuration changes moode overwrites the file and it's set to GB again. Tried setting locales at the linux configuration to no avail. How can I make moode spit out something other than GB when writing the wpa config?

I forgot to mention that this Country Code business is a transitory problem. Tim is amending mosbuild.sh and moOde to deal with it.

Regards,
Kent
 
Yes, correct. The WiFi country code will be defaulted to US in moOde and in the Builder. The Network Config screen will contain a new Country input field with a dropdown list of all the WiFi country codes
 

Attachments

  • moode-r41-wifi-country.png
    moode-r41-wifi-country.png
    100.5 KB · Views: 378
Doesn’t the US wifi code have less channels than GB?

Why the change?

In my tests, the new 3B+, Stretch and Wifi country = GB resulted in not being able to see my 5GHz SSID. Switching to country = US and then 5GHz SSID shows up.

I don't know whether the reverse will happen outside the US. In other words if country code = US then will European 5GHz wifi band not show up?

At least 2.4 GHZ will be ok, and its better than the experience with stock Raspbian where the Wifi adapter is blocked completely until a country code is entered using raspy-config :-0
 
Add these lines to the config.txt file after what is already there to restrict speed:

arm_freq=800
sdram_freq=400
core_freq=400
gpu_freq=300
over_voltage=-4 or -2
over_voltage_sdram=-4 or -2 if showing problems
gpu_mem=16

setting process to realtime priority seems to sound better to do,
ssh to the pi then run these lines (I always just copy and paste):


sudo nano /lib/systemd/system/mpd.service

CPUSchedulingPolicy=fifo
CPUSchedulingPriority=99
Nice=-20

exit and save then run these lines

sudo systemctl daemon-reload
sudo systemctl restart mpd

see how it sounds after that ;)

thx :D:D:D

i will try and report :)
 
In my tests, the new 3B+, Stretch and Wifi country = GB resulted in not being able to see my 5GHz SSID. Switching to country = US and then 5GHz SSID shows up.

I don't know whether the reverse will happen outside the US. In other words if country code = US then will European 5GHz wifi band not show up?
There are different broadcast power levels allowed in different countries, this link is old-ish but probably still relevant.

Maximum wifi transmission power per country | Wolph
 
Anybody else has issue with track order and artwork?

1.
View attachment 660429
(This is displayed hen I select directly the album)
Some albums has wrong track order. The track number is good but the tracks are not in order.

2.
View attachment 660430
(This is displayed when I select the artist and then the album)
Same wrong track order of the same album, this time without cover art.

I have to mention, all my albums have cover art and track no. in tag and files have the following structured:
+ ARTIST
+ ARTIST
+ Year - Album

+ Year - Album

Folder.jpg
Playlist.m3u
Audio files
+ Cover Art
Front.jpg
Inside.jpg
Back.jpg
Booklet.pdf​

Some other singles like single tracks are stored in a "Year" folders; some of audio files have cover art, some of them doesn't have cover art.
The tracks without embedded cover appears with a cover art "stoled" from the other files in the same folder, even if there is not Folder.jpg file.

3.
View attachment 660431
Wrong cover art.

4.
View attachment 660432
Wrong cover art.​


I think you should find "coverart.php" file in the var/www folder, and vi it in the "// image search priority" part. I changed priority to mode 0, and the "stoled cover art" disappered after reboot. :D
 
What logic, if any, would improve the sound by undersampling?

Thanks for any feedback,
Rafa.

As far as I'm aware non of the config.txt tweaks offer under sampling they simply run the processor and memory at a reduced rate for lower noise, this is the logic. It seems to work on my system, the results are blacker gaps between notes (if you know what I mean) and more definition.

I suppose it's akin to running your engine at a reduced rate instead of flat out, someone will come up with a better analogy I'm sure. Give it a go and report your findings if you like.
 
As far as I'm aware non of the config.txt tweaks offer under sampling they simply run the processor and memory at a reduced rate for lower noise, this is the logic. It seems to work on my system, the results are blacker gaps between notes (if you know what I mean) and more definition.

I suppose it's akin to running your engine at a reduced rate instead of flat out, someone will come up with a better analogy I'm sure. Give it a go and report your findings if you like.
Someone did the same approach on a RP2/3 and basically underclock the processor to get better music. Search the earlier posts.
 
Someone did the same approach on a RP2/3 and basically underclock the processor to get better music. Search the earlier posts.

Yep, where did you think I got the idea from, can't remember the guy who posted it, or even if it was on this forum, but he was right about slowing the Pi3 down gives better audio results I always use his tweaked config.txt settings now. It was all about noise in the pathways and reducing levels.

BTW I use max SOX oversampling rates into my Mojo - this seems to get best results and the Pi never misses a beat at the lower cpu setting of 800mhz. Trying the B+ now to see if it behaves as the B in this respect, so far it hasn't glitched or dropped out all day.

I'm looking forward to others trying the slowing down approach to see their results.
 
There are different broadcast power levels allowed in different countries, this link is old-ish but probably still relevant.

Maximum wifi transmission power per country | Wolph

Note that the US power limit in the 2.4GHz band is ten times the GB limit ( a full 10dBm). On the other hand, the US limits 802.11g/n operation to WLAN channels 1-11.

I suspect but can't prove that it is differences like these between the world's regulatory domains which moved the Raspberry Pi Foundation explicitly to introduce Country Code setting in the lastest raspbian.

All that aside, the RPi3B+ wifi performance is very nice. See, for example, Raspberry Pi 3 Model B+ WiFi Performance - Phoronix and the article "Benchmarking the Pi 3B+" in MagPi issue 68, MagPi 68: an in-depth look at the new Raspberry Pi 3B+ - Raspberry Pi

I'm loving mine at 5GHz (thankfully the ISP-provided router/AP supports 5GHz decently).

Regards,
Kent
 
Yep, where did you think I got the idea from, can't remember the guy who posted it, or even if it was on this forum, but he was right about slowing the Pi3 down gives better audio results I always use his tweaked config.txt settings now. It was all about noise in the pathways and reducing levels.

It probably came partly from here: Archimago's Musings: MEASUREMENTS: Raspberry Pi 3 as USB Audio Streamer (with recommended CRAAP config & TIDAL/MQA arrives)
Scroll down to 'Conclusions'
 
I know how to get this to work, but I want to understand what I am seeing.

Q1: Given the architecture of the DigiOne is 24/192 why is the output stream always 32/192?
Device: Allo DigiOne, Chip: Cirrus Logic WM8805
Architecture: S/PDIF transceiver 24 bit 192 kHz
OUTPUT STREAM: Format: 32 bit, 192 kHz, Stereo

It seems that the kernel driver for the DigiOne/WM8805 is packing the 24 bits of PCM into a 32 bit stream. This is quite common. If you want to query this, you will probably need to talk to Allo.

Q2: What determines why a DSD64 file is initially decoded to 32/192 when 'Native DSD' enabled?
=====================================
INPUT PROCESSING
Source: NAS/Music/DSD/2L-038_stereo_01_01.dff
Encoded at: DSD64, 1 bit, 2.822 mbps Stereo
Decoded to: PCM, 32 bit, 192 kHz, Stereo
It is decoding to PCM because the WM8805 will not pass a native DSD stream over SPDIF (I'm not sure anything will but happy to be corrected), so MPD is falling back to converting the audio to PCM. MPD is doing this based on what the kernel driver says the DigiOne can accept.

Q3: What determines why a DSD64 file is initially decoded to 24/176.2 kHz when 'Native DSD' disabled (DoP enabled)?
=====================================
INPUT PROCESSING
Source: NAS/Music/DSD/2L-038_stereo_01_01.dff
Encoded at: DSD64, 1 bit, 2.822 mbps Stereo
Decoded to: DoP 24 bit 176.4 kHz, Stereo
As per the MPD page linked by Tim, the DSD stream is being packaged into a PCM stream (DoP=DSD over PCM). This allows the DSD to be smuggled over the SPDIF output of the DigiOne to a compatible DAC. I take it that your DAC is able to extract the DoP data? It must be if this is working.

Without using SoX are these values adjustable? What is the rationale here?

Is the reported "Decoded to" value what is being outputted from the DigiOne, or is it the 'OUTPUT STREAM' value that is being reported - 32/192?

Just trying to understand what is going on.
These values are based on what the kernel driver reports to MPD as the capabilities of the device and how particular data streams need to be packaged. I'm not sure how to manually adjust these values without writing your own version of the driver.

I believe the values quoted are the formats that MPD is outputting to the DigiOne. The DigiOne should only be able to output what is compliant with the SPDIF specification: max 24 bit 192 kHz LPCM or surround streams such as DTS, Dolby Digital.

Cheers,
Richard