NSLU2-Linux
view · edit · print · history

HowTo.BuildMpd History

Hide minor edits - Show changes to markup

August 03, 2008, at 02:36 PM by stripwax --
Added lines 86-89:

libvorbisidec package is not available for SlugOS. However it's not hard to build it yourself using the native build environment, using the source from xiph.org Tremor. stripwax - I've just done this, and manually applied a number of the patches developed by the Rockbox guys - end result is I can now decode using 10% CPU on a turbo slug

April 19, 2008, at 11:17 PM by Jeff -- MyBook and mpd doesn\'t work
Added lines 90-93:

MPD doesn't work on MyBook? World Edition Problem with MBWE/gumstix1151 missing /opt/lib/uClib

January 25, 2007, at 06:24 AM by BrianZhou -- cross compilation done
Changed lines 28-29 from:

Has anyone done this?

to:

mpd ipk is in optware feed. Please add wiki page on its usage.

January 25, 2007, at 05:32 AM by AlienZ --
Deleted lines 78-79:

I can't get MPD to work with the ikpkg libmad unless I specify the path --with-mad=/opt/lib/. When I do this, I get the error: mpd: error while loading shared libraries: libmad.so.0: cannot open shared object file: No such file or directory. Please can someone who has MPD working on unslung 6.8 update the wiki!! I have spent countless days trying to get it to work! - AlienZ??

January 23, 2007, at 06:44 AM by AlienZ --
Added lines 79-80:

I can't get MPD to work with the ikpkg libmad unless I specify the path --with-mad=/opt/lib/. When I do this, I get the error: mpd: error while loading shared libraries: libmad.so.0: cannot open shared object file: No such file or directory. Please can someone who has MPD working on unslung 6.8 update the wiki!! I have spent countless days trying to get it to work! - AlienZ??

February 28, 2006, at 10:30 AM by bwalle -- Added DebianSlug/BuildMPD
Added lines 23-26:

Native compile for DebianSlug

See http://www.nslu2-linux.org/wiki/DebianSlug/BuildMPD

February 11, 2006, at 10:55 PM by bwalle -- Added OSS patch
Added lines 73-74:

bwalle The way described above didn't work for me, I didn't get the ao output working. I used following patch to get oss working: http://www.bwalle.de/patches/mpd-big-endian.diff

October 01, 2005, at 04:03 PM by Daniel Locantore --
Changed lines 35-36 from:
 CPPFLAGS=-I/opt/include -L/opt/lib
to:
 CPPFLAGS=-I/opt/include
 LDFLAGS=-L/opt/lib
October 01, 2005, at 02:32 PM by DaveHooper --
Added line 5:
Added line 7:
Added line 22:
Changed lines 35-36 from:
 CPPFLAGS=-I/opt/include -L:/opt/lib
to:
 CPPFLAGS=-I/opt/include -L/opt/lib
Changed lines 52-54 from:

