Skip to content

Airtame 2 & AirServer support - #32

Open
3rd3 wants to merge 14 commits into
omarroth:mainfrom
3rd3:airtame2
Open

Airtame 2 & AirServer support#32
3rd3 wants to merge 14 commits into
omarroth:mainfrom
3rd3:airtame2

Conversation

@3rd3

@3rd3 3rd3 commented Aug 15, 2026

Copy link
Copy Markdown

Summary

Adds minimal compatibility support for Airtame 2/AirServer-style receivers advertising as AppleTV5,3.

  • Uses session-first control/audio/video SETUP ordering.
  • Includes the required FairPlay key material in the relevant SETUP requests.
  • Falls back to a 1920×1080 framebuffer when /info does not advertise a display size and scales X11 capture accordingly.
  • Completes the bidirectional legacy NTP timing handshake by probing the receiver-returned timingPort and responding to subsequent timing requests.
  • Uses Linux CLOCK_BOOTTIME for the boot-relative timestamps expected by these receivers, with a portable fallback.
  • Selects raw AAC-ELD audio for affected receivers:
    • ct=7
    • audioFormat=0x1000000
    • 44.1 kHz stereo
    • 480 samples per frame
    • no redundant audio/FEC
  • Applies the negotiated audio codec to both direct and daemon streaming paths.

Open question: Device detection

Currently, the Airtame 2 is detected with the following function:

// looksLikeAirServerClone reports receivers that impersonate a first-party
// Apple TV in /info (model + CoreUtils feature bits) but omit a display list
// and do not speak CoreUtils pair-setup. AirTame 2 / AirServer answer as
// AppleTV5,3 with AirPlay/375.3 and reject modern HKP type 5 M1 with HTTP 500.
func (i *ReceiverInfo) looksLikeAirServerClone() bool {
	return i != nil &&
		i.Model == "AppleTV5,3" &&
		len(i.Displays) == 0 &&
		i.Features&featureThirdPartyReceiverMask == 0
}

However, I doubt AirPlay clients make a distinction like this. More likely, they treats all AppleTV5,3 the same. However, because I lack access to this particular Apple TV model I decided to leave this in.

Not tested: AirServer

So far, I have not tested AirServer software as a playback target itself. It is known Airtame 2 uses the AirServer for Embedded Linux, but it is not available for download. One may be able to test it with the desktop versions.

Feel free to pull this PR entirely or just use as an inspiration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant