Computer Audio Asylum

Music servers and other computer based digital audio technologies.

Return to Computer Audio Asylum


Message Sort: Post Order or Asylum Reverse Threaded

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

184.147.229.163

Posted on June 13, 2012 at 19:52:01
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
I am interested in sharing experience and exchanging ideas on how to tune Linux/MPD for best possible sound quality on an ALIX processor.

I had very good experiences with CMP/CPLAY sound quality following the rather radical stripping of XP and the hardware down to the bare essentials. I moved to USB2 DAC via the WaveIO XMOS board. This prompted a look at Linux based on the native drivers.

I started with VoyageMPD on the Alix. Standard configuration of distributed processing with ALIX running mpd/alsa. The ALIX has no hard drives using a compact flash card to store the OS. The music is on a NAS. In my case a 1TB WDMYBOOKLIVE. An old laptop runs the GMPC client and a dedicated router/wireless access point completes the picture. Only the client is connected wirelessly. A tablet or iphone is a nice client platform as it provides a rich GUI from the listening chair.

I use separate linear power supplies on all the TDA1541a consumers. The WaveIO benefited from a nice PS. The ALIX board seems to be fine with a simple wallwort, but I gave it a branch off the WaveIO supply.

I have now moved on to use mpdpup as the ALIX OS. This puppy distribution is specifically built for great music, containing just enough OS to run mpd, usb and the ethernet link. While not real time, the linux core is optimized for low latency. Sound quality of this setup is very good. To my ear quite a bit better than my best CMP setup which was very good indeed.

Now my quest is to tune all the alsa buffer parameters for best sound. Then I'll go on to the real time patches.

All ideas welcome.

Now I am looking for a community of interest for tuning the platform.

 

Hide full thread outline!
    ...
RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 14, 2012 at 01:28:03
phofman
Audiophile

Posts: 236
Joined: August 7, 2011
Show as your mpd.conf, so that we can have a look at your alsa device config.

By default MPD uses 500ms of alsa buffer which is quite OK. If you avoid alsa dmix (which I think you already do), your chain will be bit-perfect and as short as possible.

You can play with snd-usb-audio module parameter nrpacks which defines how often your USB controller will throw an IRQ/how many frames the USB core will prepare in advance for the USB controller to process on its own. You may want to raise it and see what it does. It can be very large for usb adaptive, there are limits for usb async as the response must be taken into account when the usb-audio driver prepares new URB (groups of USB packets submitted to the USB controller at once).

IMO you want to keep CPU at minimum and let the USB controller do its work - i.e. large buffers, large nrpacks.

There is no magic/voodoo in linux audio stack.

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 14, 2012 at 21:37:22
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
The alsa device from mpd.conf is:


audio_output {
type "alsa"
name "WaveIO"
period_time "21333"
fragment_size "4096"
device "hw:1,0"
buffer_time "250000"
mixer_type "none"
mixer_device "disabled"
auto_resample "no"
auto_format "no"
}

I have started with a much more basic mpd.conf


audio_output {
type "alsa"
name "WaveIO"
device "hw:1,0"
mixer_type "none"
}

to my ear the one above is superior.

Only other thing worth noting is

audio_buffer_size "8192"
buffer_before_play "100%"

I think this does not make a lot of difference, but I prefer the sound.

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 15, 2012 at 20:15:41
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
phofman,
Nice tip.
I am running with
modprobe snd-usb-audio nrpacks=100
I found steady improvement in jumps of 10->15->25. Will have to listen more over time to determine optimum. Initial impression is higher is better.

Walter

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 00:29:28
phofman
Audiophile

Posts: 236
Joined: August 7, 2011
Are you sure you hear any difference? IMO the modprobe command did not do anything. For two reasons:

1) If the module was already loaded (which was the case unless you loaded it via modprobe before hooking your USB DAC), it was not realoaded. The command throws no error though.


2) The valid values of nrpacks argument are 1 - 20. Anything above that will throw an error:

root@htpc:~# modprobe snd-usb-audio nrpacks=100
FATAL: Error inserting snd_usb_audio (/lib/modules/2.6.32-32-generic/updates/alsa/snd-usb-audio.ko): Invalid argument


I am afraid only blind tests will tell you if your config changes yield any sound changes.

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 06:20:42
Ryelands
Audiophile

Posts: 1867
Location: Scotland
Joined: January 9, 2009
Now I am looking for a community of interest for tuning the platform.

Tuning? Tuning? Understanding the basics would be a fine start for me though I am certainly intrigued and know of at least one other who is equally interested.

That said, I don't think USB or NAS is a "show stopper" for cMP2, even with (particularly with) extreme slimming and custom drivers; to me the chief stumbling block is repeatability or, more accurately, a severe lack of it despite stunning sonic results.

Hence the attraction of mpdpup. Whether it rivals or betters my Fit-cMP2-überslim or a tweaked SB remains to be seen but I suspect it might and feel it's well worth a try. Many thanks for your initative and updates.

BTW, though the link you provided on the cPlay thread didn't work for me, I think the one below points to the same place in case anyone else had the same difficulty.

Now to those irritating newbie questions. I've not digested the whole thread but, if I understand it right, mpdpup can be configured from the off over a LAN - there's no need to connect KVM to get going and Alix boards have no video in any case. Is that right?

Second, is NAS essential or can mdppup "see" Windows LAN shares?

And, finally, can one change the client software without chaging anything on the player?

Thanks . . .

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 06:32:26
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
phofman,
Nice tip.
I am running with
modprobe snd-usb-audio nrpacks=100
I found steady improvement in jumps of 10->15->25. Will have to listen more over time to determine optimum. Initial impression is higher is better.

Walter

 

Could you be more specific in your set-up for those of us ..., posted on June 16, 2012 at 07:16:31
Posts: 3040
Location: Atlanta
Joined: December 15, 2003
who have NO IDEA what all of this stuff is? What are the actual items one needs to buy/find?

I cannot figure out what to look for. WAY over my head but you have me interested.

At your leisure ...

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 07:28:43
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
Ryelands
Welcome to the party. I was hoping to catch your interest to know how this would compare on your Atom based rig.

Now, to your questions:
... mpdpup can be configured from the off over a LAN - there's no need to connect KVM to get going and Alix boards have no video in any case. Is that right?

mpdpup is a Linux distro that is designed to be run from a USB stick not from the HD. You can plug it in without disrupting anything on your PC. You basically download the iso and burn it to a usb stick using a tool like unetbootin-windows-575. It will format the stick and put all the stuff in the right place to be a "livecd". When you boot from it for the first time have your usb dac plugged in. mpdpup runs through some wizards to set up linux. it runs from the usb stick and never touches your hd. In fact after it loads the OS, it runs in memory. you can remove the usb stick and it will run until you power off the unit.
In my situation, because I run an ALIX board and it uses a CF card instead of a HD I simply take the CF and put it into a usb reader attached to a windows pc to run unetbootin to format it for mpdpup. Then if you think about it, I have a solid state hd that costs $15. MPDPUP takes 80mb out of the 4GB available. Everything about this platform is optimized to our purpose.

Second, is NAS essential or can mdppup "see" Windows LAN shares?

mpdpup expects music to be either on a usb stick or on a NAS. Once you get familiar with mpd (music player deamon) you can certainly access your windows share. I think your best bet to taste linux would be to put some of your evaluation tracks onto a stick and run from there. If you like it, you can invest in learning more about linux / mpd and alsa.


And, finally, can one change the client software without changing anything on the player?

Yes, this is a characteristic of mpd and not unique to the puppy setup. mpd is truely a distributed processing model. You can choose any one of dozens of clients running on anything from windows to linux to a web browser based client. The client can run on the same box as mpd. Better though is to run nothing but mpd on your Fit box and have the HD on another box and the client on a third. The client can run on your cell phone, a tablet or in my case an old laptop. Downside of the laptop is it wants to run a fan now and again. So you have this etremely rich client experience at your chair without affecting the sound. I wish my company had given me an Iphone instead of a blackberry. An iphone is an ideal client for mpd. I'll buy a cheap android tablet and throw gmpc on it.

So if you think about it, is this not a perfect platform? The mpd player is isolated from the HDD, the video etc. The OS is minimalist. You can tune the priority of every service running. You can set the buffer size of every step of the audio chain. You can configure the action of the USB port. The Alix is $90. The OS is free. USB2 and ASIO are built into the OS. (on windows I paid more for the driver than this entire rig). The SSHD is $15. The music lib can be on any consumer grade box. I bought a discounted WD Livebook. Yet you can chose from 20 clients on 5 different platforms. Heck you can change songs wirelessly from anywhere in the house by opening a browser on your cell phone and picking a new cd or track. Everything is completely silent. The only moving part is the HDD on the NAS. I keep it on the end of some ethernet cable out of the soundstage so if you do hear the HD spinning your brain blocks it out. In another room would be best if you have the option of running some Cat5.

Feel free to ask questions. I am no expert, but I have an overview understanding.

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 08:03:01
soundchekk
Audiophile

Posts: 2426
Joined: July 11, 2007
A SB Touch + EDO/my toolbox reflects pretty much that what you'll achieve when you're ready with your journey.

I've done serious modifications of MPD running on a stripped down rt-Linux in 2007/8 already. My MPD base setup never sounded perfect to me. MPD comes with certain limitations. (Once in a while I verify that view.)