2b. Because of buggy config script, the config step fails (says the vorbis is unusable even when it isn't). Either edit the "configure" (search for "#ifdef TREMOR" and comment out eveything in main() except vorbis_info vi; vorbis_info_init(&vi) ) or just configure with

to:

2b. Because of buggy config script in 0.12.0, the config step fails (says the vorbis is unusable even when it isn't). Either edit the "configure" (search for "#ifdef TREMOR" and comment out eveything in main() except vorbis_info vi; vorbis_info_init(&vi) ) or just configure with

Changed lines 73-80 from:

MPD (as of version 0.11.2) uses libogg to play ogg-vorbis files, which relies on floating point math, which is slow. Glen Harris reports that a TurboSlug can play 64kbit/s ogg-vorbis with 96% CPU load.

To play higher-quality ogg-vorbis files (or anything at all on a non-turbo slug), we need to switch to an integer-based decoder. A patch (and modified bb file for OpenEmbedded) is available to make MPD use the Tremor library for this. See http://www.musicpd.org/mantis/view.php?id=353 for details.

To build a patched MPD for OpenSlug, simply replace packages/mpd/mpd_0.11.2.bb with http://reich.sdf-eu.org/hannes/code/mpd_0.11.2-tremorSupport.bb

With the Tremor patch, playing a 192kbit/s ogg file takes 40% CPU on a non-turbo slug.

to:

MPD can play ogg-vorbis files using libogg, which relies on floating point math, which is slow. Glen Harris reports that a TurboSlug can play 64kbit/s ogg-vorbis with 96% CPU load.

To play higher-quality ogg-vorbis files (or anything at all on a non-turbo slug), we need to switch to an integer-based decoder. This decoder is called Tremor and is available in the libvorbisidec package:

 ipkg install libvorbisidec

Using the Tremor decoder, playing a 192kbit/s ogg file takes 40% CPU on a non-turbo slug.

Tremor support is already built in to MPD v0.12.0 and above. Older versions of MPD will need to be patched. A patch (and modified bb file for OpenEmbedded) is available for MPD v0.11.2 to make MPD use the Tremor library. See http://www.musicpd.org/mantis/view.php?id=353 for details. To build a patched MPD for OpenSlug, simply replace packages/mpd/mpd_0.11.2.bb with http://reich.sdf-eu.org/hannes/code/mpd_0.11.2-tremorSupport.bb

October 01, 2005, at 02:15 PM by DaveHooper --
Changed lines 26-31 from:

1. Once you have a working development environment, you'll need to build libao (download tarball from http://www.xiph.org/ao). 0.8.6 worked fine for me. I made some hacks to my development environment on the nslu2 so that

CPATH=/opt/lib:/opt/bin:/opt/include

and that /usr/local/lib, /usr/local/bin, /usr/local/include and /usr/local/src are symbolic links to /opt/usr/lib, .. etc. That last bit's not probably recommended but it meant that all I needed to do to install libao was ./configure; make install !

to:

1. Once you have a working development environment, you'll need to build libao (download tarball from http://www.xiph.org/ao). 0.8.6 worked fine for me. I also made some hacks to my development environment on the nslu2 so that I could compile without having to do the whole master Makefile thing:

 CPATH=/opt/lib:/opt/bin:/opt/include
 CPPFLAGS=-I/opt/include -L:/opt/lib

and that /usr/local/lib, /usr/local/bin, /usr/local/include and /usr/local/src are symbolic links to /opt/usr/lib, .. etc. That last bit's not probably recommended but it meant that all I needed to do to install libao was ./configure; make install !

Changed lines 39-53 from:
 - I had hell trying to get the tremor patch (mentioned in the next section of this page) to work with 0.11.5 or earlier so went with the 0.12.0 version which has the patch built in.  I used the svn snapshot @ 3454 and it seems fine for me.  

Again, ./configure; make install *should* work fine. But note the following comprehensively-recalled (from memory) list of problems I encoutered:

2a. To use the integer tremor decoder (*recommended!!*) you'll need to configure using "./configure --with-tremor" before making

2b. Because of buggy config script, the config step fails (says the vorbis is unusable even when it isn't). Either edit the "configure" (search for "#ifdef TREMOR" and comment out eveything in main() except vorbis_info vi; vorbis_info_init(&vi) ) or just configure with ./configure --with-tremor --disable-vorbistest.

2c. *ONLY* the ao driver works for me in 0.12.0 (The OSS driver 'works' but byteswaps all the audio data so the result is nasty white noise instead of music :-( ). So in your mpd.conf you'll need to use the audio_output type "ao" stuff. Oh, and ao isn't compiled in by default (of course!) which means the actual configure you want to run is probably

./configure --enable-ao --with-tremor --disable-vorbistest

Then you're pretty much set! Contact me (dave at beermex dot com) if the above instructions don't get you going.

to:

I had hell trying to get the tremor patch (mentioned in the next section of this page) to work with 0.11.5 or earlier so went with the 0.12.0 version which has the patch built in. I used the svn snapshot @ 3454 and it seems fine for me.

Again, ./configure; make install *should* work fine. But note the following comprehensively- recalled (from memory) list of problems I encoutered:

2a. To use the integer tremor decoder (*recommended!!*) you'll need to configure using "./configure --with-tremor" before making

2b. Because of buggy config script, the config step fails (says the vorbis is unusable even when it isn't). Either edit the "configure" (search for "#ifdef TREMOR" and comment out eveything in main() except vorbis_info vi; vorbis_info_init(&vi) ) or just configure with

 ./configure --with-tremor --disable-vorbistest.

2c. *ONLY* the ao driver works for me in 0.12.0 (The OSS driver 'works' but byteswaps all the audio data so the result is nasty white noise instead of music :-( ). So in your mpd.conf you'll need to use the audio_output type "ao" stuff. Oh, and ao isn't compiled in by default (of course!) which means the actual configure you want to run is probably

 ./configure --enable-ao --with-tremor --disable-vorbistest

2d. I couldn't get mpd to build successfully using it's built-in mad decoder or id3tag parser. You may well find the same. If so, "ipkg install libid3tag" and "ipkg install libmad" onto your slug, and re-run the configure script above. Configure will detect the external libid3tag and libmad libs and defer to those instead of compiling the supplied-with sources. (Thanks to Daniel Locantore for reminding me about this!)

Then you're pretty much set! Contact me (dave at beermex dot com) if the above instructions don't get you going.

September 29, 2005, at 06:16 AM by DaveHooper -- Details of how to build mpd on Unslung!
Added lines 23-47:

Native compile for Unslung

Stripwax: I'm one of those lazy types who'd rather build natively on Unslung. I've got mpd running successfully in Unslung 5.5, here's what I did:

1. Once you have a working development environment, you'll need to build libao (download tarball from http://www.xiph.org/ao). 0.8.6 worked fine for me. I made some hacks to my development environment on the nslu2 so that

CPATH=/opt/lib:/opt/bin:/opt/include

and that /usr/local/lib, /usr/local/bin, /usr/local/include and /usr/local/src are symbolic links to /opt/usr/lib, .. etc. That last bit's not probably recommended but it meant that all I needed to do to install libao was ./configure; make install !

2. Download an mpd source tarball e.g. http://musicpd.org/~normalperson/debian/experimental/mpd/mpd_0.12.0~svn+r3454.orig.tar.gz

 - I had hell trying to get the tremor patch (mentioned in the next section of this page) to work with 0.11.5 or earlier so went with the 0.12.0 version which has the patch built in.  I used the svn snapshot @ 3454 and it seems fine for me.  

Again, ./configure; make install *should* work fine. But note the following comprehensively-recalled (from memory) list of problems I encoutered:

2a. To use the integer tremor decoder (*recommended!!*) you'll need to configure using "./configure --with-tremor" before making

2b. Because of buggy config script, the config step fails (says the vorbis is unusable even when it isn't). Either edit the "configure" (search for "#ifdef TREMOR" and comment out eveything in main() except vorbis_info vi; vorbis_info_init(&vi) ) or just configure with ./configure --with-tremor --disable-vorbistest.

2c. *ONLY* the ao driver works for me in 0.12.0 (The OSS driver 'works' but byteswaps all the audio data so the result is nasty white noise instead of music :-( ). So in your mpd.conf you'll need to use the audio_output type "ao" stuff. Oh, and ao isn't compiled in by default (of course!) which means the actual configure you want to run is probably

./configure --enable-ao --with-tremor --disable-vorbistest

Then you're pretty much set! Contact me (dave at beermex dot com) if the above instructions don't get you going.

July 29, 2005, at 12:25 PM by HannesReich --
Changed line 23 from:

ogg-vorbis peformance

to:

ogg-vorbis performance

July 18, 2005, at 09:56 PM by HannesReich --
Changed lines 1-2 from:

The MPD music player (www.musicpd.org) can built and is a good basis for the SlugAsAudioPlayer.

to:

The MPD music player (www.musicpd.org) is a good basis for the SlugAsAudioPlayer.

July 18, 2005, at 09:46 PM by HannesReich --
Changed lines 28-29 from:

To build a patched MPD for OpenSlug, simply replace packages/mpd/mpd_0.11.2.bb with http://reich.sdf-eu.org/hannes/code/mpd_0.11.2-tremorSupport.bb

to:

To build a patched MPD for OpenSlug, simply replace packages/mpd/mpd_0.11.2.bb with http://reich.sdf-eu.org/hannes/code/mpd_0.11.2-tremorSupport.bb

July 18, 2005, at 09:46 PM by HannesReich --
Added lines 28-29:

To build a patched MPD for OpenSlug, simply replace packages/mpd/mpd_0.11.2.bb with http://reich.sdf-eu.org/hannes/code/mpd_0.11.2-tremorSupport.bb

July 18, 2005, at 08:35 PM by HannesReich -- openslug instructions, ogg-tremor patch details
Added lines 1-31:

The MPD music player (www.musicpd.org) can built and is a good basis for the SlugAsAudioPlayer.

Native build

MPD can be built natively without too much effort, as the only required dependency is libao.

Cross-compile for OpenSlug

There is an MPD package in OpenEmbedded, which can be built with the OpenSlug 2.0 source tree (once set up as described by BuildingTheSource) as follows:

 ln -s ../../openembedded/packages/mpd \ 
       ../../openembedded/packages/libvorbis \ 
       ../../openembedded/packages/libogg \ 
       ../../openembedded/packages/libao \ 
       ../../openembedded/packages/libmikmod \ 
       ../../openembedded/packages/libmad \ 
       ../../openembedded/packages/flac \ 
       ../../openembedded/packages/audiofile \ 
       nslu2-linux/packages
 source setup-env
 bitbake mpd
 bitbake package-index

Cross-compile for Unslung

Has anyone done this?

ogg-vorbis peformance

MPD (as of version 0.11.2) uses libogg to play ogg-vorbis files, which relies on floating point math, which is slow. Glen Harris reports that a TurboSlug can play 64kbit/s ogg-vorbis with 96% CPU load.

To play higher-quality ogg-vorbis files (or anything at all on a non-turbo slug), we need to switch to an integer-based decoder. A patch (and modified bb file for OpenEmbedded) is available to make MPD use the Tremor library for this. See http://www.musicpd.org/mantis/view.php?id=353 for details.

With the Tremor patch, playing a 192kbit/s ogg file takes 40% CPU on a non-turbo slug.

libmikmod problems

Glen Harris says MPD on OpenSlug will currently segfault if it tries to play a mod file.

view · edit · print · history · Last edited by stripwax.
Based on work by Jeff, BrianZhou, AlienZ, bwalle, Daniel Locantore, DaveHooper, and HannesReich.
Originally by HannesReich.
Page last modified on August 03, 2008, at 02:36 PM