mpdPup - Simplified MPD Music Server/Jukebox - v0.9.3

For talk and support relating specifically to Puppy derivatives
Post Reply
Message
Author
ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#91 Post by ldolse »

@Dynobot, will swappiness matter if there is no swap file? I intentionally configured the iso so it doesn't create a swapfile. Thanks for the extra info - I'll bet taskset is also part of util-linux, so I'll add that when I add chrt.

@johnnyc, you can ignore the fsck when you power it down by holding the power button - it does run out of RAM and the fsck isn't required. Puppy Linux has that logic for non-RAM based Puppy installations to prevent kernel panics. mpdPup 0.9.1 was a remaster of a very old version of Puppy Linux which didn't have that safety feature. At some point I need to dig through the startup scripts and make it smarter so that it properly handles a RAM based pupmode and skips the fsck.

I hadn't really thought about putting it on Distro watch - I'm not sure I see the benefit due to the highly niche nature of the project.

Dynobot
Posts: 44
Joined: Wed 05 Dec 2012, 12:04

#92 Post by Dynobot »

Hi Idolse

No I don't think Swappiness will help...to be honest I can't tell even with HD versions of Linux... :shock:

Dynobot
Posts: 44
Joined: Wed 05 Dec 2012, 12:04

#93 Post by Dynobot »

Considering past notions about CPU power usage, it appears that a reduced CPU power is best.

In light of that it may seem counter intuitive but I think the cpu governor frequency should be set to powersave instead of performance.

Performance keeps the CPU at the highest possible frequency
Powersave keeps the CPU at the lowest possible frequency
Userspace exports the available frequency information to the user level (through the /sys file system) and permits user-space control of the CPU frequency
Ondemand scales the CPU frequencies according to the CPU usage (like does the userspace frequency scaling daemons, but in kernel)
Conservative acts like the ondemand but increases frequency step by step

The recent CPUs have a feature which let them scale their operating frequency (changing a voltage power supply input) according to the system/user needs.

http://idebian.wordpress.com/2008/06/22 ... -in-linux/

Or it may be best to just leave well enough alone, this may take some testing and confirmation.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#94 Post by ldolse »

Dynobot wrote:Considering past notions about CPU power usage, it appears that a reduced CPU power is best.

Or it may be best to just leave well enough alone, this may take some testing and confirmation.
What I would do once implemented is add this into the 'tweaks' section of the wizard so that a user could choose which profile they want. In my mind powersave would probably be best too, at least for users who are using bit perfect NOS. Looks like based on other searches whether this profile does anything is highly variable on the features built into the CPU. A more recent article would be helpful if you come across one. A 2009 article shows that one of the three underlying methods in the article - p4-clockmod - isn't really relevant anymore, the way the Linux kernel moves I wouldn't be surprised if there have been quite a few other changes since 2008 as well.

Dynobot
Posts: 44
Joined: Wed 05 Dec 2012, 12:04

#95 Post by Dynobot »

Hi Idolse,

Don't mean to put so much on your plate....but I have yet another suggestion.

How about having a toggle during setup that would allow the user to do automatic updating. Say each time they cycle their unit [power off and on] MPDPup will look on the server for a newer version, if found it will update and keep the users settings.

I'm kinda just coming up with these as just brain storming ideas so please take with a grain of salt.

jrling
Posts: 47
Joined: Wed 27 Jun 2012, 13:51

#96 Post by jrling »

ldolse wrote:
Dynobot wrote:Just wanted to say great job with this...

Some suggestions you might consider