MPD hasn't developed much since then.

Streaming audio data I consider pretty awful anyhow. The network suddenly becomes a part of the tweaking game. That'll drive you creasy.

I still prefer my SB setup over any other Linux setup though - but only because of iPad control via iPeng, the nice database management and an above average (acceptable) soundquality.

Soundwise I could take my setup from 2008 out of the pocket and use that one instead. I'd end up with slightly better sound.

CPLAY was never better then my own Linux based setup. No idea why Cics never got out of that XP dead end street.

Good luck on your journey.

Enjoy.



-----------------------------------------------------------------

blog latest >> The Audio Streaming Series - tuning kit pCP

 

RE: Could you be more specific in your set-up for those of us ..., posted on June 16, 2012 at 08:48:03
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
Hi Rick
I am happy to outline it. Fundamentally I am running:
OS - Linux (as minimalist version as possible to run mpd)
PC for player - ALIX 3d2 processor (buy direct from PC engines)
Player - Music Player Daemon or MPD
USB Dac - I'm using the WaveIO for USB2 async high res playback into my 1541a dac. This could also be your @julie on you cmp rig
Client - GMPC is the distributed client (see post below to ryelands)
Music library - network attached - WDLiveBook 1tb
Wired/wireless router - cheap Linksys. Anything will do

As a set of references, I got hooked by a reference to VoyageMPD. Have a quick scan of the VoyageMPD.
http://linux.voyage.hk/voyage-mpd

VoyageMPD is a Debian Linux configuration optimized for minimum size configured with MPD and optimized for the ALIX. I got a fast start by buying a preconfigured compact flash for $20 from the voyage store. You can plug it into an alix and you are off. Trying to learn enough linux to load up voyage yourself will kill you. Since then I disacovered puppy linux, and in that realm is mpdpup. Like VoyageMPD, it is optimized for low latency mpd based audio. It is great in that you can download it (free) and put it on a usb stick and it will run wizards that will get you set up with a really decent set up. From there as you learn how to configure MPD and ALSA (the Advanced Linux Sound subsystem)

To get a taste, you could actually download mpdpup and load it onto a usb stick. You could put some evaluation music onto a usb stick. you could put both sticks into the cmp machine and boot from there leaving your cmp rig in tact. you would have to plug an ethernet cable into a router so that you could configure a client to play direct the music playing. To do this you could download GMPC to a windows laptop that is connected (by cat5 or wirelessly) to the router.
When your cmp rig boots up, if I recall, you have a monitor and a keyboard on it. These can be used to follow the wizards to help mpdpup find your julie card and the usb with the music. At that stage you can actually play music without a client machine by issuing the command
mpc listall | mpc add
mpc play
it will simply play all the music it finds on the usb. To configure a proper client, you fire up GMPC on the client laptop by pointing it to the IP address of your player machine if the router is 192.168.1.1, your player will likely be set by the wizzard to an address of your chosing such as 192.168.1.2. You tell GMPC to connect to that address and voila. you'll see all the music on your usb stick. For people that use flac you get all the cover art, and tags etc. For most of us we run WAV. The tagging is non-existant and you just get a list of song names. Cues are not supported. I just organized my collection on the NAS using a hierarcy of folders for Jazz/Classical/Folk/Opera etc and by artist and cd below that. Works very well. Instead of cues, you can set up play lists. The client is at your chair and can be a nice tablet, so its pretty easy to control.

If you like the direction that this takes, and want to go the embedded processor route, then the ALIX is a very good choice for driving a USB DAC.

I hope this starts to paint a picture. Happy to add to this.
Walter

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 09:07:29
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
It is very hard to say. I'll have to arrange some kind of A/B test. I am getting very good sound. Between the new OS and the buffer/period settings its too soon to know if I have simply imagined it. I certainly had very noticable effects in windows by reducing polling frequency, so I may well be predisposed to imagine an improvement here. It would not be the first time.
Strangely I receive no error setting to 100. After issuing modprobe, I cycled MPD. Sounds like I should have power cycled the DAC??
Thanks for the tip. I found your observations on this topic at diyaudio informative:
http://www.diyaudio.com/forums/pc-based/93315-linux-audio-way-go-92.html
Do you have other references I should read?

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 09:52:27
Ryelands
Audiophile

Posts: 1867
Location: Scotland
Joined: January 9, 2009
When you boot from it for the first time have your usb dac plugged in. mpdpup runs through some wizards . . .

Thanks for a most helpful reply. I'd sort of got the gist of download-the-iso-and-format-the-USB-stick thing and it looks straightforward enough but I'm still confused on the above. How do you "run through wizards" on an unconfigured machine with no video?

