Skip to content

fix(audio): the Atmos output activator matches tvOS's HDMI port type - #854

Closed
chrws wants to merge 1 commit into
superuser404notfound:mainfrom
chrws:fix/atmos-activator-hdmi-port
Closed

chrws wants to merge 1 commit into
superuser404notfound:mainfrom
chrws:fix/atmos-activator-hdmi-port

Conversation

@chrws

@chrws chrws commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Summary

AtmosOutputActivator.hdmiPortType is "HDMI", but AVAudioSession.Port.HDMI.rawValue is "HDMIOutput", so since #834 no HDMI route takes the activator and APAC on tvOS plays without the silent Atmos stream. This spells it the way the session does.

Related to #848 (its pause change only takes effect once the activator runs on HDMI at all) and #834.

What changed

  • hdmiPortType is "HDMIOutput".
  • The route tests use "HDMIOutput", and a new test pins the value on every platform: portTypeMatchesTheSession only builds for iOS and tvOS, which is why the macOS run stayed green.
  • CHANGELOG entry under Unreleased.

Test plan

  • Device / OS: Apple TV 4K (3rd gen, A15), tvOS 27.0, LG CX over HDMI, Sonos Arc on the CX's eARC. Continuous Audio Connection off.
  • Source media: AV1 10-bit MKV with TrueHD Atmos, played as APAC 7.1.4 through the software path's audio renderer on a local branch; HEVC Dolby Vision 8.1 MKV with TrueHD Atmos through AVPlayer.
  • Result: before, every APAC session logged [AtmosOutputActivator] off on route ports=[HDMIOutput]; after, active on route ports=[HDMIOutput]. On the software path the Arc showed Multichannel PCM 7.1 before and Dolby Atmos after. Through AVPlayer this Arc showed Dolby Atmos without the activator, so on this sink the visible difference is the software path; the HW-Q990C case is the one AVPlayer needs it for.
  • AVAudioSession.Port.HDMI.rawValue read in a Mac Catalyst build: "HDMIOutput".
  • swift test on macOS 27: 4793 tests, one failure in Issue220SoftwareDecoderDrainTests, which fails the same way on main.

Checklist

  • CHANGELOG.md updated
  • Commit messages follow Conventional Commits
  • The fix lives in the engine, not in a host-side workaround
  • No public API change

🤖 Generated with Claude Code

AVAudioSession.Port.HDMI is "HDMIOutput", not "HDMI", so since superuser404notfound#834 no HDMI
route took the activator: every APAC session on an Apple TV 4K (3rd gen,
tvOS 27.0) logged "off on route ports=[HDMIOutput]" and played without the
silent Atmos stream. The test that compares the constant with the session's
own value builds only for iOS and tvOS, so the macOS run stayed green; the
value is now pinned there too.

Refs superuser404notfound#848, superuser404notfound#834.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
superuser404notfound pushed a commit that referenced this pull request Oct 25, 2026
…rm (#854)

portTypeMatchesTheSession only builds for iOS and tvOS, so the macOS run stayed
green while the constant was spelled "HDMI" and no HDMI route took the activator.
This pins "HDMIOutput" where there is no AVAudioSession. Taken from #854, whose
constant fix landed independently in 814fef1 (7.47.0).

Co-Authored-By: Christian Witthøft Sørensen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
@superuser404notfound

Copy link
Copy Markdown
Owner

Thank you for tracking this down, and for the A15 / Sonos Arc measurements in the test plan, they are a useful confirmation for #834.

The constant itself was fixed independently on main in 814fef1 (hdmiPortType is "HDMIOutput"), and that shipped in 7.47.0, so the source change here would now only conflict.

Your extra test closes a real gap, though: portTypeMatchesTheSession only builds for iOS and tvOS, which is exactly why the macOS run stayed green with the wrong spelling. That test is on main now as fc2a05e, with you as co-author. Closing this one as superseded.

pkajaba added a commit to pkajaba/AetherEngine that referenced this pull request Oct 25, 2026
…4notfound#854) into parity/now-playing-856-fold

Two conflicts. AtmosOutputActivator.swift: the type doc comment keeps both the software-host paragraph and the superuser404notfound#848 pause-grace paragraph; update() has one shared 'guard playing else { holdThroughPause(); return }' after the route check, covering the AVPlayer branch (playing = timeControlStatus != .paused) and the renderer branch (playing from the host transport), so the software host gets the same 60 s pause grace; pauseAfterGrace is cancelled before player.play(), release() cancels it, detach() reaches release() through follow(nil). Issue834AtmosActivatorRouteTests.swift: kept both the fold's softwareTransportTruthTable and main's portTypeIsHDMIOutput (superuser404notfound#854) pin.
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.

2 participants