Skip to content

firmware: add --no-audio build flag to keep audio on the iPhone - #180

Merged
onehumanbeing merged 1 commit into
onehumanbeing:mainfrom
huisinro:feat/no-airplay-audio
Nov 22, 2026
Merged

onehumanbeing merged 1 commit into
onehumanbeing:mainfrom
huisinro:feat/no-airplay-audio

Conversation

@huisinro

Copy link
Copy Markdown

Adds an optional --no-audio flag (-DNO_AIRPLAY_AUDIO=1) to hardware/flash.sh so the AirPlay receiver advertises video mirroring only and leaves audio playback on the iPhone speaker.

Changes

  • hardware/hid_bridge/src/airplay/ap_internal.h: clear SupportsAudio (bit 9), AudioRedundant (bit 10), and AudioFormats 0..3 (bits 18..21) in AP_FEATURES when NO_AIRPLAY_AUDIO is defined.
  • hardware/hid_bridge/src/airplay/mdns.c: skip advertising _raop._tcp when NO_AIRPLAY_AUDIO is defined.
  • hardware/hid_bridge/src/airplay/handlers.c: omit initialVolume, audioFormats, and audioLatencies in GET /info when NO_AIRPLAY_AUDIO is defined.
  • hardware/flash.sh: add --no-audio build option.

Default builds (without --no-audio) are completely unchanged, preserving AirPlay audio forwarding for the app's listening feature.

Testing

  • Built both hardware/flash.sh --build-only and hardware/flash.sh --no-audio --build-only cleanly.
  • Verified scripts/check-public.sh.
  • Flashed --no-audio onto a Seeed Studio XIAO ESP32-S3 and verified on iPhone with Screen Mirroring + YouTube: video mirrors normally while audio plays on the iPhone speaker.

Adds an optional --no-audio flag (-DNO_AIRPLAY_AUDIO=1) to hardware/flash.sh
so the AirPlay receiver advertises video mirroring only:
- clears SupportsAudio, AudioRedundant, and AudioFormats bits in AP_FEATURES
- skips _raop._tcp mDNS advertising
- omits initialVolume, audioFormats, and audioLatencies in GET /info

Tested on XIAO ESP32-S3 with iPhone Screen Mirroring + YouTube: video mirrors
normally while audio stays on the iPhone speaker.
@onehumanbeing
onehumanbeing merged commit 97f116a into onehumanbeing:main Nov 22, 2026
5 checks passed
@onehumanbeing

Copy link
Copy Markdown
Owner

Thanks a lot @huisinro, really appreciated! This is a clean, well-scoped change: the default build stays exactly as it was, and the feature bits you cleared are the right ones. Thanks for testing it on a real XIAO too.

Merged. Happy to review more if you have other ideas!

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