I was planning not to touch my Fit-PC2/cMP2 setup but instead start pretty much from the off with an Alix board.

Having had an elderly motherboard go bad on me and needing to replace it, I assigned the Intel Atom mobo running my second cMP2 system to other duties (as they say) and need to replace it with something. Carpe diem and all that.

Cues are not supported . . . Instead of cues, you can set up play lists.

Ah. My system revolves round cuesheets, it lives and breathes cuesheets. I have cuesheets configured to play the music I want in all sorts of fancy ways. Over 7,000 of them. Take my soul but not my cuesheets.

Can they not be converted into "playlists"? I thought the latter were simply plain text pointer files; cuesheets certainly are.

Thanks again for your help.

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 10:02:32
phofman
Audiophile

Posts: 236
Joined: August 7, 2011
============
Strangely I receive no error setting to 100. After issuing modprobe, I cycled MPD. Sounds like I should have power cycled the DAC??
============
I eaplained that in my previous post. The modprobe command loads the usb-audio module (i.e. the usb-audio driver). However, when the module is already loaded, it quits without any output. The module gets loaded automatically by udev upon attaching the USB soundcard/at boot respectively. In your case the module was already loaded, that is why modprobe did not complain. Nothing really happened, you could not hear any sound difference.

Either rmmod the module which may be a bit more complicated if some software is already accessing the sound device (rmmod snd-usb-audio), or reboot with the dac disconnected (better than powered-down, it could still be detected, I do not have your gear to test).

Upon rebooting, run the modprobe command with the nrpacks param. You can always remote it with rmmod. Play with the different values to identify the upper limit of 20 (I raised the limit to 1000 in my diy experiment but that requires rebuilding the kernel).

After the module is loaded with modprobe, attach you USB DAC. This time udev will not load the module as it is already present, with the parameters you specified.

This way ABX testing is simple, e.g. using my simple script at http://blog.ivitera.com/pavel/linux-audio/tool-for-ab-testing - just redefine CMD1 and CMD2 to rmmod the module, modprobe with another nrpacks value and play some file.

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 17:08:19
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
Ryelands
Lack of cuesheet support may be the killer for you. I have not spent much time looking for a tool that reads cue sheets and create mpd playlists. I find it hard to believe someone has not done it. As you point out the playlist files are just very simple text files. If I see anything, I'll let you know.

Without video card or monitor it is surprisingly easy. On your client machine, you configure some software to use SSH to tunnel into Linux on the ALIX. In windows, download a little app called Putty. You tell putty the IP address of the Alix and up pops an xterm window which you use for command line. mpdpup wizzards pop up some Q&A that will configure everything for you. So basically Alix just boots up on power up and when itis fully booted (about 1min) it will accept your logon from Putty. If you client is running linux, in an xterm from command line you simply use SSH. ssh root@192.168.1.2 ... a moment later mpdpup askes for the password "woofwoof", and you are in.



 

RE: Buffer, posted on June 16, 2012 at 18:17:38
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
With the help of Douwe we have made some progress by tuning period_time and buffer_time. The following is giving very nice results. I repost here for the record. The original thread is on the mpdpup discussion forum.

audio_buffer_size "51200"
buffer_before_play "100%"

Douwe is using 90m audio_buffer with 10% before play. I prefer to fully process it prior to audio play.

And...

audio_output {
type "alsa"
name "WaveIO"
period_time "8192"
fragment_size "4096"
device "hw:1,0"
buffer_time "131072"
mixer_type "none"
mixer_device "disabled"
auto_resample "no"
auto_format "no"
}

CPU time with these settings while playing 44.1 is a fraction of 1%. Still, the ALIX does not have the HP to resample using SRC.

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 19:56:31
ted_b
Audiophile

Posts: 803
Joined: January 14, 2001
Before moving on to an Auraliti PK90USB (MPD box with SoTM USB card) I ran an Alix box and found it to significantly gain sonic weight and heft by powering it with a good external linear power supply (Hynes SR3-12).

Now my Auraliti PK90USB is being powered by the same Hynes PS and I'm getting ready to improve it even more by using the much heftier Hynes SR7-18V5 (Paul Hynes custom build for my Mac Mini external ps that I will dial down to 12V). My MPD distro is currently supporting both 24/192 as well as DSD64 (via DoP version 1.0). I have 3 DACs inhouse that are DSD-capable (I own the Meitner and the Mytek and now am eval'ing a demo Sonore/eXD DAC).

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 16, 2012 at 21:54:17
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
Ted
Thanks for that tip. Sounds like a pretty serious PS. Reminds me that its time for me to finish what I started with my PS.

