https://bugs.freedesktop.org/show_bug.cgi?id=96361
Bug ID: 96361
Summary: [NEED]Try recover from snd_pcm_avail() -EPIPE
Product: PulseAudio
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: alsa
Assignee: pulseaudio-bugs@lists.freedesktop.org
Reporter: cunshangzhi...@gmail.com
QA Contact: pulseaudio-bugs@lists.freedesktop.org
CC: lenn...@poettering.net
ALSA sink has been unloaded due to process_rewind() return -1.
"alsa-sink.c: process_rewind(1754) > [alsa-sink-Multimedia1 (*)]
snd_pcm_avail() failed: Broken pipe"
"sink.c: sink_free(843) > [pulseaudio] Freeing sink 2
"alsa_output.0.analog-stereo""
"module.c pa_module_free(183) > [pulseaudio] unloaded "module-alsa-sink"
(index: #15)"
Actually, sometimes we may meet snd_pcm_avail() -EPIPE from process_rewind,
pa_alsa_safe_avail. But how about do recover for this error case instead of
return error and unload sink?
I've tried make a patch for this issue. But I'm not sure about this is a proper
solution. Please give me your opinion. Thank you.
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));
#ifdef RECOVER_FROM_EPIPE
/* try recover if we got -EPIPE from snd_pcm_avail */
if (unsed == -EPIPE) {
pa_log("snd_pcm_avail() failed of -EPIPE. Try recover!!!");
if (try_recover(u, "process_rewind", unused) < 0)
return -1;
else {
pa_log_info("Tried rewind, but was apparently not possible.");
pa_sink_process_rewind(u->sink, 0);
return 0;
}
}
#endif
return -1;
}
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
_______________________________________________
pulseaudio-bugs mailing list
pulseaudio-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs