~vcs-imports/alsa-plugins/trunk

Viewing all changes in revision 289.

  • Committer: Takashi Iwai
  • Author(s): Timo Wischer
  • Date: 2018-03-16 14:27:00 UTC
  • Revision ID: git-v1:a08336cd889512dd3f1060c68724ab81f15fb21c
jack: Report Xruns to user application

Only increasing the hw_ptr is not sufficient
because it will not be evaluated by the ALSA library
to detect an Xrun.

In addition there is a raise where an Xrun detected by the JACK thread
could not be detected in the ALSA thread.
- In playback use case
- The hw_ptr will be increased by the JACK thread
  (hw_ptr > appl_ptr => Xrun)
- But the ALSA thread increases the appl_ptr before evaluating the
hw_ptr
- Therefore the hw_ptr < appl_ptr again
- ALSA will not detect the Xrun which was already detected by the
JACK thread

Therefore an additional variable is required to report an Xrun from the
JACK thread to ALSA.

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: