aboutsummaryrefslogtreecommitdiff
path: root/src/pcm.c
diff options
context:
space:
mode:
authorRicardo Biehl Pasquali <pasqualirb@gmail.com>2018-08-21 14:42:23 -0300
committerRicardo Biehl Pasquali <pasqualirb@gmail.com>2019-01-08 13:06:18 -0200
commit13e11fea99849b34ba4fe2f06475c71c81fd8e59 (patch)
tree4bd0733701670089c00ed3e3ce7241ece6bc6802 /src/pcm.c
parentf85cf62763b170698a91a7dd176695b581dbe358 (diff)
pcm: Remove start before read
Start is done by kernel when start_threshold or more frames are requested. Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
Diffstat (limited to 'src/pcm.c')
-rw-r--r--src/pcm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pcm.c b/src/pcm.c
index b02883f..3900ee6 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -752,9 +752,7 @@ int pcm_readi(struct pcm *pcm, void *data, unsigned int frame_count)
x.frames = frame_count;
x.result = 0;
for (;;) {
- if ((!pcm->running) && (pcm_start(pcm) < 0))
- return -errno;
- else if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_READI_FRAMES, &x)) {
+ if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_READI_FRAMES, &x)) {
pcm->prepared = 0;
pcm->running = 0;
if (errno == EPIPE) {