Skip to content

Conversation

@singalsu
Copy link
Collaborator

This code is used in non-HiFi3 platforms and in all gcc builds.
The inefficient audio_stream_read/write_frag_s16/s32() usage is
replaced by block processing with help of function
audio_stream_bytes_without_wrap(). The circular buffers pointers
are checked only in the end or when one of the pointers are at end.

Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the performance improvement ?

@lgirdwood lgirdwood added this to the v2.0 milestone Nov 22, 2021
@singalsu
Copy link
Collaborator Author

@lgirdwood This version seems to fail CI in every platform before cAVS. I need to test and fix. I'm now setting up a BYT device to measure the execute speed difference.

@singalsu singalsu force-pushed the pcm_converter_generic_optimize branch from 7a51057 to 2ac1d2a Compare November 23, 2021 11:26
@singalsu
Copy link
Collaborator Author

Here's execution time for s16 to s24 conversion measured in CML platform with gcc build. I could not yet get up my BYT device where this code would be default. The execution time average dropped from 15 us to 13 us that corresponds to 6 MCPS to 5 MCPS. But since we can have potentially several instances of these running the saving can be larger.

Screenshot from 2021-11-23 14-33-51

@singalsu singalsu marked this pull request as ready for review November 23, 2021 12:38
@singalsu singalsu force-pushed the pcm_converter_generic_optimize branch from 2ac1d2a to c108e96 Compare November 26, 2021 10:46
@singalsu singalsu changed the title Audio: pcm_converter: Optimize buffers access in generic version [DO NOT MERGE]Audio: pcm_converter: Optimize buffers access in generic version Nov 26, 2021
@singalsu
Copy link
Collaborator Author

This push contains temporary disable of hifi3 code version to increase CI test coverage for this patch.

This code is used in non-HiFi3 platforms and in all gcc builds.
The inefficient audio_stream_read/write_frag_s16/s32() usage is
replaced by block processing with help of function
audio_stream_bytes_without_wrap(). The circular buffers pointers
checks and wraps are done only when necessary.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the pcm_converter_generic_optimize branch from c108e96 to 5f26007 Compare November 26, 2021 17:03
@singalsu singalsu changed the title [DO NOT MERGE]Audio: pcm_converter: Optimize buffers access in generic version Audio: pcm_converter: Optimize buffers access in generic version Nov 26, 2021
@singalsu singalsu requested a review from lyakh November 26, 2021 17:04
@gkbldcig
Copy link
Collaborator

Can one of the admins verify this patch?

@lgirdwood
Copy link
Member

CI shows logger and FW presence error unrelated to this PR.

@lgirdwood lgirdwood merged commit cb280c4 into thesofproject:main Dec 1, 2021
@singalsu singalsu deleted the pcm_converter_generic_optimize branch September 16, 2022 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants