diff options
author | Ricardo Biehl Pasquali <pasqualirb@gmail.com> | 2018-12-30 11:53:54 -0200 |
---|---|---|
committer | Ricardo Biehl Pasquali <pasqualirb@gmail.com> | 2019-01-08 13:06:18 -0200 |
commit | 535a6bac9a576b4d8553a295669a07c5609d4ab3 (patch) | |
tree | de01ce3119382456b457ce751ac96e16823901c0 /src | |
parent | c8eb9c98a65c63090de7354441528718f6390fc9 (diff) |
pcm: Get appl_ptr and avail_min after prepare
appl_ptr becomes zero in prepare action. avail_min is the
same as when it was set in software parameters.
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/pcm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1192,6 +1192,9 @@ int pcm_prepare(struct pcm *pcm) if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_PREPARE) < 0) return oops(pcm, errno, "cannot prepare channel"); + /* get appl_ptr and avail_min from kernel */ + pcm_sync_ptr(pcm, SNDRV_PCM_SYNC_PTR_APPL|SNDRV_PCM_SYNC_PTR_AVAIL_MIN); + return 0; } |