Repository navigation
Optimize host copier with one less buffer copy - #6951
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, copier actually created 2 devices for data input, it is
host and copier, hence there are two times copy from DMA buffer
to local buffer then to component buffer.
This PR intend to remove host device and one more time copy
through use host data to handle host interface calling.
Basically, there are several steps to go there:
Performance data:
mcps, saved 1.9mcps, 5.9 --> 4.0, 33% saved for copier.
Before: comp:0 0x40000 perf comp_copy samples 48 period 1000 cpu avg 586 peak 598
After: comp:0 0x40000 perf comp_copy samples 48 period 1000 cpu avg 408 peak 422
memory, since host endpoint buffer and host device got removed, for each copier,
16bit/32bit 384/768 bytes saved for buffer, 112 saved for host device.
As a summary, 16/32 bit playback/capture totally saved 496/884 bytes for each copier usage.
For the cases that have more than 10 copier usage, memory saving is quite remarkable.
Note:multiple sink host copier is not tested and will be fixed in a follow up dai optimization PR.
Signed-off-by: Baofeng Tian baofeng.tian@intel.com