-cpufreq - change from ondemand to performance
-somehow be able to unbind devices from sharing the same interrupt
-increasing the priority of the audio threads
-if at all possible give MPD a CPU core to itself via affinity
-enable mmap in MPD
Hi Dynobot, I saw you'd done some testing on audioasylum, I was wondering what tweaks you were referring to, so that helps. Was happy to see you had a good experience with it.
  • cpufreq - hadn't heard of that tweak and looks quite simple, will do
  • audio thread priority - my first attempt at this used nice and unfortunately it caused mpd to fail to start on some hardware. I'm looking to do this in the future with chrt, but need to spend some time trying to figure out the best way to build a minimal util-linux package - it's a bit of a clusterf#$!@ to try to build just one piece of it.
  • I'd actually just read about mmap about a week ago, this is on the list to get done soon
  • single core dedicated to MPD is interesting, will explore options there
  • IRQ sharing is the only one that I think will be difficult to tackle, as the behavior varies a lot from platform to platform.
Some great suggestions Dynobot. I have come from Windows CPlay et al which had me incessantly trying to reduce and optimise Windows to be a half-decent Music Transport. Ended up being a total nightmare.

mpdPup is a fantastic starting point for a dedicated Music Player. 66MB running in RAM is a great testament to Idolese.

However, I have found that tweaking mpdPup, which is really simple compared to 'Optimising' Windows, has already shown that it can be tweaked to give materially improved SQ. Thanks to wlowes and now Dynabot's suggestions.

I am sure that there are two types of users:
1. 'Out of the Box'
2. Tweakers

Idolese's approach in the wizard caters for both admirably. Thanks.

I am definitely a Tweaker. I looked at Dynabot's excellent website and its recommendations for tweaking MPD. Unfortunately, most, if not all of the Linux commands that he uses, like Synaptics Package Manager, apt-get, chkconfig, taskset, are not (apparently) part of mpdPup? I am sure that is purposeful in the design to keep the size of the ISO down to minimum.

I look forward to Idolese incorporating some of Dynabot's suggestion into the ISO, but in the meantime,is there any way that mpdPup users can achieve Dynabot's recommendations themselves - especially those without too much Linux experience?

Lastly, I am unclear whether mpdPup (0.9.3) has a Real Time Kernel, which many of Dynabot's tweaks involve?

Many thanks

Jonathan

Dynobot
Posts: 44
Joined: Wed 05 Dec 2012, 12:04

#97 Post by Dynobot »

Hi jrling

Thanks for the kind remarks. I have plenty more suggestions, some may be over the top others might not be worth the effort but I'd like to get them off my chest none the less.

Seeing the Puppy operates from RAM I'd like to see a 64bit version that is able to take advantage of greater amounts of RAM.

For those who link to their music via server IP address, making some tweaks to the Ethernet might improve performance.....see ethtool Linux tweaks to optimize Ethernet traffic.

Not sure if its already been brought up but some might like upsampling....so including Sox would be cool. Having multiple sample rates can be as easy as having multiple outputs...each with the same hw# but with different names and parameters for different sample rates. For example Dac XYZ rate 24/48, Dac XYZ rate 24/96 etc.

Dynobot
Posts: 44
Joined: Wed 05 Dec 2012, 12:04

#98 Post by Dynobot »

BTW, if I can help an any way please let me know.

I appreciate the efforts behind this and am willing to role my sleeves up as well...

jrling
Posts: 47
Joined: Wed 27 Jun 2012, 13:51

#99 Post by jrling »

Upsampling is included. 0.9.2 had Secret Rabbit Code built in and configurable in the audio-output section and Idolese has now included SOX upsampling in 0.9.3 with multiple audio-outputs for each SOX setting.

I find both excellent enhancements to 44.1/16 files, which is all I have.

Keep the ideas coming! mpdPup is an excellent tool and as you suggest I am sure any effort to make it even better, will be rewarded.

Jonathan

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#100 Post by ldolse »

Keep the ideas coming, happy to hear them. Regarding auto-updating, this is something I've thought about quite a bit. It's pretty straightforward to build ad-hoc updates for packages/bug fixes for a particular release - and it's probably something I'll do in the relatively near future. Full-on upgrades is a bit more difficult - on top of more technical VCS challenges just to do it there are major challenges in terms of config migration and regression testing - I'd be opening myself up to a whole class of bugs that as a one man shop I'm not really up for keeping on top of.

