Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash on audio end from IRQ, refactor A2DP #2189

Merged
merged 1 commit into from
May 31, 2024
Merged

Fix crash on audio end from IRQ, refactor A2DP #2189

merged 1 commit into from
May 31, 2024

Conversation

earlephilhower
Copy link
Owner

Fixes #2188

We get a call to stop the audio channel from a timer/IRQ context, so can't safely remove the IRQ handler for the AudioBufferManager. The SDK will panic.

Because the IRQ handler will be a noop if it's not uninstalled, we will instead just leave our shared handler in place and let it do nothing.

Use a common BluetoothLock RAII in BluetoothAudio to clen up the code and automatically lock BT for the AVRCP button methods.

Fixes #2188

We get a call to stop the audio channel from a timer/IRQ context, so can't
safely remove the IRQ handler for the AudioBufferManager.  The SDK will panic.

Because the IRQ handler will be a noop if it's not uninstalled, we will
instead just leave our shared handler in place and let it do nothing.

Use a common BluetoothLock RAII in BluetoothAudio to clen up the code and
automatically lock BT for the AVRCP button methods.
@earlephilhower earlephilhower merged commit bf38549 into master May 31, 2024
13 checks passed
@earlephilhower earlephilhower deleted the b2 branch May 31, 2024 19:15
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.

Bluetooth reconnect fails
1 participant