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

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

Equalizer

#16 Post by ldolse »

Looks like it's possible to implement an equalizer through a LADSPA plugin. I'll look into getting something along these lines working as an optional function for the next version.

Some links for further reading and so I don't need to bookmark them:

http://www.thedigitalmachine.net/alsaequal.html
http://quitte.de/dsp/caps.html
http://wiki.linuxmce.org/index.php/Equalizer_for_ALSA
http://pastebin.com/g9jtTGxM
http://mpd.wikia.com/wiki/Music_Player_ ... _Equalizer
http://mpd.wikia.com/wiki/Talk:Music_Pl ... _Equalizer
http://plugin.org.uk/faq.php

plan9
Posts: 6
Joined: Sat 27 Aug 2011, 21:14

#17 Post by plan9 »

I am very appreciative of the research as well as your looking into adding equalizer functionality in a future release. While I value audio purity, some files really benefit from judicious EQ. Making it optional should harm no one.

If implemented this would improve an already impressive app.Thanks.

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

New version 0.9.1

#18 Post by ldolse »

I've just posted the newest version of mpdPup, 0.9.1:
  • Changes
    • New setup wizard (runs from GUI or CLI)
    • latest mpd 0.16.4 (plus patch fixing longstanding wav/aiff issue)
    • Supports headless install -- no monitor/keyboard/mouse required, SSH built in. This enables support for embedded systems like Soekris/Alix (only Soekris tested)
    • LastFM support (and scrobbling with mpdscribble)
    • CLI Clients: mpc, ncmpc, ncmpcpp, Practical Music Search (pms)
    • Various MPD Utilities: MPDToys
    • ALSA/LADSPA Equalizer as an optional output
    • Eliminated the majority of desktop apps and reduced the iso by 10MB
First post is updated to reflect the changes, so more can be read there.
Note while the basic setup has been tested extensively, I haven't tested every single add on like LastFM, mpdscribble, mpdtoys, etc. Let me know if you see problems there.

icswainx
Posts: 1
Joined: Mon 29 Aug 2011, 19:17

Shutting down remotely and other errors

#19 Post by icswainx »

Hi,

Firstly, thanks idolse for such an awesome tool - have been looking for something like this for a while.
I've installed mpdPup on a small HP thin client, and it sounds great. The system has a meagre 256MB RAM and a 256MB CF disk. I use it completely headless, over ssh.
I'm having some problems shutting down the system - both shutdown and wmpoweroff seem to require X to be running, and fail if it is not. I can do a save2flash to write the state and then manually push the power off button, but it seems a bit hacky. Am I missing something?
Secondly - and this may not be related to mpdPup (it may be an issue with mpd in general) - mpd is being killed by the kernel due to "out of memory" when creating the initial database via 'mpc update' on my large music collection. It appears to cache the database in memory before writing it to disk. Working on a subset of my music collection works fine - it seems to be a problem with the size of the collection.

Any help would be very much appreciated.

Thanks for your time and greetings from sunny New Zealand!

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

#20 Post by ldolse »

Hi icswainx,

Thanks for the feedback, glad it's working for you more or less. Regarding the shutdown issues, that seems a bit odd that the shutdown command isn't working. wmpoweroff makes sense, as I believe this is designed to run from X only (wm - window manager) - I can try to make that smarter and have it shut down differently if runnning without X. The shutdown command should be working, but I'll have to admit I may not have tested it, I'll dig into it. I actually do the hacky thing you mention more often than not, or I use the reboot command because I'm testing some change.

Right now the shutdown scripts manually confirm whether you want to save the running state to flash - perhaps you're closing your ssh session before getting a chance to answer that question?

The second issue is probably more of an MPD issue in general. That said how big is your music collection? I have 1 terabyte of music, albeit mostly uncompressed. This creates a 5 MB mpd database when finished, so even 256 megs of RAM shouldn't be a problem. However perhaps there is some sort of memory leak during the building of the database itself. I haven't tried creating the DB from scratch on my geode system - that only has 128 megs of RAM, I'll see if I can reproduce the behavior there.

The other issue as you've noted is it won't flush the in memory database to disk until the database is update is completed, which can take many hours for an empty database. I think I'll ask the MPD team about this point, I think it would be a very good thing to implement.

