-
Notifications
You must be signed in to change notification settings - Fork 324
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
volume: fix processing size in HiFi3 implementation #81
volume: fix processing size in HiFi3 implementation #81
Conversation
[FAILED][build][SOF Firmware: sof/pr/81] 4e43d9be12451fb1e3f5e7f8fffb8a3d1704dde5 |
Can we repeat the build? |
src/audio/volume_hifi3.c
Outdated
@@ -60,7 +60,7 @@ static void vol_s16_to_s16(struct comp_dev *dev, struct comp_buffer *sink, | |||
ae_f16x4 in_sample; | |||
size_t channel; | |||
int i; | |||
int limit = source->size / (dev->params.channels << 1); | |||
int limit = cd->source_period_bytes / (dev->params.channels << 1); |
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.
is this really equivalent to the generic code?
The generic code iterations are controlled by dev->frames, here you are making a reference to the source period, is this matching?
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.
Yes, it's exactly the same as the generic code.
Previously it was incorrect, because it was using the size of the whole buffer instead of the size of currently processed period.
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.
What I was trying to say is that the code would be "more similar" if you used the same dev->frames in the loop. the source_period_bytes is derived from dev->frames, so might as well use the latter for symmetry.
The code compiles alright for APL with xt-xcc, the CI fail is likely a problem due to GCC being broken... |
do you mean the way CI use GCC is wrong or #78 ? |
the latter, GCC is broken across the board. It's been 2+ weeks this way...
… —
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#81 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGIa6y8Xmnk-eKlwoC5FqgLZVFrOkFHks5uFi8agaJpZM4VK0gW>.
|
HiFi3 implementation for volume used wrong buffer size, which caused buffer overflow. Signed-off-by: Tomasz Lauda <[email protected]>
4e43d9b
to
b56e6ac
Compare
Changed to dev->frames to be more similar to generic code. |
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.
thanks for the update, looks good to me!
compiled and tested on Up^2, no issues with volume (except for zipper noise but this is a different bug) -> merge. |
Added working demo using GStreamer Java bindings
HiFi3 implementation for volume used wrong buffer size,
which caused buffer overflow.
Signed-off-by: Tomasz Lauda [email protected]