Skip to content

Conversation

@andrula-song
Copy link
Contributor

This patch replaces the audio stream read/write frag based
access to source and sink by block processing based on
audio_stream_bytes_without_wrap() bytes count.

Test all platform first.

Signed-off-by: Andrula Song xiaoyuan.song@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.

@andrula-song do you have a before and after MCPS value to show as why this should be merged ?

@andrula-song
Copy link
Contributor Author

hi @lgirdwood , the specific platforms's statistic have not been measured yet. but by the xtensa simulation testbench Seppo sent me, the cycles the processing function spent would reduce about 25% than now. In this way, there would only be one circular buffer, we only set the begin and end address once in processing function rather than 3 times in every for loop in processing function. I want to make sure there are no other potential bugs before giving specific measurements.

@andrula-song
Copy link
Contributor Author

from the xtensa test bench, after this optimization, each format reduce many the cycles the scale_vol function cost.
the optimized result is:
opt

the original result is:
org

for S16 format, opt version cost 4281000 cycles, the original version cost 5751000 cycles, reduce about 25% cycles
for S24 format, opt version cost 5899500 cycles, the original version cost 8985000 cycles, reduce about 34% cycles
for S32 format, opt version cost 6760500 cycles, the original version cost 9777000 cycles, reduce about 30% cycles

@lgirdwood
Copy link
Member

@singalsu good for you ?

Copy link
Collaborator

@singalsu singalsu left a comment

Choose a reason for hiding this comment

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

Great that this idea worked. Good work!

@lgirdwood
Copy link
Member

@andrula-song any reason why this is still draft ?

@andrula-song andrula-song marked this pull request as ready for review March 4, 2022 13:30
@andrula-song
Copy link
Contributor Author

@andrula-song any reason why this is still draft ?
should I change the commit message to include those optimization info?

This patch replaces the audio stream read/write frag based
access to source and sink by block processing based on
audio_stream_bytes_without_wrap() bytes count. In this way,
the copy and scale volume function can reduce about 25%
cycles for S16, 34% for S24 and 30% for S32.

Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
@andrula-song
Copy link
Contributor Author

SOFCI TEST

@lgirdwood
Copy link
Member

@plbossart @bardliao CI showing a SDW timeout and a rt711 jack timeout on PM test.
https://sof-ci.01.org/sofpr/PR5452/build12228/devicetest/?model=TGLU_RVP_SDW&testcase=check-suspend-resume-with-playback-5
Should be unrelated to this PR, any ideas ?

@bardliao
Copy link
Collaborator

bardliao commented Mar 7, 2022

@plbossart @bardliao CI showing a SDW timeout and a rt711 jack timeout on PM test. https://sof-ci.01.org/sofpr/PR5452/build12228/devicetest/?model=TGLU_RVP_SDW&testcase=check-suspend-resume-with-playback-5 Should be unrelated to this PR, any ideas ?

@lgirdwood It is unrelated to this PR. See thesofproject/linux#3459

@lgirdwood
Copy link
Member

@kkarask @wszypelt looks like CI may be blocked ?

@miRoox
Copy link

miRoox commented Mar 9, 2022

SOFCI TEST

@andrula-song
Copy link
Contributor Author

the failure items is unrelated with this PR, because daily test exist, too.

@lgirdwood lgirdwood merged commit 39205fb into thesofproject:main Mar 9, 2022
@andrula-song andrula-song deleted the vol-opt2 branch March 23, 2022 09:05
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.

5 participants