What you could do is create your database on another piece of equipment with more memory that can also run mpdPup - once the database is created you can use it on the HP, and future updates won't run into the issue since they'll be tiny - I know 256 megs of RAM should be fine after the db is built as I'm already running it with 128 on one system. If you've installed to flash media as the first post describes you could probably even boot off the same media so there wouldn't be any files to move.

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

#21 Post by ldolse »

Regarding the shutdown and wmpoweroff commands, I just looked at them and both assume that the user will run them from X. I'll try modify the scripts to check if X is running before they go through their normal X specific shutdown procedures, but I don't want to change how they behave for an X user, so we'll see.

The command you'll want to use from the CLI is 'poweroff'.

A couple other thoughts regarding ways to build the initial db:
  • Try killing mpd using "mpd --kill" periodically during the update and see of it writes the current db to disk, under some scenarios I've seen it do this, but I don't recall exactly what I did. If it works it would be simple to create a script to do this automatically for you for a few hours.
    The script would look something like this:

    Code: Select all

    #!/bin/sh
    counter=1
    
    mpdPeriodicUpdate() {
    mpc update
    sleep 600
    mpd --kill
    sleep 15
    mpd
    }
    
    while [ $counter -le 25 ]
    do
        mpdPeriodicUpdate
        counter=(( $counter + 1 ))
    done
    
    That would kill mpd every ten minutes for four hours (and hopefully flushing the db to disk and clearing the mem leak), the numbers could be tweaked based on how long you think the update would take. That's all assuming mpd --kill will flush the db, but I'm just guessing on that point at the moment.
  • Point MPD to an empty folder on your NAS and migrate your music to the folder in pieces.
  • Build the db on another machine as I mentioned before.
Hopefully the first option is workable, I'm on the road so can't easily test it now.

bestiabugblatta
Posts: 6
Joined: Fri 30 Sep 2011, 09:01

#22 Post by bestiabugblatta »

Hi Idolse, very nice work indeed!!! I have had some problems anyway.

My hardware is:

MB Alix 1D
Soundcard ESI Juli@

Booting was flawless, except for the fact that it does not start the GUI automatically. Anyway, this is not the biggest issue. Juli@ card is correctly recognized, but I was not able to make it play any sound from analog outputs. I haven't tried with S/PDIF output because I have not a separate DAC.
Sound correctly from the integrated soundcard of the Alix, and the Juli@ works correctly under Windows.....

Do you (or somebody else who have the same configuration) have any suggestion?

Thanks
Bruno

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

#23 Post by ldolse »

The GUI is set up to only start up automatically on the first boot, weird that it didn't start, but maybe there is some issue with the Xwindows config and the Alix1D chipset.

Does the GUI work when you type 'xwin'?

Since the GUI didn't start did you try running the setup wizard? Type 'mpdwizard' at the CLI and it will show you the available outputs, let you choose between them and test the sound. I believe the Analog out on the Juli@ is hw:0,0.

I have a Juli@ at home on in Intel Atom board, I could swear I've tested the analog outs and had them working, but I'll double-check when I get home later.

Also make sure you're using the latest version 0.9.1, if you downloaded the first version that might explain the confusion.

Edit:

I can confirm that the analog RCA out on the Juli@ works on my system when using hw:0,0, which should also show up in the MPD Configuration Wizard. Let me know how it goes. Also let me know if you were planning on using the Juli@ as a line out to a stereo or if you want to control the volume using mpd - currently the assumption is you'll use your stereo preamp/receiver to control the volume. I can help you out with getting the volume control working.

bestiabugblatta
Posts: 6
Joined: Fri 30 Sep 2011, 09:01

#24 Post by bestiabugblatta »

GUI starts with startx, I configured ALSA and MPD correctly with alsaconf and mpdwizard, I tried with hw:0,0 and plughw:0,0 and I'm using 0.9.1 version of mpdPup, but still no sound from analogue outputs.....

Yes, I want to control volume from preamp.

Thanks for you support, I really need it!!!

Ciao
Bruno

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

#25 Post by ldolse »

Strange...
Can you paste the output of "aplay -l"? I generally don't use alsaconf, though it shouldn't hurt.

