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

After starting, PCM substream shift its state to running and applications
can move appl_ptr by several ways. When status and control data of runtime
of the PCM substream is not mapped, the applications should issue appl_ptr
to kernel land. In this case, when any PCM frames is handled by mmap
operation, the applications should issue appl_ptr to update.

This commit adds a helper function for this purpose. To avoid unexpected
change of avail_min, this commit uses a flag just to update appl_ptr.

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