]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
alsa_write: Print more detailed error message.
authorAndre Noll <maan@systemlinux.org>
Fri, 30 Nov 2007 21:45:19 +0000 (22:45 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 30 Nov 2007 21:45:19 +0000 (22:45 +0100)
alsa_write.c

index 3ad8f5dfe84c5e93dfdd9e2d8d81e3fa7f7c7d22..fab886cacf777caaa51358970f5b43f081e62585 100644 (file)
@@ -184,12 +184,13 @@ static int alsa_write_post_select(__a_unused struct sched *s,
                return 1;
        ret = snd_pcm_writei(pad->handle, data, frames);
        if (ret == -EPIPE) {
-               PARA_WARNING_LOG("%s", "EPIPE\n");
+               PARA_WARNING_LOG("EPIPE\n");
                snd_pcm_prepare(pad->handle);
                return 1;
        }
        if (ret < 0) {
-               PARA_WARNING_LOG("%s", "ALSA ERROR\n");
+               PARA_WARNING_LOG("alsa error (%zu frames, ret = %d\n",
+                       frames, (int)ret);
                return -E_ALSA_WRITE;
        }
        ms2tv(pad->buffer_time / 4000, &tv);