Also check alsamixer and make sure that the volume is set to the max - the alsamixer volume control should be bypassed by mpd with hw/plughw, but perhaps the sound is muted for some reason.

There is also an applet on the cli I added, it automatically calls aplay and tries to play a file, try 'soundtest hw:0,0' from the cli.

Lastly when you're getting no sound what exactly are you doing? I'm assuming you've rebooted the system at least once, MPD is running and has already scanned your library, is that correct? What file formats are you trying to play?

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

#26 Post by ldolse »

Actually, I just re-tested with 0.9.1 - my previous test was with the next version I'm working on.

I'm seeing the exact same behavior as you now, and the fix is definitely alsamixer - the analog out volume is muted. Just type 'alsamixer' and set the DAC and DAC1 volume levels to 100% using the up arrow.


I'll see if I can get the init scripts in future versions to automatically set the alsamixer volumes so it's not muted - I already made one attempt at this, but clearly wasn't good enough :P

Screenshot attached.
Attachments
alsamixer.png
(98.36 KiB) Downloaded 2196 times

bestiabugblatta
Posts: 6
Joined: Fri 30 Sep 2011, 09:01

#27 Post by bestiabugblatta »

Thank you Idolse, but still not working. Volume levels were 80%, I raised them up to 100%, still no sound.

I tried 'soundtest hw:0,0' , no sound....

aplay -l

card0: Juli [ESI Juli@], device 0: ICE1724 [ICE1724]
Subdevices: 1/1
Subdevice #0: subdevice #0
card0: Juli [ESI Juli@], device 1: IEC1724 IEC958 [IEC1724 IEC958]
Subdevices: 1/1
Subdevice #0: subdevice #0

Yes, correct: rebooted, MPD restarted, scanned library. File formats are mainly flac, but I tried also with wav and mp3.

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

#28 Post by ldolse »

Stranger and stranger. Note the soundtest app may not work if mpd is running, as mpd may be hogging the output, type mpd --kill before running it. Doesn't sound like a file format problem to me, all those same formats are in my library.

The only difference I can see between my alsamixer settings and yours is that my multi-track channels aren't muted. The left-most multi-track channel refuses to stay muted in my case.. I doubt that is related to the problem, but it's the only difference I see.

Just to sanity check the basics - all your connections are correct, source is selected/non-muted on the preamp, and you're using the RCA Jacks highlighted in the attached picture?


Last thing to check is that there is actually audio going to the soundcard - Start playing something in mpd, and while it's playing type this at the CLI:

Code: Select all

cat /proc/asound/Juli/pcm0p/sub0/hw_params 
And this should be the output:

Code: Select all

# cat /proc/asound/Juli/pcm0p/sub0/hw_params 
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 5512
buffer_size: 22052
# 

There are multiple 'pcmxx' sound devices under the 'Juli' folder. The analog output is pcm0p on my system, I would expect it to be similar on yours, but if that exact command doesn't work try the same command with the other pcmxx directories.
Attachments
juli.jpg
(28.29 KiB) Downloaded 3432 times

bestiabugblatta
Posts: 6
Joined: Fri 30 Sep 2011, 09:01

#29 Post by bestiabugblatta »

Yes, I noticed that multi-track channel are muted, and there is no chance to rise them. I think that it is a matter of volume, but I have no idea where to rise it up! :-)

The output of the command proc is the same as your, and all the connections are correct (the board plays in the same conf under windows7).

I tried also with Voyage Linux 0.8, same result (so it is not a matter of old releases of ALSA and MPD).

It is very strange indeed!!! Are you using an Atom based motherboard? Maybe this problem is related to the Alix board I'm using....I will try to install windows xp to see if it works.

Thanks again

Ciao
Bruno

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

#30 Post by ldolse »

The MPD release on this build is actually the latest and greatest, but the ALSA upgrade I'm still working on. That was going to be my final suggestion, was testing out a pre-release build of my next version which is the latest stable kernel and alsa 1.0.24. But if it didn't work on Voyage I don't think it's going to make a difference. It does sound like some sort of hardware issue.

I'm using the intel D945GSEJT.

