sof icon indicating copy to clipboard operation
sof copied to clipboard

Audio: Rename audio stream read/write frag functions with prefix deprecated

Open andrula-song opened this issue 3 years ago • 2 comments

The purpose of this patch is to highlight and discourage use of not efficient audio stream functions.(the subsequent to PR #5726)

The functions audio_stream_read_frag_s16/32() and audio_stream_write_frag_s16/32() cause high processing load when used for every sample in copy() processing. This patch renames the poor performing function usages with prefix deprecated.

The valid use of the same functions is enabled with renamed function audio_stream_read/write_initial_frag_s16/32(). It is acceptable use to get a buffer pointer once before the samples processing.

Signed-off-by: Andrula Song [email protected]

andrula-song avatar Jun 13 '22 09:06 andrula-song

No need to rename, lets use the deprecated compiler attribute. https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html#:~:text=The%20deprecated%20attribute%20results%20in,future%20version%20of%20a%20program.

I tried this, but those warings would be treated as errors and can not pass the compilation. Maybe I can keep this commit to record the modification process.

andrula-song avatar Jun 14 '22 05:06 andrula-song

No need to rename, lets use the deprecated compiler attribute. https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html#:~:text=The%20deprecated%20attribute%20results%20in,future%20version%20of%20a%20program.

I tried this, but those warings would be treated as errors and can not pass the compilation. Maybe I can keep this commit to record the modification process.

ok, we will need to fix any remaining users of the frag first.

lgirdwood avatar Jun 14 '22 08:06 lgirdwood

Can one of the admins verify this patch?

gkbldcig avatar Feb 18 '23 04:02 gkbldcig