OLD: mpdPup - Simplified MPD Music Server/Jukebox - v0.9.2

For talk and support relating specifically to Puppy derivatives
Message
Author
wlowes
Posts: 49
Joined: Fri 08 Jun 2012, 02:30
Location: Toronto, Canada

Tuning Linux/MPD/Alsa for best sound on ALIX processor

#181 Post by wlowes »

Douwe
I tried your period/buffer parameters. Have to agree. Nice improvement.
I have set buffer to about 50mb with 100% before play as a compromise.

I have another area of experimentation. There is a parameter for setting the amount of data xmitted by the usb hdw nrpacks. Debate is to set it low (1) to get extra low latency at expense of 1000s of interrupts / sec and higher cpu load or very high to put the cpu to rest and use the usb hardware. I am running at 100. I think high is the way to go, but more listening time required for all of these.

modprobe snd-usb-audio nrpacks=100

I have to pick up a serial -> USB converter so I can use a pc as a monitor and get into the bios. Look forward to underclocking cpu as you suggest.

Currently listening to some new material and getting goose bumps with the microdetail and air.

Walter

PET-240
Posts: 74
Joined: Tue 22 May 2012, 17:38

#182 Post by PET-240 »

Walter,

As an aside, perhaps we should start a thread detailing settings on the Alix/mpdpup?
Also in regards to powersupply, what are you running?
We could cover all this there? Keep it here on this forum as its where mpdpup lives, and we could cross reference to both threads with the other having "advanced" setup tips? Just all the setting changes could get a bit much feeling for a new to Linux user?
Thoughts all?

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

#183 Post by ldolse »

I don't particularly mind if tweaks get discussed here, even if they're somewhat advanced - they'll get integrated in at some point (some sooner rather than later), and I'll make sure that it's done in a way that tries to avoid confusion for newbs.

Most of these tweaks have more to do with Linux audio/MPD in general vs being specific to Alix or mpdPup, so if you did want to discuss them elsewhere I would recommend one of the other boards I know several of you frequent, and to that point I saw that Walter already has a thread on Audioasylum. The only other board I frequent at the moment is Computeraudiophile, and I've been thinking to start a blog there to document various aspects of mpdPup and mpd tweaks.

@Walter, the USB tweak you mentioned sounds interesting - is there a link to a discussion on it somewhere else (edit - nevermind, saw it was from audioasylum)

Looks like that nrpacks USB tweak might be obsolete:
http://ubuntuforums.org/showthread.php?t=1608913
http://lists.linuxaudio.org/pipermail/l ... 66765.html

An interesting guide here (more focused on musicians, and not all usable for mpdPup):
http://wiki.linuxmusicians.com/doku.php ... figuration

Looks like I need to add the full version of lsusb to dig into some of this - the busybox version doesn't provide enough detail for debugging.

RayCtech

#184 Post by RayCtech »

Great project!

I am using a Intel Atom DN2800MT motherboard powered by a linear 8 volt PSU, with 4 or 8GB RAM and a Intel 40GB mSATA SSD.

I have some issues that I do not know if are related to my hardware setup or are related to mpdPup.

When mpdPup loads the MPD startup never finishes...

Hitting "enter" returns the command prompt / line without any error messages.
The only way I can get MPD started is to:

mpd --kill

and then

mpd -v (verbose)


Using MPoD and MPaD "everything" works, but there is some minor details like not showing the bitrate (always 0 Kb/sec).
This works when using Voyage MPD.

MPoD and MPaD do not discover the mpdPup and must be configured manually.
Maybe this is caused by MPD startup problem...

I now boot from a CD with the *.fs files on a Voyage MPD partition on the mSATA drive.
Two different USB sticks and one USB HDD drive will not boot at all (made with unetbootin) ??

Is there a installation routine (like in Voyage MPD) to install to the mSATA ??

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

#185 Post by ldolse »

The setup wizards don't support automatically installing to an internal hard disk - Puppy Linux supports that in general though, you need to do the following:

Boot from CD (or a USB stick set up as per the first post). Then you need to follow a bunch of steps, not all of which I've thoroughly tested:
  • Go into Xwindows, type xwin or startx if it isn't automatically started
  • Use gparted to format the SSD drive using FAT32 (optionally ext2/3)
  • Right click on the desktop, select Setup -> Puppy Universal Installer
  • Go through all the prompts to install Puppy to your internal hard drive
  • If it didn't come up as part of the Universal Installer then install GRUB or GRUB4DOS - right click on the desktop System -> GRUB
  • Reboot, off the hard disk this time, cross fingers (since I'm writing this more or less from memory_
  • Make the MPD directories with the following command

    Code: Select all

    mkdir -p /mnt/home/mpd/playlists
  • Run through the config wizards again if neccessary
As far as mpd not working, it's quite possibly related to your overall config, since you appear to be a little outside of what I've set to be 'easy'. The startup scripts only start MPD if it detects that the music directory is mounted successfully and that the PUPMODE is 13 (a Puppy Linux thing you don't really need to worry about). Anyway based on what you wrote I can't tell exactly what you did to get mpdPup up and running, but I'm pretty sure you took a different set of steps than what's outlined in the first post.

Edit: weird that the unetbootin sticks aren't working - have you set your bios boot priority to prefer USB? Anyway I'd try to get it working from a USB stick before trying to work through a frugal install.

Where is your audio located, is it on a NAS?


The bitrate is probably related to you using AIFF or WAV, and Voyage defaults to libaudiofile/ffmpeg, which supports the bitrate but plays id3 tags as static. I default to sndfile because it properly supports id3 tags in aiff/wav, but you get the bitrate thing you mention - I prefer 0 bitrate vs static.

MPoD/MPaD not discovering the system automatically turns out to be a regression I just discovered, will be fixed in the next version.

Edit2: Regarding mpd not starting automatically with the system, I only have one theory at the moment, it would help if you send me the output of this command:

Code: Select all

cat /etc/rc.d/PUPSTATE
If you're not doing this from a remote session where copy/paste is easy the most important bit is the PUPMODE on the first line, just let me know the number.

RayCtech

#186 Post by RayCtech »

ldolse, thanks for the quick reply.

The PUPSTATE outputs is as follows:
PUPMODE=13
PDEV1=sr0
DEV1FS=iso9660
PUPSFS=sda1,vfat,/puppy_mpdpup_0.9.2.sfs
PUPSAVE=sda1,vfat,/mpdpupsave-XMOS.3fs
PMEDIA=cd
ATADRIVES=sda
SAVE_LAYER=/pup_ro1
PUP_LAYER=/pup_ro2
PUP_HOME=/mnt/dev_save
ZDRV=
ZDRVINIT=no
PSAVEMARK=

I will try the install to the mSATA today and post the results.

RayCtech

#187 Post by RayCtech »

mpdPup is now installed to the mSATA drive (thanks to the detailed instructions).

mpd is still not starting, and I have to start it manually..
Maybe the startup scripts after the universal install is not correct.

After booting from the mSATA there is some new issues:
1. Keyboard and mouse do not work in X.
Have to pull the power and reboot,
and when mpdPup boots again and checks the filesystem the keyboard do not work.
The keyboard works with Grub and with mpdPup commandline when normal boot.
2. Grub do not timeout... and I have to hit enter to boot.
Will edit the Grub config when keyboard and mouse works again in X.


When started manually mpd works normally,
and I can use tunes.local as server setup in MPoD and MPaD.

Currently I use a iTunes library on a NAS (Linux) with only AIFF and WAV files.
AIFF files is a mix of 44.1k/16bit, 176.4k/24bit, 176.4k/32bit and 352.8k/32bit,
all WAV files is DXD 352.8k master recordings and tagging is working with both iTunes and mpd.

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

#188 Post by ldolse »

Glad you were able to get it installed, but not really sure what the root cause of your problems are - regarding mpd not starting, is your network share successfully mounting at startup? Basically mpd won't start unless it sees that something has been successfully mounted at /mnt/music. If it doesn't see anything, it tries to mount everything in /etc/fstab (which the wizard should have been able to configure), sleeps for a few seconds, and then checks to see if the mount was successful. It tries this five times in a row before giving up completely. The reason behind this is it can take a while to initialize the network on some systems, and I didn't want mpd ever starting if the mount was unsuccessful and potentially wiping out the database.

You can edit /etc/init.d/20.mpd if you want to uncomment some of the echo statements there, it might help you determine what's going on during bootup.

Regarding the keyboard/mouse, I haven't seen that with other hardware it's likely something to do with the chipset on that Atom board that will need to be sorted out. I'm curious though, how were you able to run through the Puppy install process to successfully do the install if the keyboard/mouse didn't work?

It does sound like keyboard is working at the console, before X starts, did you actually run through the configuration wizard, or did you configure mpd.conf manually by yourself? If you can't run the wizard from X you can run it from the CLI by typing 'mpdwizard'.

The 0 bitrate is indeed based on your file format selection and the sndfile decoding library - so that's basically an upstream bug that the mpd team will need to address.

RayCtech

#189 Post by RayCtech »

When booting from the CD -> keyboard/mouse works at the console and in X.
The install process is no problem as it is done when booted from the CD.

When booting from the mSATA -> keyboard works at the console,
but no keyboard/mouse in X and I am stuck and the ´only way´ out is power off/on.

I used mpdwizard to configure.


I will remove the mSATA and try to install to a USB flash.
Then I will put the mSATA back again - erase and install once more to check if the problems is persistent.


Edit:

When booting and mpd does not start -> running mpdwizard and verifying that the NAS is mounted
and exiting and the mpdwizard tells that the processes are restarted and working...
mpd is still not running and I must start mpd manually.

Douwe01nl
Posts: 17
Joined: Thu 14 Jun 2012, 20:32

#190 Post by Douwe01nl »

Hi Walter
I think you do not have to bother to get into your bios. The manual describes the things you can change in tinybios, and it is not CPU frequency.
Yesterday i removed the soundchip (a famous Jack Wong mod) which pumped up SQ again.
Maybe it is possible to flash your bios to the award-version, and then lower cpu-freq.

Where did you find the USB-mod. Seems very interesting. will try next week.

Lets discuss all the tweaks here, keep them near to Idolse.

Douwe

Douwe01nl
Posts: 17
Joined: Thu 14 Jun 2012, 20:32

#191 Post by Douwe01nl »

walter where do you put the modprobe line? No need for putting parameters between " "?
TIA Douwe

RayCtech

#192 Post by RayCtech »

Douwe01nl wrote: Lets discuss all the tweaks here, keep them near to Idolse.

Douwe
The tweak I can recommend is to add OSCON plus very fast 10nF high voltage polypropylene capacitors to ALL voltage rails.

In my primary music player system I have added minimum 6.800uF and 10nF/630volt/2000v/us slewrate in all rails except the input 8 volt witch is a linear PSU with 120.000uF.

The tweak with the greatest SQ impact I have tested is isolation of the USB (480Mbps) to the USB -> I2S device.
As the USB isolation is my own design and not patented yet I can not tell much more...

PET-240
Posts: 74
Joined: Tue 22 May 2012, 17:38

#193 Post by PET-240 »

Hey Ray,

Have read about your AMT design too, asked about them but have never seen or heard, would love a pair but I think they may be like unobtanium! The USB could be easier, so looking forward to your USB isolator when it becomes available. I am not much use in your quest, though I think of one thing that Freenas advises, have you updates your bios? They mention alot of issues can be the bios. Would be a real long shot given it works elsewhere, but a thought none the less.

Cheers,

Drew.

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

#194 Post by ldolse »

@RayCtech, in order to progress further on why mpd won't start you'll need to edit /etc/init.d/20.mpd to uncomment the echo statements, I'm at a loss as to why it won't start. My only suspicion at this point is that the NAS drive isn't getting mounted before mpd gives up - the debug statements will help with that. PM me if you need detailed steps on editing the file.

Regarding the keyboard, you've thrown me for a loop - there should be zero differences in how drivers get loaded for CD vs SATA vs USB. I'll ping the other Puppy Linux forum members on this because I don't believe many of them monitor this thread, and at this point I've got no other ideas.

@Douwe01nl, I've been watching the discussion between wlowes & phofman regarding this USB setting over on Audioasylum, and I'm not positive that wlowes entered the command in a way that would do anything. Based on what I've read thus far, in order for it to work you would need to kill mpd (because it has the sound device open), unload the existing alsa USB driver, reload it with the nrpacks setting, then re-start mpd. These should be the lines to paste into the CLI:

Code: Select all

/etc/init.d/20.mpd stop
modprobe -r snd-usb-audio
modprobe snd-usb-audio nrpacks=20
/etc/init.d/20.mpd start
Note based on the previous discussions I linked I'm still not certain if these commands will do anything. They were relevant to older kernels, but were apparently hardcoded recently - it's unclear whether the command will still override the hard-coding, but keep me posted if you think you hear anything. If you're convinced you do they can be made permanent via an init script, I can post instructions for that if need be.

Douwe01nl
Posts: 17
Joined: Thu 14 Jun 2012, 20:32

nrpacks stuff

#195 Post by Douwe01nl »

Idolse!
I love these settings!
More detail, it's just much more musical.
nrpacks=100 resulted in failure; 20 was highest possible, didn't try 1 yet.
Would be great if you could give instructions how to make an init script
Thanks!

ps i noticed slightly better SQ when putting a ferrite core around the LAN cable

Douwe01nl
Posts: 17
Joined: Thu 14 Jun 2012, 20:32

caps

#196 Post by Douwe01nl »

@RayCtech
in previous setups i had good results capping the powerlines on the board, so i plan to do Alix in (hopefully near) future. I used to use Siemens Sikorel caps combined with small mkp's.
Two questions:
- are oscons better than sikorels for use on Alix?
- what is the reason for the high voltage (in stead of 6v or 16v)?
Thanks!

wlowes
Posts: 49
Joined: Fri 08 Jun 2012, 02:30
Location: Toronto, Canada

ALIX Caps & nrpacks=20 & bios

#197 Post by wlowes »

Douwe01
CAPSI have just added caps to the Alix board. Things are sounding very nice.

I use a lot of OSCON SEPC caps to good advantage in my DAC. On power supplies I find nothing compares to BlackGates. Organic polymers very close. Both need 100+ hours to really strut their stuff. I had a few BGs in the cap drawer. I added little miniture BG PK 50v .22u as a bypass on the pins of the big 220u electrolytes. Also on right on the pins of the power input. I then put a BG F 100u 50v also on the input pins. No room in the enclosure so I attached it on the upper side near the memory and ran twisted pair over to the input pins.

I must say the sound is quite outstanding.

I have a bunch of oscon surface mount 16v 220u. I might look around on the board for spots that could benefit in the future. Right now can't stop listening.

nrpacks
I am running with nrpacks=20. I too think it adds clarity and space around instruments. There is a fair discussion on my tunning thread on AA. The net is I added the line
options snd-usb-audio nrpacks=20
to the end of the file alsa-base.conf
It is found in /etc/modprobe.d
I believe that this sets the option for the driver at the time it is loaded. Otherwise (as you have discovered) you have to disconnect the USB, reboot and issue the modprobe command to load the driver with nrpacks=20. Then when you connect the usb, the driver is already there with the option set.

Bios
I picked up the USB->serial converter, figured out how to get it going and then discovered as you point out that tinybios does not control much of anything. I followed the recommendations of another site and set serial speed to 115000, and enabled UDMA. I have no idea if this helps anything.

Very cool that you did a videochipectomy. I think the fact that it helped tends to suggest that the optimal boards for SQ are those that have no extra hardware. My 3d2 is pretty good. the 1d? may be even better in that it has connectors on one end and leds on the other, and no extra chips. You likely have the best of all now in that you have Award bios and thanks to your hot air gun, no video chip. I also read that on boards like mine that have no battery you can simply solder one in where indicated in the mask. It would be nice if it remembered the date and time between boots if not connected to the net to find an ntp server.

Thanks for sharing your research.

wlowes
Posts: 49
Joined: Fri 08 Jun 2012, 02:30
Location: Toronto, Canada

Re: caps

#198 Post by wlowes »

Douwe01nl wrote:@RayCtech
in previous setups i had good results capping the powerlines on the board, so i plan to do Alix in (hopefully near) future. I used to use Siemens Sikorel caps combined with small mkp's.
Two questions:
- are oscons better than sikorels for use on Alix?
- what is the reason for the high voltage (in stead of 6v or 16v)?
Thanks!
Another really good combination is to replace your small mkps with some Russian silver mica. I use 1000v 1500pf to great advantage as the bipass. The theory is that the rigid nature of the mica eliminates the effect of movement that plagues film caps. I use them to bipass russian mgbo2 pio caps for coupling tubes. Very nice.

wlowes
Posts: 49
Joined: Fri 08 Jun 2012, 02:30
Location: Toronto, Canada

A/B comparison of nrpacks 1 -15 - 20

#199 Post by wlowes »

[quote="ldolse@Douwe01nl, I've been watching the discussion between wlowes & phofman regarding this USB setting over on Audioasylum, and I'm not positive that wlowes entered the command in a way that would do anything. Based on what I've read thus far, in order for it to work you would need to kill mpd (because it has the sound device open), unload the existing alsa USB driver, reload it with the nrpacks setting, then re-start mpd. These should be the lines to paste into the CLI:

Code: Select all

/etc/init.d/20.mpd stop
modprobe -r snd-usb-audio
modprobe snd-usb-audio nrpacks=20
/etc/init.d/20.mpd start
Note based on the previous discussions I linked I'm still not certain if these commands will do anything. They were relevant to older kernels, but were apparently hardcoded recently - it's unclear whether the command will still override the hard-coding, but keep me posted if you think you hear anything. If you're convinced you do they can be made permanent via an init script, I can post instructions for that if need be.[/quote]

Ildose,
Thanks for this information. I did not realize modprobe -r would unload the driver so easily. With this set of cmds, it is easy to flip quite rapidly between different settings of nrpacks. I picked off a few tracks with very good resolution. I played 30 seconds of each of 6 different tracks at nrpacks=20
then swithced to nrpacks=1. ARG!! While sound quality still very good, the soundstage collapsed back into the distance and a feeling of constraint sets in like the air is thick and hard to breath. There just is no air and space compared to nrpacks=20. I tried settings at 10 and 15. much better than 1, but still not as good as 20 IMHO.

So now I want nrpacks to stick between boots! (they are never satisfied!). Am I correct that adding
options snd-usb-audio nrpacks=20
to the end of the file alsa-base.conf
will cause nrpacks=20 to be set after reboot, or should we add something to a startup script somewhere?

The sound is the best I have heard to date. This puppy can howl!

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

Re: A/B comparison of nrpacks 1 -15 - 20

#200 Post by ldolse »

wlowes wrote:I picked off a few tracks with very good resolution. I played 30 seconds of each of 6 different tracks at nrpacks=20
then swithced to nrpacks=1. ARG!! While sound quality still very good, the soundstage collapsed back into the distance and a feeling of constraint sets in like the air is thick and hard to breath. There just is no air and space compared to nrpacks=20. I tried settings at 10 and 15. much better than 1, but still not as good as 20 IMHO.
Excellent, glad that's clearly working for you - It doesn't surprise me that the highest numbers are the best - sometimes it's not about the lowest latency - I can see why a musician would want to set it to 1, but for playback I can't see any reason. I saw that phofman actually hacked his kernel at one point to allow for even higher numbers, may have to look at that some time in the future.

wlowes wrote:So now I want nrpacks to stick between boots! (they are never satisfied!). Am I correct that adding
options snd-usb-audio nrpacks=20
to the end of the file alsa-base.conf
will cause nrpacks=20 to be set after reboot, or should we add something to a startup script somewhere?

The sound is the best I have heard to date. This puppy can howl!
Regarding getting it to stick, I've read about editing alsa-base.conf in several places, so I assume that will work (and it would be the preferred way to do it if it does work). If you're not entirely sure it is working I was thinking about just sticking an init script in /etc/init.d/, something like this:

Code: Select all

#!/bin/sh

case "$1" in
start)
   modprobe -r snd-usb-audio 
   modprobe snd-usb-audio nrpacks=20  
;;
esac
And name is something like 00.usbnrpacks, so it's executed before mpd. But that would be more of a hack, so I hope the other method works.

Post Reply