Problem
MediaController caches the PulseAudio/PipeWire card index. PipeWire may assign a different index after AirPods disconnect and reconnect, so later availability checks can query a card that no longer exists and incorrectly conclude that A2DP is unavailable.
Expected behavior
Resolve the current card by Bluetooth MAC before each A2DP activation and update the cached index used by subsequent profile operations.
Acceptance criteria
- Reconnection with a changed card index is detected without restarting the application.
- Availability checks and profile activation use the newly resolved card.
- Failure to find the card exits cleanly without operating on the stale index.
Problem
MediaController caches the PulseAudio/PipeWire card index. PipeWire may assign a different index after AirPods disconnect and reconnect, so later availability checks can query a card that no longer exists and incorrectly conclude that A2DP is unavailable.
Expected behavior
Resolve the current card by Bluetooth MAC before each A2DP activation and update the cached index used by subsequent profile operations.
Acceptance criteria