-
Notifications
You must be signed in to change notification settings - Fork 349
Audio: DRC: Optimize source buffer read and sink buffer write #5489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio: DRC: Optimize source buffer read and sink buffer write #5489
Conversation
|
The saving with default DRC configuration was measured from copy() function with added traces to measure execution time. The first test is for normal processing mode and stereo 48 kHz playback stream. The upper row shows execution times with optimized code for s16/s24/s32 formats. The lower row is the same with original version. Based on average execution time the MCPS for optimized are 49.6, 48.8, and 48.8. The MCPS for original are 68.0, 67.6, and 67.2. The saving is 18.4 - 18.8 MCPS. Note: The processing time for DRC varies a lot during first 10s time and then continues with nearly constant processing time near average. |
|
@johnylin76 I have checked the optimization with binary compare of testbench output for original vs. optimized and process_test('drc', 16, 16) (24 and 32 as well). I'll still redo the test for final version and listen some music in s16/s24/s32 formats before turning this to non-draft (to hear if there are glitches). |
5a6408f to
bbe51cd
Compare
|
@cujomalainey @johnylin76 some DRC savings. |
|
Thanks for the great effort!! |
|
CI has license server timeout. Rerun CI |
|
SOFCI TEST |
|
@lgirdwood thanks for notification, CI tests already passed. |
|
@singalsu can you fix the conflict. Thanks |
|
Can one of the admins verify this patch? |
|
@singalsu can you fix the conflict. |
src/include/sof/audio/drc/drc.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this feels generic enough to be in audio_stream.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. I think I'll change this to use audio_stream_samples_without_wrap_sXX() functions those I did after this PR, it will look a bit cleaner.
|
@singalsu ping |
This patch replaces the audio_stream_read/write_frag_s16/s32 functions based source buffer read and sink buffer write with audio_stream_bytes_without_wrap() based blocks access. The drc_s16/s24/s32_default processing functions are simplified by move of common delay input sample operation to separate function. The same function is used in DRC disabled and enabled part of processing functions. The pass-through mode is optimized with generic audio_stream_copy() that is a common function for all s16/s24/s32 formats. The MCPS savings are in TGL-H for stereo 48 kHz stream - Normal operation 68 to 50 MCPS, saving 18 MCPS - Pass-through without delay 22 to 6 MCPS, saving 16 MCPS - Pass-through with delay 21 to 7 MCPS, saving is 14 MCPS Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch enables testing of DRC in HDA generic devices by adding it to headset/speaker pipeline after mixer. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
bbe51cd to
29cba70
Compare
lkoenig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really nice change. Thanks you.
cujomalainey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review, LGTM



No description provided.