alsa: Increase timeout on eof to 20ms.
authorAndre Noll <maan@systemlinux.org>
Wed, 13 Jan 2010 03:58:19 +0000 (04:58 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 13 Jan 2010 03:58:19 +0000 (04:58 +0100)
alsa_write.c

index 8e3688f..27a8db3 100644 (file)
@@ -177,8 +177,8 @@ static int alsa_write_pre_select(struct sched *s, struct writer_node *wn)
                if (ret == 0)
                        return 1;
                if (ret < 0) {
-                       underrun = 10;
-                       goto timeout;
+                       sched_request_timeout_ms(20, s);
+                       return 42;
                }
        } else {
                if (*wng->loaded - wn->written < pad->bytes_per_frame)
@@ -202,7 +202,6 @@ static int alsa_write_pre_select(struct sched *s, struct writer_node *wn)
        if (underrun < 50)
                underrun = 50;
        underrun -= 50;
-timeout:
        ms2tv(underrun, &tv);
        if (tv_diff(&s->timeout, &tv, NULL) > 0)
                s->timeout = tv;