Real Time kernels and audio on the Raspberry Pi

A year or two ago I posted about how you could send audio over the internet with Raspberry Pis using the OpenOB project. Since then the OpenOB project has taken off, with lots of contributions from the community and lots of improvement as a result.

What hasn’t aged well is the Pi. A firmware update to fix some keyboard compatibility issues caused some serious issues with audio over IP, as both the Ethernet controller and USB sound card shared a USB bus which couldn’t operate quickly enough to handle the precise timing demands. Fortunately, the Wolfson Audio Board has come along to save the day – and it’s certainly promising.

Sadly, the kernel support for the Wolfson device isn’t in the mainline kernel yet, so that means using their custom OS image, or building our own kernel. On top of that we’d quite like a preemptible kernel to allow us to get lower latencies in userspace. This is crucial for reliable jitter-free low-latency audio, but because it’s quite niche this also means we need to apply some non-mainline patches to the Raspberry Pi kernel. The Wolfson drivers will eventually make it to the Pi kernel by default, and hopefully someone familiar with packaging for Debian/Raspbian can contribute a package to provide a real-time patched version of the kernel; but in the meantime we need to get our hands dirty. Here’s how to get a stock Raspbian image turned into a low-latency audio capable flavour, broken down and explained a bit. Continue reading Real Time kernels and audio on the Raspberry Pi

Getting started with XRF modules and LLAP

Months ago I picked up some radio modules – specifically the XRF radio modules from Ciseco. They’re about ¬£10 a pop and are in theory very simple to use. This is… almost true. In the end my modules sat dormant in my component store, and the OpenKontrol gateway I got from them at the same time was never assembled, owing to some missing parts for the ethernet module and abysmal documentation for the entire project – it’s still sat on my desk and will probably migrate to the bin eventually. This theme of abysmal documentation is unfortunately consistent across all of the Cisceo product lines, which is a real shame since they make great bits and pieces¬†in theory. I really do hope they’ll pull their finger out and fix their documentation.

All that aside, last week at work, we had a two-day event for physical prototyping and I decided that I’d try and get the things working – and after a day or so, succeeded. This post is a brief introduction to how to get the modules working as advertised. Continue reading Getting started with XRF modules and LLAP

The ntpi: accurate time with a Raspberry Pi and Venus638FLPx

One of the things I’ve always loved to tinker with is time sources and synchronization. Typically this has been tied to sensible things like the Network Time Protocol and designing and maintaining time distribution systems for broadcast networks. Lately though I’ve been toying with ‘real’ time sources – GPS and MSF broadcasts. This is a quick tutorial on how to set up a Raspberry Pi, which at only a few watts makes for an economical time server, to talk to a Venus 638FLPx GPS receiver (available from Sparkfun on a suitable breakout board here). Continue reading The ntpi: accurate time with a Raspberry Pi and Venus638FLPx