From 5f247ef8d5ef39922dde2e2f12c7a2ab7393d34b Mon Sep 17 00:00:00 2001 From: Ricardo Biehl Pasquali Date: Mon, 20 Aug 2018 19:46:56 -0300 Subject: pcm: Remove code assuming start after write The state cannot be assumed as RUNNING after a write because start_threshold may not have elapsed. Signed-off-by: Ricardo Biehl Pasquali --- src/pcm.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/pcm.c') diff --git a/src/pcm.c b/src/pcm.c index 43e8279..7dec5f7 100644 --- a/src/pcm.c +++ b/src/pcm.c @@ -703,12 +703,6 @@ int pcm_writei(struct pcm *pcm, const void *data, unsigned int frame_count) x.frames = frame_count; x.result = 0; for (;;) { - if (!pcm->running) { - if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_WRITEI_FRAMES, &x)) - return oops(pcm, errno, "cannot write initial data"); - pcm->running = 1; - return x.result; - } if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_WRITEI_FRAMES, &x)) { pcm->prepared = 0; pcm->running = 0; -- cgit v1.2.3