diff options
Diffstat (limited to 'pcm.c')
-rw-r--r-- | pcm.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -378,8 +378,12 @@ int pcm_write(struct pcm *pcm, const void *data, unsigned int count) if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_WRITEI_FRAMES, &x)) { pcm->running = 0; if (errno == EPIPE) { - /* we failed to make our window -- try to restart */ + /* we failed to make our window -- try to restart if we are + * allowed to do so. Otherwise, simply allow the EPIPE error to + * propagate up to the app level */ pcm->underruns++; + if (pcm->flags & PCM_NORESTART) + return -EPIPE; continue; } return oops(pcm, errno, "cannot write stream data"); |