Linuxing an iPod

A few months ago Rory (of Rory Glory fame) gave me his non-functioning 4G (fourth generation) iPod; he thought I might like to do something with it. Rory had taken the iPod to an Apple store in Melbourne and was told it would cost more to fix then replace; he bought a new one. I stuffed around with the iPod for a couple of hours (disconnected the battery and did a software restore), it’s now fully functional. If I was Rory I’d be pretty pissed with the Apple store; but personally, I’m quite happy. So, I could give it back, but where’s the fun in that? Instead, I decided to have a play with iPodLinux.

Yes, if you didn’t already know, your* iPod can run Linux. (*dependant on iPod model, your mileage may vary; check the list of supported iPods)

The iPodLinux project consists of two main components, the Linux (uClinux) kernel and a user interface called podzilla. These components are currently packaged in an easy to use installation program. My iPodLinux install went without a hitch. I downloaded the Mac installer here, connected the iPod to my computer, ran the installer, and in under 5 mins I had a dual booting Linux/Apple iPod. It was worth the effort just to see this:

Tux on my/Rory's iPod

Tux, the Linux mascot; apparently chilled out on cool tunes (not on Ganja).

But the reason I’m interested in iPodLinux (aside from its pure geek appeal) is that it enables iPod recording at frequency rates up to 96kHz (to put this in perspective, 44.1kHz is the frequency rate used for audio CDs). With Apple’s operating system all 4G (or earlier) iPods have their audio recording abilities limited to a pathetic 8kHz (apparently the new 5G iPods boast a voice recording setting of 44.1kHz stereo but you’ll need a third party mic to enable this functionality and I’ve yet to see a device that’s capable of this). So iPodLinux brings the potential for high quality field recordings to the iPod (whether the iPod lives up to this potential is a point of contention). I decided to run a few tests and see what the iPod had to offer.

All the documentation and discussions I’ve read about recording with podzilla indicate that the iPod has a built-in preamp that supplies bias power through the headphone jack; after a lot of messing around I’m starting to wonder if this is really the case.

My mic experiments have been based on Tomi Engdahl’s excellent microphone article at ePanorama.net. The test recordings were carried out using a standard electret mic insert (the data sheet is here if your interested) and the Mac Installer build 0.4b (r4 alpha!). The iPod was set to record through the headphone jack (Mic Record on the podzilla menu) at a sample rate of 96kHz. For each recording I counted from 1 to 10 in time with the seconds counter on the iPod’s display (so each recording goes for about 10 seconds).

The first 4 recordings are basically flat-lining; the 5th recording is more promising; something is actually audible, albeit at quite low levels.

Test 1 – mic with Right channel Grounded
Circuit with Right channel Grounded
waveform with Right channel grounded

Audio file: mic R-GND.mp3 – 92 KB

Test 2 – mic with Right channel connected to Left
Circuit with Right channel connected to Left
waveform with Right channel connected to Left

Audio file: mic R-Left.mp3 – 96 KB

Test 3 – mic with Right channel floating
Circuit with Right channel not-connected
waveform with Right channel floating

Audio file: mic R-floating.mp3 – 92 KB

Test 4 – mic with Right channel as bias power
Circuit with Right channel as bias power
waveform with Right channel as bias power

Audio file: mic R+V with R & Cap.mp3 – 100 KB

Test 5 – mic with 6V external bias power
Circuit with external bias power
waveform with 6V external bias power

Audio file: mic 6V with R & Cap.mp3 – 92 KB

You will notice from these audio files that it takes about 4 seconds for the iPod’s audio circuit to kick in, this is typical of the recordings I’ve made so far. The length of the delay appears to be dependant on the amount of time since the last recording; if you make two recordings back-to-back then the delay is less than a second. You may also notice that in test 3 (mic with Right channel floating) the last couple of seconds are filled with white noise; this is a more critical issue.

At the start of my tests these bursts of white noise would occur randomly in about 30% of the recordings. My recording process went like this: record in podzilla at 96kHz, stop the recording, plug the iPod into the USB dock, switch to diskmode, and open the file in a Mac audio program (I’m trying out a demo version of Amadeus II). I got so tired of being greeted by a blast of static that I started checking the recordings through the podzilla Playback option prior to transferring them to the Mac. Surprisingly, in most cases the white noise stopped showing up. I’m not sure how Playback is effecting the audio files (I would have assumed it should have no effect at all) but it seems to be making a difference. Equally puzzling is that occasionally I get a file that plays fine on the iPod but when I connect to the Mac it has white noise in the track. On disconnecting from the Mac and replaying the file with podzilla I find that the white noise remains; I’ve never been able to recover a file once the white noise has appeared.

I’m currently running all my recordings through the podzilla Playback option before transferring them to the computer, it solves the white noise issue 95% of the time (perhaps the megabrains over at iPodLinux will come up with a fix for this?).

As for bias power in the plug, I couldn’t find any. The only way I was able to get a decent signal was by supplying external power to the mic. There is a 4th connector in the 4G iPod’s headphone jack (as documented on this page), perhaps the bias power can be found there? Not having a suitable four connector plug, I was unable to test this.

As you would expect, mic signal response increases with the external supply voltage. Following are tests with 1.5, 3, and 9V.

1.5V Test – mic with external bias power
waveform with 1.5V external bias power

Audio file: mic 1.5V with R & Cap.mp3 – 96 KB

3V Test – mic with external bias power
waveform with 3V external bias power

Audio file: mic 3V with R & Cap.mp3 – 96 KB

9V Test – mic with external bias power
waveform with 9V external bias power

Audio file: mic 9V with R & Cap.mp3 – 96 KB

Despite the increased response from a 9V source the mic level is still fairly low. The iPod is obviously doing some preamping of the signal but not to a level I would normally expect, perhaps the preamp’s gain is turned down. Maybe the Linux crew will come up with a software fix for this also, until they do a bit of additional mic amplification may be required.

If you’re after a serious field recorder podzilla is missing a few essential features (such as level indicators, gain control, and headphone monitoring), also it’s not 100% stable, it will occasionally freeze (usually when playing an audio file), and there’s the troubling ‘white noise’ issue I mentioned earlier. But despite these problems it’s still a pretty attractive option and if you already own an iPod then there’s really no down side: it’s free, it doesn’t disrupt the normal operation of your iPod, and it’s open-source so if you have the time, skills, and inclination you can add to the project; maybe you can solve that annoying white noise problem?

Bookmark the permalink. Both comments and trackbacks are currently closed.

One Comment