]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: hw: add a helper function to issue avail_min without side-effects
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 30 Jun 2017 11:37:28 +0000 (20:37 +0900)
committerTakashi Iwai <tiwai@suse.de>
Fri, 30 Jun 2017 14:39:11 +0000 (16:39 +0200)
commitcea81cbdc2e7be344a34992ad6adef451a759840
tree9498c080851cb24f812c936bcdaa7b7fe19ee20d
parentde9fe69e40e6b705aeae9aa8d1408736d4a1e563
pcm: hw: add a helper function to issue avail_min without side-effects

At present, applications can change avail_min parameter of PCM substream
by two ways; via mapped control data, and by executing ioctl(2) with
SNDRV_PCM_IOCTL_SYNC_PTR. The former is available in a case that the
applications map the data successfully.

When utilizing alsa-lib API, the above is done by a call of
'snd_pcm_sw_params()' to hw PCM plugin. In current implementation, this
call has an side-effect to issue appl_ptr unexpectedly.

This commit adds a helper function to issue avail_min without the
side-effect.

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