librepods-org / librepods-org/librepods
[Linux] Release AACP state before running playback takeover
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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