]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: workaround for avoiding automatic start in mmap mode
authorTakashi Iwai <tiwai@suse.de>
Thu, 20 Aug 2009 23:18:00 +0000 (01:18 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 20 Aug 2009 23:23:08 +0000 (01:23 +0200)
commitbd5389278c96f585afcac4058420e4f3ac201d2a
tree4962fae692d6e34b6cfb5f939722b3b53baf8216
parent96da0c842d14b40ce8e37726b259229634b3aa21
pcm: workaround for avoiding automatic start in mmap mode

In the normal mmap mode, the stream isn't started automatically even after
the data >= start_threshold has been written.   However, in the
mmap-emulation mode, the stream is started because it uses
snd_pcm_write_areas() internally.

As a workaround for this inconsistency, start_threshold value is changed
dynamically in sw_parmams and mmap_commit callbacks in mmap-emul plugin.
Meanwhile, start_threshold for slave PCM is set to boundary so that only
this plugin (or the one over it) can control the start of the stream.

This will fix problems in some apps using pulse plugin in the mmap mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_mmap_emul.c