Skip to content

music: add output device selection - #2056

Open
TheFallen058 wants to merge 4 commits into
coredevices:mainfrom
TheFallen058:feature/music-output-device-selection
Open

TheFallen058 wants to merge 4 commits into
coredevices:mainfrom
TheFallen058:feature/music-output-device-selection

Conversation

@TheFallen058

Copy link
Copy Markdown

Goal

Allow Pebble users to change the active Android media output directly from the Music app while preserving the existing short-press play and pause controls.

This PR implements the PebbleOS side of the feature. Android performs route discovery and transfer; PebbleOS provides the picker UI and transports requests and selections over Pebble Protocol.

Companion Android PR: coredevices/mobileapp#422

Behavior

  • advertises watch support for music output routing through the protocol capability bit
  • adds request, response, and selection commands for output routes
  • opens the output-device picker with a long press of Select in every control mode
  • preserves the existing play/pause behavior and icon for a short Select press
  • displays loading, permission, no-player, empty, and error states
  • keeps a stable atomic route snapshot while the picker is visible
  • includes the response generation in selections to prevent stale route races
  • rejects oversized and truncated route responses safely

Compatibility

The picker is available only when the connected phone advertises matching support. Existing music controls remain unchanged with older mobile apps, and no additional action-bar icon is introduced.

The complete feature requires the companion Android PR. Either side independently gates unsupported peers through Pebble Protocol capabilities.

Validation

  • PebbleOS firmware build for obelix@pvt
  • music endpoint protocol tests
  • output picker lifecycle, capability, snapshot, retry, selection, and long-press tests
  • clang-format verification
  • gitlint verification for all feature commits
  • manual route switching between phone, Bluetooth headphones, and Google Nest Mini using a Galaxy S25 and Pebble Time 2

The firmware build and focused routing tests passed locally. The complete image-comparison suite could not run locally because generated PBI/PDC fixtures were unavailable; canonical CI remains the authoritative image check.

AI disclosure

AI assistance was used for implementation and review. Usage is disclosed in the relevant commit trailers.

Add protocol support and a Music app picker for selecting phone media output routes.

Co-authored-by: GPT-5.6 Sol <noreply@openai.com>
Signed-off-by: Aliaksandr Karnilovich <alexander.karnilovich@capital.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Advertise watch support and preserve route generations through selection.
Reject malformed responses and expose an atomic snapshot to consumers.

Co-authored-by: GPT-5.6 Sol <noreply@openai.com>
Signed-off-by: Aliaksandr Karnilovich <alexander.karnilovich@capital.com>
Keep displayed routes stable until selection and open the picker with a long
Select press in every control mode. Preserve short-press play and pause.

Co-authored-by: GPT-5.6 Sol <noreply@openai.com>
Signed-off-by: Aliaksandr Karnilovich <alexander.karnilovich@capital.com>
Invalidate picker snapshots when output routing becomes unavailable. Add
configurable session capabilities and verify watch capability advertisement.

Co-authored-by: GPT-5.6 Sol <noreply@openai.com>
Signed-off-by: Aliaksandr Karnilovich <alexander.karnilovich@capital.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@gmarull
gmarull requested a review from sjp4 September 14, 2026 10:48
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