If something is working — break it!

If something is working — break it!

Nov 07, 2026
40

This post is for everyone and shows what the hell I'm usually doing and what's I'm writing about.

TestFlight build I'm writing about here

You might reasonably ask: why bother with multiple devices on the same FireWire bus? Who even needs that? Why not make a single audio interface work reliably first?

Well, it's not that simple.

Imagine a single audio interface. A relatively simple one. It has two audio streams: one for input and another for output. It also has meters and controls, allowing the Mac to read input levels, monitor device settings, detect knob movements, and send commands.

I got this working. Sometimes it worked beautifully, running for hours without a single glitch. And sometimes it just hung.

The problem with these failures is that they're incredibly difficult to reproduce. When something breaks after several hours or even days of perfectly normal operation, finding the actual cause can be a nightmare. Was it an interrupt? A missed DMA completion? An asynchronous transaction that never finished? A race condition somewhere? Or something else entirely?

So I came up with an idea: instead of waiting hours for something to break, why not make it break sooner? I connected several audio interfaces and an external FireWire hard drive to the same bus. And, well, that exposed a whole pile of problems almost immediately.

But to understand why, let me briefly explain how all of this works.

A little bit about FireWire

FireWire uses two fundamentally different types of data transfer.

The first is isochronous transfer, used for real-time audio. The FireWire bus operates in repeating 125-microsecond cycles — 8,000 of them every second. Audio data must be transmitted on time, continuously and predictably. Miss a deadline, and you risk losing audio data.

Then there's asynchronous transfer. This is used for things like reading meters, checking device settings, and sending commands. Want to change the sample rate? The driver needs to tell the device. Turn a physical knob? The driver may need to read its new position. Unlike isochronous audio, asynchronous transactions involve requests, responses, and potentially unpredictable delays.

And devices don't all behave the same way. Some are perfectly happy being polled 20 times per second, while others work better at 50. Their timing requirements, response behavior, and tolerance for frequent requests can be quite different.

imageNow imagine connecting several audio interfaces.

Suddenly, we have several isochronous audio streams running concurrently, each with its own timing requirements. At the same time, every device needs its own control traffic. The driver has to process incoming audio, prepare outgoing audio, handle interrupts, read meters, send commands, wait for responses, and recover when something doesn't go according to plan.

And all these activities must coexist. One device taking too long to respond shouldn't hold up another. A control request shouldn't interfere with audio processing. And a problem with one stream shouldn't bring down everything else. This is where what looks like a relatively straightforward audio driver becomes an exercise in concurrency, scheduling, synchronization, resource management, and error recovery.

But that's not all.

Every device has its own ideas about FireWire

Here's something interesting about FireWire: it was designed to work without a computer at all.

You could connect a digital camcorder directly to a compatible video recorder, control playback and recording, and transfer video between them. No Mac or PC required. Unlike a conventional host-peripheral architecture, FireWire is a peer-to-peer bus. Devices can initiate transactions, communicate with one another, and participate in managing the bus itself. Every FireWire device has its own FireWire driver, implemented as part of its firmware. In many ways, it's doing the same kind of work that ASFireWire does on the Mac.

And, just like any other software, these implementations can have bugs. Different manufacturers made different engineering decisions. Some interpreted parts of the specification differently, others implemented proprietary protocols, and some introduced their own quirks and timing requirements.

This means that understanding the FireWire specification is only half the battle. You also need to understand how actual hardware behaves, including cases where it doesn't behave quite as the specification suggests.

A transaction that works perfectly with one device may cause another to become unresponsive. A recovery strategy that works for one interface might fail with another. And sometimes the problem isn't even in your own code.

Now imagine several independently developed FireWire drivers, from different manufacturers, all operating on the same bus. And you're trying to make sure they cooperate.

The bigger picture

When I started ASFireWire, I was focused on making a single audio interface work. That alone was quite a challenge, and every problem solved felt like another step toward having a complete, stable driver.

At some point, I remember thinking: "Oh, I think I've finally solved the puzzle!"

And then it felt as if someone walked into the room, dropped a few thousand additional puzzle pieces onto the table, and said:

"Nah. That was just a tiny part of the picture."

That's probably the best way I can describe what developing ASFireWire has been like.

Every time I get something working, I discover another layer underneath. Another protocol, another device-specific behavior, another concurrency problem, another obscure corner of a specification written decades ago.

The funny thing is that, unlike many software projects, this puzzle is finite. FireWire is a legacy technology. There aren't going to be new generations of FireWire audio interfaces appearing every year. The hardware ecosystem already exists. The specifications have been written. The pieces of the puzzle are already out there.

The progress?

image

Here, Core Audio is aggregating three FireWire devices exposed by ASFireWire:

  • Focusrite Saffire

  • PHASE 88 Rack

  • M-Audio FireWire 1814

and the resulting Aggregate Device exposes:

  • 36 input channels

  • 24 output channels

  • at 48.0 kHz

And I think this is a nice illustration of what the project has become.

So yes — the picture is much bigger than it seemed at first.

But now, at least, some of the pieces are starting to click together.

The goal is clear.
The hardware is known.
And the solution?

Still cooking.

Enjoy this post?

Buy Aleksandr Shabelnikov a coffee

More from Aleksandr Shabelnikov

PrivacyTerms