librepods-org / librepods-org/librepods

[Linux] Release AACP state before running playback takeover

Open
#684 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
29.9k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Problem

The playback listener holds the AACP state mutex while activating the A2DP profile and sending takeover packets. Profile discovery and WirePlumber recovery can take several seconds, blocking incoming AACP events and queued control commands. The takeover send path also needs the same mutex, which can prevent progress when connected-device notifications are present.

Expected behavior

Read the required ear-detection and connected-device values into a snapshot, release the AACP state guard, and only then perform profile activation and takeover sends.

Acceptance criteria

  • No AACP state guard is held across A2DP activation or packet-send awaits.
  • Incoming AACP state updates remain able to proceed during profile recovery.
  • Playback takeover uses a consistent snapshot of the values that triggered it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the playback listener and trace the AACP state guard through A2DP profile activation and takeover packet sends. Verify that ear-detection and connected-device values are captured before releasing the guard, then confirm incoming AACP updates can proceed during recovery and that takeover uses one consistent snapshot.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.