
The Lightning Digital AV Adapter Surprise - pkartistry
http://www.panic.com/blog/2013/03/the-lightning-digital-av-adapter-surprise/
======
seanp2k2
One must wonder why they chose to expend significant R&D to make a
complicated, power-sucking adapter for use on a mobile device that provides
sub-par output and costs quite a bit more than a "dumb" cable.

Maybe I'm missing something, but I feel like Lightning is just the next
Firewire without all the usefulness that FW had (low latency, dedicated bus
that wasn't USB, lots of pro audio gear that worked with it, ability to daisy-
chain, faster real-world speeds than USB, near-ubiquity before FW800 came out,
super small form factor (the 4pin is tiny; not much bigger than a lightning)).

~~~
raverbashing
My opinion: bandwidth

The lightning connector doesn't have enough bandwidth to drive a HDMI
connexion directly

Of course, compressing (inside the iPad) for streaming, sending this through a
limited bandwidth channel and then decompressing is complicated, but looks
like it's the easiest solution (because all components - especially sw ones -
are off the shelf)

It's like a mini Raspberry-pi in that adaptor, amazing! (if not slightly
overpriced)

~~~
AlexDanger
_It's like a mini Raspberry-pi in that adaptor, amazing! (if not slightly
overpriced)_

What a wonderful age we live in. How long ago was it that people doubted the
Rasberry-Pi could be delivered at such a low price?

One of those rare moments where movement to the future is evidently palpable.

~~~
jonknee
Apple could be losing a decent amount of money on each adapter sold. They can
afford to lose money on an adapter few will by (in comparison to devices
sold), especially while they're now making money on all the new 3rd party
lightning accesseries.

------
gojomo
Maybe it's a chip to prevent the cable from being used to display any 'barely
legal teens'.

------
mjs
The description on the UK Apple Store says that it "mirrors exactly what you
see on your device", so that needs adjustment, at least.

[http://store.apple.com/uk/product/MD826ZM/A/lightning-
digita...](http://store.apple.com/uk/product/MD826ZM/A/lightning-digital-av-
adapter)

~~~
Joeri
Someone isn't practiced enough at weaselwords yet. Had they said 'mirrors in
its entirety what you see on your device', they would have been accurate while
misleading, while now they're just wrong.

------
signed0
So instead of just going with USB3 like other phone manufacturers and having
native HDMI they created their own interface that results in an a picture
display with noticeable artifacts.

~~~
evan_
What's USB3 got to do with HDMI?

~~~
dangrossman
Most non-Apple smartphones have micro-USB ports for charging, and most made in
the past few years also support sending an HDMI signal through this port,
either via MHL [1] or SlimPort (notably, Nexus 4). All it takes is a $10
adapter cable rather than a $40 SoC transcoding things.

1: [http://en.wikipedia.org/wiki/Mobile_High-
Definition_Link#Mob...](http://en.wikipedia.org/wiki/Mobile_High-
Definition_Link#Mobile_devices)

~~~
jws
They also have hardware in the phone to generated HDMI (although electrically
modified to fit on the USB connector). Given that only a tiny percentage of
people will ever plug their phone into HDMI, it makes sense to have that
minority pony up $40 instead of making everyone pay an extra dollar for the
hardware they will never use.

~~~
signed0
But if they cared about cutting costs they wouldn't have invented their own
cable to begin with. When has Apple ever worried about making people pay for
things they don't use?

I'm disappointed because Lightening was billed as the next innovation in
design, but if the picture quality is worse then what's the point?

~~~
arrrg
Apple has no problem making pay – but they do have a problem making people pay
for stuff they don’t use. Nothing to do with costs per se, it’s more a
philosophical stance.

------
MBCook
Apple says the adapter can play 1080p video.

Is it possible that it could play 1080p video, but the on-device encoding is
limited to 1600x900, so can't mirror at 1080p?

------
zacharyvoase
Most cables that adapt signals from one format to another are 'active' (that
is, contain a microcontroller). c.f.:
<https://en.wikipedia.org/wiki/Active_cable>

~~~
wmf
But there's a big difference between demuxing (e.g. DisplayPort to HDMI) and
decompressing video.

------
shabble
If bored, you could try probing those various little gold test pads on the off
chance they have a debug port[1] somewhere. Then again, Apple paranoia makes
that overwhelmingly unlikely.

[1] [http://www.devttys0.com/2012/11/reverse-engineering-
serial-p...](http://www.devttys0.com/2012/11/reverse-engineering-serial-
ports/) (although JTAG is probably much more likely if anything)

------
fnordfnordfnord
>What could all of those resistors be for?

The brown ones a most likely capacitors.

~~~
mbell
The small parts are just standard 0201 size. Brown ones are MLCC caps, black
are resistors.

------
Cushman
I assume that someone is now trying to install Linux on one of these?

------
Someone
If this thing decodes the vodeo stream and gets the code the run from the iOS
device when connected, might we see a future iOS update that enables full HD,
or would the video decoder hardware be the limiting factor here?

Also, for jailbreakers: find that code, and improve it.

Finally: I find it a pity that Panic reports this now. It would have been
funny if it were published exactly one month later (or is the clock in their
CMS off by a month?)

------
alive-or-not
Very interesting investigation.

I heard somewhere that the Apple lightning cable, that comes with newer iPod,
iPhone, iPads contains a chip and we'll be very hard to replicate (by Chinese
cloners). Any insight on this?

------
senthilnayagam
It is pretty exciting to think about possibilities

* Jail break this cable, if this has some OS, use instead of raspberry Pi * is Apple bringing Android ADK style interfaces

------
mekpro
Don't be panic if the cable get kernel panic.

~~~
lostlogin
Having just spent an evening trying to sort a strange video issue which turned
out to be an intermittent issue with a component cable, the thought of this
isn't nice.

------
supercoder
I think they're way off on the theory the cable is running iOS.

I think what's most likely is the phone is putting out a h264 stream and the
chip is just decoding it. Rather than a whole ios stack & AirPlay protocol.

Sure this shares some similarities with how AirPlay works (showing a h264
stream from the device ) but wouldn't require a whole system on a chip just
for showing this feed.

~~~
userna
Actually, they're dead on. (And no, I won't corroborate that further. But it
does download a stub copy of iOS.)

~~~
pifflesnort
This provides no useful information whatsoever. I wouldn't be hugely surprised
if they wrote code to the ARM MCU (if it has 2GB of RAM to work with), but
what does "stub copy of iOS" even mean?

Also. Jimmy Hoffa is buried inside that microcontroller. I won't corroborate
this further, but this is the dead-on truth.

~~~
millerc
No need to be sarcastic. I find it interesting that somebody goes through the
trouble of creating a new user account, just to confirm a theory that nobody
could confirm without getting in trouble.

It doesn't prove anything, but it certainly fits the context. I would say the
theory (and the extra bit of information) merit being analyzed further.

FWIW, a "stub copy of iOS" would mean in this context "a copy of iOS where
every OS function is stubbed except what's necessary to run AirPlay."

~~~
micampe
_> creating a new user account_

that gives me less confidence, not more.

~~~
jacquesm
Apple has fired people over less. /. has a long standing tradition of ACs
breaking rank and posting insider stuff, I see no reason why the same couldn't
happen on HN.

------
drivebyacct2
Someone is very confused as to what "AirPlay" is. This doesn't make any sense.
AirPlay is a network protocol tied to mDNS/Bonjour. There's no way the
Lightning controller is supporting an entire network stack plus video
transcription. Calling this only half-thought-out seems generous. I thought it
was well known that these were smart cables. Thunderbolt is the same way. At
best the SoC is some sort of smarter adapter.

~~~
tptacek
You think Cabel Sasser doesn't know what Airplay is?

~~~
drivebyacct2
I honestly don't know. _Someone_ is somehow implying that the adapter is
implementing a full stack capable of being an AirPlay receiver and transcoding
video on the fly. I think Cabel is wrong or has explained what they think is
occuring incorrectly. /shrug

~~~
cabel
In this case, AirPlay is our easier-to-understand way of saying "the results
you're getting are exactly the same as when you stream iOS video using
AirPlay". (Which is really weird for a video-out dongle! Especially since the
former, non-Lightning one did proper video out.)

I've tweaked the post to make it clearer that AirPlay isn't _necessarily_ the
_exact_ mechanism being used! It could just be H.264 or MPEG or whatever.

Mostly I'd love to know exactly what this chip/system does, so if anyone here
with far more advanced hardware knowledge than any of us have feels up to
hacking around, that'd be amazing! :)

The key takeaways from the post are:

1\. It's feels unusual that a AV adapter would have a full SoC ARM-based CPU
with RAM etc, not just a video encoder/decoder chip. Is it unusual? Let me
know. :)

2\. It's a bummer that the Video Out isn't very good, and not true 1080p, and
has MPEG artifacts.

(Thanks for sharing the link.)

~~~
mbell
> Mostly I'd love to know exactly what this chip/system does, so if anyone
> here with far more advanced hardware knowledge than any of us have feels up
> to hacking around, that'd be amazing! :)

Its converting an encoded steam to HDMI output. There aren't enough pins on a
lightning connector to directly output HDMI and even if it could, you still
need a transceiver somewhere (not particularly trivial in terms of space or
power to stuff in the phone).

The SoC is most likely a little ARM core to manage stuff (Cortex-M0/3) with a
video decoder and HDMI transceiver, the 256MB of ram is there primarily for
the decoder to use. It also needs to mux the audio stream into the HDMI
encoding.

As for 'it runs iOS', your really splitting hairs, its pretty normal for the
master devise to load a slave device with its firmware when plugged in (rather
than storing the firmware in flash on the slave). The fact that they would use
some knocked down version of iOS isn't terribly surprising. Embedded versions
of more powerful OSs are used all the time; There is a non-zero chance your
stove and microwave are 'running linux'.

~~~
kalleboo
> There aren't enough pins on a lightning connector to directly output HDMI
> and even if it could, you still need a transceiver somewhere (not
> particularly trivial in terms of space or power to stuff in the phone).

MicroUSB+MHL accomplishes the same thing quite well on the current crop of
Android phones. Why Apple chose the method they did is still quite odd.

~~~
mbell
MHL is an option but it only fixes the number of pins issue. It has the same
problem as HDMI out: you need a transceiver capable of multi-Gbit data rates.
You also have to get the video output to the transceiver. Its not the easiest
thing to do inside a phone, its really not the easiest thing to do when your
next phone release is focused on 'thinner and lighter'.

Apple already made a strong commitment to AirPlay, so they already had a focus
on building a fast, smooth, low power encoder that could encode the entire
screen. Once encoded, the stream is probably only a few Mbit/s, a data rate
that can easily be transmitted with single ended protocols like SPI. Almost
all SoCs already have multiple SPI buses so no need to change any hardware.

Their solution may seem inelegant to some, but I think it is great. They
managed to support a feature with almost zero hardware costs on the core
device (depending on how you assign the lightning connector). A feature that
I'm willing to bet only a very small % of all users will ever use. That is a
big win, not having to dump extra hardware into a device that only 5% of all
users will ever activate does great things for your margin and design
flexibility.

------
nirvana
The 30 pin dock had 30 pins so it could put video out directly and things like
that.

Lightening is a SERIAL FORMAT with 9pins. So it streams audio and video out in
an encoded form.

The AV adapter, need to take that audio and video and turn it into a
standardized AV format for the AV plugs.

Now, rather than a lot of odd incompatibilities because Apple added new
features to new devices that older docks don't support, we have a common
communication format in lightening that should be much more robust going
forward.

Apple can add whatever protocols it needs over the serial connection to
support future tech, rather than the old way of redefining what some of those
30 pins meant from period to period-- remember the 30 pin connecter started
out in a time when there was firewire taking up some of those pins!

People like to ascribe nefarious purposes to Apple or claim apple is "rippng
them off" because a small computer that does digital AV conversion costs
$30... and they dont' realize that the 30 pin connector didnt' do any
conversion of formats was just bringing the signals out to a standard
connector. This one actually has to do work, which is why it has a SoC on it.

~~~
revelation
People don't realize that the 30 pin connector didn't do any conversion of
formats _because they don't care_. They want a connector, and what Apple
delivered is a power-sipping SOC that actively throws information away, given
the artifacts seen, and then upscales to 1080p because they didn't even have
enough throughput to get lossy compressed 1080p through the bus.

So yes you get your 30$ worth of components but it's horribly inferior to a 5$
adapter you can get for every other connector on the planet. It's a rip off
alright.

~~~
lostlogin
A rip off in the sense that its a crappy output, not in that they are
overcharging. I see mention that its likely making no money or actually losing
money selling this cable.

