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 <pasqualirb@gmail.com>
This commit is contained in:
Ricardo Biehl Pasquali
2018-08-20 19:46:56 -03:00
parent 30a18cbb52
commit 447f8ff75f
-6
View File
@@ -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;