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

For talk and support relating specifically to Puppy derivatives
Message
Author
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.

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

#36 Post by tempestuous »

Functionality and Hifi.

There are two particular appealing factors of the MPD system: it provides very useful functionality, both in terms of playback configuration and music management, and it's also a good foundation upon which to base a high-fidelity computer-based music system.
So the appeal of MPD is not limited to hifi buffs, but the system appeals particularly to hifi buffs.

For audiophiles who wish to optimise their Linux MPD configuration for audio quality, a major element is to ensure bit-perfect digital output to the sound card or DAC, as such:
i) ensure that MPD will not use its software mixer. In your MPD configuration file, /etc/mpd.conf
make sure that this line is commented out -

Code: Select all

mixer_type                      "software"
and ii) the "dmix" function of the ALSA audio system should be disabled. Create a new document in Geany with this -

Code: Select all

pcm.MYSOUNDCARD {
   type hw
   card 0
}
and save it as /etc/asound.conf

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#37 Post by aragon »

One thing i've allways loved about mpd was the simpleness?!? of configuring and controlling an shoutcast output. I've used this setup for parties as an example, where the controller streams to a number of receiver (In this setup audiophile quality is not the main argument).

aragon

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

#38 Post by tempestuous »

Yes, two of the configurations I explained above involve streaming over the LAN, but I used the built-in HTTP streaming
option of MPD, not the ShoutCast streaming option.
I confess that I don't know the relative benefits of each.

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#39 Post by aragon »

I tested both, inbuild and shoutcast, both worked, but as i allways used shoutcast ...

Aragon

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

Appreciate the votes of confidence

#40 Post by ldolse »

Hi Aragon, Tempestuous,

Appreciate the votes of confidence/feedback, along with the background on Music Player Daemon for the uninitiated. My initial target audience was people looking to hook this server up to their stereo directly and control it remotely - my favorite remote control is mPad on the iPad, but this project has forced me to learn about many other clients and I must admit I have some new special purpose faves. The setup wizards built into mpdPup follow the best practices Tempestuous mentions regarding disabling dmix, etc and outputting bit-perfect output via whatever audio interface the user chooses.

That said, shoutcast/http out support is compiled in as well. Right now the wizards I've written don't provide a simplified setup for that, but it's simple enough to enable for anyone comfortable with editing mpd.conf. A longer term goal is to expand the wizards to allow different types of outputs. I've also seen hints that some of the mpd devs are working on DLNA and RAOP support, which would provide an exciting addition for higher quality network broadcasting than the current shoutcast/http functionality.

Regarding the take-up, I'm probably also a bit late to the game with mpdPup - as Tempestuous notes, this is probably of interest to a relatively small cross-section of users, and many of those users are using Voyage Linux. I'd actually started on this project a couple years back, but when a Voyage variant dedicated to mpd came out I put things on the back burner. It was only much later when I'd tried Voyage and decided it was still too technical for a typical Windows/Mac user that I came back to this project, since many of Puppy's goals around ease of use coincide with my goals for this derivative.

I've been busy working on the next release, and am quite excited about where it's going. It's using the 2.6.39.4 kernel, which now includes remote control support. So the next update will have out of the box support for any Soundgraph iMon remote control/LCD, and other remote controls will work with minimal effort. I'm also adding two new clients, albumbler and mpd-sima. These are all working quite well to provide automatic DJ/smart shuffle capabilities, especially when combined with the new remote control function - I've already got this all working, just need to fine tune my init and remaster build scripts.

My stretch goal is to add a radio station index. I've found an index which provides access to several thousand stations, I just need to write some scripts to parse the index files to allow users to browse the selection, add them to MPD's playlist folder, and assign them to remote control hot-keys.

Post Reply