LWN.net Logo

The EeePC as a low-power music player

By Forrest Cook
February 6, 2009

For a long time, your author has been searching for a low power music playing computer for use in an off-grid solar and wind powered mountain cabin. The desire was to have a player with capabilities that were similar to the grid-powered system used at home. This consists of a library of over 5000 FLAC-encoded audio files that are either randomly or sequentially played by one of several Python scripts. The audio is fed from the computer's sound card to the auxiliary input of a stereo amplifier.

The current off-grid audio system uses a car stereo deck with a built-in CD player driving three stereo speaker sets, all running on 12V DC power. Power consumption is in the range of 5-10 Watts, depending on volume. The car stereo deck has an auxiliary audio input for connecting external sound sources, such as a computer. After one becomes used to a Linux-powered music system with unattended playback of a large music library, manually swapping individual CDs every 45 minutes seems like a lot of trouble.

Initially, a stripped-down desktop computer was considered for the job, but the power consumption was a bit too high for continuous off-grid use, especially when powering the machine equipment through a DC to AC power inverter. A number of mini-ITX systems were considered for the job, but their prices were high, power consumption was still moderate, and an external monitor, with more power consumption, was required.

A laptop computer seemed like a better platform for building such a system. Taking the small system idea one step further, it was decided that a palmtop computer would be a good candidate for the task at hand. The ASUS Eee PC was chosen because it was inexpensive, common, tiny, self-contained and would run on low power. Also, another LWN editor had an Eee PC model 4G (701) that he was willing to part with. This machine uses a solid state flash drive for its primary filesystem.

[Eee PC music player]

One might ask, why not just get an iPod? In short, your author does not like the sound quality that comes from highly compressed audio formats, and the ability to create custom software was desired. Also, the price of large capacity hard drives has come down enough that high volume storage is no longer an issue.

The newly acquired Eee PC needed a fresh operating system installation. Ubuntu was a logical choice since it was already being used for the home-based music player. Easy Peasy 1.0 (Ubuntu 8.10) was the first Ubuntu-based distribution that was found for the Eee PC platform. The EEEBUNTU distribution also looks like a good candidate for running Ubuntu on the the Eee PC. Installing the operating system on a machine that lacked a CDROM drive involved downloading the appropriate ISO image and installing it on a USB memory stick. Creation of a bootable USB memory stick is explained in this article.

The Easy Peasy installation worked the first time, the only annoyance involved the appearance of the Ubiquity system installation window upon logging in. The Easy Peasy forum had an article on Common issues and fixes that had the solution to that problem, and some additional post-installation suggestions. An article about optimizing Linux on a solid stated drive suggested some additional tricks for improving the life of the solid state memory. The folks who put Easy Peasy together did a good job customizing Ubuntu for the Eee platform, all of the various Eee PC peripherals have worked with no problems.

A Seagate FreeAgent 320GB USB drive was chosen to hold the music collection, it is small, frugal with power and gets its operating power from the USB port. The drive required installation of an EXT3 filesystem. The entire music collection was copied over by installing the new drive on the home system and running an rsync command to populate the filesystem. As the master music archive grows, it will be simple to synchronize it with the USB drive using another rsync operation. The USB drive also provides an off-site backup for the main music collection.

A small amount of software had to be installed on the machine. The Ubuntu vorbis-tools package contains the ogg123 command line FLAC file player. Two custom Python scripts, RandFlacPlay.py and Playflacs.py (available here) use ogg123 to do the rest of the work. The music is organized in a hierarchy of directory trees categorized by genre, artist and recordings. The recordings of CDs, vinyl disks and tapes each get their own directory. RandFlacPlay.py is run with the primary music archive as an argument, it picks random selections and plays them. It can also be run on subsets of the entire collection or on directories full of symbolic links to specific groupings of recordings. Playflacs.py is used to play all of the songs in one particular directory. Both Python scripts can be invoked multiple times inside of a bash script for a wide variety of programmability.

Using the Kill-a-watt meter that was discussed in the aforementioned power consumption article, data was taken for various modes of Eee PC operation. With the USB hard drive connected and the screen on, the worst-case AC power usage was in the 17-21 Watt range while playing music. This is about four times better than the best power consumption achieved with the desktop machine, not counting the desktop video monitor. When the Eee PC screen is closed, power consumption drops by about 2 Watts. Removing the USB hard drive causes the power consumption to drop by around 4 Watts. Running from the AC charger, the Eee PC can play music using only 11-15 Watts. This number can likely be shaved by another 5 watts or so if the machine is powered directly from 12V DC using a car cigar lighter adapter, the AC adapter generates a lot of heat.

In the above example, minimum power usage was achieved with the hard drive disconnected. However, a music player without music isn't of much use. A bit of software solved the problem. The RandFlacPlay.py script was modified so that instead of playing the random music selections, it copies the songs from the hard drive to a specified directory on the flash-based filesystem. Flash space on this system is in short supply, so an external 4GB USB memory stick (1 Watt) was added to the machine. The memory stick can be loaded with many hours of music and the system can play without the hard drive. Since this mode of operation involves no spinning drives, operating the system in a car becomes a practical option. A common iPod FM transmitter would allow the player to be used in an automotive setting where no auxiliary audio input is available.

In all, this project went together rather easily, no major problems were encountered. Audio quality could likely be improved by adding an external USB sound card. A remote control device such as the Wii Remote (covered here) would be a nice addition. The Eee PC features a large amount of hardware capability in a tiny enclosure. It makes an excellent platform for a music player and is capable of much more.


(Log in to post comments)

The EeePC as a low-power music player

Posted Feb 12, 2009 14:58 UTC (Thu) by jengelh (subscriber, #33263) [Link]

And I like my SONY PCG-U3 for just that reason.

>One might ask, why not just get an iPod?

Because standalone gadgets have mixed playback capabilities compared to what mplayer can do. (Whose availability BTW makes ogg123 and an external shuffler somewhat redundant.) Three years ago, it was a bit of gambling to get a decently-priced player with OggVorbis support, and even nowadays there probably are players that do not support the format du jour. Upgrading mplayer is cheap, upgrading the laptop is too (in light of it being usable for more than just listening to audio), so these specialized AV playback gadgets seem like an outdated technology.

The EeePC as a low-power music player

Posted Feb 12, 2009 16:42 UTC (Thu) by stevan (subscriber, #4342) [Link]

An interesting project. One possible improvement could be related to boot speed and overall system speed. I recently installed Arch Linux onto my trusty Asus 701, bumpkin. Unlike Ubuntu variants on the Asus, you can actually watch video without jerky motion, battery life is around the same as the custom Xandros original software, and boot speed is within a second or two of the original Xandros, with Arch running XFCE, and time measured up to getting a working wireless network connection. While I have Ubuntu on my other machines, Arch is staying on my eeepc, and it's been fun playing with a different distro anyway.

Oh, and I find my old IBM X31 running Ubuntu uses slightly less power than the Asus. Maybe an older IBM with a large internal disk would use less power overall?

Stevan

The EeePC as a low-power music player

Posted Feb 13, 2009 0:03 UTC (Fri) by socket (guest, #43) [Link]

I've heard references to the Kill-A-Watt in a few places now, and I suspect I'll probably invest in one... but I'm a little surprised that there isn't already some appropriate sensor in typical computers to measure power usage. Especially in laptops.

...there isn't, right?

The EeePC as a low-power music player

Posted Feb 13, 2009 21:04 UTC (Fri) by ssam (subscriber, #46587) [Link]

There usually is. Powertop can show you this. My laptop (thinkpad x31) will only show this when on battery. however it will not include things like the power used by the charger.

the external what meters are good to independently verify the figures. also if you are concerned about measuring all the devices in your house its a good investment.

The EeePC as a low-power music player

Posted Feb 14, 2009 19:15 UTC (Sat) by Richard_J_Neill (subscriber, #23093) [Link]

I think he's missing a few tricks.

1. Copy the next hour's worth of tracks into a RAM disk (or use the flash) - and then let the HDD spin down. Actually, 16 GB SD cards are now cheap enough, that you probably don't need to use an external HDD much! Personally, I find 256 kbit/sec ogg is "as good as" the original CD - and I have reasonably decent HiFi equi[ment to play it on.

2. USB soundcards are really worth having - they eliminate almost all the interference from the PC's innards. Something like a Behringer UCA202 costs only $25, and you'd be surprised how good they are.

3. Get a Class-T amplifier (eg from Sonic Impact). Coupled with high-sensitivity speakers, you can get quite a lot of noise from only a few watts input. These Class-T amps sound as good as a $250 hi-fi, and they are efficient enough to run from batteries! Essentially, the speakers are driven using a digital, PWM signal, with some low-pass-filtering, and enough negative feedback to fix the artefacts. This really shouldn't work, but it does.

4. If a 12V DC direct supply is used, then make sure it never goes much above this. You probably don't need a boost converter, or perfect voltage regulation, but I'd suggest at least a Zener-Diode clamp to < 15V, with a fuse in series.

The EeePC as a low-power music player

Posted Feb 19, 2009 6:18 UTC (Thu) by Russ.Dill@gmail.com (subscriber, #52805) [Link]

I would recommend something like the OMAP3 based beagle board or maybe a Nokia N800 or N810. These have their own audio output or can be used in conjunction with a USB audio device. You'd really be sipping power at that point. And of course you can now get 32GB SD cards or 64GB USB sticks.

The EeePC as a low-power music player

Posted Feb 25, 2009 13:44 UTC (Wed) by shane (subscriber, #3335) [Link]

I use a NSLU2 running Debian for this purpose:

http://www.nslu2-linux.org/

I use the MPD to control it:

http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki

Right now I'm using a USB hard disk to store music, but I just bought a 32 Gbyte USB memory stick (hard disks make noise!).

The disadvantages are that it has no screen of it's own, and that it cannot play any media formats that require floating point. This isn't a problem for MP3, Ogg, or Flac, which are the only formats I use, all of which have integer-only playback support on the Debian ARM distribution.

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds