aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRicardo Biehl Pasquali <pasqualirb@gmail.com>2018-08-20 19:46:56 -0300
committerRicardo Biehl Pasquali <pasqualirb@gmail.com>2019-01-08 13:06:18 -0200
commit5f247ef8d5ef39922dde2e2f12c7a2ab7393d34b (patch)
tree1822618f5312b654c459834e6e4ef453d77f357e /src
parent7c40a9ecde0150049bf1b04a9fbf0fd437c16043 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/pcm.c6
1 files changed, 0 insertions, 6 deletions
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;