I did build a very heavy duty linear PS, but its partially shared with the WaveIO. I built CLCLC supply for the WaveIO. Its fed from a 8A 12V toroid so no shortage of power. I pick up power for the ALIX after the first Choke. I should experiment with a fully dedicated supply. Also might look into some on board adjustments. I use BG F bypassed with silver mica in the supply. Might try replacing the on board caps with oscons and pop a BG right across the input pins. Not very scientific but often produces some pretty good results. Definitely produced an improvement going from wall wort to this supply and absolutely took a jump in the right direction when I swapped in BGs.

 

RE: Tuning Linux/MPD/Alsa for best sound on ALIX processor, posted on June 17, 2012 at 03:05:41
Ryelands
Audiophile

Posts: 1867
Location: Scotland
Joined: January 9, 2009
Lack of cuesheet support may be the killer for you.

Well, let's see . . could you possibly PM me a couple of sample playlists known to work with mpdpup?

On a quick look, there seems to be a plethora of playlist formats - it might simply be a case of bulk editing of cuesheets.


 

RE: Tuning ALIX processor Power Supply, posted on June 17, 2012 at 09:47:47
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
Your post inspired me to make a very simple mod to the ALIX board. I had some Black Gate PK 50v .22u caps in my supply. I added 3 to my ALIX board. One soldered right across the power input terminal. Then one each added as a bypass to the 2 large electrolitic caps at C1 & C?. We are in the relm of tiny improvements here but I'd wager there is a little bit of cleanup in the noise floor and the cymbals.
Can I A/B the sound? No. Have I tested on a scope, no. So this falls in the relm of leap of faith. As some inmates point out, everything counts and at some level it all adds up.

I had earlier popped in a BlackGate F 50V 100u cap across the power source. It is at the exit to my power supply so only a length of 3 feet of power cord stand between it and the ALIX board. This had a distinct impact that other caps can't touch. So I expect my supply prior to this on board adjustment was pretty good. As you can tell, I am a great fan of BGs in power supplies. There must be 25 of them in the current audio chain and another dozen in my Rotel CDP.

 

Update - Tuning ALIX processor Power Supply, posted on June 18, 2012 at 17:41:57
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
For the record, I took the next step on the ALIX PS. I removed the stock electrolytics (35v 220u) and replaced them with Nichocon LF Organic Polymers 16V 270u. These are again bypassed with BlackGate PK 50v .22u. Even with fresh caps, its clear the sound benefits. Can't predict why, but there is just a lot of punch. Bass is deeper and cleaner. Well worth 5mins with the soldering iron. Still have a BG F 100u 50v across the power input pins.

 

USB cable , posted on June 18, 2012 at 18:38:51
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
Again for the record, part of the sound I am getting is based on the USB cable. The cable makes a differnce. I use DIY cable. Keep it short. Mine is under a foot. I took a good quality USB2 cable with gold plated connectors and chopped off the connectors. I replaced the cable with twisted pair from catv cable. one pair for data. the other pair for ground and 5v. I tried shielded but ultimately prefer no shield. As I power the usb card with a linear supply, I cut the +5v wire to further isolate the components.

 

Thanks ...., posted on June 23, 2012 at 09:48:03
Posts: 3040
Location: Atlanta
Joined: December 15, 2003
though I think I need to actually attempt this to truly understand.

I remain intrigued and will start working my way towards doing some experimentation.

THANKS again for your time and tinkering (nothing more important to this hobby than the tinkerer!).

 

nrpacks=20 turns out to be the best, posted on June 23, 2012 at 21:10:06
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
With a little help from the mpdpup site we settled on nrpacks=20 as the ideal setting. This can be changed quite easily using modprobe -r to unload the driver. From the command line, the following sequence gets you there.

killall mpd
modprobe -r snd-usb-audio
modprobe snd-usb-audio nrpacks=20
mpd

Sound difference between default, 1 and 20 is fairly pronounced. Thanks phofman for surfacing this parameter.

 

RE: nrpacks=20 turns out to be the best, posted on June 26, 2012 at 01:10:25
phofman
Audiophile

Posts: 236
Joined: August 7, 2011
Well, to be honest, taking into account the previously reported sound change when apparently no modification to nrpacks was done, I am sceptical to the outcome unless it is confirmed by a blind test.

 

RE: nrpacks=20 turns out to be the best, posted on June 26, 2012 at 05:57:17
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
phofman

I appreciate your doubt, but we have come a long way since my earlier misstep. The sound is quite dramatic on my system between 1 and 20. If you were to boot at 1 you would be wondering what went wrong. It is easy to flip back and forth to compare the sound, so anyone can try it. Like everything your results may vary depending on overall system. Lots of people have different preferences. Several people using the Alix with fairly decent systems report delight with this setting. Others may not. Some like tubes and some solid state.
To get a report of what is running:
Code:
cat /sys/module/snd_usb_audio/parameters/nrpacks

Works perfectly. It returns the value of nrpacks.
20
To set it as your default add:
options snd-usb-audio nrpacks=20
to the end of the file alsa-base.conf.

Again, thank you for introducing me to this.

 

RE: nrpacks=20 turns out to be the best, posted on June 29, 2012 at 03:19:47
phofman
Audiophile

Posts: 236
Joined: August 7, 2011
My reason for justified doubts are the many contradictory claims on this subject - e.g. http://www.diyaudio.com/forums/pc-based/93315-linux-audio-way-go-23.html#post1719334 . None has been accompanied by any credible support and most likely never will, even though a credible listening test is trivial in this case.

 

RE: nrpacks=20 turns out to be the best, posted on June 29, 2012 at 06:27:42
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
No issue taken.

It is posted here to share with those that wish to experience first hand. Takes 1 minute. Some will find it useful, others will take exception. The post is directed at those who find it useful and derive more pleasure from their system in return for typing the command.

 

RE: Buffer update, posted on November 9, 2013 at 10:08:10
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
Over time my taste has evolved, and my system has evolved to a much more resolved state. Now I strongly prefer

audio_buffer_size "376"
buffer_before_play "10%"

another change is now essential. I ssh into mpdpup and enter the following

ulimit -l unlimited
ulimit -i unlimited
ulimit -u unlimited
ulimit -s 16384

This greatly improves the coherence and clarity from top to bottom. Trouble is, the settings only last as long as the ssh client is open. So I keep a small tablet powered up with xterm open to act as a console for mpdpup and ensure these settings are in force before any serious listening.

Recently went to high end audio show. Did not hear anything at any $$ that I'd trade for my system. I think the mpdpup could be improved but it is already kicking some serious butt.

 

RE: Buffer update, posted on November 26, 2013 at 11:34:10
lgroli
Audiophile

Posts: 7
Joined: September 27, 2010
That sounds very interesting. What are your settings for nrpacks and the nice level of mpd?

Is this small buffer setting better for all sorts of sampling rates? My worries would be that with highres music it will not be enough.

I also saw that you changed caps on your alix. As I have a spare one I might give that a try. Where is the best place to start in your opinion? Change them all as you did? Does using a good power supply still make this necessary/audible?

Thanks.

 

RE: Buffer update, posted on November 26, 2013 at 18:09:12
wlowes
Audiophile

Posts: 112
Location: Toronto
Joined: April 18, 2009
I prefer nrpacks = 20. I can't remember nice value for mpd. I'll check later and post.

It has been a long time since I did the cap upgrade on the ALIX. I recall feeling it worth while, although on a relative scale, I think the ALIX PS is not the biggest factor in SQ. I do recall the addition of caps being a nice upgrade. A home made usb is also important. Short and solid wire.

There is a pair of cheap electrolytic caps right at the power input. It is a quick easy change.

 

RE: Buffer update, posted on November 27, 2013 at 04:41:11
lgroli
Audiophile

Posts: 7
Joined: September 27, 2010
Thanks for your feedback, wlowes.

I switched from an alix 3 board to an alix 1 with an SOTM Pci card, both alix running with mpdpup. The sound of the alix 1 system with the card and two linear power supplies is better than the alix 3 board, I think even the alix 1 board alone is a bit better, but the big step up for me was the SOTM card. But as I have the alix 3, I will use it in a second system. And it is always fun to improve things and learn.

I also tried ulimit command as you suggested and I think I could hear a difference at the time, but I do not like the fact that I have to do it again and again manually.

As I live in Switzerland I talked to the owner of pcengines (seller of alix) once. He told me (if I remember correctly) that some people have even tried to change the clocks on the board to improve sound. Anyone has any experience in this?

What happens when the buffer is so smallas you suggest, wlowes, and you are not using these ulimit commands?

I also agree with your assessment: I have not heard a better computer source for audio yet than my alix 1 with SOTM and two linear power supplies. Independent of price. But I have by far not heard all there are ...;-)

 

RE: Buffer update, posted on November 28, 2013 at 14:33:26
Linefader
Audiophile

Posts: 7
Joined: November 28, 2013
I just completed the required setup to get DSD playback to work on my system.
I am using an old laptop (no ALIX, an HP Pentium M) running Fedora 19 and a Mytek Stereo 192 DSD DAC.
I also have other computers but I'ld prefer to use that old Fedora laptop as my music server since I don't need it for any other purpose (thus, it can reside at the stereo system all the time).

Principally everything works fine with that setup: I am using MPD (version 0.18.4) on the server and several clients (Theremin on the Mac, MPoD on the iPhone etc.) to control the music. However, when I play high-resolution files (Flac > 96 kHz or DSD) after about 1 minute there are glitches and
dropouts.

I already googled a lot on USB-dropouts and made the following plan, of what I'll try to do next weekend:

1) disconnect all other devices that are connected via USB to my laptop, such that only the Mytek uses the USB
2) plug a 2000mA-powered USB hub in between the laptop and the Mytek
3) increase the process priority of the music player (e.g. via "nice -n 10 mpd" on the command line) to keep it save from being interrupted by screen savers and the like
4) play with the buffering options (e.g. by putting period_size=50000 into mpd.conf - maybe someone has some more ideas here? What are good values for the audio_buffer_size and the buffer_before_play parameter?)
5) run some diognosys tools (http://wiki.winehq.org/MeasuringAudioLatency ) to check if there are DPC Spikes (if I find them: shouldn't the above two solutions solve this issue?)
6) run 'dmesg | less' to check whether there are enlightening log messages during the dropouts
7) upgrade the RAM of the laptop by plugging in new DDRs (the laptop has only 512 MB, but any DSF/DFF/FLAC file I tried should fit completely in there)

Do you have more ideas, what I could try?

 

RE: Buffer update, posted on November 29, 2013 at 01:22:20
lgroli
Audiophile

Posts: 7
Joined: September 27, 2010
Linefader,
the one thing I see immediately is that your nice command seems wrong. Highest priority in nice is -20. I have mpd at -19. You put it at 10 which is very low priority.
Try to use mpd with the standard settings first, do you have dropouts then? Only then move on to change buffers and the likes.
I am not a mytek user but I understand they have some special drivers for linux. Did you install those? Maybe I am wrong on this but google is your friend.
Just my 2 cents.

 

RE: Buffer update, posted on November 29, 2013 at 13:40:11
Linefader
Audiophile

