aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRicardo Biehl Pasquali <pasqualirb@gmail.com>2018-12-22 12:51:21 -0200
committerRicardo Biehl Pasquali <pasqualirb@gmail.com>2019-01-08 13:06:19 -0200
commitb00f90ab08db5f458aae1bc0f66690b9f0e10be4 (patch)
tree67cce0898514a47d1ef9a30ba3309b3e233cad88 /src
parentc1446758c76a8319382aad3b56df09c45d51bba4 (diff)
pcm: Get values from kernel in avail_update
Instead of sending appl_ptr and avail_min to the kernel, get them. This is the behavior of alsa-lib. Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcm.c b/src/pcm.c
index 4bc86aa..3a8d4e9 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -1325,7 +1325,7 @@ int pcm_mmap_commit(struct pcm *pcm, unsigned int offset, unsigned int frames)
int pcm_avail_update(struct pcm *pcm)
{
- pcm_sync_ptr(pcm, 0);
+ pcm_sync_ptr(pcm, SNDRV_PCM_SYNC_PTR_APPL|SNDRV_PCM_SYNC_PTR_AVAIL_MIN);
return pcm_mmap_avail(pcm);
}