When configuring avail_min to multiple of slave period size it can happen that user waits one slave period longer than needed for available data. Root cause is implicit grabbing of slave samples in avail_update operation. On next entering poll, the slave will wait for the avail_min threshold reached again, as he is not aware that there are already pending samples in the above layer which are not yet provided to user. Solution is to dynamically adapt the avail_min on the slave.
Andreas Pape (2): plugin: dynamically update avail_min on slave rate: dynamic update avail_min on slave
src/pcm/pcm_plugin.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- src/pcm/pcm_plugin.h | 3 +++ src/pcm/pcm_rate.c | 2 +- 3 files changed, 51 insertions(+), 2 deletions(-)