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

For talk and support relating specifically to Puppy derivatives
Message
Author
PET-240
Posts: 74
Joined: Tue 22 May 2012, 17:38

#166 Post by PET-240 »

Hey Idolse,

Totally my bad completely forgot that!

Shall do that later and attempt to PDF it for you!

The hard part is knowing when it's done!

D'oh!

Reload..........:-(

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

#167 Post by PET-240 »

hey Idolse,

Good break this time, put the boy to bed and washing up and fed dog and finished washing up and put wife to bed and taadaaah, Loaded!

ok.....


VESA BIOS Extensions not detected.
VESA BIOS Extensions not detected.
# dmidecode -t 1,2,3,4,5
# dmidecode 2.9
# No SMBIOS nor DMI entry point found, sorry.
#

and that was all it wrote.

Believe these have a tinyBios, perhaps just a final screen in the wizard regardless of board type, wait minimum of 10 mins and if you cant login yet.......just wait longer!

Not sure if the reference to Ace Ventura is going to be missed or not....

Currently the mute edit is sticking, I will add in the extra bit you sent, shall unmute first. Then will know if it is actually unmuting on boot.

Thanks Idolse,
Last edited by PET-240 on Mon 11 Jun 2012, 13:44, edited 1 time in total.

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

#168 Post by PET-240 »

Ok, seems alright, the code you sent I couldn't paste so I had to copy by typing, however it was still muted on reboot, so to be sure, I did power off, waited 10, then unplugged, rebooted and waited 10, logged in and still muted.
So unmuted and resaved as per the alsactl command.

The coverart isn't working for me, see if the pics load, you may see something I'm missing......
http://db.tt/pfGlCQuE
http://db.tt/9jUwJ10F
http://db.tt/tojXVJHZ

Sorry for the links, couldn't figure another way with iPad......

If I can copy and paste the code you sent, how I wrote it, or whether I need to save to notepad or something first?

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

#169 Post by PET-240 »

Figured I could just type the first line again.

Code: Select all

#!/bin/sh

unmute_audio(){
   CARDS=`aplay -l | grep card | cut -f 1 -d ':' | uniq | cut -f 2 -d ' '`
   for card in $CARDS
   do
      CONTROLS=`amixer -c $card scontrols | cut -f 2 -d "'"`
      for control in $CONTROLS
      do
         amixer -c $card sset $control unmute >/dev/null 2>/dev/null
         amixer -c $card sset $control 100% >dev/null 2>/dev/null
      done
   done

}

unmute_audio
How'd I do?

Thanks for all the support Idolse!

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

#170 Post by ldolse »

Not checking your work, sorry - the way you copy and paste into Putty is to right click on the main part of the Putty window - not intuitive, but quite easy once you get used to it.

Make sure there isn't any blank line at the top.

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

#171 Post by PET-240 »

So the header that has the ip/tunes.local bit?

Strange question, have found some info on the LED's may I ask which kernel you are using please?

Thanks Idolse!

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

#172 Post by PET-240 »

nevermind, figured it by accident!

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

#173 Post by PET-240 »

Hopefully tomorrow then, my beauty sleep is calling......

Thanks for all the assist Idolse, been fantastic support, realise I am a little difficult not knowing much, but the upside is if I can break it......I probably will.

Will be getting this out and about here once I've got it up and going reliable, and thats no reflection on you or mpdpup, just me, new at this coding, will get it eventually!

Patience is a virtue.........pity it takes so long.

Thanks Again!

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

#174 Post by ldolse »

Check your PMs tomorrow - best to take this offline.

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

Boot speed on Alix

#175 Post by wlowes »

Idolse
I just timed a boot up. From power on to a successful GMPC connection was 65 seconds on my ALIX. Coming from a Windows world that seems lightning fast!.. I have to expect it also depends on speed of CF. Mine is nothing special a x133 Kingston CF.
Walter

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

#176 Post by PET-240 »

Will time one too when MPod connects, I have a Patriot 266 card.

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

Alix and Alsa settings

#177 Post by Douwe01nl »

Hi Idolse, Walter and others,
Idolse wow you did a fantastic job, mpdPup is great!! For me Linux is new, but mpdpup works like a charm! So here is some, very positive, feedback.

Like Walter, i'm coming from CMP2, a dedicated and stripped to the bone (hardware and OS wise) Windows XP based musicplayer, Atom-based in my case. Which gives very good SQ. I learned about the big impact of changes in hardware and OS on SQ. Because XP is getting old, i figured to try and learn linux which is the future for diy music playback.

So this is my setup.
NAS -> Alix 3D3 -> WaveIO -> spdif coax cable (I2S in future) -> modded Benchmark DAC1 -> Hypex-based class D amp -> PMC OB1

Alix 3D3 has battery PSU (12v SLA). This version has monitor (which is only used when changing bios settings) and Award-Bios. In bios CPU-speed is set to 400 MHz (much better SQ than @500MHz), sound and IDE (yes!) are disabled, so no CF (which gives better SQ).
Mpdpup is started from USB stick, which i remove after start up (again a step up in SQ).
The WaveIO has its own 12v SLA battery and lowdrop regulator (to 5v).

WaveIO mute at startup is solved perfectly by Idolses advice to store it somewhere in the startup-sequence.

At first sound was a bit flat and i almost decided to go back to CMP2, despite of the great comfort of pmdPup, when i read Waters suggestions for Alsa-settings (audio out). This fired up SQ, and i experimented a bit. These are my favorite settings:
period_time "8192"
buffer_time "131072"

Before the Audio out lines i put:
- audio_buffer_size "90000" (i thought mdpup takes 128MB of the RAM, so to be safe i chose 90MB for putting files in RAM)
- buffer_before_play "10%" (when choosing 100% it takes ages to load the file into RAM.

The rest is the same as Walter found out (except for fragment_size which i think is not an ALSA parameter, see the article mentioned below).
I found this articles on period/buffer/fragment times etc.
http://0pointer.de/blog/projects/pulse-glitch-free.html
http://linux.die.net/man/5/mpd.conf

Conclusion for me was i had to find the optimum within:
- period_time as large as possible
- buffer_time as small as possible
- period_time * 16 = buffer_time (i learned from walters article)

So i experimented with the following settings, and chose semi-binary time-periods (2x2x2x2xetc). a bit foolish of course because period are about microseconds and not bits. Whatever, just doing the best i can. These are the settings i tried:
period_time / buffer_time
65536 / 1048576
32768 / 524288
8192 / 131072
4096 / 65536

For me 8192 / 131072 gave best sound and deepest and broadest sound stage.

Again: thanks a lot Idolse, this is great, and a best first step into Linux!!

About upsampling: with Alix this is impossible. I will try mpdpup on my Atom-board (but cannot connect it to LAN, maybe drivers, will try again later).
My Benchmark DAC1 does internal up sampling to 172.400. Optimum in my setup, SQ-wise, is to feed the DAC with 88.200 signal.
My solution is to use a desktop PC and SoX batch converter to convert the files from 16 bits / 44.100 to 32 bits / 88.200 and put the files in a special folder on the NAS (32 bits sound better than 24 bits, i think maybe because 32 bits is native for pc). In this way i can play 32/88.200 files on the Alix.

I hope this adds to the development of mpdpup. CMP2 learned me how important it is to have a small and light OS. So as far as i am concerned, i would not prefer more features or functionality. Less is more...

Best regards,
Douwe

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

#178 Post by ldolse »

Hi Douwe,

Awesome feedback, thanks! You've definitely taken the tweaking up a notch. I never thought about disabling IDE and yanking the USB stick after bootup when I was choosing/configuring Puppy Linux this way, but that's a very cool way to go.

Regarding memory, mpdPup would only take a few megabytes more than the ISO size - so it's probably more like 70MB with the current release.

In terms of futures, while I plan on adding functionality, I don't envision any more services being enabled by default other than what's enabled in the current release. Additional functionality which requires some sort of daemon will almost always be added as an opt-in. So basically the only impact would be a slight increase in the iso size - then next release will go up by ~10MB, but basic default processes will remain identical. Even though that release will go up I'm not done with size optimizations - I fully expect future releases to go down again as I re-review the included packages and go through more rounds of optimization.

I have been thinking about an option for hardcore tuners like yourself where you can install mpdPup on two systems - one system running nothing but MPD itself, and the other running all the remote control clients/daemons. This can be done manually today of course, but curious if there would be much demand for automating it.

I'm seeing similar results with Walter's settings, and will test your suggestions. When I first started working on this project I had moved overseas and my stereo didn't come with me - I'd been more focused on the overall OS and hadn't spent too much time on the audio tuning. it's only recently I've put together a new stereo and been able to evaluate more subtle changes. - I see now that there is a lot that can be improved here.

I definitely plan on adding the ability to tweak these buffer/sound settings through the wizards - I'm on the fence regarding whether they should be enabled by default, as I'm not sure the same settings can be used universally across all sound devices. I've been thinking it would be nice to somehow crowd-source the best settings - in the future I want to add an ABX testing script from here, that's just a basic framework, it will need a lot more expansion for user friendliness. It would be very cool if people could tweak settings, test via ABX, and then upload the results somewhere - a common set of winning settings could theoretically be determined. I'll need to think on that but guessing it's not something I'll be able to accomplish any time soon.

I haven't read any glowing reviews of upsampling with libsamplerate, but if you try it out let me know how it goes - although it's included I haven't played with it. Ecasound & Brutefir are other things I've considered adding - mpd can pipe to these applications to leverage a different playback engine. No guarantees though, a lot of that will depend on how easily they can be added to the wizards and whether they'll support sample rate switching.

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

Buffer tuning

#179 Post by wlowes »

Douwe
Awesome input. I was hoping to spawn a little community of interest around MPD on embedded processors as we had in CMP. The sound quality opportunities are unbelieveable, and the linux platform is designed to facilitate this level of control. In XP we were hacking and up against the limitations of the architecture os the core OS.

You have moved the bar forward. I am excited to get home and apply your buffer settings.

Also intrigued about the Bios settings. I do not have video support as I went even more minimalist with the 3D2 Alix. I'll have to figure out how to set up a console so I can get into the bios. ??? I have a null cable (db9 connector) cable, just not sure what I attach it to?!?!?

Idolse, I am also glad to hear that I am not imagining the SQ pop that comes with these settings. I think it is a tribute to your low latency platform that we can take SQ up a notch. I could imagine that over time a wizzard that has 2 options, basic to be followed by 90% of the crowd, and an advanced branch that allows toggling of the buffer settings could strike the ideal balance of ease and flexibility. On the other hand, the advanced user can just edit the conf files. I have chosen to keep a copy of these on my NAS. This way if I need to involke the wizzard for any reason to get me back to a base mpdpup I can just pop mpd.conf back in from the NAS to get back to full tweak.

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

Re: Buffer tuning

#180 Post by ldolse »

wlowes wrote:Also intrigued about the Bios settings. I do not have video support as I went even more minimalist with the 3D2 Alix. I'll have to figure out how to set up a console so I can get into the bios. ??? I have a null cable (db9 connector) cable, just not sure what I attach it to?!?!?
I'm guessing you mean you're not sure where to attach it to on your PC - modern PCs don't come with Serial/DB9 connectors, you need to purchase a USB-to-Serial adapter if you want to mess with the console.

wlowes wrote:ldolse, I am also glad to hear that I am not imagining the SQ pop that comes with these settings. I think it is a tribute to your low latency platform that we can take SQ up a notch. I could imagine that over time a wizzard that has 2 options, basic to be followed by 90% of the crowd, and an advanced branch that allows toggling of the buffer settings could strike the ideal balance of ease and flexibility. On the other hand, the advanced user can just edit the conf files. I have chosen to keep a copy of these on my NAS. This way if I need to involke the wizzard for any reason to get me back to a base mpdpup I can just pop mpd.conf back in from the NAS to get back to full tweak.
I haven't A/B'd this enough to determine whether it's psycho-acoustics, and another problem is that I just swapped my speaker stands for a 3" shorter pair and that by itself is making a huge difference, but I do think I hear something - I may integrate a basic version of the ABX script just to verify I'm not crazy. Anyway my thoughts are running pretty similarly around an advanced vs. basic Wizard. Part my reasoning to implement it is actually selfishness - even though I'm technical enough to change things on my own I've come to appreciate the laziness the wizards give me - I don't like making changes I know the wizards will blow away.

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.

Post Reply