Skip to content

[Linux] Release AACP state before running playback takeover #684

Description

@mmatczuk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions