From b00f90ab08db5f458aae1bc0f66690b9f0e10be4 Mon Sep 17 00:00:00 2001 From: Ricardo Biehl Pasquali Date: Sat, 22 Dec 2018 12:51:21 -0200 Subject: 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 --- src/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pcm.c') 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); } -- cgit v1.2.3