mirror of
https://github.com/openharmony/third_party_tinyalsa.git
synced 2026-07-19 15:24:22 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user