One thing you could try is disassembling the Juli@ and re-assembling it. I had one squirrelly problem and disassembling/reassembling fixed it - when you mention it's working on Windows 7 I'm not sure if you mean on the Alix board.

bestiabugblatta
Posts: 6
Joined: Fri 30 Sep 2011, 09:01

#31 Post by bestiabugblatta »

I definitely found the cause: it is the Alix board.....I moved the Juli@ on my desktop PC, booted from a live CD (ubuntu), and it works.....

I still don't know if it is my board defective, or the Alix board itself is not compatible with Juli@.

I will try to find out...

Thanks for your support!!!

Ciao
Bruno

bestiabugblatta
Posts: 6
Joined: Fri 30 Sep 2011, 09:01

#32 Post by bestiabugblatta »

Quick update: Juli@ mounted on Alix board works well if connected via S/PDIF to an external DAC. No sound through analogue outputs....

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

#33 Post by ldolse »

Odd, but glad to hear you were able to find some way to make it work. Maybe you should see if you can force the card to a different IRQ.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#34 Post by tempestuous »

ldolse,
I just want to applaud your efforts to provide a full out-of-the-box solution for a Linux MPD server.

In early 2008 I set up a small music server based on Intel mini-ITX, running MPD under Puppy Linux 3.0, outputting the audio locally through a Chaintech AV-710 sound card. This budget sound card was claimed to have audiophile credentials when configured so that its Envy 24HT-S chip redirected the main (front) audio outputs to the rear output circuitry, which then took advantage of a the sound card's well-regarded Wolfson D/A converter.
With high expectations I eventually connected this system to a friend's uber-expensive hifi system, but I was disappointed to find how far short the audio quality was compared to their high-end CD transport and DAC.
I now realise I was expecting too much from a budget sound card.

Almost 3 years later, I note with interest that you're using the ESI Juli@ sound card, which the hifi forums seem to constantly recommend these days.
My next foray into computer audio will involve MPD on a server running some form of embedded OS, with a yet-to-be-decided high end USB DAC providing the audio output.

J.Allen wrote:I'm a bit surprised there isn't a queue of frustrated audio enthusiasts, Linux wannabes, much like myself standing in line to shake your hand.
I'm not surprised - this application appeals to audio enthusiasts/hifi enthusiasts, and such people are not necessarily conversant with Linux.
On the other hand, the average Linux enthusiast is not necessarily an audio enthusiast, and their music requirements are likely to be satisfied by a less complicated and more mainstream music player application.

So we're talking about two minority groups; audio enthusiasts and Linux users, and this application (MPD) is generally known to the rare group of people who overlap those two minority groups!

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#35 Post by tempestuous »

For visitors to this forum thread confused by what all the hype about Music Player Daemon is about, let me try to explain:

MPD is a music client/server playback system. The main MPD application is the server, which includes a proper database.
Separate client applications, of which there are many available, connect to the server, and control playback.
In the most basic configuration, you can run both the server and a client on the same computer. In this setup, MPD appears little different to any other music player. But things start to get interesting once you separate out the server from the client;

- The configuration that most users seem to employ is with a second "livingroom-friendly" computer used as the client, connecting over the LAN to the MPD server somewhere else in the house. Here the server sends an audio stream to the client, as requested by the client. The client computer acts as both the controller and the audio output device. This can be particularly useful if the client computer is a portable device such as a tablet.

- The second common configuration, my personal preference, is where the the MPD server outputs audio, itself, and the client computer is just a controller. You could use a small tablet computer (any operating system) as the client device, which will effectively then be a "glorified remote control".
The MPD server must have some form of audio card (or external USB DAC) which is connected directly your hifi equipment. Since hifi equipment is typically in a fixed position, portable audio output has no real benefit ...
but it's useful to be able to have the controller portable, particularly if your livingroom listening area opens onto different areas of the house such as the Out house, for example.

- from there you can start to get really complex with configuration - a third computer can be set up on the LAN purely for audio output. Commercial vendors are starting to refer to this type of device as the "media renderer". This output device is the destination point of your audio output, but the server remains centralised, and the controller (client) also remains separate.

And from there, any number of clients and output devices can all connect to the same server!
Not many people would require this level of complexity, but it shows how powerful the MPD system is.

Post Reply