projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
132ab6b
)
alsa_write: Handle EPIPE errors properly.
author
Andre Noll
<maan@systemlinux.org>
Thu, 5 Mar 2009 21:05:22 +0000
(22:05 +0100)
committer
Andre Noll
<maan@systemlinux.org>
Thu, 5 Mar 2009 21:05:22 +0000
(22:05 +0100)
There's no need to throw away the data if a buffer underrun occurs.
Just try to write the same data again after the snd_pcm_prepare().
alsa_write.c
patch
|
blob
|
history
diff --git
a/alsa_write.c
b/alsa_write.c
index b10d5c62faa910dc92757e4ce77afc818c0a676a..f016e6ff74aeb16dcc764d0b482764e347fd60b1 100644
(file)
--- a/
alsa_write.c
+++ b/
alsa_write.c
@@
-181,6
+181,8
@@
static int alsa_write_post_select(__a_unused struct sched *s,
if (ret == -EPIPE) {
PARA_WARNING_LOG("EPIPE\n");
snd_pcm_prepare(pad->handle);
+ /* try to write the same data again */
+ ret = snd_pcm_writei(pad->handle, data, frames);
return 1;
}
if (ret < 0 && ret != -EAGAIN) {