Ticket #616 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[PATCH] Recover stream when it's suspended upon rewind

Reported by: lkundrak Owned by: lennart
Milestone: 0.9.16 Component: module-alsa-*
Keywords: Cc:

Description

Error from snd_pcm_rewind() might mean we just woke up from suspend and didn't have a chance to try to recover the stream since we didn't write to it in between. Call try_recover() in such cases.

Note that for this to work kernel must return ESTRPIPE instead of EBADF for rewind/forward attempts on suspended streams, so that snd_pcm_recover() can recognize it should snd_pcm_resume() the stream. This is not the case yet (2.6.31-rc5), patch is available.

Attachments

0001-Recover-stream-when-it-s-suspended-upon-rewind.patch (2.0 kB) - added by lkundrak 3 years ago.
Recover stream when it's suspended upon rewind
0001-Tell-user-that-stream-to-be-rewound-is-suspended.patch (2.1 kB) - added by lkundrak 3 years ago.
This is the kernel part - just for illustration, it has already been submitted to lkml & alsa-devel, just seems to be pending in greylist now

Change History

Changed 3 years ago by lkundrak

Recover stream when it's suspended upon rewind

Changed 3 years ago by lkundrak

This is the kernel part - just for illustration, it has already been submitted to lkml & alsa-devel, just seems to be pending in greylist now

Changed 3 years ago by lennart

Merged the PA patch. However I assume the check in try_recover() should actually compare with ESTRPIPE and not EBADFD, right? Otherwise the kernel patch would not match up with this PA patch, or am I blind?

Changed 3 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed
  • component changed from daemon to module-alsa-*

OK, fixed the EBADFD/ESTRPIPE mixup now in git.

Thanks for the patch!

Note: See TracTickets for help on using tickets.