summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polyp/module-oss.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/polyp/module-oss.c b/polyp/module-oss.c
index d060b489..12cedf19 100644
--- a/polyp/module-oss.c
+++ b/polyp/module-oss.c
@@ -368,6 +368,15 @@ int pa__init(pa_core *c, pa_module*m) {
pa_modargs_free(ma);
+ /*
+ * Some crappy drivers do not start the recording until we read something.
+ * Without this snippet, poll will never register the fd as ready.
+ */
+ if (u->source) {
+ char buf[u->sample_size];
+ read(u->fd, buf, u->sample_size);
+ }
+
return 0;
fail: