Over the weekend, a fascinating little post over on the Panic weblog revealed that the Lightning AV adapter meant to send video out from a connected iPhone or iPad over HDMI had an interesting little secret to it: it’s not a converter so much as it is a tiny ARM-based computer with a tiny SoC and 2GB of RAM!
The guys at Panic had a theory that this meant that the Lightning AV Adapter booted a miniature version of iOS every time it was connected, and that it was using a bizarre, hardwired version of the AirPlay protocol to do its streaming. That’s not actually the case, but an anonymous Apple engineer has now given the backstory behind this fascinating little bit of engineering.
Here’s the issue in a nutshell: Lightning can’t output a raw HDMI signal. All it can do is squirt out some H264 video down a Lightning cable and hope that something on the other end can convert it to HDMI. The result has a lot of artifacts associated with MPEG compression, as seen in the image above.
An anonymous Apple engineer, commenting on the matter, says that despite this, the Lightning AV Adapter isn’t running iOS:
It is true that the kernel the adapter SoC boots is based off of XNU, but that’s where the similarities between iOS and the adapter firmware end. The firmware environment doesn’t even run launchd. There’s no shell in the image, there’s no utilities (analogous to what we used to call the “BSD Subsystem” in Mac OS X). It boots straight into a daemon designed to accept incoming data from the host device, decode that data stream, and output it through the A/V connectors. There’s a set of kernel modules that handle the low level data transfer and HDMI output, but that’s about it. I wish I could offer more details then this but I’m posting as AC for a damned good reason.
The Apple engineer says of the compression artifacts that “certain people [within Apple] are aware that the quality could be better and others are working on it. For the time being, the quality was deemed to be suitably acceptable. ”
nd while the MPEG compression quality may be a bit wanting, it does have some advantages:
This system essentially allows us to output to any device on the planet, irregardless of the endpoint bus (HDMI, DisplayPort, and any future inventions) by simply producing the relevant adapter that plugs into the Lightning port. Since the iOS device doesn’t care about the hardware hanging off the other end, you don’t need a new iPad or iPhone when a new A/V connector hits the market.
That said, the Lightning AV Adapter may have the distinction of being the only Apple accessory that will actually get firmware updates, as part of the regular iOS update release cycle. It just goes to show, you can’t afford to pass over even the smallest and least consequential Apple product: great ingenuity has gone into designing each and every one.
- Source Panic