Uh oh!
There was an error while loading. Please reload this page.
ring_buffer: Increase buffer size to prevent a DP module starvation - #9724
Conversation
Increase buffer size to 3 times max_ibs_obs to prevent starving a DP module that process different block sizes in different periods (44.1 kHz case). Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
tmleman
left a comment
There was a problem hiding this comment.
LGTM
Nice description btw.
| * in the output signal. To resolve this situation and allow the module to process | ||
| * correctly, it is necessary to allocate a buffer three times larger than max_ibs_obs. | ||
| */ | ||
| ring_buffer->data_buffer_size = 3 * max_ibs_obs; |
There was a problem hiding this comment.
I was left wondering should this be configurable given this corner case is only hit with specific pipelines (like the SRC case given as example). OTOH, the default should be safe, so I think this PR makes sense at this point and optimization (if needed) can come later.
There was a problem hiding this comment.
@kv2019i My proposition was that the module should declare if it needs any data retention between cycles. It would also make possible using a shared memory space as a buffer - a module always consume 100% data if no retention is needed, leaving a buffer empty ==> memory may be used for other purposes.
Increase buffer size to 3 times
max_ibs_obsto prevent starving a DP module that process different block sizes in different periods (44.1 kHz case). The full description has been added as a comment in the source code.