[pulseaudio-commits] src/modules
Arun Raghavan
arun at kemper.freedesktop.org
Fri Nov 13 20:22:19 PST 2015
src/modules/alsa/alsa-sink.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit f621aa5e2c04ff8bc63d5f10447130cfb6bf435d
Author: Zbigniew KempczyĆski <z.kempczynsk at samsung.com>
Date: Tue Nov 10 07:51:46 2015 +0100
alsa-sink: Avoid unloading alsa-sink module before calling try_recover()
This fixes rare condition when pulseaudio client tries to rewind,
but a device previously reached underrun and was changed to XRUN state.
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index b6c7d09..476188c 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1628,8 +1628,10 @@ static int process_rewind(struct userdata *u) {
pa_log_debug("Requested to rewind %lu bytes.", (unsigned long) rewind_nbytes);
if (PA_UNLIKELY((unused = pa_alsa_safe_avail(u->pcm_handle, u->hwbuf_size, &u->sink->sample_spec)) < 0)) {
- pa_log("snd_pcm_avail() failed: %s", pa_alsa_strerror((int) unused));
- return -1;
+ if (try_recover(u, "snd_pcm_avail", (int) unused) < 0) {
+ pa_log_warn("Trying to recover from underrun failed during rewind");
+ return -1;
+ }
}
unused_nbytes = (size_t) unused * u->frame_size;
More information about the pulseaudio-commits
mailing list