Skip to content

pal: fix playback blocked during concurrent capture and playback - #73

Open
tkanfade wants to merge 2 commits into
AudioReach:masterfrom
tkanfade:fix/ec-ref-deadlock-concurrent-streams
Open

tkanfade wants to merge 2 commits into
AudioReach:masterfrom
tkanfade:fix/ec-ref-deadlock-concurrent-streams

Conversation

@tkanfade

@tkanfade tkanfade commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

When capture is already running and playback starts, the echo
cancellation setup for the new playback stream tries to acquire
a lock that the capture thread is already holding while waiting
for DSP data. This causes the playback startup to block for
13-27 seconds resulting in muted audio at the beginning of
playback.

Fixed by using the lock-free variant of the echo reference
setup call, which is safe here since the resource manager
lock is already held preventing any concurrent access.
This is also consistent with how the same operation is
handled for the transmit stream path.

Tested on: LEMANS EVK (IQ-9075)

When capture is already running and playback starts, the echo
cancellation setup for the new playback stream tries to acquire
a lock that the capture thread is already holding while waiting
for DSP data. This causes the playback startup to block for
13-27 seconds resulting in muted audio at the beginning of
playback.

Fixed by using the lock-free variant of the echo reference
setup call, which is safe here since the resource manager
lock is already held preventing any concurrent access.
This is also consistent with how the same operation is
handled for the transmit stream path.

Tested on: LEMANS EVK (IQ-9075)

Signed-off-by: Tejas Vijay Kanfade <tkanfade@qti.qualcomm.com>
@tkanfade
tkanfade requested review from a team July 28, 2026 13:04
Signed-off-by: tkanfade <tkanfade@qti.qualcomm.com>
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