]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: hw: add a helper function to request hwsync without side-effects
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 30 Jun 2017 11:37:26 +0000 (20:37 +0900)
committerTakashi Iwai <tiwai@suse.de>
Fri, 30 Jun 2017 14:38:32 +0000 (16:38 +0200)
commit8a3df40bce2ae3fd9e9dfdf979b2c672754e0b93
tree70ec69ee08747250706087e257af569190580f96
parent78f3165a9e82d6f5e83e0e7075cdd96b49f9f401
pcm: hw: add a helper function to request hwsync without side-effects

SNDRV_PCM_IOCTL_SYNC_PTR command for ioctl(2) with
SNDRV_PCM_SYNC_PTR_HWSYNC flag has an effect to update hw_ptr.
This is an alternative of SNDRV_PCM_IOCTL_HWSYNC but caller can get
current status simultaneously.

This commit adds a helper function just to issue hwsync. To avoid
side-effect to change appl_ptr and avail_min, this commit uses
SNDRV_PCM_SYNC_PTR_APPL and SNDRV_PCM_SYNC_PTR_AVAIL_MIN flags.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_hw.c