Skip to content

Audio: Volume: Fix problem with Hifi4#9408

Merged
lgirdwood merged 1 commit intothesofproject:mainfrom
singalsu:volume_hifi4_s16_441_fix
Sep 2, 2024
Merged

Audio: Volume: Fix problem with Hifi4#9408
lgirdwood merged 1 commit intothesofproject:mainfrom
singalsu:volume_hifi4_s16_441_fix

Conversation

@singalsu
Copy link
Collaborator

This patch fixes an issue with gain and peakvolume processing with s16 sample format and with sample rates where period is not multiple of four samples SIMD processing assumption. With 44.1 kHz rate the period is normally 44 frames but every 10th is 45. However, the value of 45 was not handled correctly. A Glitch appeared to output when this happened.

The fixed code adds sample-by-sample volume process code for the remaining amount of up to 3 samples to process.

The earlier workaround (87571f3 "audio: volume: disable HIFI4 optimizations") is reverted.

@singalsu singalsu requested a review from gbernatxintel August 26, 2024 16:05
@singalsu
Copy link
Collaborator Author

This patch continues fixing the issues from work in #9158. Need to fix for both gain and peakvolume the normal and pass-through mode code versions.

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

One question inline, otherwise looks good.

This patch fixes an issue with gain and peakvolume processing
with s16 sample format and with sample rates where period is not
multiple of four samples SIMD processing assumption. With 44.1 kHz
rate the period is normally 44 frames but every 10th is 45. However,
the value of 45 was not handled correctly. A Glitch appeared to
output when this happened.

The fixed code adds sample-by-sample volume process code for the
remaining amount of up to 3 samples to process.

The earlier workaround (87571f3 "audio: volume: disable HIFI4
optimizations") is reverted.

Signed-off-by: Grzegorz Bernat <grzegorzx.bernat@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the volume_hifi4_s16_441_fix branch from 5905e05 to 880e71a Compare August 27, 2024 12:33
@singalsu singalsu requested a review from kv2019i August 27, 2024 14:08
@lgirdwood lgirdwood merged commit 39ace34 into thesofproject:main Sep 2, 2024
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.

4 participants