As far as help goes, a lot of the work I have to do goes into the research required to follow up on various suggestions, extra detail or testing on specific tweaks on mpdPup itself is a huge help, particularlly when it includes docs on exactly what files need to be changed - this is how Sox was added in the last release as an example. Sometimes this might require installing the developer devx file, but a lot of times you just need to use the Puppy Package manager - util-linux for instance can be installed from there to give a user access to taskset and chrt.

@jrling, most if not all of Dynobot's suggestions can be tested with the current release, though they do require some level of comfort with hacking on Linux. If you have a system which supports XWindows you can use the Puppy Package manager to install util-linux. If your system doesn't support X it's a bit trickier, but still possible. I don't believe any of the suggestions require a real-time kernel.

Edit - added package installation instructions here.

willemoes
Posts: 12
Joined: Thu 08 Nov 2012, 09:16

#101 Post by willemoes »

jrling wrote:Upsampling is included. 0.9.2 had Secret Rabbit Code built in and configurable in the audio-output section and Idolese has now included SOX upsampling in 0.9.3 with multiple audio-outputs for each SOX setting.

I find both excellent enhancements to 44.1/16 files, which is all I have.
Is there a way to choose between Secret Rabbit Code and SOX for upsampling (like in Cmp2, where some preferred SRC due to a more "analogue" sound)?

Found this as a way to verify souncards output sample rate, if you don´t have a dac that shows (might need adjustment to actual config):

# cat /proc/asound/card0/pcm0p/sub0/hw_params

and a continous update (haven´t yet checked the use of "watch)

# watch -n 1 'cat /proc/asound/card0/pcm0p/sub0/hw_params'

Regards, Finn

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#102 Post by ldolse »

willemoes wrote:Is there a way to choose between Secret Rabbit Code and SOX for upsampling (like in Cmp2, where some preferred SRC due to a more "analogue" sound)?
There's no way to do this through the setup wizards, but if you want to test Secret Rabbit Code it's just a matter of hand-editing mpd.conf to enable it for a sound output. I suppose I can add a configuration option for it in the wizard, but you're the first person that's expressed interest in it, so it hasn't been a priority.

I don't have my system with me to test, but I'm not sure if those sample rate commands work on mpdPup - some of the kernel level debug/info code is disabled on the kernel I'm using, so a lot of that advanced info isn't available. While it would be nice to have, I also wonder if the fact that it's disabled contributes positively to the overall sound signature, less being more and all that...

luisb
Posts: 25
Joined: Sun 30 Sep 2012, 13:52

#103 Post by luisb »

Hi Idolse
usbnrpacks=20 doesnt work anymore, always stays on 8 verified with cat command. I tried to find the file in init.d with no sucess. Using previous 00.usbnrpakcs (old topic) works. Any news for the suport of adicional usb storage devices? I'm reading about symlinks, not easy for a newbie but i will persist.
Thanks for your fantastic job

willemoes
Posts: 12
Joined: Thu 08 Nov 2012, 09:16

#104 Post by willemoes »

ldolse wrote:There's no way to do this through the setup wizards, but if you want to test Secret Rabbit Code it's just a matter of hand-editing mpd.conf to enable it for a sound output.
Editing mpd.conf is fine with me; libsamplerate working fine..

SOX, however, is causing a "connection refused" error (I´m using ncmpcpp)
-regardless of chosen samplerate (tried 88,2/96 and 176,4 Khz).

Soundcard is HT Omega Claro Pci (C-media CMI-8788)

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#105 Post by ldolse »

@luisb, nrpacks is something I'm aware of, working on some fixes for the not too distant future. I haven't looked into trying to support multiple drives through some sort of symlinking. To be honest I've just never considered it a particularly ideal design and hoped users could get a larger hard disk or a NAS. However a simple dialog for creating symlinks into mpd's music directory isn't completely undoable. That said, mounting the disks is still an issue which adds complexity to the solution. How are you mounting all these disks - did you edit fstab yourself?

@willemoes, glad you got SRC working - regarding Sox, sounds like you neglected to disable the default output before enabling a Sox output - depending on the hardware this can do a variety of bad things, you have to be diligent about disabling the default output before enabling a Sox output. This is because the underlying hardware is the same and if both are enabled conflicts will ensue. MPD doesn't have any features to protect a user from themselves in this case.

Once you get them both working let us know what you think of the difference.

jrling
Posts: 47
Joined: Wed 27 Jun 2012, 13:51

#106 Post by jrling »

ldolse wrote:
@willemoes, glad you got SRC working - regarding Sox, sounds like you neglected to disable the default output before enabling a Sox output - depending on the hardware this can do a variety of bad things, you have to be diligent about disabling the default output before enabling a Sox output. This is because the underlying hardware is the same and if both are enabled conflicts will ensue. MPD doesn't have any features to protect a user from themselves in this case.

Once you get them both working let us know what you think of the difference.
I run mpdPup on an Intel Dual Core 1.66 GHz Atom D510 mobo with 4GB RAM.

I have now had a chance to compare SRC/SOX on that PC. I run SRC at 'Highest' quality level (0)

SOX at 176,400 was unable to run without stuttering whereas SRC at 176,400 runs fine. I have to conclude that SOX is more CPU intensive.
At 88,200 both ran fine. There was very little in it for SQ, but in the end, I prefer SRC as being more 'natural'. Both IMHO though enhance 44.1/16 CD usefully, especially at the top end.

Of course, your mileage may vary.

luisb
Posts: 25
Joined: Sun 30 Sep 2012, 13:52

#107 Post by luisb »

Yes Idolse, thats an issue to. I began to try to automount the card reader with the following line on fstab :
/dev/mmcblk0p1 /mnt/mmcblk0p1 auto defaults
also tryed vfat (card is in vfat) instead of auto and it doesnt mount.

But if i add to the /etc/rc.d/rc.local the following lines:

mkdir /mnt/mmcblk0p1
mount /dev/sda1 /mnt/mmcblk0p1

It works for the card reader, if i add the line

mount -t ntfs /dev/sdc1 /mnt/sdc1

it doesnt mount the usb drive. Really i am trying to make the card reader working for now.

luisb
Posts: 25
Joined: Sun 30 Sep 2012, 13:52

#108 Post by luisb »

Sorry, replace mount/dev/ sda for mount/dev/mmcblk0p1.

boulogne75
Posts: 15
Joined: Mon 17 Dec 2012, 13:34

#109 Post by boulogne75 »

Hi,
I am starting to try mpdPup and it looks very promising, congratulations!!!
I have one suggestion and two questions.

CIFS should use a credential file to store the username and password (chmod 700 it) and uses the credentials option to mount the share. It's more secure and a wider password range will be allowed. Actually you can't use passwords with ',' (coma) characters because it is the options delimiter in fstab. I think this point should be really easy to implement.

Now, the questions...
Is there any way to change/redetect/swap audio interfaces without reinstalling or using CLI to load module and modify alsa/mpd config files? I'll be swapping Young DAC and Hiface2 but can't figure out how to "magically" make it work.
Any plan on NFS support?

Thanks and keep up the good work!!!

boulogne75
Posts: 15
Joined: Mon 17 Dec 2012, 13:34

#110 Post by boulogne75 »

I've seen discussions about several tweaks. I don't know if the package exists for Puppy: rtirq-init (name in Debian). It can address a few of these tweaks (irq threading, priorities...) and you can achieve pretty good defaults/balance for USB Dacs and PCI Cards. An option to activate it in the wizzard would be possible as it is an init script that can be enabled/disabled in a config file.
It takes advantage of irqthreads/realtime enabled kernels. I am actually at work and cannot check if this is the case of mpdPup.

Post Reply