On Fri, 23 Feb 2018 10:28:51 +0100, twischer@de.adit-jv.com wrote:
From: Timo Wischer twischer@de.adit-jv.com
if requested by the IO plugin
Without this changes an IO plugin is not able to report that buffer_size frames were read from the buffer. When the buffer was full this is a valid action and has not to be handled as an under run.
For example when the hw_ptr will be updated with hw_ptr += buffer_size and it is using the buffer_size as wrap around hw_ptr %= buffer_size would result in the same value as before the add operation.
Signed-off-by: Timo Wischer twischer@de.adit-jv.com
Hello Takashi,
If you need to improve such a situation, you'd have to fix in the ioplug implementation itself, not the jack plugin.
A have attached a patch which improves the IO plug API. If you are happy with this solution I would also adapt the pending JACK plugin patch and set the SND_PCM_IOPLUG_FLAG_BOUNDARY_WA flag.
Yep, this looks better now.
A slightly complex procedure when extending an API is that you need to check the existence of SND_PCM_IOPLUG_FLAG_BOUNDARY_WA in jack plugin side at the compilation time. Or make AM_PATH_ALSA() in alsa-utils/configure.ac aligned with this change, but it won't work until the release of alsa-lib itself.
thanks,
Takashi