Skip to content

Conversation

@singalsu
Copy link
Collaborator

@singalsu singalsu commented Feb 1, 2022

This patch replaces the non efficient per sample fragment functions
with audio_stream_bytes_without_wrap() aided block processing.

The volume component MCPS is optimized from 24 MCPS to 8 MCPS. The
saving is similar in all s16, s24, s32 volume copy() functions.
The test was done in TGL-H platform with HiFi3 code version disabled
and with xt-xcc compiler.

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

This patch replaces the non efficient per sample fragment functions
with audio_stream_bytes_without_wrap() aided block processing.

The volume component MCPS is optimized from 24 MCPS to 8 MCPS. The
saving is similar in all s16, s24, s32 volume copy() functions.
The test was done in TGL-H platform with HiFi3 code version disabled
and with xt-xcc compiler.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
Copy link
Collaborator Author

singalsu commented Feb 1, 2022

Here's plot of copy() execution time vs. playback time for a 30s long clip. Surprisingly all the volume handlers have quite similar load.

(I checked with additional traces that in sof-hda-generic-2ch.tplg the speaker/headset PCM uses in volume component the aplay input format, that's good for this kind of formats impact testing. The DAI converts the pipeline format to DAI)

Screenshot from 2022-02-01 19-57-14

@lgirdwood
Copy link
Member

@singalsu which plots are before and after ? What's the speedup ?

@singalsu singalsu marked this pull request as ready for review February 2, 2022 14:08
@singalsu
Copy link
Collaborator Author

singalsu commented Feb 2, 2022

@singalsu which plots are before and after ? What's the speedup ?

The upper row is optimized s16/s24/s32, the bottom row is same with git main. Optimized is average 19 us and original 59-60 us per copy, so the speed up is 3.1x. or 32% of previous load.

@lgirdwood
Copy link
Member

rerun CI as CML DUT was missing.

@lgirdwood
Copy link
Member

SOFCI TEST

@lgirdwood
Copy link
Member

CI showing known "sof-logger was already dead" on some Zephyr tests. Unrelated.

@lgirdwood lgirdwood merged commit bc11c6e into thesofproject:main Feb 2, 2022
@singalsu singalsu deleted the volume_generic_buffers_access_optimize branch September 16, 2022 07:54
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.

2 participants