We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b112f80 commit 816a488Copy full SHA for 816a488
1 file changed
playback/src/audio_backend/alsa.rs
@@ -447,8 +447,11 @@ impl Sink for AlsaSink {
447
// on a Prepared-state USB PCM can deadlock the kernel driver
448
// (confirmed on Raspberry Pi 3 with the dwc_otg USB controller).
449
// In that case, dropping the PCM is sufficient to release resources.
450
- if pcm.state() == State::Running {
+ let state = pcm.state();
451
+ if state == State::Running {
452
pcm.drain().map_err(AlsaError::DrainFailure)?;
453
+ } else {
454
+ debug!("PCM not in Running state ({state:?}), skipping drain and dropping PCM");
455
}
456
457
0 commit comments