Posts: 7
Joined: November 28, 2013
Hi Igorli, you are right, the Mytek requires special USB drivers (available here: http://github.com/lintweaker/mytekusb2 ) - but I already installed them (before, the Mytek did not work at all). And you are also right about 'nice': I high 'nice' value leads to a low priority, thus, I needed to 'renice -20 -p mpdpid' but unfortunately this did not solve the problem. I can see the new priority (in 'top') but the dropouts are still there …

What I do not understand is that the audio_buffer_size parameter (in mpd.conf) seems to have no effect: I set buffer_before_play to "100%' and tried 409600 (400 MB, my average DSF/DFF file size), half this value, the double size etc. for audio_buffer_size but my MPD (in 'top') always looks like this:
2357 user 0 -20 89888 13244 2772 S 1.7 2.8 0:03.07 mpd

only 2.7% memory usage on my laptop with 500 MB RAM.
Can anybody explain this?
What do I need to change to reserve as many memory as possible?

 

RE: Buffer update, posted on November 29, 2013 at 14:10:14
lgroli
Audiophile

Posts: 7
Joined: September 27, 2010
For me personally, buffer before play of 100% did not work well. Somehow I always thought it is a bit of funny setting anyway as mpd only plays when the buffer is completely full and after you play the first byte it has to fill again to be at 100%. I use 8 Mbyte (8192) of buffer and buffer before play is at 10%. It works fine for all resolutions of PCM and also DSD files. As you can see in this thread some people use very small buffers and seem to be fine with it.
Maybe you may also want to try different values of nrpacks as outlined above. I use 20 and it appears fine.
I also used to use a powerline adapter (and WLAN) for the Ethernet connection to the Alix and that did not work well. Always dropouts. Use a wire connection, also shielded cable will make an audible difference to the better.
Hope this is helpful, let us know how you are doing.

 

RE: Buffer update, posted on November 29, 2013 at 14:47:50
lgroli
Audiophile

Posts: 7
Joined: September 27, 2010
And one more thing I just see. I think if you have only 500 MB of RAM to use 400 MB for the buffer is a bit sporty ... I would significantly lower the amount of buffer used. Or get more RAM. But I am really not sure such a large buffer makes sense.

 

RE: Buffer update, posted on November 30, 2013 at 05:41:20
Linefader
Audiophile

Posts: 7
Joined: November 28, 2013
I still did not solve this issue. But maybe, I am one step further:
I noticed that I put the audio_buffer_size and buffer_before_play option in the wrong place (inside the mpd.conf audio_output-element). Since I moved them to the top level of mpd.conf, they take effect: I set the audio_buffer_size to 131028 and the buffer_before_play to 100%
And now I can see (in 'top') that mpd consumes almost 30% (29.5) of the available RAM
However, this did not solve the dropout problem.
Higher values for the audio_buffer_size were rejected.
Moreover, I noticed that the dropouts even occur with MP3-files, not only with DSD and FLAC (but with high-resolution sources, they are much more frequent).


So, I still do not know ..
.. why I cannot use all the available RAM
.. what I can do with the MPD-parameters buffer_time, period_time and max_output_buffer_size (I tried to play with them, but that did not lead to any noticeable change)


p.s. I also tried to disconnect from the WLAN, to play the music from a different hard disc, to change the nrpacks using modprobe .. but that all did not help. If nobody has a better idea, I guess, I'll have to replace that laptop :-(

 

RE: Buffer update, posted on November 30, 2013 at 09:11:09
Linefader
Audiophile

Posts: 7
Joined: November 28, 2013
I also tried to find out, if the dropouts could be IRQ-related.
when I look in my /proc/interrupts I can find the following:

10: 5185354 XT-PIC-XT-PIC ehci_hcd:usb1, ohci_hcd:usb2, ohci_hcd:usb3, radeon, enp0s19

To me this looks like, if the DAC is sharing an interrupt with other devices (the graphics card etc.) Should I change this? How can I do this?

 

RE: Buffer update, posted on December 1, 2013 at 02:00:17
lgroli
Audiophile

Posts: 7
Joined: September 27, 2010
I saw that Fedora recommends 1GByte of Ram on their webpage. You have only 512 MByte and in addition you want to use 400Mbyte for music. Does not surprise me that it does not work. Either put in more RAM in or use another distribution of linux. MPDPUP should run fine on your amount of RAM for example. Also Voyage MPD or Tiny Core.
My experience is that these smaller footprint linux distros sound better anyway in many cases.





 

RE: Buffer update, posted on December 6, 2013 at 13:02:45
Linefader
Audiophile

Posts: 7
Joined: November 28, 2013
ok, I did a backup of all my important data, formatted the hard disc and installed Voyage Linux (v0.9.1).
But now, I am fighting with other (even more serious) setup problems: I cannot get the WiFi to work.
According to http://linux.voyage.hk/content/getting-started-v09x
I wrote the following into my /etc/network/interfaces

auto wlan0
iface wlan0 inet static
address 10.1.10.1
netmask 255.255.255.0
broadcast 10.1.10.255
hostapd /etc/hostapd/hostapd.wlan0.conf
up nat.sh wlan0 eth0 "10.1.10.0/24"

but even after a reboot, the network is still unreachable. Can you help me out again?

 

RE: Buffer update, posted on December 7, 2013 at 02:13:10
lgroli
Audiophile

Posts: 7
Joined: September 27, 2010
Sorry, I am not that familiar with all the details of voyage.

I used voyagempd as well but found that mpdpup was much easier to setup and worked within a couple of minutes. It is quite easy to install.

Maybe you want to try that and see whether you have the same problems.

 

RE: Buffer update, posted on December 7, 2013 at 08:09:59
Linefader
Audiophile

Posts: 7
Joined: November 28, 2013
with mpdpup (and others like sqeezelite, ap-linux etc.), I am afraid that I will not find a driver for my Mytek.
For Voyage, I can use the one from
http://linux.voyage.hk/content/voyage-mpd-091-released

Thus, I (temporarily) fixed the WiFi problem with an ethernet cable.

However, I am still having setup problems:

When I switch on the DAC dmesg says
[ 92.706059] usb 2-1: new high-speed USB device number 5 using ehci-pci
[ 92.828360] usb 2-1: New USB device found, idVendor=25ce, idProduct=000e
[ 92.834277] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 92.840197] usb 2-1: Product: STEREO192-DSD DAC
[ 92.846068] usb 2-1: Manufacturer: Mytek Digital

which looks good to me, but the Mytek display still shows "no LoCh" (in Fedora, the connection was immediately there) and when I enter "aplay -l" I cannot see the DAC.

And I cannot even play a test song:
There is no user mpd in my voyagempd and when I copy music to /var/lib/mpd/music
I cannot see the files in my MPD clients. The configuration file for mpd in voyage is /etc/mpd.conf, isn't it?

 

RE: Buffer update, posted on December 18, 2013 at 07:08:43
Linefader
Audiophile

Posts: 7
Joined: November 28, 2013
I still did not successfully connect the Mytek to my Voyage Laptop.

I found the following message in my dmesg-log

[ 1245.803333] mytek: invalid fimware version in device: 03 01 22 0a.
please reconnect to power. if this failure still happens, check your
firmware installation.

Since I installed the latest Mytek firmware (1.7.5, which was working with Fedora) I guess, Voyage might be happier with an older version of the firmware.

Can anybody who uses the Mytek with VoyageMPD post the version of the firmware he/she uses?

 

Page processed in 0.055 seconds.