Repository navigation
Audio: Volume: Add HiFi5 implementation. - #9419
Conversation
|
This is a new merge conflicts fixed version of Andrula's #8900. I've run this successfully in testbench HiFi5 environment with 48 kHz and 44.1 kHz rates with s16 and s32 formats. Though testbench is currently IPC3, so the test didn't exercise IPC4 code parts. |
There was a problem hiding this comment.
Should this come from Kconfig ?
i.e. The selection of HiFi3, HIFI4, HIFI5, AVX etc would set a generic CONFIG_FRAME_BYTE_ALIGN macro that could be used everywhere ?
9e4ec96 to
394c08d
Compare
There was a problem hiding this comment.
@lgirdwood I don't remember from where this align requirement for 6ch comes from. There was no discussion that I could find for it in #5266. Is it specific to peakvolume or generic for loading/storing the format in 64 bit or 128 bit chunks. If internal to peakvolume, then this SOF_FRAME_BYTE_ALIGN_6CH in common.h would make no sense.
394c08d to
69e2d33
Compare
There was a problem hiding this comment.
If this is bytes we should state in the comments next to the definition. Should never be 1 if bytes.
There was a problem hiding this comment.
I think one is the default if it's not set to be free to provide any number of frames, but it makes no sense as align constraint. Also Above I think the #if SOF_MAX_XCHAL_HIFI == NONE could be left out as redundant. These could be before this a macros section for SSE or AVX specific definitions.
There was a problem hiding this comment.
I'll move this 6ch specific definition into volume, I can't see generally how 6ch alignement would be a special case. Every word length, channels count has some number of frames that is not matching align with 8 or 16 bytes / 64 or 128 bits.
There was a problem hiding this comment.
maybe we can converge one way or another - with or without a space in "HiFi.N"
There was a problem hiding this comment.
Yep, changing to without space.
There was a problem hiding this comment.
this loop can be replaced with a single memcpy() and you've found out that the loop is faster?.. Interesting, then we have a problem with our memcpy()
There was a problem hiding this comment.
It was a finding by Andrula that I haven't verified.
There was a problem hiding this comment.
although it looks like it wouldn't be a single memcpy(), but a loop of them. So you actually mean that 4 assignments are faster than a memcpy()? That would be logical
There was a problem hiding this comment.
I can remove the comment to avoid it to confuse. It's most of use cases just two channels. Especially with recommended memcpy_s() there is more overhead.
There was a problem hiding this comment.
is this really supposed to be a doxygen comment? More below
There was a problem hiding this comment.
Fixed in next version
There was a problem hiding this comment.
"once?" Did you mean "per iteration?"
69e2d33 to
07df9a2
Compare
07df9a2 to
5b345b7
Compare
kv2019i
left a comment
There was a problem hiding this comment.
Only minor notes, looks good!
There was a problem hiding this comment.
Comment says "PCM samples" which is a bit misleading as this is alignment in bytes (as tge define name says, FRAME_BYTE).
There was a problem hiding this comment.
Oops yes, it looks quite confusing.
There was a problem hiding this comment.
I added commit to fix same typos in HiFi3 and HiFi4 versions.
Add HiFi5 implementation of volume functions, compared with HiFi3 version, can reduce about 28% cycles. Signed-off-by: Andrula Song <[email protected]> Signed-off-by: Seppo Ingalsuo <[email protected]>
Changed adsress -> address, also the comments are edited to avoid to be mistaken as Doxygen. Signed-off-by: Seppo Ingalsuo <[email protected]>
5b345b7 to
1050ffc
Compare
|
sof-docs fail and Intel LNL fails all known and tracked in https://github.com/thesofproject/sof/issues?q=is%3Aissue+is%3Aopen+label%3ACI |
Add HiFi5 implementation of volume functions, compared with HiFi3 version, can reduce about 28% cycles.